From 151ad3d0e2ac83ccc729131d6c6a7bdd1a36f81f Mon Sep 17 00:00:00 2001 From: Jonathan Wenger Date: Tue, 29 Jul 2025 08:27:47 -0700 Subject: [PATCH] 25.8.0 --- README.md | 115 +- docs/A1099/V2/CompaniesW9Api.md | 36 +- .../V2/CoveredIndividualReferenceResponse.md | 32 + docs/A1099/V2/CoveredIndividualRequest.md | 38 +- docs/A1099/V2/Create1099Form201Response.md | 143 + docs/A1099/V2/CreateW9Form201Response.md | 191 + docs/A1099/V2/CreateW9FormRequest.md | 194 + docs/A1099/V2/Form1042SList.md | 14 + docs/A1099/V2/Form1042SListItem.md | 230 ++ docs/A1099/V2/Form1042SListItemResponse.md | 69 + docs/A1099/V2/Form1042SRequest.md | 84 + docs/A1099/V2/Form1042SResponse.md | 73 + docs/A1099/V2/Form1095BListItem.md | 72 +- docs/A1099/V2/Form1095BListItemResponse.md | 47 + docs/A1099/V2/Form1095BRequest.md | 87 +- docs/A1099/V2/Form1099BaseResponse.md | 45 + docs/A1099/V2/Form1099DivListItem.md | 88 +- docs/A1099/V2/Form1099DivRequest.md | 97 +- docs/A1099/V2/Form1099DivResponse.md | 17 +- docs/A1099/V2/Form1099KListItem.md | 90 +- docs/A1099/V2/Form1099KListItemResponse.md | 84 + docs/A1099/V2/Form1099KRequest.md | 99 +- docs/A1099/V2/Form1099ListResponse.md | 13 + .../V2/Form1099ListResponseValueInner.md | 143 + docs/A1099/V2/Form1099MiscListItem.md | 82 +- docs/A1099/V2/Form1099MiscListItemResponse.md | 58 + docs/A1099/V2/Form1099MiscRequest.md | 91 +- docs/A1099/V2/Form1099MiscResponse.md | 19 +- docs/A1099/V2/Form1099NecListItem.md | 59 +- docs/A1099/V2/Form1099NecListItemResponse.md | 48 + docs/A1099/V2/Form1099NecRequest.md | 67 +- docs/A1099/V2/Form1099NecResponse.md | 19 +- docs/A1099/V2/Form1099RListItem.md | 148 +- docs/A1099/V2/Form1099RListItemResponse.md | 65 + docs/A1099/V2/Form1099RRequest.md | 99 +- docs/A1099/V2/Form1099StatusDetailResponse.md | 14 + docs/A1099/V2/FormRequestBase.md | 44 +- docs/A1099/V2/FormRequestListItemBase.md | 48 + docs/A1099/V2/FormResponseBase.md | 17 +- docs/A1099/V2/FormSingleRequestBase.md | 59 +- docs/A1099/V2/Forms1099Api.md | 98 +- docs/A1099/V2/FormsW9Api.md | 97 +- docs/A1099/V2/Get1099Form200Response.md | 200 +- docs/A1099/V2/ICreateForm1099Request.md | 129 +- docs/A1099/V2/IUpdateForm1099Request.md | 129 +- docs/A1099/V2/IW9FormDataModelsOneOf.md | 10 +- docs/A1099/V2/IntermediaryOrFlowThrough.md | 23 + .../V2/IntermediaryOrFlowThroughRequest.md | 23 + .../V2/IntermediaryOrFlowThroughResponse.md | 23 + docs/A1099/V2/Issuers1099Api.md | 42 +- docs/A1099/V2/JobResult.md | 30 +- docs/A1099/V2/Jobs1099Api.md | 4 +- docs/A1099/V2/PrimaryWithholdingAgent.md | 14 + .../V2/PrimaryWithholdingAgentRequest.md | 14 + .../V2/PrimaryWithholdingAgentResponse.md | 14 + .../V2/StateAndLocalWithholdingResponse.md | 16 +- .../V2/StateEfileStatusDetailResponse.md | 15 + docs/A1099/V2/SubstantialUsOwnerRequest.md | 15 + docs/A1099/V2/Update1099Form200Response.md | 19 +- docs/A1099/V2/ValidationErrorResponse.md | 14 + docs/A1099/V2/W4FormDataModel.md | 10 +- docs/A1099/V2/W4FormRequest.md | 49 + docs/A1099/V2/W8BenEFormRequest.md | 125 + docs/A1099/V2/W8BenEFormResponse.md | 6 +- docs/A1099/V2/W8BenFormDataModel.md | 10 +- docs/A1099/V2/W8BenFormRequest.md | 54 + docs/A1099/V2/W8BeneFormDataModel.md | 10 +- docs/A1099/V2/W8ImyFormDataModel.md | 10 +- docs/A1099/V2/W8ImyFormRequest.md | 141 + docs/A1099/V2/W8ImyFormResponse.md | 4 +- docs/A1099/V2/W9FormBaseRequest.md | 30 + docs/A1099/V2/W9FormDataModel.md | 10 +- docs/A1099/V2/W9FormRequest.md | 48 + docs/EInvoicing/V1/Address.md | 18 + docs/EInvoicing/V1/BatchErrorDetail.md | 15 + docs/EInvoicing/V1/BatchSearch.md | 2 +- docs/EInvoicing/V1/BatchSearchListResponse.md | 6 +- docs/EInvoicing/V1/Consents.md | 13 + .../V1/CreateTradingPartner201Response.md | 15 + .../CreateTradingPartnersBatch200Response.md | 15 + ...adingPartnersBatch200ResponseValueInner.md | 15 + .../V1/CreateTradingPartnersBatchRequest.md | 13 + docs/EInvoicing/V1/DataInputFieldsApi.md | 10 +- docs/EInvoicing/V1/DataInputFieldsResponse.md | 1 - docs/EInvoicing/V1/DocumentFetch.md | 1 - docs/EInvoicing/V1/DocumentsApi.md | 14 +- docs/EInvoicing/V1/ErrorResponse.md | 2 +- docs/EInvoicing/V1/Extension.md | 14 + docs/EInvoicing/V1/HmacSignatureValue.md | 1 - docs/EInvoicing/V1/Identifier.md | 15 + docs/EInvoicing/V1/InteropApi.md | 2 +- docs/EInvoicing/V1/Mandate.md | 1 - docs/EInvoicing/V1/MandatesApi.md | 12 +- docs/EInvoicing/V1/Pagination.md | 1 - docs/EInvoicing/V1/RequiredWhenField.md | 1 - .../V1/SearchParticipants200Response.md | 15 + docs/EInvoicing/V1/Signature.md | 1 - docs/EInvoicing/V1/SignatureValue.md | 1 - docs/EInvoicing/V1/SubscriptionCommon.md | 1 - docs/EInvoicing/V1/SubscriptionsApi.md | 24 +- docs/EInvoicing/V1/SuccessResponse.md | 1 - docs/EInvoicing/V1/SupportedDocumentTypes.md | 17 + docs/EInvoicing/V1/TaxIdentifierRequest.md | 17 + docs/EInvoicing/V1/TaxIdentifierResponse.md | 15 + .../V1/TaxIdentifierResponseValue.md | 15 + ...TaxIdentifierSchemaByCountry200Response.md | 14 + docs/EInvoicing/V1/TaxIdentifiersApi.md | 189 + docs/EInvoicing/V1/TradingPartner.md | 22 + docs/EInvoicing/V1/TradingPartnersApi.md | 492 ++- .../V1/UpdateTradingPartner200Response.md | 15 + docs/EInvoicing/V1/ValidationError.md | 15 + docs/EInvoicing/V1/WebhooksErrorResponse.md | 1 - pom.xml | 79 +- .../SDK/api/A1099/V2/CompaniesW9Api.java | 40 +- .../SDK/api/A1099/V2/Forms1099Api.java | 146 +- .../Avalara/SDK/api/A1099/V2/FormsW9Api.java | 158 +- .../SDK/api/A1099/V2/Issuers1099Api.java | 44 +- .../Avalara/SDK/api/A1099/V2/Jobs1099Api.java | 4 +- .../api/EInvoicing/V1/DataInputFieldsApi.java | 12 +- .../SDK/api/EInvoicing/V1/DocumentsApi.java | 14 +- .../SDK/api/EInvoicing/V1/InteropApi.java | 4 +- .../SDK/api/EInvoicing/V1/MandatesApi.java | 14 +- .../api/EInvoicing/V1/SubscriptionsApi.java | 31 +- .../api/EInvoicing/V1/TaxIdentifiersApi.java | 495 +++ .../api/EInvoicing/V1/TradingPartnersApi.java | 1025 ++++- .../model/A1099/V2/AbstractOpenApiSchema.java | 2 +- .../Avalara/SDK/model/A1099/V2/Attribute.java | 2 +- .../A1099/V2/AuthorizedApiRequestModel.java | 2 +- .../V2/AuthorizedApiRequestV2DataModel.java | 2 +- .../SDK/model/A1099/V2/BaseCompanyModel.java | 2 +- .../model/A1099/V2/BaseFormListRequest.java | 2 +- .../A1099/V2/BulkUpsert1099FormsRequest.java | 58 +- .../V2/CompanyCreateUpdateRequestModel.java | 2 +- .../SDK/model/A1099/V2/CompanyModel.java | 2 +- .../SDK/model/A1099/V2/CompanyResponse.java | 2 +- .../model/A1099/V2/CompanyResponseModel.java | 2 +- .../CoveredIndividualReferenceResponse.java | 734 ++++ .../A1099/V2/CoveredIndividualRequest.java | 40 +- .../A1099/V2/Create1099Form201Response.java | 511 +++ .../A1099/V2/CreateW9Form201Response.java | 418 +++ .../model/A1099/V2/CreateW9FormRequest.java | 418 +++ .../java/Avalara/SDK/model/A1099/V2/Data.java | 2 +- .../SDK/model/A1099/V2/ErrorModel.java | 4 +- .../SDK/model/A1099/V2/ErrorResponse.java | 2 +- .../A1099/V2/ErrorResponseErrorsInner.java | 2 +- .../SDK/model/A1099/V2/Form1042SList.java | 262 ++ .../SDK/model/A1099/V2/Form1042SListItem.java | 2050 ++++++++++ .../A1099/V2/Form1042SListItemResponse.java | 1771 +++++++++ .../SDK/model/A1099/V2/Form1042SRequest.java | 1633 ++++++++ .../SDK/model/A1099/V2/Form1042SResponse.java | 1390 +++++++ .../SDK/model/A1099/V2/Form1095BList.java | 4 +- .../SDK/model/A1099/V2/Form1095BListItem.java | 155 +- .../A1099/V2/Form1095BListItemResponse.java | 1201 ++++++ .../SDK/model/A1099/V2/Form1095BRequest.java | 184 +- .../model/A1099/V2/Form1099BaseResponse.java | 1092 ++++++ .../SDK/model/A1099/V2/Form1099DivList.java | 4 +- .../model/A1099/V2/Form1099DivListItem.java | 170 +- .../model/A1099/V2/Form1099DivRequest.java | 190 +- .../model/A1099/V2/Form1099DivResponse.java | 44 +- .../SDK/model/A1099/V2/Form1099KList.java | 4 +- .../SDK/model/A1099/V2/Form1099KListItem.java | 176 +- .../A1099/V2/Form1099KListItemResponse.java | 1751 +++++++++ .../SDK/model/A1099/V2/Form1099KRequest.java | 192 +- .../model/A1099/V2/Form1099ListResponse.java | 246 ++ .../V2/Form1099ListResponseValueInner.java | 511 +++ .../SDK/model/A1099/V2/Form1099MiscList.java | 4 +- .../model/A1099/V2/Form1099MiscListItem.java | 188 +- .../V2/Form1099MiscListItemResponse.java | 1450 +++++++ .../model/A1099/V2/Form1099MiscRequest.java | 208 +- .../model/A1099/V2/Form1099MiscResponse.java | 72 +- .../SDK/model/A1099/V2/Form1099NecList.java | 4 +- .../model/A1099/V2/Form1099NecListItem.java | 169 +- .../A1099/V2/Form1099NecListItemResponse.java | 1200 ++++++ .../model/A1099/V2/Form1099NecRequest.java | 187 +- .../model/A1099/V2/Form1099NecResponse.java | 72 +- .../A1099/V2/Form1099ProccessResult.java | 2 +- .../SDK/model/A1099/V2/Form1099RList.java | 4 +- .../SDK/model/A1099/V2/Form1099RListItem.java | 234 +- .../A1099/V2/Form1099RListItemResponse.java | 1643 ++++++++ .../SDK/model/A1099/V2/Form1099RRequest.java | 192 +- .../V2/Form1099StatusDetailResponse.java | 251 ++ .../SDK/model/A1099/V2/FormRequestBase.java | 123 +- .../A1099/V2/FormRequestListItemBase.java | 973 +++++ .../SDK/model/A1099/V2/FormResponseBase.java | 44 +- .../model/A1099/V2/FormSingleRequestBase.java | 146 +- .../A1099/V2/Get1099Form200Response.java | 324 +- .../V2/HttpValidationProblemDetails.java | 4 +- .../A1099/V2/ICreateForm1099Request.java | 2 +- .../A1099/V2/IUpdateForm1099Request.java | 2 +- .../A1099/V2/IW9FormDataModelsOneOf.java | 3 +- .../A1099/V2/IntermediaryOrFlowThrough.java | 514 +++ .../V2/IntermediaryOrFlowThroughRequest.java | 514 +++ .../V2/IntermediaryOrFlowThroughResponse.java | 514 +++ .../SDK/model/A1099/V2/IssuerCommand.java | 2 +- .../SDK/model/A1099/V2/IssuerResponse.java | 2 +- .../Avalara/SDK/model/A1099/V2/JobResult.java | 32 +- .../java/Avalara/SDK/model/A1099/V2/Link.java | 2 +- .../A1099/V2/PaginatedQueryResultModel.java | 2 +- ...inatedQueryResultModelCompanyResponse.java | 2 +- ...ginatedQueryResultModelIssuerResponse.java | 2 +- .../model/A1099/V2/PaginatedW9FormsModel.java | 4 +- .../A1099/V2/PrimaryWithholdingAgent.java | 253 ++ .../V2/PrimaryWithholdingAgentRequest.java | 253 ++ .../V2/PrimaryWithholdingAgentResponse.java | 253 ++ .../SDK/model/A1099/V2/ProblemDetails.java | 2 +- .../V2/StateAndLocalWithholdingRequest.java | 2 +- .../V2/StateAndLocalWithholdingResponse.java | 18 +- .../V2/StateEfileStatusDetailResponse.java | 282 ++ .../SDK/model/A1099/V2/StatusDetail.java | 2 +- .../A1099/V2/SubstantialUsOwnerRequest.java | 282 ++ .../A1099/V2/SubstantialUsOwnerResponse.java | 2 +- .../A1099/V2/Update1099Form200Response.java | 62 +- .../A1099/V2/ValidationErrorResponse.java | 264 ++ .../SDK/model/A1099/V2/W4FormDataModel.java | 45 +- .../SDK/model/A1099/V2/W4FormRequest.java | 939 +++++ .../SDK/model/A1099/V2/W4FormResponse.java | 2 +- .../SDK/model/A1099/V2/W8BenEFormRequest.java | 2958 +++++++++++++++ .../model/A1099/V2/W8BenEFormResponse.java | 29 +- .../V2/W8BenESubstantialUsOwnerDataModel.java | 2 +- .../model/A1099/V2/W8BenFormDataModel.java | 45 +- .../SDK/model/A1099/V2/W8BenFormRequest.java | 1092 ++++++ .../SDK/model/A1099/V2/W8BenFormResponse.java | 2 +- .../model/A1099/V2/W8BeneFormDataModel.java | 45 +- .../model/A1099/V2/W8ImyFormDataModel.java | 45 +- .../SDK/model/A1099/V2/W8ImyFormRequest.java | 3318 +++++++++++++++++ .../SDK/model/A1099/V2/W8ImyFormResponse.java | 19 +- .../SDK/model/A1099/V2/W9FormBaseRequest.java | 428 +++ .../model/A1099/V2/W9FormBaseResponse.java | 2 +- .../SDK/model/A1099/V2/W9FormDataModel.java | 45 +- .../SDK/model/A1099/V2/W9FormRequest.java | 920 +++++ .../SDK/model/A1099/V2/W9FormResponse.java | 2 +- .../SDK/model/EInvoicing/V1/Address.java | 365 ++ .../model/EInvoicing/V1/BatchErrorDetail.java | 260 ++ .../SDK/model/EInvoicing/V1/BatchSearch.java | 2 +- .../V1/BatchSearchListResponse.java | 8 +- .../EInvoicing/V1/ConditionalForField.java | 2 +- .../SDK/model/EInvoicing/V1/Consents.java | 209 ++ .../V1/CreateTradingPartner201Response.java | 270 ++ ...CreateTradingPartnersBatch200Response.java | 292 ++ ...ingPartnersBatch200ResponseValueInner.java | 267 ++ .../V1/CreateTradingPartnersBatchRequest.java | 234 ++ .../model/EInvoicing/V1/DataInputField.java | 4 +- .../V1/DataInputFieldsResponse.java | 4 +- .../model/EInvoicing/V1/DocumentFetch.java | 2 +- .../EInvoicing/V1/DocumentListResponse.java | 2 +- .../EInvoicing/V1/DocumentStatusResponse.java | 2 +- .../model/EInvoicing/V1/ErrorResponse.java | 2 +- .../SDK/model/EInvoicing/V1/Extension.java | 263 ++ .../EInvoicing/V1/FetchDocumentsRequest.java | 2 +- .../EInvoicing/V1/HmacSignatureValue.java | 2 +- .../SDK/model/EInvoicing/V1/Identifier.java | 279 ++ .../model/EInvoicing/V1/InputDataFormats.java | 2 +- .../SDK/model/EInvoicing/V1/Mandate.java | 10 +- .../EInvoicing/V1/MandateDataInputField.java | 2 +- .../model/EInvoicing/V1/MandatesResponse.java | 2 +- .../EInvoicing/V1/OutputDataFormats.java | 2 +- .../SDK/model/EInvoicing/V1/Pagination.java | 2 +- .../EInvoicing/V1/RequiredWhenField.java | 2 +- .../V1/SearchParticipants200Response.java | 289 ++ .../SDK/model/EInvoicing/V1/Signature.java | 2 +- .../model/EInvoicing/V1/SignatureValue.java | 2 +- .../EInvoicing/V1/SubscriptionCommon.java | 2 +- .../EInvoicing/V1/SubscriptionDetail.java | 2 +- .../V1/SubscriptionListResponse.java | 2 +- .../V1/SubscriptionRegistration.java | 2 +- .../model/EInvoicing/V1/SuccessResponse.java | 2 +- .../EInvoicing/V1/SupportedDocumentTypes.java | 353 ++ .../EInvoicing/V1/TaxIdentifierRequest.java | 306 ++ .../EInvoicing/V1/TaxIdentifierResponse.java | 251 ++ .../V1/TaxIdentifierResponseValue.java | 267 ++ ...xIdentifierSchemaByCountry200Response.java | 247 ++ .../model/EInvoicing/V1/TradingPartner.java | 520 +++ .../V1/UpdateTradingPartner200Response.java | 270 ++ .../model/EInvoicing/V1/ValidationError.java | 241 ++ .../EInvoicing/V1/WebhookInvocation.java | 2 +- .../EInvoicing/V1/WebhooksErrorResponse.java | 2 +- 276 files changed, 45525 insertions(+), 3255 deletions(-) create mode 100644 docs/A1099/V2/CoveredIndividualReferenceResponse.md create mode 100644 docs/A1099/V2/Create1099Form201Response.md create mode 100644 docs/A1099/V2/CreateW9Form201Response.md create mode 100644 docs/A1099/V2/CreateW9FormRequest.md create mode 100644 docs/A1099/V2/Form1042SList.md create mode 100644 docs/A1099/V2/Form1042SListItem.md create mode 100644 docs/A1099/V2/Form1042SListItemResponse.md create mode 100644 docs/A1099/V2/Form1042SRequest.md create mode 100644 docs/A1099/V2/Form1042SResponse.md create mode 100644 docs/A1099/V2/Form1095BListItemResponse.md create mode 100644 docs/A1099/V2/Form1099BaseResponse.md create mode 100644 docs/A1099/V2/Form1099KListItemResponse.md create mode 100644 docs/A1099/V2/Form1099ListResponse.md create mode 100644 docs/A1099/V2/Form1099ListResponseValueInner.md create mode 100644 docs/A1099/V2/Form1099MiscListItemResponse.md create mode 100644 docs/A1099/V2/Form1099NecListItemResponse.md create mode 100644 docs/A1099/V2/Form1099RListItemResponse.md create mode 100644 docs/A1099/V2/Form1099StatusDetailResponse.md create mode 100644 docs/A1099/V2/FormRequestListItemBase.md create mode 100644 docs/A1099/V2/IntermediaryOrFlowThrough.md create mode 100644 docs/A1099/V2/IntermediaryOrFlowThroughRequest.md create mode 100644 docs/A1099/V2/IntermediaryOrFlowThroughResponse.md create mode 100644 docs/A1099/V2/PrimaryWithholdingAgent.md create mode 100644 docs/A1099/V2/PrimaryWithholdingAgentRequest.md create mode 100644 docs/A1099/V2/PrimaryWithholdingAgentResponse.md create mode 100644 docs/A1099/V2/StateEfileStatusDetailResponse.md create mode 100644 docs/A1099/V2/SubstantialUsOwnerRequest.md create mode 100644 docs/A1099/V2/ValidationErrorResponse.md create mode 100644 docs/A1099/V2/W4FormRequest.md create mode 100644 docs/A1099/V2/W8BenEFormRequest.md create mode 100644 docs/A1099/V2/W8BenFormRequest.md create mode 100644 docs/A1099/V2/W8ImyFormRequest.md create mode 100644 docs/A1099/V2/W9FormBaseRequest.md create mode 100644 docs/A1099/V2/W9FormRequest.md create mode 100644 docs/EInvoicing/V1/Address.md create mode 100644 docs/EInvoicing/V1/BatchErrorDetail.md create mode 100644 docs/EInvoicing/V1/Consents.md create mode 100644 docs/EInvoicing/V1/CreateTradingPartner201Response.md create mode 100644 docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md create mode 100644 docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md create mode 100644 docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md create mode 100644 docs/EInvoicing/V1/Extension.md create mode 100644 docs/EInvoicing/V1/Identifier.md create mode 100644 docs/EInvoicing/V1/SearchParticipants200Response.md create mode 100644 docs/EInvoicing/V1/SupportedDocumentTypes.md create mode 100644 docs/EInvoicing/V1/TaxIdentifierRequest.md create mode 100644 docs/EInvoicing/V1/TaxIdentifierResponse.md create mode 100644 docs/EInvoicing/V1/TaxIdentifierResponseValue.md create mode 100644 docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md create mode 100644 docs/EInvoicing/V1/TaxIdentifiersApi.md create mode 100644 docs/EInvoicing/V1/TradingPartner.md create mode 100644 docs/EInvoicing/V1/UpdateTradingPartner200Response.md create mode 100644 docs/EInvoicing/V1/ValidationError.md create mode 100644 src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReferenceResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1042SList.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItem.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItemResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItemResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099BaseResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItemResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItemResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItemResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetailResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorResponse.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java create mode 100644 src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/Address.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchErrorDetail.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/Consents.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartner201Response.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200Response.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatchRequest.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/Extension.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/Identifier.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/SearchParticipants200Response.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentTypes.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierRequest.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponse.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponseValue.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/TradingPartner.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/UpdateTradingPartner200Response.java create mode 100644 src/main/java/Avalara/SDK/model/EInvoicing/V1/ValidationError.java diff --git a/README.md b/README.md index 0a18c66..47c5442 100644 --- a/README.md +++ b/README.md @@ -122,39 +122,45 @@ Class | Method | HTTP request | Description *SubscriptionsApi* | [**deleteWebhookSubscription**](docs/EInvoicing/V1/SubscriptionsApi.md#deletewebhooksubscription) | **DELETE** /webhooks/subscriptions/{subscription-id} | Unsubscribe from events *SubscriptionsApi* | [**getWebhookSubscription**](docs/EInvoicing/V1/SubscriptionsApi.md#getwebhooksubscription) | **GET** /webhooks/subscriptions/{subscription-id} | Get details of a subscription *SubscriptionsApi* | [**listWebhookSubscriptions**](docs/EInvoicing/V1/SubscriptionsApi.md#listwebhooksubscriptions) | **GET** /webhooks/subscriptions | List all subscriptions -*TradingPartnersApi* | [**batchSearchParticipants**](docs/EInvoicing/V1/TradingPartnersApi.md#batchsearchparticipants) | **POST** /trading-partners/batch-searches | Creates a batch search and performs a batch search in the directory for participants in the background. -*TradingPartnersApi* | [**downloadBatchSearchReport**](docs/EInvoicing/V1/TradingPartnersApi.md#downloadbatchsearchreport) | **GET** /trading-partners/batch-searches/{id}/$download-results | Download batch search results in a csv file. -*TradingPartnersApi* | [**getBatchSearchDetail**](docs/EInvoicing/V1/TradingPartnersApi.md#getbatchsearchdetail) | **GET** /trading-partners/batch-searches/{id} | Get the batch search details for a given id. -*TradingPartnersApi* | [**listBatchSearches**](docs/EInvoicing/V1/TradingPartnersApi.md#listbatchsearches) | **GET** /trading-partners/batch-searches | List all batch searches that were previously submitted. +*TaxIdentifiersApi* | [**taxIdentifierSchemaByCountry**](docs/EInvoicing/V1/TaxIdentifiersApi.md#taxidentifierschemabycountry) | **GET** /tax-identifiers/schema | Returns the tax identifier request & response schema for a specific country. +*TaxIdentifiersApi* | [**validateTaxIdentifier**](docs/EInvoicing/V1/TaxIdentifiersApi.md#validatetaxidentifier) | **POST** /tax-identifiers/validate | Validates a tax identifier. +*TradingPartnersApi* | [**batchSearchParticipants**](docs/EInvoicing/V1/TradingPartnersApi.md#batchsearchparticipants) | **POST** /trading-partners/batch-searches | Handles batch search requests by uploading a file containing search parameters. +*TradingPartnersApi* | [**createTradingPartner**](docs/EInvoicing/V1/TradingPartnersApi.md#createtradingpartner) | **POST** /trading-partners | Creates a new trading partner. +*TradingPartnersApi* | [**createTradingPartnersBatch**](docs/EInvoicing/V1/TradingPartnersApi.md#createtradingpartnersbatch) | **POST** /trading-partners/batch | Creates a batch of multiple trading partners. +*TradingPartnersApi* | [**deleteTradingPartner**](docs/EInvoicing/V1/TradingPartnersApi.md#deletetradingpartner) | **DELETE** /trading-partners/{id} | Deletes a trading partner using ID. +*TradingPartnersApi* | [**downloadBatchSearchReport**](docs/EInvoicing/V1/TradingPartnersApi.md#downloadbatchsearchreport) | **GET** /trading-partners/batch-searches/{id}/$download-results | Downloads batch search results in a csv file. +*TradingPartnersApi* | [**getBatchSearchDetail**](docs/EInvoicing/V1/TradingPartnersApi.md#getbatchsearchdetail) | **GET** /trading-partners/batch-searches/{id} | Returns the batch search details using ID. +*TradingPartnersApi* | [**listBatchSearches**](docs/EInvoicing/V1/TradingPartnersApi.md#listbatchsearches) | **GET** /trading-partners/batch-searches | Lists all batch searches that were previously submitted. *TradingPartnersApi* | [**searchParticipants**](docs/EInvoicing/V1/TradingPartnersApi.md#searchparticipants) | **GET** /trading-partners | Returns a list of participants matching the input query. +*TradingPartnersApi* | [**updateTradingPartner**](docs/EInvoicing/V1/TradingPartnersApi.md#updatetradingpartner) | **PUT** /trading-partners/{id} | Updates a trading partner using ID. ### A1099 V2 API Documentation Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*CompaniesW9Api* | [**createCompany**](docs/A1099/V2/CompaniesW9Api.md#createcompany) | **POST** /w9/companies | Creates a new company -*CompaniesW9Api* | [**deleteCompany**](docs/A1099/V2/CompaniesW9Api.md#deletecompany) | **DELETE** /w9/companies/{id} | Deletes a company +*CompaniesW9Api* | [**createCompany**](docs/A1099/V2/CompaniesW9Api.md#createcompany) | **POST** /w9/companies | Create a company +*CompaniesW9Api* | [**deleteCompany**](docs/A1099/V2/CompaniesW9Api.md#deletecompany) | **DELETE** /w9/companies/{id} | Delete a company *CompaniesW9Api* | [**getCompanies**](docs/A1099/V2/CompaniesW9Api.md#getcompanies) | **GET** /w9/companies | List companies *CompaniesW9Api* | [**getCompany**](docs/A1099/V2/CompaniesW9Api.md#getcompany) | **GET** /w9/companies/{id} | Retrieve a company *CompaniesW9Api* | [**updateCompany**](docs/A1099/V2/CompaniesW9Api.md#updatecompany) | **PUT** /w9/companies/{id} | Update a company -*Forms1099Api* | [**bulkUpsert1099Forms**](docs/A1099/V2/Forms1099Api.md#bulkupsert1099forms) | **POST** /1099/forms/$bulk-upsert | Creates or updates multiple 1099 forms. -*Forms1099Api* | [**create1099Form**](docs/A1099/V2/Forms1099Api.md#create1099form) | **POST** /1099/forms | Creates a 1099 form. -*Forms1099Api* | [**delete1099Form**](docs/A1099/V2/Forms1099Api.md#delete1099form) | **DELETE** /1099/forms/{id} | Deletes a 1099 form. -*Forms1099Api* | [**get1099Form**](docs/A1099/V2/Forms1099Api.md#get1099form) | **GET** /1099/forms/{id} | Retrieves a 1099 form. -*Forms1099Api* | [**get1099FormPdf**](docs/A1099/V2/Forms1099Api.md#get1099formpdf) | **GET** /1099/forms/{id}/pdf | Retrieves the PDF file for a single 1099 by form id. -*Forms1099Api* | [**list1099Forms**](docs/A1099/V2/Forms1099Api.md#list1099forms) | **GET** /1099/forms | Retrieves a list of 1099 forms based on query parameters. -*Forms1099Api* | [**update1099Form**](docs/A1099/V2/Forms1099Api.md#update1099form) | **PUT** /1099/forms/{id} | Updates a 1099 form. +*Forms1099Api* | [**bulkUpsert1099Forms**](docs/A1099/V2/Forms1099Api.md#bulkupsert1099forms) | **POST** /1099/forms/$bulk-upsert | Create or update multiple 1099/1095/W2/1042S forms +*Forms1099Api* | [**create1099Form**](docs/A1099/V2/Forms1099Api.md#create1099form) | **POST** /1099/forms | Create a 1099/1095/W2/1042S form +*Forms1099Api* | [**delete1099Form**](docs/A1099/V2/Forms1099Api.md#delete1099form) | **DELETE** /1099/forms/{id} | Delete a 1099/1095/W2/1042S form +*Forms1099Api* | [**get1099Form**](docs/A1099/V2/Forms1099Api.md#get1099form) | **GET** /1099/forms/{id} | Retrieve a 1099/1095/W2/1042S form +*Forms1099Api* | [**get1099FormPdf**](docs/A1099/V2/Forms1099Api.md#get1099formpdf) | **GET** /1099/forms/{id}/pdf | Retrieve the PDF file for a 1099/1095/W2/1042S form +*Forms1099Api* | [**list1099Forms**](docs/A1099/V2/Forms1099Api.md#list1099forms) | **GET** /1099/forms | List 1099/1095/W2/1042S forms +*Forms1099Api* | [**update1099Form**](docs/A1099/V2/Forms1099Api.md#update1099form) | **PUT** /1099/forms/{id} | Update a 1099/1095/W2/1042S form *FormsW9Api* | [**createW9Form**](docs/A1099/V2/FormsW9Api.md#createw9form) | **POST** /w9/forms | Create a W9/W4/W8 form -*FormsW9Api* | [**deleteW9Form**](docs/A1099/V2/FormsW9Api.md#deletew9form) | **DELETE** /w9/forms/{id} | Delete a form +*FormsW9Api* | [**deleteW9Form**](docs/A1099/V2/FormsW9Api.md#deletew9form) | **DELETE** /w9/forms/{id} | Delete a W9/W4/W8 form *FormsW9Api* | [**getW9Form**](docs/A1099/V2/FormsW9Api.md#getw9form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form -*FormsW9Api* | [**listW9Forms**](docs/A1099/V2/FormsW9Api.md#listw9forms) | **GET** /w9/forms | List W9/W4/W8 forms. -*FormsW9Api* | [**sendW9FormEmail**](docs/A1099/V2/FormsW9Api.md#sendw9formemail) | **POST** /w9/forms/{id}/$send-email | Sends a W9 email request to a vendor/payee +*FormsW9Api* | [**listW9Forms**](docs/A1099/V2/FormsW9Api.md#listw9forms) | **GET** /w9/forms | List W9/W4/W8 forms +*FormsW9Api* | [**sendW9FormEmail**](docs/A1099/V2/FormsW9Api.md#sendw9formemail) | **POST** /w9/forms/{id}/$send-email | Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form *FormsW9Api* | [**updateW9Form**](docs/A1099/V2/FormsW9Api.md#updatew9form) | **PUT** /w9/forms/{id} | Update a W9/W4/W8 form -*FormsW9Api* | [**uploadW9Files**](docs/A1099/V2/FormsW9Api.md#uploadw9files) | **PUT** /w9/forms/{id}/attachment | Upload files for a W9/W4/W8 form +*FormsW9Api* | [**uploadW9Files**](docs/A1099/V2/FormsW9Api.md#uploadw9files) | **POST** /w9/forms/{id}/attachment | Replace the PDF file for a W9/W4/W8 form *Issuers1099Api* | [**createIssuer**](docs/A1099/V2/Issuers1099Api.md#createissuer) | **POST** /1099/issuers | Create an issuer *Issuers1099Api* | [**deleteIssuer**](docs/A1099/V2/Issuers1099Api.md#deleteissuer) | **DELETE** /1099/issuers/{id} | Delete an issuer -*Issuers1099Api* | [**getIssuer**](docs/A1099/V2/Issuers1099Api.md#getissuer) | **GET** /1099/issuers/{id} | Get an issuer +*Issuers1099Api* | [**getIssuer**](docs/A1099/V2/Issuers1099Api.md#getissuer) | **GET** /1099/issuers/{id} | Retrieve an issuer *Issuers1099Api* | [**getIssuers**](docs/A1099/V2/Issuers1099Api.md#getissuers) | **GET** /1099/issuers | List issuers *Issuers1099Api* | [**updateIssuer**](docs/A1099/V2/Issuers1099Api.md#updateissuer) | **PUT** /1099/issuers/{id} | Update an issuer *Jobs1099Api* | [**getJob**](docs/A1099/V2/Jobs1099Api.md#getjob) | **GET** /1099/jobs/{id} | Retrieves information about the job @@ -165,22 +171,24 @@ Class | Method | HTTP request | Description ### EInvoicing V1 Model Documentation + - [Avalara.SDK.model.EInvoicing.V1.Address](docs/EInvoicing/V1/Address.md) - [Avalara.SDK.model.EInvoicing.V1.BadDownloadRequest](docs/EInvoicing/V1/BadDownloadRequest.md) - [Avalara.SDK.model.EInvoicing.V1.BadRequest](docs/EInvoicing/V1/BadRequest.md) + - [Avalara.SDK.model.EInvoicing.V1.BatchErrorDetail](docs/EInvoicing/V1/BatchErrorDetail.md) - [Avalara.SDK.model.EInvoicing.V1.BatchSearch](docs/EInvoicing/V1/BatchSearch.md) - [Avalara.SDK.model.EInvoicing.V1.BatchSearchListResponse](docs/EInvoicing/V1/BatchSearchListResponse.md) - [Avalara.SDK.model.EInvoicing.V1.BatchSearchParticipants202Response](docs/EInvoicing/V1/BatchSearchParticipants202Response.md) - [Avalara.SDK.model.EInvoicing.V1.ConditionalForField](docs/EInvoicing/V1/ConditionalForField.md) + - [Avalara.SDK.model.EInvoicing.V1.Consents](docs/EInvoicing/V1/Consents.md) + - [Avalara.SDK.model.EInvoicing.V1.CreateTradingPartner201Response](docs/EInvoicing/V1/CreateTradingPartner201Response.md) + - [Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatch200Response](docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md) + - [Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatch200ResponseValueInner](docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md) + - [Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatchRequest](docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md) - [Avalara.SDK.model.EInvoicing.V1.DataInputField](docs/EInvoicing/V1/DataInputField.md) - [Avalara.SDK.model.EInvoicing.V1.DataInputFieldNotUsedFor](docs/EInvoicing/V1/DataInputFieldNotUsedFor.md) - [Avalara.SDK.model.EInvoicing.V1.DataInputFieldOptionalFor](docs/EInvoicing/V1/DataInputFieldOptionalFor.md) - [Avalara.SDK.model.EInvoicing.V1.DataInputFieldRequiredFor](docs/EInvoicing/V1/DataInputFieldRequiredFor.md) - [Avalara.SDK.model.EInvoicing.V1.DataInputFieldsResponse](docs/EInvoicing/V1/DataInputFieldsResponse.md) - - [Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponse](docs/EInvoicing/V1/DirectorySearchResponse.md) - - [Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponseValueInner](docs/EInvoicing/V1/DirectorySearchResponseValueInner.md) - - [Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponseValueInnerAddressesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerAddressesInner.md) - - [Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponseValueInnerIdentifiersInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerIdentifiersInner.md) - - [Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponseValueInnerSupportedDocumentTypesInner](docs/EInvoicing/V1/DirectorySearchResponseValueInnerSupportedDocumentTypesInner.md) - [Avalara.SDK.model.EInvoicing.V1.DocumentFetch](docs/EInvoicing/V1/DocumentFetch.md) - [Avalara.SDK.model.EInvoicing.V1.DocumentListResponse](docs/EInvoicing/V1/DocumentListResponse.md) - [Avalara.SDK.model.EInvoicing.V1.DocumentStatusResponse](docs/EInvoicing/V1/DocumentStatusResponse.md) @@ -192,6 +200,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.EInvoicing.V1.EventMessage](docs/EInvoicing/V1/EventMessage.md) - [Avalara.SDK.model.EInvoicing.V1.EventPayload](docs/EInvoicing/V1/EventPayload.md) - [Avalara.SDK.model.EInvoicing.V1.EventSubscription](docs/EInvoicing/V1/EventSubscription.md) + - [Avalara.SDK.model.EInvoicing.V1.Extension](docs/EInvoicing/V1/Extension.md) - [Avalara.SDK.model.EInvoicing.V1.FetchDocumentsRequest](docs/EInvoicing/V1/FetchDocumentsRequest.md) - [Avalara.SDK.model.EInvoicing.V1.FetchDocumentsRequestDataInner](docs/EInvoicing/V1/FetchDocumentsRequestDataInner.md) - [Avalara.SDK.model.EInvoicing.V1.FetchDocumentsRequestMetadata](docs/EInvoicing/V1/FetchDocumentsRequestMetadata.md) @@ -199,6 +208,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.EInvoicing.V1.HmacSignature](docs/EInvoicing/V1/HmacSignature.md) - [Avalara.SDK.model.EInvoicing.V1.HmacSignatureValue](docs/EInvoicing/V1/HmacSignatureValue.md) - [Avalara.SDK.model.EInvoicing.V1.Id](docs/EInvoicing/V1/Id.md) + - [Avalara.SDK.model.EInvoicing.V1.Identifier](docs/EInvoicing/V1/Identifier.md) - [Avalara.SDK.model.EInvoicing.V1.InputDataFormats](docs/EInvoicing/V1/InputDataFormats.md) - [Avalara.SDK.model.EInvoicing.V1.InternalServerError](docs/EInvoicing/V1/InternalServerError.md) - [Avalara.SDK.model.EInvoicing.V1.Mandate](docs/EInvoicing/V1/Mandate.md) @@ -210,6 +220,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.EInvoicing.V1.OutputDataFormats](docs/EInvoicing/V1/OutputDataFormats.md) - [Avalara.SDK.model.EInvoicing.V1.Pagination](docs/EInvoicing/V1/Pagination.md) - [Avalara.SDK.model.EInvoicing.V1.RequiredWhenField](docs/EInvoicing/V1/RequiredWhenField.md) + - [Avalara.SDK.model.EInvoicing.V1.SearchParticipants200Response](docs/EInvoicing/V1/SearchParticipants200Response.md) - [Avalara.SDK.model.EInvoicing.V1.Signature](docs/EInvoicing/V1/Signature.md) - [Avalara.SDK.model.EInvoicing.V1.SignatureSignature](docs/EInvoicing/V1/SignatureSignature.md) - [Avalara.SDK.model.EInvoicing.V1.SignatureValue](docs/EInvoicing/V1/SignatureValue.md) @@ -222,6 +233,14 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.EInvoicing.V1.SubscriptionListResponse](docs/EInvoicing/V1/SubscriptionListResponse.md) - [Avalara.SDK.model.EInvoicing.V1.SubscriptionRegistration](docs/EInvoicing/V1/SubscriptionRegistration.md) - [Avalara.SDK.model.EInvoicing.V1.SuccessResponse](docs/EInvoicing/V1/SuccessResponse.md) + - [Avalara.SDK.model.EInvoicing.V1.SupportedDocumentTypes](docs/EInvoicing/V1/SupportedDocumentTypes.md) + - [Avalara.SDK.model.EInvoicing.V1.TaxIdentifierRequest](docs/EInvoicing/V1/TaxIdentifierRequest.md) + - [Avalara.SDK.model.EInvoicing.V1.TaxIdentifierResponse](docs/EInvoicing/V1/TaxIdentifierResponse.md) + - [Avalara.SDK.model.EInvoicing.V1.TaxIdentifierResponseValue](docs/EInvoicing/V1/TaxIdentifierResponseValue.md) + - [Avalara.SDK.model.EInvoicing.V1.TaxIdentifierSchemaByCountry200Response](docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md) + - [Avalara.SDK.model.EInvoicing.V1.TradingPartner](docs/EInvoicing/V1/TradingPartner.md) + - [Avalara.SDK.model.EInvoicing.V1.UpdateTradingPartner200Response](docs/EInvoicing/V1/UpdateTradingPartner200Response.md) + - [Avalara.SDK.model.EInvoicing.V1.ValidationError](docs/EInvoicing/V1/ValidationError.md) - [Avalara.SDK.model.EInvoicing.V1.WebhookInvocation](docs/EInvoicing/V1/WebhookInvocation.md) - [Avalara.SDK.model.EInvoicing.V1.WebhooksErrorInfo](docs/EInvoicing/V1/WebhooksErrorInfo.md) - [Avalara.SDK.model.EInvoicing.V1.WebhooksErrorResponse](docs/EInvoicing/V1/WebhooksErrorResponse.md) @@ -241,44 +260,53 @@ 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) + - [Avalara.SDK.model.A1099.V2.CreateW9Form201Response](docs/A1099/V2/CreateW9Form201Response.md) + - [Avalara.SDK.model.A1099.V2.CreateW9FormRequest](docs/A1099/V2/CreateW9FormRequest.md) - [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.Form1095B](docs/A1099/V2/Form1095B.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.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.Form1099Base](docs/A1099/V2/Form1099Base.md) + - [Avalara.SDK.model.A1099.V2.Form1099BaseResponse](docs/A1099/V2/Form1099BaseResponse.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.Form1099DivRequest](docs/A1099/V2/Form1099DivRequest.md) - [Avalara.SDK.model.A1099.V2.Form1099DivResponse](docs/A1099/V2/Form1099DivResponse.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) - [Avalara.SDK.model.A1099.V2.Form1099KRequest](docs/A1099/V2/Form1099KRequest.md) - - [Avalara.SDK.model.A1099.V2.Form1099List](docs/A1099/V2/Form1099List.md) - - [Avalara.SDK.model.A1099.V2.Form1099Misc](docs/A1099/V2/Form1099Misc.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.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.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.Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) + - [Avalara.SDK.model.A1099.V2.Form1099StatusDetailResponse](docs/A1099/V2/Form1099StatusDetailResponse.md) - [Avalara.SDK.model.A1099.V2.FormRequestBase](docs/A1099/V2/FormRequestBase.md) - - [Avalara.SDK.model.A1099.V2.FormRequestCsvBase](docs/A1099/V2/FormRequestCsvBase.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) @@ -286,7 +314,9 @@ Class | Method | HTTP request | Description - [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) - [Avalara.SDK.model.A1099.V2.IssuerCommand](docs/A1099/V2/IssuerCommand.md) - [Avalara.SDK.model.A1099.V2.IssuerResponse](docs/A1099/V2/IssuerResponse.md) - [Avalara.SDK.model.A1099.V2.JobResult](docs/A1099/V2/JobResult.md) @@ -295,26 +325,33 @@ Class | Method | HTTP request | Description - [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.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.StateEfileStatusDetailApp](docs/A1099/V2/StateEfileStatusDetailApp.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.Update1099Form200Response](docs/A1099/V2/Update1099Form200Response.md) - - [Avalara.SDK.model.A1099.V2.ValidationError](docs/A1099/V2/ValidationError.md) - - [Avalara.SDK.model.A1099.V2.ValidationErrorApp](docs/A1099/V2/ValidationErrorApp.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) - [Avalara.SDK.model.A1099.V2.W4FormResponse](docs/A1099/V2/W4FormResponse.md) + - [Avalara.SDK.model.A1099.V2.W8BenEFormRequest](docs/A1099/V2/W8BenEFormRequest.md) - [Avalara.SDK.model.A1099.V2.W8BenEFormResponse](docs/A1099/V2/W8BenEFormResponse.md) - [Avalara.SDK.model.A1099.V2.W8BenESubstantialUsOwnerDataModel](docs/A1099/V2/W8BenESubstantialUsOwnerDataModel.md) - [Avalara.SDK.model.A1099.V2.W8BenFormDataModel](docs/A1099/V2/W8BenFormDataModel.md) + - [Avalara.SDK.model.A1099.V2.W8BenFormRequest](docs/A1099/V2/W8BenFormRequest.md) - [Avalara.SDK.model.A1099.V2.W8BenFormResponse](docs/A1099/V2/W8BenFormResponse.md) - [Avalara.SDK.model.A1099.V2.W8BeneFormDataModel](docs/A1099/V2/W8BeneFormDataModel.md) - [Avalara.SDK.model.A1099.V2.W8ImyFormDataModel](docs/A1099/V2/W8ImyFormDataModel.md) + - [Avalara.SDK.model.A1099.V2.W8ImyFormRequest](docs/A1099/V2/W8ImyFormRequest.md) - [Avalara.SDK.model.A1099.V2.W8ImyFormResponse](docs/A1099/V2/W8ImyFormResponse.md) + - [Avalara.SDK.model.A1099.V2.W9FormBaseRequest](docs/A1099/V2/W9FormBaseRequest.md) - [Avalara.SDK.model.A1099.V2.W9FormBaseResponse](docs/A1099/V2/W9FormBaseResponse.md) - [Avalara.SDK.model.A1099.V2.W9FormDataModel](docs/A1099/V2/W9FormDataModel.md) + - [Avalara.SDK.model.A1099.V2.W9FormRequest](docs/A1099/V2/W9FormRequest.md) - [Avalara.SDK.model.A1099.V2.W9FormResponse](docs/A1099/V2/W9FormResponse.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 86c97f5..f515e40 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -4,8 +4,8 @@ All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/a Method | HTTP request | Description ------------- | ------------- | ------------- -[**createCompany**](CompaniesW9Api.md#createCompany) | **POST** /w9/companies | Creates a new company -[**deleteCompany**](CompaniesW9Api.md#deleteCompany) | **DELETE** /w9/companies/{id} | Deletes a company +[**createCompany**](CompaniesW9Api.md#createCompany) | **POST** /w9/companies | Create a company +[**deleteCompany**](CompaniesW9Api.md#deleteCompany) | **DELETE** /w9/companies/{id} | Delete a company [**getCompanies**](CompaniesW9Api.md#getCompanies) | **GET** /w9/companies | List companies [**getCompany**](CompaniesW9Api.md#getCompany) | **GET** /w9/companies/{id} | Retrieve a company [**updateCompany**](CompaniesW9Api.md#updateCompany) | **PUT** /w9/companies/{id} | Update a company @@ -16,9 +16,9 @@ Method | HTTP request | Description > CompanyResponseModel createCompany(avalaraVersion, xCorrelationId, xAvalaraClient, companyCreateUpdateRequestModel) -Creates a new company +Create a company -Creates a new company +Create a company. ### Example @@ -48,8 +48,8 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "d0e29cf5-55bc-44e6-9894-3e1cd2923e5a"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "fe0b2c61-3b02-476a-ab45-cffe1b04e41a"; // 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 { @@ -102,9 +102,9 @@ Name | Type | Description | Notes > deleteCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient) -Deletes a company +Delete a company -Deletes a company +Delete a company. ### Example @@ -135,8 +135,8 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The company to delete - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "713ec82b-b94e-4e2f-8b82-0cecc0abb124"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "250cdf61-a491-4fce-9544-33316d95a0a2"; // 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); @@ -221,14 +221,14 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); - String avalaraVersion = "2.0"; // String | API version + 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 = 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 | 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 = "38d61b75-2ccf-4a20-8fc0-6fc047805ec3"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "9bc362f8-548a-4a98-b44b-37da159b8126"; // 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); @@ -289,7 +289,7 @@ Name | Type | Description | Notes Retrieve a company -Retrieve an existing company +Retrieve a company. ### Example @@ -320,8 +320,8 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | Id of the company - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "dccf03ba-f1c1-4540-a0ab-3a642cb46223"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "1c9d767c-523c-42c5-bbcb-5158761b48a0"; // 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); @@ -377,7 +377,7 @@ Name | Type | Description | Notes Update a company -Update a company +Update a company. ### Example @@ -408,8 +408,8 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The ID of the company to update - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "e5197be7-4ab7-4f90-a190-c0a491ebb8e1"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "03774e95-4208-4f91-a5c8-e218fcb3c0a4"; // 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/CoveredIndividualReferenceResponse.md b/docs/A1099/V2/CoveredIndividualReferenceResponse.md new file mode 100644 index 0000000..8b3896d --- /dev/null +++ b/docs/A1099/V2/CoveredIndividualReferenceResponse.md @@ -0,0 +1,32 @@ + + +# CoveredIndividualReferenceResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Covered individual ID | [optional] | +|**firstName** | **String** | Covered individual's first name | [optional] | +|**middleName** | **String** | Covered individual's middle name | [optional] | +|**lastName** | **String** | Covered individual's last name | [optional] | +|**nameSuffix** | **String** | Covered individual's name suffix | [optional] | +|**tin** | **String** | Covered individual's TIN (SSN or ITIN) | [optional] | +|**birthDate** | **OffsetDateTime** | Covered individual's date of birth | [optional] | +|**coveredMonth0** | **Boolean** | Coverage indicator for all 12 months | [optional] | +|**coveredMonth1** | **Boolean** | Coverage indicator for January | [optional] | +|**coveredMonth2** | **Boolean** | Coverage indicator for February | [optional] | +|**coveredMonth3** | **Boolean** | Coverage indicator for March | [optional] | +|**coveredMonth4** | **Boolean** | Coverage indicator for April | [optional] | +|**coveredMonth5** | **Boolean** | Coverage indicator for May | [optional] | +|**coveredMonth6** | **Boolean** | Coverage indicator for June | [optional] | +|**coveredMonth7** | **Boolean** | Coverage indicator for July | [optional] | +|**coveredMonth8** | **Boolean** | Coverage indicator for August | [optional] | +|**coveredMonth9** | **Boolean** | Coverage indicator for September | [optional] | +|**coveredMonth10** | **Boolean** | Coverage indicator for October | [optional] | +|**coveredMonth11** | **Boolean** | Coverage indicator for November | [optional] | +|**coveredMonth12** | **Boolean** | Coverage indicator for December | [optional] | + + + diff --git a/docs/A1099/V2/CoveredIndividualRequest.md b/docs/A1099/V2/CoveredIndividualRequest.md index d61aedc..02730fd 100644 --- a/docs/A1099/V2/CoveredIndividualRequest.md +++ b/docs/A1099/V2/CoveredIndividualRequest.md @@ -7,25 +7,25 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**firstName** | **String** | | [optional] | -|**middleName** | **String** | | [optional] | -|**lastName** | **String** | | [optional] | -|**nameSuffix** | **String** | | [optional] | -|**tin** | **String** | | [optional] | -|**birthDate** | **OffsetDateTime** | | [optional] | -|**coveredMonthIndicator0** | **Boolean** | | [optional] | -|**coveredMonthIndicator1** | **Boolean** | | [optional] | -|**coveredMonthIndicator2** | **Boolean** | | [optional] | -|**coveredMonthIndicator3** | **Boolean** | | [optional] | -|**coveredMonthIndicator4** | **Boolean** | | [optional] | -|**coveredMonthIndicator5** | **Boolean** | | [optional] | -|**coveredMonthIndicator6** | **Boolean** | | [optional] | -|**coveredMonthIndicator7** | **Boolean** | | [optional] | -|**coveredMonthIndicator8** | **Boolean** | | [optional] | -|**coveredMonthIndicator9** | **Boolean** | | [optional] | -|**coveredMonthIndicator10** | **Boolean** | | [optional] | -|**coveredMonthIndicator11** | **Boolean** | | [optional] | -|**coveredMonthIndicator12** | **Boolean** | | [optional] | +|**firstName** | **String** | Covered individual's first name | [optional] | +|**middleName** | **String** | Covered individual's middle name | [optional] | +|**lastName** | **String** | Covered individual's last name | [optional] | +|**nameSuffix** | **String** | Covered individual's name suffix | [optional] | +|**tin** | **String** | Covered individual's TIN (SSN or ITIN) | [optional] | +|**birthDate** | **OffsetDateTime** | Covered individual's date of birth | [optional] | +|**coveredMonthIndicator0** | **Boolean** | Coverage indicator for all 12 months | [optional] | +|**coveredMonthIndicator1** | **Boolean** | Coverage indicator for January | [optional] | +|**coveredMonthIndicator2** | **Boolean** | Coverage indicator for February | [optional] | +|**coveredMonthIndicator3** | **Boolean** | Coverage indicator for March | [optional] | +|**coveredMonthIndicator4** | **Boolean** | Coverage indicator for April | [optional] | +|**coveredMonthIndicator5** | **Boolean** | Coverage indicator for May | [optional] | +|**coveredMonthIndicator6** | **Boolean** | Coverage indicator for June | [optional] | +|**coveredMonthIndicator7** | **Boolean** | Coverage indicator for July | [optional] | +|**coveredMonthIndicator8** | **Boolean** | Coverage indicator for August | [optional] | +|**coveredMonthIndicator9** | **Boolean** | Coverage indicator for September | [optional] | +|**coveredMonthIndicator10** | **Boolean** | Coverage indicator for October | [optional] | +|**coveredMonthIndicator11** | **Boolean** | Coverage indicator for November | [optional] | +|**coveredMonthIndicator12** | **Boolean** | Coverage indicator for December | [optional] | diff --git a/docs/A1099/V2/Create1099Form201Response.md b/docs/A1099/V2/Create1099Form201Response.md new file mode 100644 index 0000000..5a1f70c --- /dev/null +++ b/docs/A1099/V2/Create1099Form201Response.md @@ -0,0 +1,143 @@ + + +# Create1099Form201Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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] | +|**uniqueFormId** | **String** | Unique form identifier | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**recipientDateOfBirth** | **OffsetDateTime** | Recipient's date of birth | [optional] | +|**recipientGiin** | **String** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] | +|**recipientForeignTin** | **String** | Recipient's foreign TIN | [optional] | +|**lobCode** | **String** | Limitation on benefits code | [optional] | +|**incomeCode** | **String** | Income code | [optional] | +|**grossIncome** | **Double** | Gross income | [optional] | +|**withholdingIndicator** | **String** | Withholding indicator | [optional] | +|**taxCountryCode** | **String** | Country code | [optional] | +|**exemptionCodeChap3** | **String** | Exemption code (Chapter 3) | [optional] | +|**exemptionCodeChap4** | **String** | Exemption code (Chapter 4) | [optional] | +|**taxRateChap3** | **String** | Tax rate (Chapter 3) | [optional] | +|**withholdingAllowance** | **Double** | Withholding allowance | [optional] | +|**federalTaxWithheld** | **Double** | Federal tax withheld | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | Tax not deposited indicator | [optional] | +|**academicIndicator** | **Boolean** | Academic indicator | [optional] | +|**taxWithheldOtherAgents** | **Double** | Tax withheld by other agents | [optional] | +|**amountRepaid** | **Double** | Amount repaid to recipient | [optional] | +|**taxPaidAgent** | **Double** | Tax paid by withholding agent | [optional] | +|**chap3StatusCode** | **String** | Chapter 3 status code | [optional] | +|**chap4StatusCode** | **String** | Chapter 4 status code | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] | +|**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] | +|**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] | +|**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions | [optional] | +|**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**merchantCategoryCode** | **String** | Merchant category code | [optional] | +|**paymentTransactionNumber** | **Double** | Number of payment transactions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**january** | **Double** | January gross payments | [optional] | +|**february** | **Double** | February gross payments | [optional] | +|**march** | **Double** | March gross payments | [optional] | +|**april** | **Double** | April gross payments | [optional] | +|**may** | **Double** | May gross payments | [optional] | +|**june** | **Double** | June gross payments | [optional] | +|**july** | **Double** | July gross payments | [optional] | +|**august** | **Double** | August gross payments | [optional] | +|**sept** | **Double** | September gross payments | [optional] | +|**october** | **Double** | October gross payments | [optional] | +|**november** | **Double** | November gross payments | [optional] | +|**december** | **Double** | December gross payments | [optional] | +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalAndHealthCare** | **Double** | Medical and health care payments | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**excessGoldenParachute** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**grossAmountPaidAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**section409AIncome** | **Double** | Nonqualified deferred compensation | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | [optional] | +|**grossDistributions** | **Double** | Gross distribution | [optional] | +|**taxableAmount** | **Double** | Taxable amount | [optional] | +|**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | +|**totalDistributionIndicator** | **Boolean** | Total distribution | [optional] | +|**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | +|**employeeContributions** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +|**netUnrealizedAppreciation** | **Double** | Net unrealized appreciation in employer's securities | [optional] | +|**distributionCodeRequired** | **String** | Distribution code | [optional] | +|**distributionCodeOptional** | **String** | Second distribution code | [optional] | +|**iraSepSimpleIndicator** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +|**totalIraSepSimpleDistribution** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +|**other** | **Double** | Other amount | [optional] | +|**otherPercent** | **String** | Other percentage | [optional] | +|**percentageTotalDistribution** | **String** | Total distribution percentage | [optional] | +|**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] | + + + +## 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/CreateW9Form201Response.md b/docs/A1099/V2/CreateW9Form201Response.md new file mode 100644 index 0000000..f7bd613 --- /dev/null +++ b/docs/A1099/V2/CreateW9Form201Response.md @@ -0,0 +1,191 @@ + + +# CreateW9Form201Response + + +## Properties + +| 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] | +|**entityType** | **String** | The entity type. | [optional] | +|**makingTreatyClaim** | **Boolean** | Indicates whether the entity is making a treaty claim. | [optional] | +|**fatcaStatus** | **String** | The FATCA status. | [optional] | +|**residenceAddress** | **String** | The residential address of the individual or entity. | [optional] | +|**residenceCity** | **String** | The city of residence. | [optional] | +|**residenceState** | **String** | The state of residence. | [optional] | +|**residenceZip** | **String** | The ZIP code of the residence. | [optional] | +|**residenceCountry** | **String** | The country of residence. | [optional] | +|**residenceIsMailing** | **Boolean** | Indicates whether the residence address is also the mailing address. | [optional] | +|**mailingAddress** | **String** | The mailing address. | [optional] | +|**mailingCity** | **String** | The city of the mailing address. | [optional] | +|**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] | +|**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] | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**disregardedEntityFatcaStatus** | **String** | The FATCA status of disregarded entity or branch receiving payment. | [optional] | +|**disregardedAddress** | **String** | The address for disregarded entities. | [optional] | +|**disregardedCity** | **String** | The city for disregarded entities. | [optional] | +|**disregardedState** | **String** | The state for disregarded entities. | [optional] | +|**disregardedZip** | **String** | The ZIP code for disregarded entities. | [optional] | +|**disregardedCountry** | **String** | The country for disregarded entities. | [optional] | +|**disregardedEntityGiin** | **String** | The GIIN for disregarded entities. | [optional] | +|**treatyCountryCertification** | **Boolean** | Certifies the beneficial owner's country under the U.S. tax treaty. | [optional] | +|**treatyCountry** | **String** | The country for which the treaty applies. | [optional] | +|**benefitLimitationCertification** | **Boolean** | Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. | [optional] | +|**benefitLimitation** | **String** | The benefit limitation for tax treaty claims. | [optional] | +|**qualifiedResidentStatusCertification** | **Boolean** | Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. | [optional] | +|**treatyArticle** | **String** | The specific article of the treaty being claimed. | [optional] | +|**withholdingRate** | **String** | The withholding rate applied as per the treaty. | [optional] | +|**incomeType** | **String** | The type of income covered by the treaty. | [optional] | +|**treatyReasons** | **String** | The reasons for claiming treaty benefits. | [optional] | +|**ffiSponsoringEntity** | **String** | The name of the entity that sponsors the foreign financial institution (FFI). | [optional] | +|**investmentEntityCertification** | **Boolean** | Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. | [optional] | +|**controlledForeignCorporationCertification** | **Boolean** | Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. | [optional] | +|**compliantNonregisteringLocalBankCertification** | **Boolean** | Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. | [optional] | +|**compliantFfiLowValueAccountsCertification** | **Boolean** | Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. | [optional] | +|**sponsoredCloselyHeldEntitySponsoringEntity** | **String** | The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. | [optional] | +|**sponsoredCloselyHeldInvestmentVehicleCertification** | **Boolean** | Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. | [optional] | +|**compliantLimitedLifeDebtEntityCertification** | **Boolean** | Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. | [optional] | +|**investmentEntityNoFinancialAccountsCertification** | **Boolean** | Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. | [optional] | +|**ownerDocumentedFfiCertification** | **Boolean** | Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. | [optional] | +|**ownerDocumentedFfiReportingStatementCertification** | **Boolean** | Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. | [optional] | +|**ownerDocumentedFfiAuditorLetterCertification** | **Boolean** | Certifies that the FFI has provided or will provide an auditor’s letter and required owner documentation, including a reporting statement and Form W-9s, to meet owner-documented FFI requirements under the regulations. | [optional] | +|**ownerDocumentedFfiTrustBeneficiariesCertification** | **Boolean** | Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. | [optional] | +|**restrictedDistributorCertification** | **Boolean** | Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. | [optional] | +|**restrictedDistributorAgreementCertification** | **Boolean** | Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. | [optional] | +|**restrictedDistributorPreexistingSalesComplianceCertification** | **Boolean** | Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. | [optional] | +|**nonreportingIgaFfiCertification** | **Boolean** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] | +|**igaCountry** | **String** | The country for the applicable IGA with the United States. | [optional] | +|**igaModel** | **String** | The applicable IGA model. | [optional] | +|**igaLegalStatusTreatment** | **String** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] | +|**igaFfiTrusteeOrSponsor** | **String** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] | +|**igaFfiTrusteeIsForeign** | **Boolean** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] | +|**nonCommercialFinancialActivityCertification** | **Boolean** | Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. | [optional] | +|**internationOrganizationCertification** | **Boolean** | Certifies that the entity is an international organization described in section 7701(a)(18). | [optional] | +|**intergovernmentalOrganizationCertification** | **Boolean** | Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. | [optional] | +|**treatyQualifiedPensionFundCertification** | **Boolean** | Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. | [optional] | +|**qualifiedRetirementFundCertification** | **Boolean** | Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. | [optional] | +|**narrowParticipationRetirementFundCertification** | **Boolean** | Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. | [optional] | +|**section401AEquivalentPensionPlanCertification** | **Boolean** | Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. | [optional] | +|**investmentEntityForRetirementFundsCertification** | **Boolean** | Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. | [optional] | +|**exemptBeneficialOwnerSponsoredRetirementFundCertification** | **Boolean** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] | +|**exemptBeneficialOwnerOwnedInvestmentEntityCertification** | **Boolean** | Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. | [optional] | +|**territoryFinancialInstitutionCertification** | **Boolean** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] | +|**exceptedNonfinancialGroupEntityCertification** | **Boolean** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] | +|**exceptedNonfinancialStartUpCertification** | **Boolean** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] | +|**startupFormationOrResolutionDate** | **LocalDate** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] | +|**exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification** | **Boolean** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] | +|**nonfinancialEntityFilingDate** | **LocalDate** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] | +|**section501COrganizationCertification** | **Boolean** | Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. | [optional] | +|**determinationLetterDate** | **LocalDate** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] | +|**nonprofitOrganizationCertification** | **Boolean** | Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. | [optional] | +|**publiclyTradedNffeCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] | +|**publiclyTradedNffeSecuritiesMarket** | **String** | The name of the securities market where the corporation's stock is regularly traded. | [optional] | +|**nffeAffiliateOfPubliclyTradedEntityCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] | +|**publiclyTradedEntity** | **String** | The name of the affiliated entity whose stock is regularly traded on an established securities market. | [optional] | +|**nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket** | **String** | The name of the established securities market where the affiliated entity's stock is traded. | [optional] | +|**exceptedTerritoryNffeCertification** | **Boolean** | Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. | [optional] | +|**activeNffeCertification** | **Boolean** | Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. | [optional] | +|**passiveNffeCertification** | **Boolean** | Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. | [optional] | +|**passiveNffeNoSubstantialUsOwnersCertification** | **Boolean** | Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. | [optional] | +|**passiveNffeSubstantialUsOwnersProvidedCertification** | **Boolean** | Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. | [optional] | +|**exceptedInterAffiliateFfiCertification** | **Boolean** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] | +|**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] | +|**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] | +|**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] | +|**qiPrimaryWithholdingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding responsibility under chapters 3 and 4 for the specified accounts. | [optional] | +|**qiWithholdingResponsibilityForPtpSalesCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding and reporting responsibility under section 1446(f) for amounts realized from sales of interests in publicly traded partnerships. | [optional] | +|**qiNomineeWithholdingResponsibilityForPtpDistributionsCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding responsibility as a nominee under Regulations section 1.1446-4(b)(3) for publicly traded partnership distributions. | [optional] | +|**qiSecuritiesLenderSubstituteDividendWithholdingCertification** | **Boolean** | Certifies that the Qualified Intermediary is acting as a qualified securities lender and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] | +|**qiWithholdingAnd1099ReportingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding under chapters 3 and 4, and primary Form 1099 reporting and backup withholding responsibility for U.S. source interest and substitute interest payments. | [optional] | +|**qiForm1099OrFatcaReportingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes Form 1099 reporting and backup withholding responsibility, or FATCA reporting responsibility as a participating or registered deemed-compliant FFI, for accounts held by specified U.S. persons. | [optional] | +|**qiOptOutOfForm1099ReportingCertification** | **Boolean** | Certifies that the Qualified Intermediary does not assume primary Form 1099 reporting and backup withholding responsibility for the accounts associated with this form. | [optional] | +|**qiWithholdingRatePoolCertification** | **Boolean** | Certifies that the Qualified Intermediary meets the requirements for allocating payments to a chapter 4 withholding rate pool of U.S. payees under Regulations section 1.6049-4(c)(4)(iii). | [optional] | +|**qiIntermediaryOrFlowThroughEntityDocumentationCertification** | **Boolean** | Certifies that the Qualified Intermediary has obtained or will obtain documentation confirming the status of any intermediary or flow-through entity as a participating FFI, registered deemed-compliant FFI, or QI for U.S. payees in a chapter 4 withholding rate pool. | [optional] | +|**qualifiedDerivativesDealerCertification** | **Boolean** | Certifies that the Qualified Derivatives Dealer (QDD) is approved by the IRS and assumes primary withholding and reporting responsibilities for payments related to potential section 871(m) transactions. | [optional] | +|**qddCorporation** | **Boolean** | Indicates QDD classification is Corporation. | [optional] | +|**qddPartnership** | **Boolean** | Indicates QDD classification is Partnership. | [optional] | +|**qddDisregardedEntity** | **Boolean** | Indicates QDD classification is Disregarded Entity. | [optional] | +|**nonqualifiedIntermediaryCertification** | **Boolean** | Certifies that the entity is not acting as a Qualified Intermediary and is not acting for its own account for the accounts covered by this form. | [optional] | +|**nqiWithholdingStatementTransmissionCertification** | **Boolean** | Certifies that the nonqualified intermediary is submitting this form to transmit withholding certificates and/or other required documentation along with a withholding statement. | [optional] | +|**nqiWithholdingRatePoolComplianceCertification** | **Boolean** | Certifies that the nonqualified intermediary meets the requirements of Regulations section 1.6049-4(c)(4)(iii) for U.S. payees included in a withholding rate pool, excluding publicly traded partnership distributions. | [optional] | +|**nqiQualifiedSecuritiesLenderCertification** | **Boolean** | Certifies that the nonqualified intermediary is acting as a qualified securities lender (not as a QI) and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] | +|**nqiAlternativeWithholdingStatementVerificationCertification** | **Boolean** | Certifies that the nonqualified intermediary has verified, or will verify, all information on alternative withholding statements for consistency with account data to determine the correct withholding rate, as required under sections 1441 or 1471. | [optional] | +|**tfiTreatedAsUsPersonCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person for chapters 3 and 4 purposes concerning reportable amounts and withholdable payments. | [optional] | +|**tfiWithholdingStatementTransmissionCertification** | **Boolean** | Certifies that the territory financial institution is transmitting withholding certificates or other required documentation and has provided or will provide a withholding statement for reportable or withholdable payments. | [optional] | +|**tfiTreatedAsUsPersonForPtpSalesCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person under Regulations section 1.1446(f)-4(a)(2)(i)(B) for amounts realized from sales of publicly traded partnership interests. | [optional] | +|**tfiNomineeUsPersonForPtpDistributionsCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person and as a nominee for purposes of publicly traded partnership distributions under the applicable regulations. | [optional] | +|**tfiNotNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the territory financial institution is not acting as a nominee for publicly traded partnership distributions and is providing withholding statements for those distributions. | [optional] | +|**usBranchNonEffectivelyConnectedIncomeCertification** | **Boolean** | Certifies that the U.S. branch is receiving reportable or withholdable payments that are not effectively connected income, PTP distributions, or proceeds from PTP sales. | [optional] | +|**usBranchAgreementToBeTreatedAsUsPersonCertification** | **Boolean** | Certifies that the U.S. branch of a foreign bank or insurance company agrees to be treated as a U.S. person for reportable amounts or withholdable payments under the applicable regulations. | [optional] | +|**usBranchWithholdingStatementAndComplianceCertification** | **Boolean** | Certifies that the U.S. branch is transmitting required documentation and withholding statements for reportable or withholdable payments and is applying the appropriate FATCA regulations. | [optional] | +|**usBranchActingAsUsPersonForPtpSalesCertification** | **Boolean** | Certifies that the U.S. branch is acting as a U.S. person for purposes of amounts realized from sales of publicly traded partnership interests under the applicable regulations. | [optional] | +|**usBranchNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the U.S. branch is treated as a U.S. person and as a nominee for publicly traded partnership distributions under the applicable regulations. | [optional] | +|**usBranchNotNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the U.S. branch is not acting as a nominee for publicly traded partnership distributions and is providing the required withholding statements. | [optional] | +|**withholdingForeignPartnershipOrTrustCertification** | **Boolean** | Certifies that the entity is a withholding foreign partnership (WP) or a withholding foreign trust (WT) that is compliant with the terms of its WP or WT agreement. | [optional] | +|**nonwithholdingForeignEntityWithholdingStatementCertification** | **Boolean** | Certifies that the entity is a nonwithholding foreign partnership or trust, providing the form for non-effectively connected payments and transmitting required withholding documentation for chapters 3 and 4. | [optional] | +|**foreignEntityPartnerInLowerTierPartnershipCertification** | **Boolean** | Certifies that the entity is a foreign partnership or grantor trust acting as a partner in a lower-tier partnership and is submitting the form for purposes of section 1446(a). | [optional] | +|**foreignPartnershipAmountRealizedSection1446FCertification** | **Boolean** | Certifies that the entity is a foreign partnership receiving an amount realized from the transfer of a partnership interest for purposes of section 1446(f). | [optional] | +|**foreignPartnershipModifiedAmountRealizedCertification** | **Boolean** | Certifies that the foreign partnership is providing a withholding statement for a modified amount realized from the transfer of a partnership interest, when applicable. | [optional] | +|**foreignGrantorTrustAmountRealizedAllocationCertification** | **Boolean** | Certifies that the foreign grantor trust is submitting the form on behalf of each grantor or owner and providing a withholding statement to allocate the amount realized in accordance with the regulations. | [optional] | +|**alternativeWithholdingStatementRelianceCertification** | **Boolean** | Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement. | [optional] | +|**npFfiWithExemptBeneficialOwnersCertification** | **Boolean** | Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners. | [optional] | +|**foreignCentralBankOfIssueCertification** | **Boolean** | Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4). | [optional] | +|**businessName** | **String** | The name of the business associated with the form. | [optional] | +|**businessClassification** | **String** | The classification of the business. | [optional] | +|**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | +|**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | +|**exemptPayeeCode** | **String** | The exempt payee code. | [optional] | +|**exemptFatcaCode** | **String** | The exemption from FATCA reporting code. | [optional] | +|**foreignCountryIndicator** | **Boolean** | Indicates whether the individual or entity is in a foreign country. | [optional] | +|**foreignAddress** | **String** | The foreign address of the individual or entity. | [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/CreateW9FormRequest.md b/docs/A1099/V2/CreateW9FormRequest.md new file mode 100644 index 0000000..740cb7a --- /dev/null +++ b/docs/A1099/V2/CreateW9FormRequest.md @@ -0,0 +1,194 @@ + + +# CreateW9FormRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type. | [optional] [readonly] | +|**name** | **String** | The name of the individual or entity associated with the form. | [optional] | +|**businessName** | **String** | The name of the business associated with the form. | [optional] | +|**businessClassification** | **String** | The classification of the business. | [optional] | +|**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | +|**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | +|**exemptPayeeCode** | **String** | The exempt payee code. | [optional] | +|**exemptFatcaCode** | **String** | The exemption from FATCA reporting code. | [optional] | +|**foreignCountryIndicator** | **Boolean** | Indicates whether the individual or entity is in a foreign country. | [optional] | +|**address** | **String** | The address of the employee. | [optional] | +|**foreignAddress** | **String** | The foreign address of the individual or entity. | [optional] | +|**city** | **String** | The city of residence of the employee. | [optional] | +|**state** | **String** | The state of residence of the employee. | [optional] | +|**zip** | **String** | The ZIP code of residence of the employee. | [optional] | +|**accountNumber** | **String** | The account number associated with the form. | [optional] | +|**tinType** | **String** | The type of TIN provided. | [optional] | +|**tin** | **String** | The taxpayer identification number (TIN). | [optional] | +|**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | +|**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | [optional] | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | +|**citizenshipCountry** | **String** | The country of citizenship. | [optional] | +|**disregardedEntity** | **String** | The name of the disregarded entity receiving the payment (if applicable). | [optional] | +|**entityType** | **String** | The entity type. | [optional] | +|**fatcaStatus** | **String** | The FATCA status. | [optional] | +|**residenceAddress** | **String** | The residential address of the individual or entity. | [optional] | +|**residenceCity** | **String** | The city of residence. | [optional] | +|**residenceState** | **String** | The state of residence. | [optional] | +|**residenceZip** | **String** | The ZIP code of the residence. | [optional] | +|**residenceCountry** | **String** | The country of residence. | [optional] | +|**residenceIsMailing** | **Boolean** | Indicates whether the residence address is the mailing address. | [optional] | +|**mailingAddress** | **String** | The mailing address. | [optional] | +|**mailingCity** | **String** | The city of the mailing address. | [optional] | +|**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] | +|**giin** | **String** | The global intermediary identification number (GIIN). | [optional] | +|**foreignTin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**disregardedEntityFatcaStatus** | **String** | The FATCA status of disregarded entity or branch receiving payment. | [optional] | +|**disregardedAddress** | **String** | The address for disregarded entities. | [optional] | +|**disregardedCity** | **String** | The city for disregarded entities. | [optional] | +|**disregardedState** | **String** | The state for disregarded entities. | [optional] | +|**disregardedZip** | **String** | The ZIP code for disregarded entities. | [optional] | +|**disregardedCountry** | **String** | The country for disregarded entities. | [optional] | +|**disregardedEntityGiin** | **String** | The GIIN for disregarded entities. | [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] | +|**qiPrimaryWithholdingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding responsibility under chapters 3 and 4 for the specified accounts. | [optional] | +|**qiWithholdingResponsibilityForPtpSalesCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding and reporting responsibility under section 1446(f) for amounts realized from sales of interests in publicly traded partnerships. | [optional] | +|**qiNomineeWithholdingResponsibilityForPtpDistributionsCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding responsibility as a nominee under Regulations section 1.1446-4(b)(3) for publicly traded partnership distributions. | [optional] | +|**qiSecuritiesLenderSubstituteDividendWithholdingCertification** | **Boolean** | Certifies that the Qualified Intermediary is acting as a qualified securities lender and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] | +|**qiWithholdingAnd1099ReportingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding under chapters 3 and 4, and primary Form 1099 reporting and backup withholding responsibility for U.S. source interest and substitute interest payments. | [optional] | +|**qiForm1099OrFatcaReportingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes Form 1099 reporting and backup withholding responsibility, or FATCA reporting responsibility as a participating or registered deemed-compliant FFI, for accounts held by specified U.S. persons. | [optional] | +|**qiOptOutOfForm1099ReportingCertification** | **Boolean** | Certifies that the Qualified Intermediary does not assume primary Form 1099 reporting and backup withholding responsibility for the accounts associated with this form. | [optional] | +|**qiWithholdingRatePoolCertification** | **Boolean** | Certifies that the Qualified Intermediary meets the requirements for allocating payments to a chapter 4 withholding rate pool of U.S. payees under Regulations section 1.6049-4(c)(4)(iii). | [optional] | +|**qiIntermediaryOrFlowThroughEntityDocumentationCertification** | **Boolean** | Certifies that the Qualified Intermediary has obtained or will obtain documentation confirming the status of any intermediary or flow-through entity as a participating FFI, registered deemed-compliant FFI, or QI for U.S. payees in a chapter 4 withholding rate pool. | [optional] | +|**qualifiedDerivativesDealerCertification** | **Boolean** | Certifies that the Qualified Derivatives Dealer (QDD) is approved by the IRS and assumes primary withholding and reporting responsibilities for payments related to potential section 871(m) transactions. | [optional] | +|**qddCorporation** | **Boolean** | Indicates QDD classification is Corporation. | [optional] | +|**qddPartnership** | **Boolean** | Indicates QDD classification is Partnership. | [optional] | +|**qddDisregardedEntity** | **Boolean** | Indicates QDD classification is Disregarded Entity. | [optional] | +|**nonqualifiedIntermediaryCertification** | **Boolean** | Certifies that the entity is not acting as a Qualified Intermediary and is not acting for its own account for the accounts covered by this form. | [optional] | +|**nqiWithholdingStatementTransmissionCertification** | **Boolean** | Certifies that the nonqualified intermediary is submitting this form to transmit withholding certificates and/or other required documentation along with a withholding statement. | [optional] | +|**nqiWithholdingRatePoolComplianceCertification** | **Boolean** | Certifies that the nonqualified intermediary meets the requirements of Regulations section 1.6049-4(c)(4)(iii) for U.S. payees included in a withholding rate pool, excluding publicly traded partnership distributions. | [optional] | +|**nqiQualifiedSecuritiesLenderCertification** | **Boolean** | Certifies that the nonqualified intermediary is acting as a qualified securities lender (not as a QI) and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] | +|**nqiAlternativeWithholdingStatementVerificationCertification** | **Boolean** | Certifies that the nonqualified intermediary has verified, or will verify, all information on alternative withholding statements for consistency with account data to determine the correct withholding rate, as required under sections 1441 or 1471. | [optional] | +|**territoryFinancialInstitutionCertification** | **Boolean** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] | +|**tfiTreatedAsUsPersonCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person for chapters 3 and 4 purposes concerning reportable amounts and withholdable payments. | [optional] | +|**tfiWithholdingStatementTransmissionCertification** | **Boolean** | Certifies that the territory financial institution is transmitting withholding certificates or other required documentation and has provided or will provide a withholding statement for reportable or withholdable payments. | [optional] | +|**tfiTreatedAsUsPersonForPtpSalesCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person under Regulations section 1.1446(f)-4(a)(2)(i)(B) for amounts realized from sales of publicly traded partnership interests. | [optional] | +|**tfiNomineeUsPersonForPtpDistributionsCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person and as a nominee for purposes of publicly traded partnership distributions under the applicable regulations. | [optional] | +|**tfiNotNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the territory financial institution is not acting as a nominee for publicly traded partnership distributions and is providing withholding statements for those distributions. | [optional] | +|**usBranchNonEffectivelyConnectedIncomeCertification** | **Boolean** | Certifies that the U.S. branch is receiving reportable or withholdable payments that are not effectively connected income, PTP distributions, or proceeds from PTP sales. | [optional] | +|**usBranchAgreementToBeTreatedAsUsPersonCertification** | **Boolean** | Certifies that the U.S. branch of a foreign bank or insurance company agrees to be treated as a U.S. person for reportable amounts or withholdable payments under the applicable regulations. | [optional] | +|**usBranchWithholdingStatementAndComplianceCertification** | **Boolean** | Certifies that the U.S. branch is transmitting required documentation and withholding statements for reportable or withholdable payments and is applying the appropriate FATCA regulations. | [optional] | +|**usBranchActingAsUsPersonForPtpSalesCertification** | **Boolean** | Certifies that the U.S. branch is acting as a U.S. person for purposes of amounts realized from sales of publicly traded partnership interests under the applicable regulations. | [optional] | +|**usBranchNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the U.S. branch is treated as a U.S. person and as a nominee for publicly traded partnership distributions under the applicable regulations. | [optional] | +|**usBranchNotNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the U.S. branch is not acting as a nominee for publicly traded partnership distributions and is providing the required withholding statements. | [optional] | +|**withholdingForeignPartnershipOrTrustCertification** | **Boolean** | Certifies that the entity is a withholding foreign partnership (WP) or a withholding foreign trust (WT) that is compliant with the terms of its WP or WT agreement. | [optional] | +|**nonwithholdingForeignEntityWithholdingStatementCertification** | **Boolean** | Certifies that the entity is a nonwithholding foreign partnership or trust, providing the form for non-effectively connected payments and transmitting required withholding documentation for chapters 3 and 4. | [optional] | +|**foreignEntityPartnerInLowerTierPartnershipCertification** | **Boolean** | Certifies that the entity is a foreign partnership or grantor trust acting as a partner in a lower-tier partnership and is submitting the form for purposes of section 1446(a). | [optional] | +|**foreignPartnershipAmountRealizedSection1446FCertification** | **Boolean** | Certifies that the entity is a foreign partnership receiving an amount realized from the transfer of a partnership interest for purposes of section 1446(f). | [optional] | +|**foreignPartnershipModifiedAmountRealizedCertification** | **Boolean** | Certifies that the foreign partnership is providing a withholding statement for a modified amount realized from the transfer of a partnership interest, when applicable. | [optional] | +|**foreignGrantorTrustAmountRealizedAllocationCertification** | **Boolean** | Certifies that the foreign grantor trust is submitting the form on behalf of each grantor or owner and providing a withholding statement to allocate the amount realized in accordance with the regulations. | [optional] | +|**alternativeWithholdingStatementRelianceCertification** | **Boolean** | Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement. | [optional] | +|**npFfiWithExemptBeneficialOwnersCertification** | **Boolean** | Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners. | [optional] | +|**ffiSponsoringEntity** | **String** | The name of the entity that sponsors the foreign financial institution (FFI). | [optional] | +|**investmentEntityCertification** | **Boolean** | Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. | [optional] | +|**controlledForeignCorporationCertification** | **Boolean** | Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. | [optional] | +|**ownerDocumentedFfiCertification** | **Boolean** | Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. | [optional] | +|**ownerDocumentedFfiReportingStatementCertification** | **Boolean** | Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. | [optional] | +|**ownerDocumentedFfiAuditorLetterCertification** | **Boolean** | Certifies that the FFI will provide an auditor’s letter and required owner reporting documentation to confirm its status as an owner-documented FFI. | [optional] | +|**compliantNonregisteringLocalBankCertification** | **Boolean** | Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. | [optional] | +|**compliantFfiLowValueAccountsCertification** | **Boolean** | Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. | [optional] | +|**sponsoredCloselyHeldEntitySponsoringEntity** | **String** | The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. | [optional] | +|**sponsoredCloselyHeldInvestmentVehicleCertification** | **Boolean** | Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. | [optional] | +|**compliantLimitedLifeDebtEntityCertification** | **Boolean** | Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. | [optional] | +|**investmentEntityNoFinancialAccountsCertification** | **Boolean** | Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. | [optional] | +|**restrictedDistributorCertification** | **Boolean** | Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. | [optional] | +|**restrictedDistributorAgreementCertification** | **Boolean** | Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. | [optional] | +|**restrictedDistributorPreexistingSalesComplianceCertification** | **Boolean** | Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. | [optional] | +|**foreignCentralBankOfIssueCertification** | **Boolean** | Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4). | [optional] | +|**nonreportingIgaFfiCertification** | **Boolean** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] | +|**igaCountry** | **String** | The country for the applicable IGA with the United States. | [optional] | +|**igaModel** | **String** | The applicable IGA model. | [optional] | +|**igaLegalStatusTreatment** | **String** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] | +|**igaFfiTrusteeOrSponsor** | **String** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] | +|**igaFfiTrusteeIsForeign** | **Boolean** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] | +|**treatyQualifiedPensionFundCertification** | **Boolean** | Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. | [optional] | +|**qualifiedRetirementFundCertification** | **Boolean** | Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. | [optional] | +|**narrowParticipationRetirementFundCertification** | **Boolean** | Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. | [optional] | +|**section401AEquivalentPensionPlanCertification** | **Boolean** | Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. | [optional] | +|**investmentEntityForRetirementFundsCertification** | **Boolean** | Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. | [optional] | +|**exemptBeneficialOwnerSponsoredRetirementFundCertification** | **Boolean** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] | +|**exceptedNonfinancialGroupEntityCertification** | **Boolean** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] | +|**exceptedNonfinancialStartUpCertification** | **Boolean** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] | +|**startupFormationOrResolutionDate** | **LocalDate** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] | +|**exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification** | **Boolean** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] | +|**nonfinancialEntityFilingDate** | **LocalDate** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] | +|**publiclyTradedNffeCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] | +|**publiclyTradedNffeSecuritiesMarket** | **String** | The name of the securities market where the corporation's stock is regularly traded. | [optional] | +|**nffeAffiliateOfPubliclyTradedEntityCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] | +|**publiclyTradedEntity** | **String** | The name of the affiliated entity whose stock is regularly traded on an established securities market. | [optional] | +|**nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket** | **String** | The name of the established securities market where the affiliated entity's stock is traded. | [optional] | +|**exceptedTerritoryNffeCertification** | **Boolean** | Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. | [optional] | +|**activeNffeCertification** | **Boolean** | Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. | [optional] | +|**passiveNffeCertification** | **Boolean** | Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. | [optional] | +|**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 of the form. | [optional] | +|**makingTreatyClaim** | **Boolean** | Indicates whether the entity is making a treaty claim. | [optional] | +|**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not legally required. | [optional] | +|**treatyCountryCertification** | **Boolean** | Certifies the beneficial owner's country under the U.S. tax treaty. | [optional] | +|**treatyCountry** | **String** | The country for which the treaty applies. | [optional] | +|**benefitLimitationCertification** | **Boolean** | Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. | [optional] | +|**benefitLimitation** | **String** | The benefit limitation for tax treaty claims. | [optional] | +|**qualifiedResidentStatusCertification** | **Boolean** | Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. | [optional] | +|**treatyArticle** | **String** | The specific article of the treaty being claimed. | [optional] | +|**withholdingRate** | **String** | The withholding rate applied as per the treaty. | [optional] | +|**incomeType** | **String** | The type of income covered by the treaty. | [optional] | +|**treatyReasons** | **String** | The reasons for claiming treaty benefits. | [optional] | +|**ownerDocumentedFfiTrustBeneficiariesCertification** | **Boolean** | Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. | [optional] | +|**nonCommercialFinancialActivityCertification** | **Boolean** | Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. | [optional] | +|**internationOrganizationCertification** | **Boolean** | Certifies that the entity is an international organization described in section 7701(a)(18). | [optional] | +|**intergovernmentalOrganizationCertification** | **Boolean** | Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. | [optional] | +|**exemptBeneficialOwnerOwnedInvestmentEntityCertification** | **Boolean** | Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. | [optional] | +|**section501COrganizationCertification** | **Boolean** | Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. | [optional] | +|**determinationLetterDate** | **LocalDate** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] | +|**nonprofitOrganizationCertification** | **Boolean** | Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. | [optional] | +|**passiveNffeNoSubstantialUsOwnersCertification** | **Boolean** | Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. | [optional] | +|**passiveNffeSubstantialUsOwnersProvidedCertification** | **Boolean** | Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. | [optional] | +|**exceptedInterAffiliateFfiCertification** | **Boolean** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] | +|**substantialUsOwners** | [**List<SubstantialUsOwnerRequest>**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] | +|**capacityToSignCertification** | **Boolean** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] | +|**birthday** | **LocalDate** | The birthday of the individual associated with the form. | [optional] | +|**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] | +|**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] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/Form1042SList.md b/docs/A1099/V2/Form1042SList.md new file mode 100644 index 0000000..c05b172 --- /dev/null +++ b/docs/A1099/V2/Form1042SList.md @@ -0,0 +1,14 @@ + + +# Form1042SList + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**forms** | [**List<Form1042SListItem>**](Form1042SListItem.md) | | [optional] | +|**formType** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/Form1042SListItem.md b/docs/A1099/V2/Form1042SListItem.md new file mode 100644 index 0000000..54ce0ba --- /dev/null +++ b/docs/A1099/V2/Form1042SListItem.md @@ -0,0 +1,230 @@ + + +# Form1042SListItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uniqueFormId** | **String** | Unique form identifier | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**recipientDateOfBirth** | **OffsetDateTime** | Recipient's date of birth | [optional] | +|**recipientGiin** | **String** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] | +|**recipientForeignTin** | **String** | Recipient's foreign TIN | [optional] | +|**lobCode** | [**LobCodeEnum**](#LobCodeEnum) | Limitation on benefits code | [optional] | +|**incomeCode** | **String** | Income code | [optional] | +|**grossIncome** | **Double** | Gross income | [optional] | +|**withholdingIndicator** | **String** | Withholding indicator | [optional] | +|**taxCountryCode** | **String** | Country code | [optional] | +|**exemptionCodeChap3** | [**ExemptionCodeChap3Enum**](#ExemptionCodeChap3Enum) | Exemption code (Chapter 3) | [optional] | +|**exemptionCodeChap4** | [**ExemptionCodeChap4Enum**](#ExemptionCodeChap4Enum) | Exemption code (Chapter 4) | [optional] | +|**taxRateChap3** | **String** | Tax rate (Chapter 3) | [optional] | +|**withholdingAllowance** | **Double** | Withholding allowance | [optional] | +|**federalTaxWithheld** | **Double** | Federal tax withheld | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | Tax not deposited indicator | [optional] | +|**academicIndicator** | **Boolean** | Academic indicator | [optional] | +|**taxWithheldOtherAgents** | **Double** | Tax withheld by other agents | [optional] | +|**amountRepaid** | **Double** | Amount repaid to recipient | [optional] | +|**taxPaidAgent** | **Double** | Tax paid by withholding agent | [optional] | +|**chap3StatusCode** | [**Chap3StatusCodeEnum**](#Chap3StatusCodeEnum) | Chapter 3 status code | [optional] | +|**chap4StatusCode** | [**Chap4StatusCodeEnum**](#Chap4StatusCodeEnum) | Chapter 4 status code | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | Primary withholding agent information | [optional] | +|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | Intermediary or flow-through entity information | [optional] | +|**issuerId** | **String** | Issuer ID | [optional] | +|**referenceId** | **String** | Reference ID | [optional] | +|**recipientTin** | **String** | Recipient Tax ID Number | [optional] | +|**recipientName** | **String** | Recipient name | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**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: LobCodeEnum + +| Name | Value | +|---- | -----| +| INDIVIDUAL | "Individual" | +| GOVERNMENT_CONTRACTING_STATE | "GovernmentContractingState" | +| TAX_EXEMPT_PENSION_TRUST | "TaxExemptPensionTrust" | +| TAX_EXEMPT_CHARITABLE_ORGANIZATION | "TaxExemptCharitableOrganization" | +| PUBLICLY_TRADED_CORPORATION | "PubliclyTradedCorporation" | +| SUBSIDIARY_OF_PUBLICLY_TRADED_CORPORATION | "SubsidiaryOfPubliclyTradedCorporation" | +| COMPANY_OWNERSHIP_BASE_EROSION_TEST | "CompanyOwnershipBaseErosionTest" | +| COMPANY_DERIVATIVE_BENEFITS_TEST | "CompanyDerivativeBenefitsTest" | +| COMPANY_ACTIVE_TRADE_OR_BUSINESS_TEST | "CompanyActiveTradeOrBusinessTest" | +| DISCRETIONARY_DETERMINATION | "DiscretionaryDetermination" | +| OTHER | "Other" | +| NO_LOB_ARTICLE_IN_TREATY | "NoLobArticleInTreaty" | + + + +## Enum: ExemptionCodeChap3Enum + +| Name | Value | +|---- | -----| +| TAX_RATE_DUE_TO_BACKUP_WITHHOLDING | "TaxRateDueToBackupWithholding" | +| EFFECTIVELY_CONNECTED_INCOME | "EffectivelyConnectedIncome" | +| EXEMPT_UNDER_IRC | "ExemptUnderIrc" | +| INCOME_NOT_FROM_US_SOURCES | "IncomeNotFromUsSources" | +| EXEMPT_UNDER_TAX_TREATY | "ExemptUnderTaxTreaty" | +| PORTFOLIO_INTEREST_EXEMPT_UNDER_IRC | "PortfolioInterestExemptUnderIrc" | +| QI_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY | "QiThatAssumesPrimaryWithholdingResponsibility" | +| WF_POR_WFT | "WfPorWft" | +| US_BRANCH_TREATED_AS_US_PERSON | "UsBranchTreatedAsUsPerson" | +| TERRITORY_FI_TREATED_AS_US_PERSON | "TerritoryFiTreatedAsUsPerson" | +| QI_REPRESENTS_INCOME_EXEMPT | "QiRepresentsIncomeExempt" | +| QSL_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY | "QslThatAssumesPrimaryWithholdingResponsibility" | +| PAYEE_SUBJECTED_TO_CHAPTER4_WITHHOLDING | "PayeeSubjectedToChapter4Withholding" | +| QDD_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY | "QddThatAssumesPrimaryWithholdingResponsibility" | +| EXEMPT_UNDER_SECTION897_L | "ExemptUnderSection897L" | +| EXEMPT_UNDER_SECTION892 | "ExemptUnderSection892" | + + + +## Enum: ExemptionCodeChap4Enum + +| Name | Value | +|---- | -----| +| NOT_EXEMPT | "NotExempt" | +| GRANDFATHERED_PAYMENT | "GrandfatheredPayment" | +| EFFECTIVELY_CONNECTED_INCOME | "EffectivelyConnectedIncome" | +| PAYEE_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING | "PayeeNotSubjectToChapter4Withholding" | +| EXCLUDED_NONFINANCIAL_PAYMENT | "ExcludedNonfinancialPayment" | +| FOREIGN_ENTITY_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY | "ForeignEntityThatAssumesPrimaryWithholdingResponsibility" | +| US_PAYEES_OF_PARTICIPATING_FFI | "UsPayeesOfParticipatingFfi" | +| EXEMPT_FROM_WITHHOLDING_UNDER_IGA | "ExemptFromWithholdingUnderIga" | +| DORMANT_ACCOUNT | "DormantAccount" | +| OTHER_PAYMENT_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING | "OtherPaymentNotSubjectToChapter4Withholding" | + + + +## Enum: Chap3StatusCodeEnum + +| Name | Value | +|---- | -----| +| US_WITHHOLDING_AGENT_FI | "USWithholdingAgentFI" | +| US_WITHHOLDING_AGENT_OTHER | "USWithholdingAgentOther" | +| TERRITORY_FI_TREATED_AS_US_PERSON | "TerritoryFITreatedAsUSPerson" | +| TERRITORY_FI_NOT_TREATED_AS_US_PERSON | "TerritoryFINotTreatedAsUSPerson" | +| US_BRANCH_TREATED_AS_US_PERSON | "USBranchTreatedAsUSPerson" | +| US_BRANCH_NOT_TREATED_AS_US_PERSON | "USBranchNotTreatedAsUSPerson" | +| US_BRANCH_ECI_PRESUMPTION_APPLIED | "USBranchECIPresumptionApplied" | +| PARTNERSHIP_OTHER_THAN_WITHHOLDING_FOREIGN_PARTNERSHIP | "PartnershipOtherThanWithholdingForeignPartnership" | +| WITHHOLDING_FOREIGN_PARTNERSHIP | "WithholdingForeignPartnership" | +| TRUST_OTHER_THAN_WITHHOLDING_FOREIGN_TRUST | "TrustOtherThanWithholdingForeignTrust" | +| WITHHOLDING_FOREIGN_TRUST | "WithholdingForeignTrust" | +| QUALIFIED_INTERMEDIARY | "QualifiedIntermediary" | +| QUALIFIED_SECURITIES_LENDER_QUALIFIED_INTERMEDIARY | "QualifiedSecuritiesLenderQualifiedIntermediary" | +| QUALIFIED_SECURITIES_LENDER_OTHER | "QualifiedSecuritiesLenderOther" | +| CORPORATION | "Corporation" | +| INDIVIDUAL | "Individual" | +| ESTATE | "Estate" | +| PRIVATE_FOUNDATION | "PrivateFoundation" | +| GOVERNMENT_OR_INTERNATIONAL_ORGANIZATION | "GovernmentOrInternationalOrganization" | +| TAX_EXEMPT_ORGANIZATION_SECTION501C_ENTITIES | "TaxExemptOrganizationSection501cEntities" | +| UNKNOWN_RECIPIENT | "UnknownRecipient" | +| ARTIST_OR_ATHLETE | "ArtistOrAthlete" | +| PENSION | "Pension" | +| FOREIGN_CENTRAL_BANK_OF_ISSUE | "ForeignCentralBankOfIssue" | +| NONQUALIFIED_INTERMEDIARY | "NonqualifiedIntermediary" | +| HYBRID_ENTITY_MAKING_TREATY_CLAIM | "HybridEntityMakingTreatyClaim" | +| WITHHOLDING_RATE_POOL_GENERAL | "WithholdingRatePoolGeneral" | +| WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION | "WithholdingRatePoolExemptOrganization" | +| PAI_WITHHOLDING_RATE_POOL_GENERAL | "PAIWithholdingRatePoolGeneral" | +| PAI_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION | "PAIWithholdingRatePoolExemptOrganization" | +| AGENCY_WITHHOLDING_RATE_POOL_GENERAL | "AgencyWithholdingRatePoolGeneral" | +| AGENCY_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION | "AgencyWithholdingRatePoolExemptOrganization" | +| US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI | "USWithholdingAgentForeignBranchOfFI" | +| QUALIFIED_DERIVATIVES_DEALER | "QualifiedDerivativesDealer" | +| FOREIGN_GOVERNMENT_INTEGRAL_PART | "ForeignGovernmentIntegralPart" | +| FOREIGN_GOVERNMENT_CONTROLLED_ENTITY | "ForeignGovernmentControlledEntity" | +| PUBLICLY_TRADED_PARTNERSHIP | "PubliclyTradedPartnership" | +| DISCLOSING_QUALIFIED_INTERMEDIARY | "DisclosingQualifiedIntermediary" | + + + +## Enum: Chap4StatusCodeEnum + +| Name | Value | +|---- | -----| +| US_WITHHOLDING_AGENT_FI | "UsWithholdingAgentFi" | +| US_WITHHOLDING_AGENT_OTHER | "UsWithholdingAgentOther" | +| TERRITORY_FI_NOT_TREATED_AS_US_PERSON | "TerritoryFiNotTreatedAsUsPerson" | +| TERRITORY_FI_TREATED_AS_US_PERSON | "TerritoryFiTreatedAsUsPerson" | +| PARTICIPATING_FFI_OTHER | "ParticipatingFfiOther" | +| PARTICIPATING_FFI_REPORTING_MODEL2_FFI | "ParticipatingFfiReportingModel2Ffi" | +| REGISTERED_DEEMED_COMPLIANT_FFI_REPORTING_MODEL1_FFI | "RegisteredDeemedCompliantFfiReportingModel1Ffi" | +| REGISTERED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY | "RegisteredDeemedCompliantFfiSponsoredEntity" | +| REGISTERED_DEEMED_COMPLIANT_FFI_OTHER | "RegisteredDeemedCompliantFfiOther" | +| CERTIFIED_DEEMED_COMPLIANT_FFI_OTHER | "CertifiedDeemedCompliantFfiOther" | +| CERTIFIED_DEEMED_COMPLIANT_FFIFFI_WITH_LOW_VALUE_ACCOUNTS | "CertifiedDeemedCompliantFfiffiWithLowValueAccounts" | +| CERTIFIED_DEEMED_COMPLIANT_FFI_NON_REGISTERING_LOCAL_BANK | "CertifiedDeemedCompliantFfiNonRegisteringLocalBank" | +| CERTIFIED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY | "CertifiedDeemedCompliantFfiSponsoredEntity" | +| CERTIFIED_DEEMED_COMPLIANT_FFI_INVESTMENT_ADVISOR_OR_MANAGER | "CertifiedDeemedCompliantFfiInvestmentAdvisorOrManager" | +| NONPARTICIPATING_FFI | "NonparticipatingFfi" | +| OWNER_DOCUMENTED_FFI | "OwnerDocumentedFfi" | +| US_BRANCH_TREATED_AS_US_PERSON | "UsBranchTreatedAsUsPerson" | +| US_BRANCH_NOT_TREATED_AS_US_PERSON | "UsBranchNotTreatedAsUsPerson" | +| PASSIVE_NFFE_IDENTIFYING_SUBSTANTIAL_US_OWNERS | "PassiveNffeIdentifyingSubstantialUsOwners" | +| PASSIVE_NFFE_WITH_NO_SUBSTANTIAL_US_OWNERS | "PassiveNffeWithNoSubstantialUsOwners" | +| PUBLICLY_TRADED_NFFE_OR_AFFILIATE | "PubliclyTradedNffeOrAffiliate" | +| ACTIVE_NFFE | "ActiveNffe" | +| INDIVIDUAL | "Individual" | +| SECTION501_C_ENTITIES | "Section501CEntities" | +| EXCEPTED_TERRITORY_NFFE | "ExceptedTerritoryNffe" | +| EXCEPTED_NFFE_OTHER | "ExceptedNffeOther" | +| EXEMPT_BENEFICIAL_OWNER | "ExemptBeneficialOwner" | +| ENTITY_WHOLLY_OWNED_BY_EXEMPT_BENEFICIAL_OWNERS | "EntityWhollyOwnedByExemptBeneficialOwners" | +| UNKNOWN_RECIPIENT | "UnknownRecipient" | +| RECALCITRANT_ACCOUNT_HOLDER | "RecalcitrantAccountHolder" | +| NONREPORTING_IGAFII | "NonreportingIgafii" | +| DIRECT_REPORTING_NFFE | "DirectReportingNffe" | +| US_REPORTABLE_ACCOUNT | "UsReportableAccount" | +| NON_CONSENTING_US_ACCOUNT | "NonConsentingUsAccount" | +| SPONSORED_DIRECT_REPORTING_NFFE | "SponsoredDirectReportingNffe" | +| EXCEPTED_INTER_AFFILIATE_FFI | "ExceptedInterAffiliateFfi" | +| UNDOCUMENTED_PREEXISTING_OBLIGATION | "UndocumentedPreexistingObligation" | +| US_BRANCH_ECI_PRESUMPTION_APPLIED | "UsBranchEciPresumptionApplied" | +| ACCOUNT_HOLDER_OF_EXCLUDED_FINANCIAL_ACCOUNT | "AccountHolderOfExcludedFinancialAccount" | +| PASSIVE_NFFE_REPORTED_BY_FFI | "PassiveNffeReportedByFfi" | +| NFFE_SUBJECT_TO1472_WITHHOLDING | "NffeSubjectTo1472Withholding" | +| RECALCITRANT_POOL_NO_US_INDICIA | "RecalcitrantPoolNoUsIndicia" | +| RECALCITRANT_POOL_US_INDICIA | "RecalcitrantPoolUsIndicia" | +| RECALCITRANT_POOL_DORMANT_ACCOUNT | "RecalcitrantPoolDormantAccount" | +| RECALCITRANT_POOL_US_PERSONS | "RecalcitrantPoolUsPersons" | +| RECALCITRANT_POOL_PASSIVE_NFF_ES | "RecalcitrantPoolPassiveNffEs" | +| NONPARTICIPATING_FFI_POOL | "NonparticipatingFfiPool" | +| US_PAYEES_POOL | "UsPayeesPool" | +| QI_RECALCITRANT_POOL_GENERAL | "QiRecalcitrantPoolGeneral" | +| US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI | "UsWithholdingAgentForeignBranchOfFi" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1042SListItemResponse.md b/docs/A1099/V2/Form1042SListItemResponse.md new file mode 100644 index 0000000..037ae4d --- /dev/null +++ b/docs/A1099/V2/Form1042SListItemResponse.md @@ -0,0 +1,69 @@ + + +# Form1042SListItemResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uniqueFormId** | **String** | Unique form identifier | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**recipientDateOfBirth** | **OffsetDateTime** | Recipient's date of birth | [optional] | +|**recipientGiin** | **String** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] | +|**recipientForeignTin** | **String** | Recipient's foreign TIN | [optional] | +|**lobCode** | **String** | Limitation on benefits code | [optional] | +|**incomeCode** | **String** | Income code | [optional] | +|**grossIncome** | **Double** | Gross income | [optional] | +|**withholdingIndicator** | **String** | Withholding indicator | [optional] | +|**taxCountryCode** | **String** | Country code | [optional] | +|**exemptionCodeChap3** | **String** | Exemption code (Chapter 3) | [optional] | +|**exemptionCodeChap4** | **String** | Exemption code (Chapter 4) | [optional] | +|**taxRateChap3** | **String** | Tax rate (Chapter 3) | [optional] | +|**withholdingAllowance** | **Double** | Withholding allowance | [optional] | +|**federalTaxWithheld** | **Double** | Federal tax withheld | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | Tax not deposited indicator | [optional] | +|**academicIndicator** | **Boolean** | Academic indicator | [optional] | +|**taxWithheldOtherAgents** | **Double** | Tax withheld by other agents | [optional] | +|**amountRepaid** | **Double** | Amount repaid to recipient | [optional] | +|**taxPaidAgent** | **Double** | Tax paid by withholding agent | [optional] | +|**chap3StatusCode** | **String** | Chapter 3 status code | [optional] | +|**chap4StatusCode** | **String** | Chapter 4 status code | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] | +|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThroughResponse**](IntermediaryOrFlowThroughResponse.md) | Intermediary or flow-through entity information | [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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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/Form1042SRequest.md b/docs/A1099/V2/Form1042SRequest.md new file mode 100644 index 0000000..9415dbd --- /dev/null +++ b/docs/A1099/V2/Form1042SRequest.md @@ -0,0 +1,84 @@ + + +# Form1042SRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uniqueFormId** | **String** | Unique form identifier | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**recipientDateOfBirth** | **OffsetDateTime** | Recipient's date of birth | [optional] | +|**recipientGiin** | **String** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] | +|**recipientForeignTin** | **String** | Recipient's foreign TIN | [optional] | +|**lobCode** | **String** | Limitation on benefits code | [optional] | +|**incomeCode** | **String** | Income code | [optional] | +|**grossIncome** | **Double** | Gross income | [optional] | +|**withholdingIndicator** | **String** | Withholding indicator | [optional] | +|**taxCountryCode** | **String** | Country code | [optional] | +|**exemptionCodeChap3** | **String** | Exemption code (Chapter 3) | [optional] | +|**exemptionCodeChap4** | **String** | Exemption code (Chapter 4) | [optional] | +|**taxRateChap3** | **String** | Tax rate (Chapter 3) | [optional] | +|**withholdingAllowance** | **Double** | Withholding allowance | [optional] | +|**federalTaxWithheld** | **Double** | Federal tax withheld | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | Tax not deposited indicator | [optional] | +|**academicIndicator** | **Boolean** | Academic indicator | [optional] | +|**taxWithheldOtherAgents** | **Double** | Tax withheld by other agents | [optional] | +|**amountRepaid** | **Double** | Amount repaid to recipient | [optional] | +|**taxPaidAgent** | **Double** | Tax paid by withholding agent | [optional] | +|**chap3StatusCode** | **String** | Chapter 3 status code | [optional] | +|**chap4StatusCode** | **String** | Chapter 4 status code | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgentRequest**](PrimaryWithholdingAgentRequest.md) | Primary withholding agent information | [optional] | +|**intermediaryOrFlowThrough** | [**IntermediaryOrFlowThroughRequest**](IntermediaryOrFlowThroughRequest.md) | Intermediary or flow-through entity information | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [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" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1042SResponse.md b/docs/A1099/V2/Form1042SResponse.md new file mode 100644 index 0000000..6cde9cf --- /dev/null +++ b/docs/A1099/V2/Form1042SResponse.md @@ -0,0 +1,73 @@ + + +# Form1042SResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**userId** | **String** | | [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] | +|**recipientEmail** | **String** | | [optional] | +|**accountNumber** | **String** | | [optional] | +|**officeCode** | **String** | | [optional] | +|**recipientNonUsProvince** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**federalEFile** | **Boolean** | | [optional] | +|**postalMail** | **Boolean** | | [optional] | +|**stateEFile** | **Boolean** | | [optional] | +|**tinMatch** | **Boolean** | | [optional] | +|**addressVerification** | **Boolean** | | [optional] | +|**federalEfileStatus** | [**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" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | + + + diff --git a/docs/A1099/V2/Form1095BListItem.md b/docs/A1099/V2/Form1095BListItem.md index 7affaa6..1601acb 100644 --- a/docs/A1099/V2/Form1095BListItem.md +++ b/docs/A1099/V2/Form1095BListItem.md @@ -7,35 +7,35 @@ | 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] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**employeeFirstName** | **String** | Employee's first name | [optional] | +|**employeeMiddleName** | **String** | Employee's middle name | [optional] | +|**employeeLastName** | **String** | Employee's last name | [optional] | +|**employeeNameSuffix** | **String** | Employee's name suffix | [optional] | +|**employeeDateOfBirth** | **OffsetDateTime** | Employee's date of birth | [optional] | +|**originOfHealthCoverageCode** | [**OriginOfHealthCoverageCodeEnum**](#OriginOfHealthCoverageCodeEnum) | Origin of health coverage code | [optional] | +|**coveredIndividuals** | [**List<CoveredIndividualRequest>**](CoveredIndividualRequest.md) | Covered individuals information | [optional] | +|**issuerId** | **String** | Issuer ID | [optional] | +|**referenceId** | **String** | Reference ID | [optional] | +|**recipientTin** | **String** | Recipient Tax ID Number | [optional] | +|**recipientName** | **String** | Recipient name | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -43,13 +43,13 @@ | Name | Value | |---- | -----| -| SMALL_BUSINESS_HEALTH_OPTIONS_PROGRAM | "SmallBusinessHealthOptionsProgram" | -| EMPLOYER_SPONSORED | "EmployerSponsored" | -| GOVERNMENT_SPONSORED | "GovernmentSponsored" | -| INDIVIDUAL_MARKET | "IndividualMarket" | -| MULTIEMPLOYER_PLAN | "MultiemployerPlan" | -| OTHER_DESIGNATED_MINIMUM_ESSENTIAL_COVERAGE | "OtherDesignatedMinimumEssentialCoverage" | -| EMPLOYER_SPONSORED_INDIVIDUAL_HRA | "EmployerSponsoredIndividualHra" | +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | diff --git a/docs/A1099/V2/Form1095BListItemResponse.md b/docs/A1099/V2/Form1095BListItemResponse.md new file mode 100644 index 0000000..96cbaa1 --- /dev/null +++ b/docs/A1099/V2/Form1095BListItemResponse.md @@ -0,0 +1,47 @@ + + +# Form1095BListItemResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**originOfHealthCoverageCode** | **String** | Origin of health coverage code | [optional] | +|**coveredIndividuals** | [**List<CoveredIndividualReferenceResponse>**](CoveredIndividualReferenceResponse.md) | Covered individuals information | [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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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/Form1095BRequest.md b/docs/A1099/V2/Form1095BRequest.md index dc8bd4c..56797d9 100644 --- a/docs/A1099/V2/Form1095BRequest.md +++ b/docs/A1099/V2/Form1095BRequest.md @@ -7,36 +7,36 @@ | 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] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**employeeFirstName** | **String** | Employee's first name | [optional] | +|**employeeMiddleName** | **String** | Employee's middle name | [optional] | +|**employeeLastName** | **String** | Employee's last name | [optional] | +|**employeeNameSuffix** | **String** | Employee's name suffix | [optional] | +|**employeeDateOfBirth** | **OffsetDateTime** | Employee's date of birth | [optional] | +|**originOfHealthCoverageCode** | [**OriginOfHealthCoverageCodeEnum**](#OriginOfHealthCoverageCodeEnum) | Origin of health coverage code | [optional] | +|**coveredIndividuals** | [**List<CoveredIndividualRequest>**](CoveredIndividualRequest.md) | Covered individuals information | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -44,13 +44,13 @@ | Name | Value | |---- | -----| -| SMALL_BUSINESS_HEALTH_OPTIONS_PROGRAM | "SmallBusinessHealthOptionsProgram" | -| EMPLOYER_SPONSORED | "EmployerSponsored" | -| GOVERNMENT_SPONSORED | "GovernmentSponsored" | -| INDIVIDUAL_MARKET | "IndividualMarket" | -| MULTIEMPLOYER_PLAN | "MultiemployerPlan" | -| OTHER_DESIGNATED_MINIMUM_ESSENTIAL_COVERAGE | "OtherDesignatedMinimumEssentialCoverage" | -| EMPLOYER_SPONSORED_INDIVIDUAL_HRA | "EmployerSponsoredIndividualHra" | +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | @@ -58,12 +58,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099BaseResponse.md b/docs/A1099/V2/Form1099BaseResponse.md new file mode 100644 index 0000000..5f14fa1 --- /dev/null +++ b/docs/A1099/V2/Form1099BaseResponse.md @@ -0,0 +1,45 @@ + + +# Form1099BaseResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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/Form1099DivListItem.md b/docs/A1099/V2/Form1099DivListItem.md index 719044d..0251508 100644 --- a/docs/A1099/V2/Form1099DivListItem.md +++ b/docs/A1099/V2/Form1099DivListItem.md @@ -7,50 +7,50 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | | [optional] | -|**qualifiedDividends** | **String** | | [optional] | -|**totalCapitalGainDistr** | **String** | | [optional] | -|**unrecapSec1250Gain** | **String** | | [optional] | -|**section1202Gain** | **String** | | [optional] | -|**collectiblesGain** | **String** | | [optional] | -|**section897OrdinaryDividends** | **String** | | [optional] | -|**section897CapitalGain** | **String** | | [optional] | -|**nondividendDistributions** | **String** | | [optional] | -|**federalIncomeTaxWithheld** | **String** | | [optional] | -|**section199ADividends** | **String** | | [optional] | -|**investmentExpenses** | **String** | | [optional] | -|**foreignTaxPaid** | **String** | | [optional] | -|**foreignCountryOrUSPossession** | **String** | | [optional] | -|**cashLiquidationDistributions** | **String** | | [optional] | -|**noncashLiquidationDistributions** | **String** | | [optional] | -|**exemptInterestDividends** | **String** | | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | | [optional] | -|**fatcaFilingRequirement** | **String** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **String** | Qualified dividends | [optional] | +|**totalCapitalGainDistr** | **String** | Total capital gain distributions | [optional] | +|**unrecapSec1250Gain** | **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] | +|**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** | **String** | 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] | +|**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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**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/Form1099DivRequest.md b/docs/A1099/V2/Form1099DivRequest.md index a1a946f..fdab242 100644 --- a/docs/A1099/V2/Form1099DivRequest.md +++ b/docs/A1099/V2/Form1099DivRequest.md @@ -7,48 +7,48 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | | [optional] | -|**qualifiedDividends** | **String** | | [optional] | -|**totalCapitalGainDistr** | **String** | | [optional] | -|**unrecapSec1250Gain** | **String** | | [optional] | -|**section1202Gain** | **String** | | [optional] | -|**collectiblesGain** | **String** | | [optional] | -|**section897OrdinaryDividends** | **String** | | [optional] | -|**section897CapitalGain** | **String** | | [optional] | -|**nondividendDistributions** | **String** | | [optional] | -|**federalIncomeTaxWithheld** | **String** | | [optional] | -|**section199ADividends** | **String** | | [optional] | -|**investmentExpenses** | **String** | | [optional] | -|**foreignTaxPaid** | **String** | | [optional] | -|**foreignCountryOrUSPossession** | **String** | | [optional] | -|**cashLiquidationDistributions** | **String** | | [optional] | -|**noncashLiquidationDistributions** | **String** | | [optional] | -|**exemptInterestDividends** | **String** | | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | | [optional] | -|**fatcaFilingRequirement** | **String** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **String** | Qualified dividends | [optional] | +|**totalCapitalGainDistr** | **String** | Total capital gain distributions | [optional] | +|**unrecapSec1250Gain** | **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] | +|**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** | **String** | FATCA filing requirement | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -56,12 +56,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099DivResponse.md b/docs/A1099/V2/Form1099DivResponse.md index 88166d2..cd556b1 100644 --- a/docs/A1099/V2/Form1099DivResponse.md +++ b/docs/A1099/V2/Form1099DivResponse.md @@ -38,11 +38,11 @@ |**tinMatch** | **Boolean** | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetailApp>**](StateEfileStatusDetailApp.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<ValidationErrorApp>**](ValidationErrorApp.md) | | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | @@ -50,12 +50,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099KListItem.md b/docs/A1099/V2/Form1099KListItem.md index e2d403b..bb97020 100644 --- a/docs/A1099/V2/Form1099KListItem.md +++ b/docs/A1099/V2/Form1099KListItem.md @@ -7,51 +7,51 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | | [optional] | -|**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | | [optional] | -|**paymentSettlementEntityNamePhoneNumber** | **String** | | [optional] | -|**grossAmountPaymentCard** | **Double** | | [optional] | -|**cardNotPresentTransactions** | **Double** | | [optional] | -|**merchantCategoryCode** | **String** | | [optional] | -|**paymentTransactionNumber** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **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] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [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] | +|**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions | [optional] | +|**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**merchantCategoryCode** | **String** | Merchant category code | [optional] | +|**paymentTransactionNumber** | **Double** | Number of payment transactions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**january** | **Double** | January gross payments | [optional] | +|**february** | **Double** | February gross payments | [optional] | +|**march** | **Double** | March gross payments | [optional] | +|**april** | **Double** | April gross payments | [optional] | +|**may** | **Double** | May gross payments | [optional] | +|**june** | **Double** | June gross payments | [optional] | +|**july** | **Double** | July gross payments | [optional] | +|**august** | **Double** | August gross payments | [optional] | +|**sept** | **Double** | September gross payments | [optional] | +|**october** | **Double** | October gross payments | [optional] | +|**november** | **Double** | November gross payments | [optional] | +|**december** | **Double** | December gross payments | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**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/Form1099KListItemResponse.md b/docs/A1099/V2/Form1099KListItemResponse.md new file mode 100644 index 0000000..c5a2db4 --- /dev/null +++ b/docs/A1099/V2/Form1099KListItemResponse.md @@ -0,0 +1,84 @@ + + +# Form1099KListItemResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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] | +|**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions | [optional] | +|**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**merchantCategoryCode** | **String** | Merchant category code | [optional] | +|**paymentTransactionNumber** | **Double** | Number of payment transactions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**january** | **Double** | January gross payments | [optional] | +|**february** | **Double** | February gross payments | [optional] | +|**march** | **Double** | March gross payments | [optional] | +|**april** | **Double** | April gross payments | [optional] | +|**may** | **Double** | May gross payments | [optional] | +|**june** | **Double** | June gross payments | [optional] | +|**july** | **Double** | July gross payments | [optional] | +|**august** | **Double** | August gross payments | [optional] | +|**sept** | **Double** | September gross payments | [optional] | +|**october** | **Double** | October gross payments | [optional] | +|**november** | **Double** | November gross payments | [optional] | +|**december** | **Double** | December gross payments | [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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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] | + + + +## 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/Form1099KRequest.md b/docs/A1099/V2/Form1099KRequest.md index 4f22c0d..d1f523a 100644 --- a/docs/A1099/V2/Form1099KRequest.md +++ b/docs/A1099/V2/Form1099KRequest.md @@ -7,49 +7,49 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**filerType** | **Integer** | | [optional] | -|**paymentType** | **Integer** | | [optional] | -|**paymentSettlementEntityNamePhoneNumber** | **String** | | [optional] | -|**grossAmountPaymentCard** | **Double** | | [optional] | -|**cardNotPresentTransactions** | **Double** | | [optional] | -|**merchantCategoryCode** | **String** | | [optional] | -|**paymentTransactionNumber** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **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] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**filerType** | **Integer** | Filer type (PSE or EPF) | [optional] | +|**paymentType** | **Integer** | Payment type (payment card or third party network) | [optional] | +|**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number | [optional] | +|**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions | [optional] | +|**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**merchantCategoryCode** | **String** | Merchant category code | [optional] | +|**paymentTransactionNumber** | **Double** | Number of payment transactions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**january** | **Double** | January gross payments | [optional] | +|**february** | **Double** | February gross payments | [optional] | +|**march** | **Double** | March gross payments | [optional] | +|**april** | **Double** | April gross payments | [optional] | +|**may** | **Double** | May gross payments | [optional] | +|**june** | **Double** | June gross payments | [optional] | +|**july** | **Double** | July gross payments | [optional] | +|**august** | **Double** | August gross payments | [optional] | +|**sept** | **Double** | September gross payments | [optional] | +|**october** | **Double** | October gross payments | [optional] | +|**november** | **Double** | November gross payments | [optional] | +|**december** | **Double** | December gross payments | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -57,12 +57,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099ListResponse.md b/docs/A1099/V2/Form1099ListResponse.md new file mode 100644 index 0000000..285f141 --- /dev/null +++ b/docs/A1099/V2/Form1099ListResponse.md @@ -0,0 +1,13 @@ + + +# Form1099ListResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | [**List<Form1099ListResponseValueInner>**](Form1099ListResponseValueInner.md) | List of Form 1099 responses | [optional] | + + + diff --git a/docs/A1099/V2/Form1099ListResponseValueInner.md b/docs/A1099/V2/Form1099ListResponseValueInner.md new file mode 100644 index 0000000..b2569b7 --- /dev/null +++ b/docs/A1099/V2/Form1099ListResponseValueInner.md @@ -0,0 +1,143 @@ + + +# Form1099ListResponseValueInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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] | +|**uniqueFormId** | **String** | Unique form identifier | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**recipientDateOfBirth** | **OffsetDateTime** | Recipient's date of birth | [optional] | +|**recipientGiin** | **String** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] | +|**recipientForeignTin** | **String** | Recipient's foreign TIN | [optional] | +|**lobCode** | **String** | Limitation on benefits code | [optional] | +|**incomeCode** | **String** | Income code | [optional] | +|**grossIncome** | **Double** | Gross income | [optional] | +|**withholdingIndicator** | **String** | Withholding indicator | [optional] | +|**taxCountryCode** | **String** | Country code | [optional] | +|**exemptionCodeChap3** | **String** | Exemption code (Chapter 3) | [optional] | +|**exemptionCodeChap4** | **String** | Exemption code (Chapter 4) | [optional] | +|**taxRateChap3** | **String** | Tax rate (Chapter 3) | [optional] | +|**withholdingAllowance** | **Double** | Withholding allowance | [optional] | +|**federalTaxWithheld** | **Double** | Federal tax withheld | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | Tax not deposited indicator | [optional] | +|**academicIndicator** | **Boolean** | Academic indicator | [optional] | +|**taxWithheldOtherAgents** | **Double** | Tax withheld by other agents | [optional] | +|**amountRepaid** | **Double** | Amount repaid to recipient | [optional] | +|**taxPaidAgent** | **Double** | Tax paid by withholding agent | [optional] | +|**chap3StatusCode** | **String** | Chapter 3 status code | [optional] | +|**chap4StatusCode** | **String** | Chapter 4 status code | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] | +|**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] | +|**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] | +|**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions | [optional] | +|**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**merchantCategoryCode** | **String** | Merchant category code | [optional] | +|**paymentTransactionNumber** | **Double** | Number of payment transactions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**january** | **Double** | January gross payments | [optional] | +|**february** | **Double** | February gross payments | [optional] | +|**march** | **Double** | March gross payments | [optional] | +|**april** | **Double** | April gross payments | [optional] | +|**may** | **Double** | May gross payments | [optional] | +|**june** | **Double** | June gross payments | [optional] | +|**july** | **Double** | July gross payments | [optional] | +|**august** | **Double** | August gross payments | [optional] | +|**sept** | **Double** | September gross payments | [optional] | +|**october** | **Double** | October gross payments | [optional] | +|**november** | **Double** | November gross payments | [optional] | +|**december** | **Double** | December gross payments | [optional] | +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalAndHealthCare** | **Double** | Medical and health care payments | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**excessGoldenParachute** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**grossAmountPaidAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**section409AIncome** | **Double** | Nonqualified deferred compensation | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | [optional] | +|**grossDistributions** | **Double** | Gross distribution | [optional] | +|**taxableAmount** | **Double** | Taxable amount | [optional] | +|**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | +|**totalDistributionIndicator** | **Boolean** | Total distribution | [optional] | +|**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | +|**employeeContributions** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +|**netUnrealizedAppreciation** | **Double** | Net unrealized appreciation in employer's securities | [optional] | +|**distributionCodeRequired** | **String** | Distribution code | [optional] | +|**distributionCodeOptional** | **String** | Second distribution code | [optional] | +|**iraSepSimpleIndicator** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +|**totalIraSepSimpleDistribution** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +|**other** | **Double** | Other amount | [optional] | +|**otherPercent** | **String** | Other percentage | [optional] | +|**percentageTotalDistribution** | **String** | Total distribution percentage | [optional] | +|**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] | + + + +## 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/Form1099MiscListItem.md b/docs/A1099/V2/Form1099MiscListItem.md index bfadaaf..fa79f28 100644 --- a/docs/A1099/V2/Form1099MiscListItem.md +++ b/docs/A1099/V2/Form1099MiscListItem.md @@ -7,47 +7,47 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**secondTinNotice** | **Boolean** | | [optional] | -|**rents** | **Double** | | [optional] | -|**royalties** | **Double** | | [optional] | -|**otherIncome** | **Double** | | [optional] | -|**fedIncomeTaxWithheld** | **Double** | | [optional] | -|**fishingBoatProceeds** | **Double** | | [optional] | -|**medicalHealthCarePayments** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | -|**substitutePayments** | **Double** | | [optional] | -|**cropInsuranceProceeds** | **Double** | | [optional] | -|**grossProceedsPaidToAttorney** | **Double** | | [optional] | -|**fishPurchasedForResale** | **Double** | | [optional] | -|**section409ADeferrals** | **Double** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**excessGoldenParachutePayments** | **Double** | | [optional] | -|**nonqualifiedDeferredCompensation** | **Double** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalHealthCarePayments** | **Double** | Medical and health care payments | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**grossProceedsPaidToAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**fishPurchasedForResale** | **Double** | Fish purchased for resale | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**excessGoldenParachutePayments** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**nonqualifiedDeferredCompensation** | **Double** | Nonqualified deferred compensation | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**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/Form1099MiscListItemResponse.md b/docs/A1099/V2/Form1099MiscListItemResponse.md new file mode 100644 index 0000000..ced8e32 --- /dev/null +++ b/docs/A1099/V2/Form1099MiscListItemResponse.md @@ -0,0 +1,58 @@ + + +# Form1099MiscListItemResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalAndHealthCare** | **Double** | Medical and health care payments | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**excessGoldenParachute** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**grossAmountPaidAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**section409AIncome** | **Double** | Nonqualified deferred compensation | [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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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/Form1099MiscRequest.md b/docs/A1099/V2/Form1099MiscRequest.md index 080467e..d7a8f0d 100644 --- a/docs/A1099/V2/Form1099MiscRequest.md +++ b/docs/A1099/V2/Form1099MiscRequest.md @@ -7,45 +7,45 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**secondTinNotice** | **Boolean** | | [optional] | -|**rents** | **Double** | | [optional] | -|**royalties** | **Double** | | [optional] | -|**otherIncome** | **Double** | | [optional] | -|**fedIncomeTaxWithheld** | **Double** | | [optional] | -|**fishingBoatProceeds** | **Double** | | [optional] | -|**medicalHealthCarePayments** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | -|**substitutePayments** | **Double** | | [optional] | -|**cropInsuranceProceeds** | **Double** | | [optional] | -|**grossProceedsPaidToAttorney** | **Double** | | [optional] | -|**fishPurchasedForResale** | **Double** | | [optional] | -|**section409ADeferrals** | **Double** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**excessGoldenParachutePayments** | **Double** | | [optional] | -|**nonqualifiedDeferredCompensation** | **Double** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalHealthCarePayments** | **Double** | Medical and health care payments | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**grossProceedsPaidToAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**fishPurchasedForResale** | **Double** | Fish purchased for resale | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**excessGoldenParachutePayments** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**nonqualifiedDeferredCompensation** | **Double** | Nonqualified deferred compensation | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -53,12 +53,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099MiscResponse.md b/docs/A1099/V2/Form1099MiscResponse.md index d8fceb6..8777f22 100644 --- a/docs/A1099/V2/Form1099MiscResponse.md +++ b/docs/A1099/V2/Form1099MiscResponse.md @@ -14,7 +14,7 @@ |**fedIncomeTaxWithheld** | **Double** | | [optional] | |**fishingBoatProceeds** | **Double** | | [optional] | |**medicalHealthCarePayments** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | +|**directSalesIndicator** | **Boolean** | | [optional] | |**substitutePayments** | **Double** | | [optional] | |**cropInsuranceProceeds** | **Double** | | [optional] | |**grossProceedsPaidToAttorney** | **Double** | | [optional] | @@ -54,11 +54,11 @@ |**tinMatch** | **Boolean** | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetailApp>**](StateEfileStatusDetailApp.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<ValidationErrorApp>**](ValidationErrorApp.md) | | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | @@ -66,12 +66,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099NecListItem.md b/docs/A1099/V2/Form1099NecListItem.md index 895b717..0e8961b 100644 --- a/docs/A1099/V2/Form1099NecListItem.md +++ b/docs/A1099/V2/Form1099NecListItem.md @@ -2,40 +2,41 @@ # Form1099NecListItem +1099-NEC - Nonemployee compensation ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**secondTinNotice** | **Boolean** | | [optional] | -|**nonemployeeCompensation** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**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/Form1099NecListItemResponse.md b/docs/A1099/V2/Form1099NecListItemResponse.md new file mode 100644 index 0000000..a8c312a --- /dev/null +++ b/docs/A1099/V2/Form1099NecListItemResponse.md @@ -0,0 +1,48 @@ + + +# Form1099NecListItemResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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/Form1099NecRequest.md b/docs/A1099/V2/Form1099NecRequest.md index 7868241..a325367 100644 --- a/docs/A1099/V2/Form1099NecRequest.md +++ b/docs/A1099/V2/Form1099NecRequest.md @@ -7,33 +7,33 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**secondTinNotice** | **Boolean** | | [optional] | -|**nonemployeeCompensation** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -41,12 +41,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099NecResponse.md b/docs/A1099/V2/Form1099NecResponse.md index b6035c8..4201869 100644 --- a/docs/A1099/V2/Form1099NecResponse.md +++ b/docs/A1099/V2/Form1099NecResponse.md @@ -9,7 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**secondTinNotice** | **Boolean** | | [optional] | |**nonemployeeCompensation** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | +|**directSalesIndicator** | **Boolean** | | [optional] | |**federalIncomeTaxWithheld** | **Double** | | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | |**createdAt** | **OffsetDateTime** | | [optional] | @@ -42,11 +42,11 @@ |**tinMatch** | **Boolean** | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetailApp>**](StateEfileStatusDetailApp.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<ValidationErrorApp>**](ValidationErrorApp.md) | | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | @@ -54,12 +54,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099RListItem.md b/docs/A1099/V2/Form1099RListItem.md index c82fcc9..cbea69d 100644 --- a/docs/A1099/V2/Form1099RListItem.md +++ b/docs/A1099/V2/Form1099RListItem.md @@ -7,51 +7,51 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**grossDistribution** | **Double** | | [optional] | -|**taxableAmount** | **Double** | | [optional] | -|**taxableAmountNotDetermined** | **Boolean** | | [optional] | -|**totalDistributionDetermined** | **Boolean** | | [optional] | -|**capitalGain** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**employeeContributionsOrDesignatedRothOrInsurancePremiums** | **Double** | | [optional] | -|**netUnrealizedAppreciationInEmployerSecurities** | **Double** | | [optional] | -|**distributionCode** | [**DistributionCodeEnum**](#DistributionCodeEnum) | | [optional] | -|**secondDistributionCode** | [**SecondDistributionCodeEnum**](#SecondDistributionCodeEnum) | | [optional] | -|**iraSepSimple** | **Boolean** | | [optional] | -|**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | | [optional] | -|**otherAmount** | **Double** | | [optional] | -|**otherPercentage** | **String** | | [optional] | -|**totalDistributionPercentage** | **String** | | [optional] | -|**totalEmployeeContributions** | **Double** | | [optional] | -|**amountAllocableToIrrWithin5Years** | **Double** | | [optional] | -|**firstYearOfDesignatedRothContribution** | **Integer** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**dateOfPayment** | **OffsetDateTime** | | [optional] | -|**issuerReferenceId** | **String** | | [optional] | -|**issuerTin** | **String** | | [optional] | -|**taxYear** | **Integer** | | [optional] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [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] | +|**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** | [**DistributionCodeEnum**](#DistributionCodeEnum) | Distribution code | [optional] | +|**secondDistributionCode** | [**SecondDistributionCodeEnum**](#SecondDistributionCodeEnum) | 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** | **Integer** | First year of designated Roth contribution | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [optional] | +|**dateOfPayment** | **OffsetDateTime** | Date of payment | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -59,35 +59,35 @@ | Name | Value | |---- | -----| -| EARLY_DISTRIBUTION_NO_EXCEPTION | "EarlyDistributionNoException" | -| EARLY_DISTRIBUTION_WITH_EXCEPTION | "EarlyDistributionWithException" | -| DISABILITY | "Disability" | -| DEATH | "Death" | -| PROHIBITED_TRANSACTION | "ProhibitedTransaction" | -| SECTION1035_EXCHANGE | "Section1035Exchange" | -| NORMAL_DISTRIBUTION | "NormalDistribution" | -| EXCESS_CONTRIBUTIONS_CURRENT_YEAR | "ExcessContributionsCurrentYear" | -| CURRENT_LIFE_INSURANCE_PROTECTION_COST | "CurrentLifeInsuranceProtectionCost" | -| TEN_YEAR_TAX_OPTION | "TenYearTaxOption" | -| DESIGNATED_ROTH_DISTRIBUTION | "DesignatedRothDistribution" | -| REPORTABLE_DEATH_BENEFITS | "ReportableDeathBenefits" | -| NONQUALIFIED_ANNUITY_PAYMENTS | "NonqualifiedAnnuityPayments" | -| EPCRS_DISTRIBUTION | "EPCRSDistribution" | -| CHARITABLE_GIFT_ANNUITY | "CharitableGiftAnnuity" | -| DIRECT_ROLLOVER | "DirectRollover" | -| ROTH_ACCOUNT_TO_IRA_DIRECT_ROLLOVER | "RothAccountToIRADirectRollover" | -| EARLY_ROTH_IRA_DISTRIBUTION | "EarlyRothIRADistribution" | -| IRA_ASSETS_NO_FMV | "IRAAssetsNoFMV" | -| LOANS_DEEMED_DISTRIBUTIONS | "LoansDeemedDistributions" | -| QUALIFIED_PLAN_LOAN_OFFSETS | "QualifiedPlanLoanOffsets" | -| RECHARACTERIZED_IRA_NEXT_YEAR | "RecharacterizedIRANextYear" | -| EXCESS_CONTRIBUTIONS_PREVIOUS_YEAR | "ExcessContributionsPreviousYear" | -| QUALIFIED_ROTH_IRA_DISTRIBUTION | "QualifiedRothIRADistribution" | -| RECHARACTERIZED_IRA_PREVIOUS_YEAR | "RecharacterizedIRAPreviousYear" | -| EARLY_SIMPLE_IRA_DISTRIBUTION | "EarlySimpleIRADistribution" | -| ROTH_IRA_DISTRIBUTION_EXCEPTION | "RothIRADistributionException" | -| ESOP_DISTRIBUTION | "ESOPDistribution" | -| LONG_TERM_CARE_INSURANCE | "LongTermCareInsurance" | +| _1 | "1" | +| _2 | "2" | +| _3 | "3" | +| _4 | "4" | +| _5 | "5" | +| _6 | "6" | +| _7 | "7" | +| _8 | "8" | +| _9 | "9" | +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | +| H | "H" | +| J | "J" | +| K | "K" | +| L | "L" | +| M | "M" | +| N | "N" | +| P | "P" | +| Q | "Q" | +| R | "R" | +| S | "S" | +| T | "T" | +| U | "U" | +| W | "W" | diff --git a/docs/A1099/V2/Form1099RListItemResponse.md b/docs/A1099/V2/Form1099RListItemResponse.md new file mode 100644 index 0000000..aefb718 --- /dev/null +++ b/docs/A1099/V2/Form1099RListItemResponse.md @@ -0,0 +1,65 @@ + + +# Form1099RListItemResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**grossDistributions** | **Double** | Gross distribution | [optional] | +|**taxableAmount** | **Double** | Taxable amount | [optional] | +|**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | +|**totalDistributionIndicator** | **Boolean** | Total distribution | [optional] | +|**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**employeeContributions** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +|**netUnrealizedAppreciation** | **Double** | Net unrealized appreciation in employer's securities | [optional] | +|**distributionCodeRequired** | **String** | Distribution code | [optional] | +|**distributionCodeOptional** | **String** | Second distribution code | [optional] | +|**iraSepSimpleIndicator** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +|**totalIraSepSimpleDistribution** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +|**other** | **Double** | Other amount | [optional] | +|**otherPercent** | **String** | Other percentage | [optional] | +|**percentageTotalDistribution** | **String** | Total distribution percentage | [optional] | +|**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 | | +|**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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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/Form1099RRequest.md b/docs/A1099/V2/Form1099RRequest.md index e72f347..54f82ba 100644 --- a/docs/A1099/V2/Form1099RRequest.md +++ b/docs/A1099/V2/Form1099RRequest.md @@ -7,49 +7,49 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**grossDistribution** | **Double** | | [optional] | -|**taxableAmount** | **Double** | | [optional] | -|**taxableAmountNotDetermined** | **Boolean** | | [optional] | -|**totalDistributionDetermined** | **Boolean** | | [optional] | -|**capitalGain** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**employeeContributionsOrDesignatedRothOrInsurancePremiums** | **Double** | | [optional] | -|**netUnrealizedAppreciationInEmployerSecurities** | **Double** | | [optional] | -|**distributionCode** | **String** | | [optional] | -|**secondDistributionCode** | **String** | | [optional] | -|**iraSepSimple** | **Boolean** | | [optional] | -|**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | | [optional] | -|**otherAmount** | **Double** | | [optional] | -|**otherPercentage** | **String** | | [optional] | -|**totalDistributionPercentage** | **String** | | [optional] | -|**totalEmployeeContributions** | **Double** | | [optional] | -|**amountAllocableToIrrWithin5Years** | **Double** | | [optional] | -|**firstYearOfDesignatedRothContribution** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**dateOfPayment** | **OffsetDateTime** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [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] | +|**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] | +|**issuerId** | **String** | Issuer ID | [optional] | +|**referenceId** | **String** | Reference ID | [optional] | +|**recipientTin** | **String** | Recipient Tax ID Number | [optional] | +|**recipientName** | **String** | Recipient name | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -57,12 +57,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Form1099StatusDetailResponse.md b/docs/A1099/V2/Form1099StatusDetailResponse.md new file mode 100644 index 0000000..13fb186 --- /dev/null +++ b/docs/A1099/V2/Form1099StatusDetailResponse.md @@ -0,0 +1,14 @@ + + +# Form1099StatusDetailResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**time** | **String** | The date the form is scheduled for or the time the status last changed | [optional] | +|**status** | **String** | The status of the form. Will be one of: * unsent * scheduled * sent * corrected_scheduled * accepted * corrected * corrected_accepted * held * pending * delivered * bad_verify * bad_verify_limit * bounced * verified * incomplete * failed * unchanged * unknown | [optional] | + + + diff --git a/docs/A1099/V2/FormRequestBase.md b/docs/A1099/V2/FormRequestBase.md index 3e876f3..0645d47 100644 --- a/docs/A1099/V2/FormRequestBase.md +++ b/docs/A1099/V2/FormRequestBase.md @@ -7,28 +7,28 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | +|**issuerId** | **String** | Issuer ID | [optional] | +|**referenceId** | **String** | Reference ID | [optional] | +|**recipientTin** | **String** | Recipient Tax ID Number | [optional] | +|**recipientName** | **String** | Recipient name | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**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 new file mode 100644 index 0000000..b1d5a49 --- /dev/null +++ b/docs/A1099/V2/FormRequestListItemBase.md @@ -0,0 +1,48 @@ + + +# FormRequestListItemBase + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**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/FormResponseBase.md b/docs/A1099/V2/FormResponseBase.md index ace92b2..754f5dc 100644 --- a/docs/A1099/V2/FormResponseBase.md +++ b/docs/A1099/V2/FormResponseBase.md @@ -38,11 +38,11 @@ |**tinMatch** | **Boolean** | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetailApp>**](StateEfileStatusDetailApp.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<ValidationErrorApp>**](ValidationErrorApp.md) | | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | @@ -50,12 +50,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/FormSingleRequestBase.md b/docs/A1099/V2/FormSingleRequestBase.md index 7930817..35b4b3d 100644 --- a/docs/A1099/V2/FormSingleRequestBase.md +++ b/docs/A1099/V2/FormSingleRequestBase.md @@ -7,29 +7,29 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -37,12 +37,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index a1d1cf4..14caa86 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/a Method | HTTP request | Description ------------- | ------------- | ------------- -[**bulkUpsert1099Forms**](Forms1099Api.md#bulkUpsert1099Forms) | **POST** /1099/forms/$bulk-upsert | Creates or updates multiple 1099 forms. -[**create1099Form**](Forms1099Api.md#create1099Form) | **POST** /1099/forms | Creates a 1099 form. -[**delete1099Form**](Forms1099Api.md#delete1099Form) | **DELETE** /1099/forms/{id} | Deletes a 1099 form. -[**get1099Form**](Forms1099Api.md#get1099Form) | **GET** /1099/forms/{id} | Retrieves a 1099 form. -[**get1099FormPdf**](Forms1099Api.md#get1099FormPdf) | **GET** /1099/forms/{id}/pdf | Retrieves the PDF file for a single 1099 by form id. -[**list1099Forms**](Forms1099Api.md#list1099Forms) | **GET** /1099/forms | Retrieves a list of 1099 forms based on query parameters. -[**update1099Form**](Forms1099Api.md#update1099Form) | **PUT** /1099/forms/{id} | Updates a 1099 form. +[**bulkUpsert1099Forms**](Forms1099Api.md#bulkUpsert1099Forms) | **POST** /1099/forms/$bulk-upsert | Create or update multiple 1099/1095/W2/1042S forms +[**create1099Form**](Forms1099Api.md#create1099Form) | **POST** /1099/forms | Create a 1099/1095/W2/1042S form +[**delete1099Form**](Forms1099Api.md#delete1099Form) | **DELETE** /1099/forms/{id} | Delete a 1099/1095/W2/1042S form +[**get1099Form**](Forms1099Api.md#get1099Form) | **GET** /1099/forms/{id} | Retrieve a 1099/1095/W2/1042S form +[**get1099FormPdf**](Forms1099Api.md#get1099FormPdf) | **GET** /1099/forms/{id}/pdf | Retrieve the PDF file for a 1099/1095/W2/1042S form +[**list1099Forms**](Forms1099Api.md#list1099Forms) | **GET** /1099/forms | List 1099/1095/W2/1042S forms +[**update1099Form**](Forms1099Api.md#update1099Form) | **PUT** /1099/forms/{id} | Update a 1099/1095/W2/1042S form @@ -18,9 +18,9 @@ Method | HTTP request | Description > Form1099ProccessResult bulkUpsert1099Forms(avalaraVersion, dryRun, xCorrelationId, xAvalaraClient, bulkUpsert1099FormsRequest) -Creates or updates multiple 1099 forms. +Create or update multiple 1099/1095/W2/1042S forms -This endpoint allows you to create or update multiple 1099 forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"987-65-4321\", \"TinType\": \"IEN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"PayerMadeDirectSales\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"987-65-4321\", \"tinType\": \"IEN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"payerMadeDirectSales\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\" \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34 \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. +This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. ### Example @@ -50,9 +50,9 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); Forms1099Api apiInstance = new Forms1099Api(apiClient); - String avalaraVersion = "2.0"; // String | API version + String avalaraVersion = "2.0.0"; // String | API version Boolean dryRun = false; // Boolean | - String xCorrelationId = "e5719e20-8805-4ccc-b626-013045304315"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "2887c820-8999-462b-a6d0-a806ff098c1d"; // 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 { @@ -106,9 +106,11 @@ Name | Type | Description | Notes ## create1099Form -> Get1099Form200Response create1099Form(avalaraVersion, xCorrelationId, xAvalaraClient, icreateForm1099Request) +> Create1099Form201Response create1099Form(avalaraVersion, xCorrelationId, xAvalaraClient, icreateForm1099Request) -Creates a 1099 form. +Create a 1099/1095/W2/1042S form + +Create a 1099/1095/W2/1042S form. ### Example @@ -138,12 +140,12 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); Forms1099Api apiInstance = new Forms1099Api(apiClient); - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "6095f693-4fb2-48c8-b6e5-c7ab4611f673"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "d0cd754d-adf8-41e6-be0a-b4d205e24e61"; // 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 { - Get1099Form200Response result = apiInstance.create1099Form(avalaraVersion, xCorrelationId, xAvalaraClient, icreateForm1099Request); + Create1099Form201Response result = apiInstance.create1099Form(avalaraVersion, xCorrelationId, xAvalaraClient, icreateForm1099Request); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Forms1099Api#create1099Form"); @@ -168,7 +170,7 @@ Name | Type | Description | Notes ### Return type -[**Get1099Form200Response**](Get1099Form200Response.md) +[**Create1099Form201Response**](Create1099Form201Response.md) ### Authorization @@ -193,7 +195,9 @@ Name | Type | Description | Notes > delete1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient) -Deletes a 1099 form. +Delete a 1099/1095/W2/1042S form + +Delete a 1099/1095/W2/1042S form. ### Example @@ -224,8 +228,8 @@ 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"; // String | API version - String xCorrelationId = "15d84d4b-81ef-4d59-af08-94e94dc49322"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "addfa5c3-a255-432d-97a0-51af301447b2"; // 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); @@ -279,7 +283,9 @@ null (empty response body) > Get1099Form200Response get1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient) -Retrieves a 1099 form. +Retrieve a 1099/1095/W2/1042S form + +Retrieve a 1099/1095/W2/1042S form. ### Example @@ -310,8 +316,8 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "72e6716a-27d0-4cd0-8a93-a9aaef422691"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "d24d3112-03b3-42d3-8118-9654a4ed92c1"; // 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); @@ -363,9 +369,11 @@ Name | Type | Description | Notes ## get1099FormPdf -> Update1099Form200Response get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient) +> File get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient) + +Retrieve the PDF file for a 1099/1095/W2/1042S form -Retrieves the PDF file for a single 1099 by form id. +Retrieve the PDF file for a 1099/1095/W2/1042S form. ### Example @@ -395,13 +403,13 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); Forms1099Api apiInstance = new Forms1099Api(apiClient); - String id = "id_example"; // String | - String avalaraVersion = "2.0"; // String | API version - Boolean markEdelivered = true; // Boolean | The parameter for marked e-delivered - String xCorrelationId = "782ecb31-ec05-4880-a431-bd7a890e63e6"; // String | Unique correlation Id in a GUID format + 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 = "84d9cf56-2aee-4be1-a89f-de5be5369993"; // 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 { - Update1099Form200Response result = apiInstance.get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient); + File result = apiInstance.get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Forms1099Api#get1099FormPdf"); @@ -419,15 +427,15 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| | + **id** | **String**| The ID of the form | **avalaraVersion** | **String**| API version | - **markEdelivered** | **Boolean**| The parameter for marked e-delivered | [optional] + **markEdelivered** | **Boolean**| Optional boolean that if set indicates that the form should be marked as having been successfully edelivered | [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 -[**Update1099Form200Response**](Update1099Form200Response.md) +[**File**](File.md) ### Authorization @@ -436,7 +444,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: application/pdf, application/json ### HTTP response details @@ -451,9 +459,11 @@ Name | Type | Description | Notes ## list1099Forms -> Form1099List list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, xCorrelationId, xAvalaraClient) +> Form1099ListResponse list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, xCorrelationId, xAvalaraClient) -Retrieves a list of 1099 forms based on query parameters. +List 1099/1095/W2/1042S forms + +List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. ### Example @@ -483,15 +493,15 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); Forms1099Api apiInstance = new Forms1099Api(apiClient); - String avalaraVersion = "2.0"; // String | API version + 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. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: issuerId issuerReferenceId taxYear addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified createdAt edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted email federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held recipientName mailStatus - possible values are: sent, unscheduled, pending, delivered referenceId tinMatchStatus - possible values are: none, pending, matched, failed type - possible values are: 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 updatedAt validity - possible values are: true, false 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 = "3023fd6b-afc3-488f-ad85-1dd9f72d9f64"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "edd69041-acfd-4252-8f4f-a0a3f009bda6"; // 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 { - Form1099List result = apiInstance.list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, xCorrelationId, xAvalaraClient); + Form1099ListResponse result = apiInstance.list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, xCorrelationId, xAvalaraClient); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Forms1099Api#list1099Forms"); @@ -519,7 +529,7 @@ Name | Type | Description | Notes ### Return type -[**Form1099List**](Form1099List.md) +[**Form1099ListResponse**](Form1099ListResponse.md) ### Authorization @@ -545,7 +555,9 @@ Name | Type | Description | Notes > Update1099Form200Response update1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient, iupdateForm1099Request) -Updates a 1099 form. +Update a 1099/1095/W2/1042S form + +Update a 1099/1095/W2/1042S form. ### Example @@ -576,8 +588,8 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "6a610d02-ab2b-4ef8-9554-5149445333f1"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "860f5511-f0d8-45a4-ac62-6d2733e3028d"; // 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 fbd7372..ea59eb7 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -5,21 +5,23 @@ All URIs are relative to *https://api-ava1099.eta.sbx.us-east-1.aws.avalara.io/a Method | HTTP request | Description ------------- | ------------- | ------------- [**createW9Form**](FormsW9Api.md#createW9Form) | **POST** /w9/forms | Create a W9/W4/W8 form -[**deleteW9Form**](FormsW9Api.md#deleteW9Form) | **DELETE** /w9/forms/{id} | Delete a form +[**deleteW9Form**](FormsW9Api.md#deleteW9Form) | **DELETE** /w9/forms/{id} | Delete a W9/W4/W8 form [**getW9Form**](FormsW9Api.md#getW9Form) | **GET** /w9/forms/{id} | Retrieve a W9/W4/W8 form -[**listW9Forms**](FormsW9Api.md#listW9Forms) | **GET** /w9/forms | List W9/W4/W8 forms. -[**sendW9FormEmail**](FormsW9Api.md#sendW9FormEmail) | **POST** /w9/forms/{id}/$send-email | Sends a W9 email request to a vendor/payee +[**listW9Forms**](FormsW9Api.md#listW9Forms) | **GET** /w9/forms | List W9/W4/W8 forms +[**sendW9FormEmail**](FormsW9Api.md#sendW9FormEmail) | **POST** /w9/forms/{id}/$send-email | Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form [**updateW9Form**](FormsW9Api.md#updateW9Form) | **PUT** /w9/forms/{id} | Update a W9/W4/W8 form -[**uploadW9Files**](FormsW9Api.md#uploadW9Files) | **PUT** /w9/forms/{id}/attachment | Upload files for a W9/W4/W8 form +[**uploadW9Files**](FormsW9Api.md#uploadW9Files) | **POST** /w9/forms/{id}/attachment | Replace the PDF file for a W9/W4/W8 form ## createW9Form -> IW9FormDataModelsOneOf createW9Form(avalaraVersion, xCorrelationId, xAvalaraClient, iw9FormDataModelsOneOf) +> CreateW9Form201Response createW9Form(avalaraVersion, xCorrelationId, xAvalaraClient, createW9FormRequest) Create a W9/W4/W8 form +Create a W9/W4/W8 form. + ### Example ```java @@ -48,12 +50,12 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); FormsW9Api apiInstance = new FormsW9Api(apiClient); - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "5003c014-1aa4-48a4-91c5-3176fcf2bf73"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "a80d4171-c58b-440c-8cc7-4093fd542b00"; // 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 created + CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be created try { - IW9FormDataModelsOneOf result = apiInstance.createW9Form(avalaraVersion, xCorrelationId, xAvalaraClient, iw9FormDataModelsOneOf); + CreateW9Form201Response result = apiInstance.createW9Form(avalaraVersion, xCorrelationId, xAvalaraClient, createW9FormRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FormsW9Api#createW9Form"); @@ -74,11 +76,11 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| API version | **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] - **iw9FormDataModelsOneOf** | [**IW9FormDataModelsOneOf**](IW9FormDataModelsOneOf.md)| Form to be created | [optional] + **createW9FormRequest** | [**CreateW9FormRequest**](CreateW9FormRequest.md)| Form to be created | [optional] ### Return type -[**IW9FormDataModelsOneOf**](IW9FormDataModelsOneOf.md) +[**CreateW9Form201Response**](CreateW9Form201Response.md) ### Authorization @@ -93,7 +95,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | The created W9/W4/W8 form | - | +| **201** | The created W9/W4/W8 form | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | @@ -102,9 +104,9 @@ Name | Type | Description | Notes > deleteW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient) -Delete a form +Delete a W9/W4/W8 form -Delete a form +Delete a W9/W4/W8 form. ### Example @@ -134,9 +136,9 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); FormsW9Api apiInstance = new FormsW9Api(apiClient); - String id = "id_example"; // String | Id of the form to delete - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "949a3535-39c5-4928-8214-2dc8c4224670"; // String | Unique correlation Id in a GUID format + String id = "id_example"; // String | ID of the form to delete + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "458bae89-b373-4297-b5eb-0e7a18838af3"; // 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); @@ -156,7 +158,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| Id of the form to delete | + **id** | **String**| ID of the form to delete | **avalaraVersion** | **String**| API version | **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] @@ -185,11 +187,11 @@ null (empty response body) ## getW9Form -> IW9FormDataModelsOneOf getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient) +> CreateW9Form201Response getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient) Retrieve a W9/W4/W8 form -Retrieve a W9/W4/W8 form +Retrieve a W9/W4/W8 form. ### Example @@ -219,12 +221,12 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); FormsW9Api apiInstance = new FormsW9Api(apiClient); - String id = "id_example"; // String | Id of the form - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "5a0f7713-ffaf-49f0-be47-96783364c87d"; // String | Unique correlation Id in a GUID format + String id = "id_example"; // String | ID of the form + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "fcd3a4fb-da5b-4195-a470-97567434f46c"; // 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.getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); + CreateW9Form201Response result = apiInstance.getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FormsW9Api#getW9Form"); @@ -242,14 +244,14 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| Id of the form | + **id** | **String**| ID of the form | **avalaraVersion** | **String**| API version | **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 -[**IW9FormDataModelsOneOf**](IW9FormDataModelsOneOf.md) +[**CreateW9Form201Response**](CreateW9Form201Response.md) ### Authorization @@ -273,7 +275,7 @@ Name | Type | Description | Notes > PaginatedW9FormsModel listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, xCorrelationId, xAvalaraClient) -List W9/W4/W8 forms. +List W9/W4/W8 forms List W9/W4/W8 forms. @@ -305,13 +307,13 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); FormsW9Api apiInstance = new FormsW9Api(apiClient); - String avalaraVersion = "2.0"; // String | API version + 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 $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 = "ee2ba593-ca8c-41f1-b96e-5cec3fc8e068"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "a4990941-fbe5-45f9-8495-43ed73f8334e"; // 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); @@ -367,7 +369,9 @@ Name | Type | Description | Notes > IW9FormDataModelsOneOf sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient) -Sends a W9 email request to a vendor/payee +Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form + +Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. ### Example @@ -398,8 +402,8 @@ 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"; // String | API version - String xCorrelationId = "6503b7f4-7f28-42c1-8a3c-d158c4b5aa76"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "72cf9106-878e-4643-9b5a-440f89a7b20d"; // 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); @@ -453,6 +457,8 @@ Name | Type | Description | Notes Update a W9/W4/W8 form +Update a W9/W4/W8 form. + ### Example ```java @@ -481,9 +487,9 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); FormsW9Api apiInstance = new FormsW9Api(apiClient); - String id = "id_example"; // String | Id of the form to update - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "a40ce0b3-6438-4890-ba0a-ad7be75fb3e1"; // String | Unique correlation Id in a GUID format + String id = "id_example"; // String | ID of the form to update + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "38f0a02f-83cf-4142-b6ed-6b29474177df"; // 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 { @@ -505,7 +511,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| Id of the form to update | + **id** | **String**| ID of the form to update | **avalaraVersion** | **String**| API version | **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] @@ -535,11 +541,11 @@ Name | Type | Description | Notes ## uploadW9Files -> String uploadW9Files(id, avalaraVersion, xCorrelationId, xAvalaraClient, _file) +> uploadW9Files(id, avalaraVersion, xCorrelationId, xAvalaraClient, _file) -Upload files for a W9/W4/W8 form +Replace the PDF file for a W9/W4/W8 form -Upload files for a W9/W4/W8 form +Replaces the PDF file for a W9/W4/W8 form. ### Example @@ -570,13 +576,12 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | Id of the form - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "fe4f3600-70a9-4fa1-a8a8-28bcf27e678c"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "4fee6fea-2e64-4911-bb75-0931dd2875be"; // 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 { - String result = apiInstance.uploadW9Files(id, avalaraVersion, xCorrelationId, xAvalaraClient, _file); - System.out.println(result); + apiInstance.uploadW9Files(id, avalaraVersion, xCorrelationId, xAvalaraClient, _file); } catch (ApiException e) { System.err.println("Exception when calling FormsW9Api#uploadW9Files"); System.err.println("Status code: " + e.getCode()); @@ -601,7 +606,7 @@ Name | Type | Description | Notes ### Return type -**String** +null (empty response body) ### Authorization @@ -616,8 +621,8 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | W9/W4/W8 form with id | - | -| **400** | Bad request (e.g., invalid sort key) | - | +| **200** | | - | +| **400** | Bad request (e.g., Only .pdf files are allowed.) | - | | **401** | Authentication failed | - | | **404** | Not Found | - | diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index 284b105..42a9315 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -7,94 +7,118 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**originOfHealthCoverageCode** | **String** | | [optional] | -|**coveredIndividuals** | [**List<CoveredIndividualReference>**](CoveredIndividualReference.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] | -|**referenceId** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**tinType** | **String** | | [optional] | -|**tin** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**foreignProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | | [optional] | -|**updatedAt** | **OffsetDateTime** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | -|**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | | [optional] | -|**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | | [optional] | -|**paymentSettlementEntityNamePhoneNumber** | **String** | | [optional] | -|**grossAmountPaymentCard** | **Double** | | [optional] | -|**cardNotPresentTransactions** | **Double** | | [optional] | -|**merchantCategoryCode** | **String** | | [optional] | -|**paymentTransactionNumber** | **Double** | | [optional] | -|**federalIncomeTaxWithheld** | **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] | -|**medicalAndHealthCare** | **Double** | | [optional] | -|**nonemployeeCompensation** | **Double** | | [optional] | -|**substitutePayments** | **Double** | | [optional] | -|**directSalesIndicator** | **Boolean** | | [optional] | -|**cropInsuranceProceeds** | **Double** | | [optional] | -|**excessGoldenParachute** | **Double** | | [optional] | -|**grossAmountPaidAttorney** | **Double** | | [optional] | -|**section409ADeferrals** | **Double** | | [optional] | -|**section409AIncome** | **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] | -|**fatcaRequirementIndicator** | **Boolean** | | [optional] | -|**dateOfPayment** | **String** | | [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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.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** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Postal mail to recipient status | [optional] [readonly] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +|**tinMatchStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | TIN Match status | [optional] [readonly] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +|**addressVerificationStatus** | [**Form1099StatusDetailResponse**](Form1099StatusDetailResponse.md) | Address verification 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] | +|**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] | +|**foreignProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [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] | +|**uniqueFormId** | **String** | Unique form identifier | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**recipientDateOfBirth** | **OffsetDateTime** | Recipient's date of birth | [optional] | +|**recipientGiin** | **String** | Recipient's GIIN (Global Intermediary Identification Number) | [optional] | +|**recipientForeignTin** | **String** | Recipient's foreign TIN | [optional] | +|**lobCode** | **String** | Limitation on benefits code | [optional] | +|**incomeCode** | **String** | Income code | [optional] | +|**grossIncome** | **Double** | Gross income | [optional] | +|**withholdingIndicator** | **String** | Withholding indicator | [optional] | +|**taxCountryCode** | **String** | Country code | [optional] | +|**exemptionCodeChap3** | **String** | Exemption code (Chapter 3) | [optional] | +|**exemptionCodeChap4** | **String** | Exemption code (Chapter 4) | [optional] | +|**taxRateChap3** | **String** | Tax rate (Chapter 3) | [optional] | +|**withholdingAllowance** | **Double** | Withholding allowance | [optional] | +|**federalTaxWithheld** | **Double** | Federal tax withheld | [optional] | +|**taxNotDepositedIndicator** | **Boolean** | Tax not deposited indicator | [optional] | +|**academicIndicator** | **Boolean** | Academic indicator | [optional] | +|**taxWithheldOtherAgents** | **Double** | Tax withheld by other agents | [optional] | +|**amountRepaid** | **Double** | Amount repaid to recipient | [optional] | +|**taxPaidAgent** | **Double** | Tax paid by withholding agent | [optional] | +|**chap3StatusCode** | **String** | Chapter 3 status code | [optional] | +|**chap4StatusCode** | **String** | Chapter 4 status code | [optional] | +|**primaryWithholdingAgent** | [**PrimaryWithholdingAgentResponse**](PrimaryWithholdingAgentResponse.md) | Primary withholding agent information | [optional] | +|**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] | +|**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] | +|**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions | [optional] | +|**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**merchantCategoryCode** | **String** | Merchant category code | [optional] | +|**paymentTransactionNumber** | **Double** | Number of payment transactions | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**january** | **Double** | January gross payments | [optional] | +|**february** | **Double** | February gross payments | [optional] | +|**march** | **Double** | March gross payments | [optional] | +|**april** | **Double** | April gross payments | [optional] | +|**may** | **Double** | May gross payments | [optional] | +|**june** | **Double** | June gross payments | [optional] | +|**july** | **Double** | July gross payments | [optional] | +|**august** | **Double** | August gross payments | [optional] | +|**sept** | **Double** | September gross payments | [optional] | +|**october** | **Double** | October gross payments | [optional] | +|**november** | **Double** | November gross payments | [optional] | +|**december** | **Double** | December gross payments | [optional] | +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalAndHealthCare** | **Double** | Medical and health care payments | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**excessGoldenParachute** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**grossAmountPaidAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**section409AIncome** | **Double** | Nonqualified deferred compensation | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | [optional] | +|**grossDistributions** | **Double** | Gross distribution | [optional] | +|**taxableAmount** | **Double** | Taxable amount | [optional] | +|**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | +|**totalDistributionIndicator** | **Boolean** | Total distribution | [optional] | +|**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | +|**employeeContributions** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +|**netUnrealizedAppreciation** | **Double** | Net unrealized appreciation in employer's securities | [optional] | +|**distributionCodeRequired** | **String** | Distribution code | [optional] | +|**distributionCodeOptional** | **String** | Second distribution code | [optional] | +|**iraSepSimpleIndicator** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +|**totalIraSepSimpleDistribution** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +|**other** | **Double** | Other amount | [optional] | +|**otherPercent** | **String** | Other percentage | [optional] | +|**percentageTotalDistribution** | **String** | Total distribution percentage | [optional] | +|**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 17a3338..c5d0673 100644 --- a/docs/A1099/V2/ICreateForm1099Request.md +++ b/docs/A1099/V2/ICreateForm1099Request.md @@ -7,64 +7,64 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | | [optional] | -|**qualifiedDividends** | **String** | | [optional] | -|**totalCapitalGainDistr** | **String** | | [optional] | -|**unrecapSec1250Gain** | **String** | | [optional] | -|**section1202Gain** | **String** | | [optional] | -|**collectiblesGain** | **String** | | [optional] | -|**section897OrdinaryDividends** | **String** | | [optional] | -|**section897CapitalGain** | **String** | | [optional] | -|**nondividendDistributions** | **String** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**section199ADividends** | **String** | | [optional] | -|**investmentExpenses** | **String** | | [optional] | -|**foreignTaxPaid** | **String** | | [optional] | -|**foreignCountryOrUSPossession** | **String** | | [optional] | -|**cashLiquidationDistributions** | **String** | | [optional] | -|**noncashLiquidationDistributions** | **String** | | [optional] | -|**exemptInterestDividends** | **String** | | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**rents** | **Double** | | [optional] | -|**royalties** | **Double** | | [optional] | -|**otherIncome** | **Double** | | [optional] | -|**fedIncomeTaxWithheld** | **Double** | | [optional] | -|**fishingBoatProceeds** | **Double** | | [optional] | -|**medicalHealthCarePayments** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | -|**substitutePayments** | **Double** | | [optional] | -|**cropInsuranceProceeds** | **Double** | | [optional] | -|**grossProceedsPaidToAttorney** | **Double** | | [optional] | -|**fishPurchasedForResale** | **Double** | | [optional] | -|**section409ADeferrals** | **Double** | | [optional] | -|**excessGoldenParachutePayments** | **Double** | | [optional] | -|**nonqualifiedDeferredCompensation** | **Double** | | [optional] | -|**nonemployeeCompensation** | **Double** | | [optional] | +|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **String** | Qualified dividends | [optional] | +|**totalCapitalGainDistr** | **String** | Total capital gain distributions | [optional] | +|**unrecapSec1250Gain** | **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** | **Double** | Federal income tax withheld | [optional] | +|**section199ADividends** | **String** | Section 199A dividends | [optional] | +|**investmentExpenses** | **String** | Investment expenses | [optional] | +|**foreignTaxPaid** | **String** | 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] | +|**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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalHealthCarePayments** | **Double** | Medical and health care payments | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**grossProceedsPaidToAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**fishPurchasedForResale** | **Double** | Fish purchased for resale | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**excessGoldenParachutePayments** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**nonqualifiedDeferredCompensation** | **Double** | Nonqualified deferred compensation | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | | @@ -72,12 +72,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/IUpdateForm1099Request.md b/docs/A1099/V2/IUpdateForm1099Request.md index da7c4c3..6ae5360 100644 --- a/docs/A1099/V2/IUpdateForm1099Request.md +++ b/docs/A1099/V2/IUpdateForm1099Request.md @@ -7,64 +7,64 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**totalOrdinaryDividends** | **String** | | [optional] | -|**qualifiedDividends** | **String** | | [optional] | -|**totalCapitalGainDistr** | **String** | | [optional] | -|**unrecapSec1250Gain** | **String** | | [optional] | -|**section1202Gain** | **String** | | [optional] | -|**collectiblesGain** | **String** | | [optional] | -|**section897OrdinaryDividends** | **String** | | [optional] | -|**section897CapitalGain** | **String** | | [optional] | -|**nondividendDistributions** | **String** | | [optional] | -|**federalIncomeTaxWithheld** | **Double** | | [optional] | -|**section199ADividends** | **String** | | [optional] | -|**investmentExpenses** | **String** | | [optional] | -|**foreignTaxPaid** | **String** | | [optional] | -|**foreignCountryOrUSPossession** | **String** | | [optional] | -|**cashLiquidationDistributions** | **String** | | [optional] | -|**noncashLiquidationDistributions** | **String** | | [optional] | -|**exemptInterestDividends** | **String** | | [optional] | -|**specifiedPrivateActivityBondInterestDividends** | **String** | | [optional] | -|**fatcaFilingRequirement** | **Boolean** | | [optional] | -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] [readonly] | -|**issuerId** | **String** | | [optional] | -|**referenceId** | **String** | | [optional] | -|**recipientName** | **String** | | [optional] | -|**recipientTin** | **String** | | [optional] | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | | [optional] | -|**recipientSecondName** | **String** | | [optional] | -|**address** | **String** | | [optional] | -|**address2** | **String** | | [optional] | -|**city** | **String** | | [optional] | -|**state** | **String** | | [optional] | -|**zip** | **String** | | [optional] | -|**recipientEmail** | **String** | | [optional] | -|**accountNumber** | **String** | | [optional] | -|**officeCode** | **String** | | [optional] | -|**recipientNonUsProvince** | **String** | | [optional] | -|**countryCode** | **String** | | [optional] | -|**federalEFile** | **Boolean** | | [optional] | -|**postalMail** | **Boolean** | | [optional] | -|**stateEFile** | **Boolean** | | [optional] | -|**tinMatch** | **Boolean** | | [optional] | -|**addressVerification** | **Boolean** | | [optional] | -|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | | [optional] | -|**secondTinNotice** | **Boolean** | | [optional] | -|**rents** | **Double** | | [optional] | -|**royalties** | **Double** | | [optional] | -|**otherIncome** | **Double** | | [optional] | -|**fedIncomeTaxWithheld** | **Double** | | [optional] | -|**fishingBoatProceeds** | **Double** | | [optional] | -|**medicalHealthCarePayments** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | -|**substitutePayments** | **Double** | | [optional] | -|**cropInsuranceProceeds** | **Double** | | [optional] | -|**grossProceedsPaidToAttorney** | **Double** | | [optional] | -|**fishPurchasedForResale** | **Double** | | [optional] | -|**section409ADeferrals** | **Double** | | [optional] | -|**excessGoldenParachutePayments** | **Double** | | [optional] | -|**nonqualifiedDeferredCompensation** | **Double** | | [optional] | -|**nonemployeeCompensation** | **Double** | | [optional] | +|**totalOrdinaryDividends** | **String** | Total ordinary dividends | [optional] | +|**qualifiedDividends** | **String** | Qualified dividends | [optional] | +|**totalCapitalGainDistr** | **String** | Total capital gain distributions | [optional] | +|**unrecapSec1250Gain** | **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** | **Double** | Federal income tax withheld | [optional] | +|**section199ADividends** | **String** | Section 199A dividends | [optional] | +|**investmentExpenses** | **String** | Investment expenses | [optional] | +|**foreignTaxPaid** | **String** | 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] | +|**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 | | +|**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 | | +|**address2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | | +|**state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +|**zip** | **String** | Zip/postal code | [optional] | +|**recipientEmail** | **String** | Recipient email address | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**recipientNonUsProvince** | **String** | Foreign province | [optional] | +|**countryCode** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +|**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] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | +|**rents** | **Double** | Rents | [optional] | +|**royalties** | **Double** | Royalties | [optional] | +|**otherIncome** | **Double** | Other income | [optional] | +|**fedIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**fishingBoatProceeds** | **Double** | Fishing boat proceeds | [optional] | +|**medicalHealthCarePayments** | **Double** | Medical and health care payments | [optional] | +|**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale | [optional] | +|**substitutePayments** | **Double** | Substitute payments in lieu of dividends or interest | [optional] | +|**cropInsuranceProceeds** | **Double** | Crop insurance proceeds | [optional] | +|**grossProceedsPaidToAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | +|**fishPurchasedForResale** | **Double** | Fish purchased for resale | [optional] | +|**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**excessGoldenParachutePayments** | **Double** | (Legacy field) Excess golden parachute payments | [optional] | +|**nonqualifiedDeferredCompensation** | **Double** | Nonqualified deferred compensation | [optional] | +|**nonemployeeCompensation** | **Double** | Nonemployee compensation | | @@ -72,12 +72,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/IW9FormDataModelsOneOf.md b/docs/A1099/V2/IW9FormDataModelsOneOf.md index 1254788..c4b22c1 100644 --- a/docs/A1099/V2/IW9FormDataModelsOneOf.md +++ b/docs/A1099/V2/IW9FormDataModelsOneOf.md @@ -124,9 +124,9 @@ Interface representing a union of W4FormDataModel, W8BeneFormDataModel, W8BenFor |**certifyBox41** | **Boolean** | | [optional] | |**certifyBox43** | **Boolean** | | [optional] | |**certifyPart29Signature** | **Boolean** | | [optional] | -|**part19FormationOrResolutionDate** | **OffsetDateTime** | | [optional] | -|**part20FilingDate** | **OffsetDateTime** | | [optional] | -|**part21DeterminationDate** | **OffsetDateTime** | | [optional] | +|**part19FormationOrResolutionDate** | **LocalDate** | | [optional] | +|**part20FilingDate** | **LocalDate** | | [optional] | +|**part21DeterminationDate** | **LocalDate** | | [optional] | |**substantialUsOwners** | [**List<W8BenESubstantialUsOwnerDataModel>**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] | |**birthday** | **String** | The birthday of the individual associated with the form. | [optional] | |**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not required. | [optional] | @@ -205,8 +205,8 @@ Interface representing a union of W4FormDataModel, W8BeneFormDataModel, W8BenFor |**certifyBox40** | **Boolean** | Indicates certification for box 40. | [optional] | |**box41SponsoringEntity** | **String** | The sponsoring entity information for box 41. | [optional] | |**certifyBox42** | **Boolean** | Indicates certification for box 42. | [optional] | -|**box35FormedOnDate** | **OffsetDateTime** | | [optional] | -|**box36FiledOnDate** | **OffsetDateTime** | | [optional] | +|**box35FormedOnDate** | **LocalDate** | | [optional] | +|**box36FiledOnDate** | **LocalDate** | | [optional] | |**tinMatchStatus** | **String** | The status of the TIN match. | [optional] | |**signature** | **String** | The signature itself | [optional] | |**businessClassification** | **String** | The classification of the business. | [optional] | diff --git a/docs/A1099/V2/IntermediaryOrFlowThrough.md b/docs/A1099/V2/IntermediaryOrFlowThrough.md new file mode 100644 index 0000000..344886c --- /dev/null +++ b/docs/A1099/V2/IntermediaryOrFlowThrough.md @@ -0,0 +1,23 @@ + + +# IntermediaryOrFlowThrough + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ein** | **String** | | [optional] | +|**chap3StatusCode** | **String** | | [optional] | +|**chap4StatusCode** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**giin** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**foreignTin** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/IntermediaryOrFlowThroughRequest.md b/docs/A1099/V2/IntermediaryOrFlowThroughRequest.md new file mode 100644 index 0000000..8a19e72 --- /dev/null +++ b/docs/A1099/V2/IntermediaryOrFlowThroughRequest.md @@ -0,0 +1,23 @@ + + +# IntermediaryOrFlowThroughRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ein** | **String** | | [optional] | +|**chap3StatusCode** | **String** | | [optional] | +|**chap4StatusCode** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**giin** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**foreignTin** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/IntermediaryOrFlowThroughResponse.md b/docs/A1099/V2/IntermediaryOrFlowThroughResponse.md new file mode 100644 index 0000000..92910a5 --- /dev/null +++ b/docs/A1099/V2/IntermediaryOrFlowThroughResponse.md @@ -0,0 +1,23 @@ + + +# IntermediaryOrFlowThroughResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**ein** | **String** | | [optional] | +|**chap3StatusCode** | **String** | | [optional] | +|**chap4StatusCode** | **String** | | [optional] | +|**name** | **String** | | [optional] | +|**giin** | **String** | | [optional] | +|**countryCode** | **String** | | [optional] | +|**foreignTin** | **String** | | [optional] | +|**address** | **String** | | [optional] | +|**city** | **String** | | [optional] | +|**state** | **String** | | [optional] | +|**zip** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index 9f9844a..650c8b2 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**createIssuer**](Issuers1099Api.md#createIssuer) | **POST** /1099/issuers | Create an issuer [**deleteIssuer**](Issuers1099Api.md#deleteIssuer) | **DELETE** /1099/issuers/{id} | Delete an issuer -[**getIssuer**](Issuers1099Api.md#getIssuer) | **GET** /1099/issuers/{id} | Get an issuer +[**getIssuer**](Issuers1099Api.md#getIssuer) | **GET** /1099/issuers/{id} | Retrieve an issuer [**getIssuers**](Issuers1099Api.md#getIssuers) | **GET** /1099/issuers | List issuers [**updateIssuer**](Issuers1099Api.md#updateIssuer) | **PUT** /1099/issuers/{id} | Update an issuer @@ -18,7 +18,7 @@ Method | HTTP request | Description Create an issuer -Create a new issuer +Create an issuer (also known as a Payer). ### Example @@ -48,8 +48,8 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); Issuers1099Api apiInstance = new Issuers1099Api(apiClient); - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "fa8cab77-a162-404b-8bd9-a580287c744f"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "790d12c4-e473-4e06-8104-e1391469363d"; // 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 { @@ -104,7 +104,7 @@ Name | Type | Description | Notes Delete an issuer -Delete an issuer +Delete an issuer (also known as a Payer). ### Example @@ -135,8 +135,8 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to delete - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "b341ad72-1306-4af4-9c02-a742c55d8d97"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "f4fbae4e-795e-458a-aec2-5e5232efb33b"; // 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); @@ -187,9 +187,9 @@ null (empty response body) > IssuerResponse getIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient) -Get an issuer +Retrieve an issuer -Get an issuer +Retrieve an issuer (also known as a Payer). ### Example @@ -219,9 +219,9 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); Issuers1099Api apiInstance = new Issuers1099Api(apiClient); - String id = "id_example"; // String | - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "7d676bbe-e39a-4d59-a548-f9a8e026beed"; // String | Unique correlation Id in a GUID format + String id = "id_example"; // String | Id of the issuer to retrieve + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "826bf1b5-f556-485c-be41-e57e14e5cae9"; // 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); @@ -242,7 +242,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| | + **id** | **String**| Id of the issuer to retrieve | **avalaraVersion** | **String**| API version | **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] @@ -275,7 +275,7 @@ Name | Type | Description | Notes List issuers -List issuers for a given tax year. Filterable fields are name, referenceId and taxYear +List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. ### Example @@ -305,14 +305,14 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); Issuers1099Api apiInstance = new Issuers1099Api(apiClient); - String avalaraVersion = "2.0"; // String | API version + 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 = 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 | 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 = "84029679-b1eb-4ebf-8c73-2612f83c1981"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "12264f5a-c0c1-4cb2-8ab1-e5434d55b73f"; // 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); @@ -373,7 +373,7 @@ Name | Type | Description | Notes Update an issuer -Update an existing issuer +Update an issuer (also known as a Payer). ### Example @@ -403,9 +403,9 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); Issuers1099Api apiInstance = new Issuers1099Api(apiClient); - String id = "id_example"; // String | Id of the issuer to Update - String avalaraVersion = "2.0"; // String | API version - String xCorrelationId = "5eac330a-bb0c-4122-9f83-ec27fc871b05"; // String | Unique correlation Id in a GUID format + String id = "id_example"; // String | Id of the issuer to update + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "73758ef3-adb6-4b4b-ab1b-96f87332b71d"; // 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 { @@ -426,7 +426,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **String**| Id of the issuer to Update | + **id** | **String**| Id of the issuer to update | **avalaraVersion** | **String**| API version | **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] diff --git a/docs/A1099/V2/JobResult.md b/docs/A1099/V2/JobResult.md index d9c42fd..28a7d17 100644 --- a/docs/A1099/V2/JobResult.md +++ b/docs/A1099/V2/JobResult.md @@ -9,22 +9,22 @@ |------------ | ------------- | ------------- | -------------| |**id** | **String** | | [optional] | |**type** | **String** | | [optional] | -|**dryRun** | **Boolean** | | [optional] | -|**upsert** | **Boolean** | | [optional] | -|**status** | **String** | | [optional] | +|**dryRun** | **Boolean** | Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. | [optional] | +|**upsert** | **Boolean** | Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: * Form ID * Form Reference ID and tax year * Form TIN and tax year | [optional] | +|**status** | **String** | Status of the job | [optional] | |**errorMessage** | **String** | | [optional] | -|**totalProcessed** | **Integer** | | [optional] | -|**totalRows** | **Integer** | | [optional] | -|**updatedValid** | **Integer** | | [optional] | -|**updatedNoEmail** | **Integer** | | [optional] | -|**updatedInvalid** | **Integer** | | [optional] | -|**skippedDuplicate** | **Integer** | | [optional] | -|**skippedInvalid** | **Integer** | | [optional] | -|**skippedMultipleMatches** | **Integer** | | [optional] | -|**notFound** | **Integer** | | [optional] | -|**createdInvalid** | **Integer** | | [optional] | -|**createdNoEmail** | **Integer** | | [optional] | -|**createdValid** | **Integer** | | [optional] | +|**totalProcessed** | **Integer** | Total number of forms processed | [optional] | +|**totalRows** | **Integer** | Total number of forms in the request | [optional] | +|**updatedValid** | **Integer** | Number of forms updated and valid for e-filing and e-delivery | [optional] | +|**updatedNoEmail** | **Integer** | Number of forms updated and valid for e-filing but missing email or email is undeliverable | [optional] | +|**updatedInvalid** | **Integer** | Number of forms updated but invalid for e-filing | [optional] | +|**skippedDuplicate** | **Integer** | Number of forms skipped because they would have updated a record already updated once in the request | [optional] | +|**skippedInvalid** | **Integer** | Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing | [optional] | +|**skippedMultipleMatches** | **Integer** | Number of forms skipped because they matched multiple forms | [optional] | +|**notFound** | **Integer** | Number of forms skipped because no matching form or issuer could be found | [optional] | +|**createdInvalid** | **Integer** | Number of new forms created because no matching form could be found (and `upsert` was true) - with errors | [optional] | +|**createdNoEmail** | **Integer** | Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable | [optional] | +|**createdValid** | **Integer** | Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery | [optional] | diff --git a/docs/A1099/V2/Jobs1099Api.md b/docs/A1099/V2/Jobs1099Api.md index fb9e03b..fd4e11c 100644 --- a/docs/A1099/V2/Jobs1099Api.md +++ b/docs/A1099/V2/Jobs1099Api.md @@ -45,8 +45,8 @@ 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"; // String | API version - String xCorrelationId = "3473f78f-f1bd-48ce-8cad-ad651630addb"; // String | Unique correlation Id in a GUID format + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "08e85997-7532-4dd7-96fa-f7a029bb399f"; // 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/PrimaryWithholdingAgent.md b/docs/A1099/V2/PrimaryWithholdingAgent.md new file mode 100644 index 0000000..95d982b --- /dev/null +++ b/docs/A1099/V2/PrimaryWithholdingAgent.md @@ -0,0 +1,14 @@ + + +# PrimaryWithholdingAgent + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**primaryWithholdingAgentName** | **String** | | [optional] | +|**primaryWithholdingAgentEin** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/PrimaryWithholdingAgentRequest.md b/docs/A1099/V2/PrimaryWithholdingAgentRequest.md new file mode 100644 index 0000000..a1c2c60 --- /dev/null +++ b/docs/A1099/V2/PrimaryWithholdingAgentRequest.md @@ -0,0 +1,14 @@ + + +# PrimaryWithholdingAgentRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**primaryWithholdingAgentName** | **String** | | [optional] | +|**primaryWithholdingAgentEin** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/PrimaryWithholdingAgentResponse.md b/docs/A1099/V2/PrimaryWithholdingAgentResponse.md new file mode 100644 index 0000000..9e92bb5 --- /dev/null +++ b/docs/A1099/V2/PrimaryWithholdingAgentResponse.md @@ -0,0 +1,14 @@ + + +# PrimaryWithholdingAgentResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**primaryWithholdingAgentName** | **String** | | [optional] | +|**primaryWithholdingAgentEin** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/StateAndLocalWithholdingResponse.md b/docs/A1099/V2/StateAndLocalWithholdingResponse.md index f92f497..ebbdb23 100644 --- a/docs/A1099/V2/StateAndLocalWithholdingResponse.md +++ b/docs/A1099/V2/StateAndLocalWithholdingResponse.md @@ -7,14 +7,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**stateTaxWithheld** | **Double** | | [optional] | -|**state** | **String** | | [optional] | -|**stateIdNumber** | **String** | | [optional] | -|**stateIncome** | **Double** | | [optional] | -|**localTaxWithheld** | **Double** | | [optional] | -|**locality** | **String** | | [optional] | -|**localityIdNumber** | **String** | | [optional] | -|**localIncome** | **Double** | | [optional] | +|**stateTaxWithheld** | **Double** | Amount of state tax that was withheld | [optional] | +|**state** | **String** | US state | [optional] | +|**stateIdNumber** | **String** | State ID number of the entity issuing the form | [optional] | +|**stateIncome** | **Double** | Amount of state income | [optional] | +|**localTaxWithheld** | **Double** | Amount of local tax that was withheld | [optional] | +|**locality** | **String** | Locality name | [optional] | +|**localityIdNumber** | **String** | Locality ID number of the entity issuing the form | [optional] | +|**localIncome** | **Double** | Amount of local income | [optional] | diff --git a/docs/A1099/V2/StateEfileStatusDetailResponse.md b/docs/A1099/V2/StateEfileStatusDetailResponse.md new file mode 100644 index 0000000..b6e5ac3 --- /dev/null +++ b/docs/A1099/V2/StateEfileStatusDetailResponse.md @@ -0,0 +1,15 @@ + + +# StateEfileStatusDetailResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | | [optional] | +|**time** | **String** | | [optional] | +|**jurisdiction** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/SubstantialUsOwnerRequest.md b/docs/A1099/V2/SubstantialUsOwnerRequest.md new file mode 100644 index 0000000..9972e02 --- /dev/null +++ b/docs/A1099/V2/SubstantialUsOwnerRequest.md @@ -0,0 +1,15 @@ + + +# SubstantialUsOwnerRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | The name of the substantial U.S. owner of the NFFE. | [optional] | +|**address** | **String** | The address of the substantial U.S. owner of the NFFE. | [optional] | +|**tin** | **String** | The taxpayer identification number (TIN) of the substantial U.S. owner of the NFFE. | [optional] | + + + diff --git a/docs/A1099/V2/Update1099Form200Response.md b/docs/A1099/V2/Update1099Form200Response.md index b766608..dae8fd3 100644 --- a/docs/A1099/V2/Update1099Form200Response.md +++ b/docs/A1099/V2/Update1099Form200Response.md @@ -38,11 +38,11 @@ |**tinMatch** | **Boolean** | | [optional] | |**addressVerification** | **Boolean** | | [optional] | |**federalEfileStatus** | [**StatusDetail**](StatusDetail.md) | | [optional] | -|**stateEfileStatus** | [**List<StateEfileStatusDetailApp>**](StateEfileStatusDetailApp.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<ValidationErrorApp>**](ValidationErrorApp.md) | | [optional] | +|**validationErrors** | [**List<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | |**secondTinNotice** | **Boolean** | | [optional] | |**rents** | **Double** | | [optional] | |**royalties** | **Double** | | [optional] | @@ -50,7 +50,7 @@ |**fedIncomeTaxWithheld** | **Double** | | [optional] | |**fishingBoatProceeds** | **Double** | | [optional] | |**medicalHealthCarePayments** | **Double** | | [optional] | -|**payerMadeDirectSales** | **Boolean** | | [optional] | +|**directSalesIndicator** | **Boolean** | | [optional] | |**substitutePayments** | **Double** | | [optional] | |**cropInsuranceProceeds** | **Double** | | [optional] | |**grossProceedsPaidToAttorney** | **Double** | | [optional] | @@ -68,12 +68,13 @@ | Name | Value | |---- | -----| -| FORM1099_NEC | "Form1099Nec" | -| FORM1099_MISC | "Form1099Misc" | -| FORM1099_DIV | "Form1099Div" | -| FORM1099_R | "Form1099R" | -| FORM1099_K | "Form1099K" | -| FORM1095_B | "Form1095B" | +| _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" | diff --git a/docs/A1099/V2/ValidationErrorResponse.md b/docs/A1099/V2/ValidationErrorResponse.md new file mode 100644 index 0000000..6102cbf --- /dev/null +++ b/docs/A1099/V2/ValidationErrorResponse.md @@ -0,0 +1,14 @@ + + +# ValidationErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**field** | **String** | The field containing the error | [optional] | +|**errors** | **List<String>** | The list of error messages | [optional] | + + + diff --git a/docs/A1099/V2/W4FormDataModel.md b/docs/A1099/V2/W4FormDataModel.md index 07bbf10..6ad649d 100644 --- a/docs/A1099/V2/W4FormDataModel.md +++ b/docs/A1099/V2/W4FormDataModel.md @@ -124,9 +124,9 @@ W-4 Form |**certifyBox41** | **Boolean** | | [optional] | |**certifyBox43** | **Boolean** | | [optional] | |**certifyPart29Signature** | **Boolean** | | [optional] | -|**part19FormationOrResolutionDate** | **OffsetDateTime** | | [optional] | -|**part20FilingDate** | **OffsetDateTime** | | [optional] | -|**part21DeterminationDate** | **OffsetDateTime** | | [optional] | +|**part19FormationOrResolutionDate** | **LocalDate** | | [optional] | +|**part20FilingDate** | **LocalDate** | | [optional] | +|**part21DeterminationDate** | **LocalDate** | | [optional] | |**substantialUsOwners** | [**List<W8BenESubstantialUsOwnerDataModel>**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] | |**birthday** | **String** | The birthday of the individual associated with the form. | [optional] | |**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not required. | [optional] | @@ -205,8 +205,8 @@ W-4 Form |**certifyBox40** | **Boolean** | Indicates certification for box 40. | [optional] | |**box41SponsoringEntity** | **String** | The sponsoring entity information for box 41. | [optional] | |**certifyBox42** | **Boolean** | Indicates certification for box 42. | [optional] | -|**box35FormedOnDate** | **OffsetDateTime** | | [optional] | -|**box36FiledOnDate** | **OffsetDateTime** | | [optional] | +|**box35FormedOnDate** | **LocalDate** | | [optional] | +|**box36FiledOnDate** | **LocalDate** | | [optional] | |**tinMatchStatus** | **String** | The status of the TIN match. | [optional] | |**signature** | **String** | The signature itself | [optional] | |**businessClassification** | **String** | The classification of the business. | [optional] | diff --git a/docs/A1099/V2/W4FormRequest.md b/docs/A1099/V2/W4FormRequest.md new file mode 100644 index 0000000..baa9e97 --- /dev/null +++ b/docs/A1099/V2/W4FormRequest.md @@ -0,0 +1,49 @@ + + +# W4FormRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w4\" for this model). | [optional] [readonly] | +|**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 employee. | [optional] | +|**city** | **String** | The city of residence of the employee. | [optional] | +|**state** | **String** | The state of residence of the employee. | [optional] | +|**zip** | **String** | The ZIP code of residence of the employee. | [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] | +|**companyId** | **String** | The ID of the associated company. | [optional] | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W8BenEFormRequest.md b/docs/A1099/V2/W8BenEFormRequest.md new file mode 100644 index 0000000..6c67959 --- /dev/null +++ b/docs/A1099/V2/W8BenEFormRequest.md @@ -0,0 +1,125 @@ + + +# W8BenEFormRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w8bene\" for this model). | [optional] [readonly] | +|**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] | +|**entityType** | **String** | The entity type. | [optional] | +|**makingTreatyClaim** | **Boolean** | Indicates whether the entity is making a treaty claim. | [optional] | +|**fatcaStatus** | **String** | The FATCA status. | [optional] | +|**residenceAddress** | **String** | The residential address of the individual or entity. | [optional] | +|**residenceCity** | **String** | The city of residence. | [optional] | +|**residenceState** | **String** | The state of residence. | [optional] | +|**residenceZip** | **String** | The ZIP code of the residence. | [optional] | +|**residenceCountry** | **String** | The country of residence. | [optional] | +|**residenceIsMailing** | **Boolean** | Indicates whether the residence address is also the mailing address. | [optional] | +|**mailingAddress** | **String** | The mailing address. | [optional] | +|**mailingCity** | **String** | The city of the mailing address. | [optional] | +|**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] | +|**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] | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**disregardedEntityFatcaStatus** | **String** | The FATCA status of disregarded entity or branch receiving payment. | [optional] | +|**disregardedAddress** | **String** | The address for disregarded entities. | [optional] | +|**disregardedCity** | **String** | The city for disregarded entities. | [optional] | +|**disregardedState** | **String** | The state for disregarded entities. | [optional] | +|**disregardedZip** | **String** | The ZIP code for disregarded entities. | [optional] | +|**disregardedCountry** | **String** | The country for disregarded entities. | [optional] | +|**disregardedEntityGiin** | **String** | The GIIN for disregarded entities. | [optional] | +|**treatyCountryCertification** | **Boolean** | Certifies the beneficial owner's country under the U.S. tax treaty. | [optional] | +|**treatyCountry** | **String** | The treaty country of the beneficial owner. | [optional] | +|**benefitLimitationCertification** | **Boolean** | Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. | [optional] | +|**benefitLimitation** | **String** | The benefit limitation for tax treaty claims. | [optional] | +|**qualifiedResidentStatusCertification** | **Boolean** | Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. | [optional] | +|**treatyArticle** | **String** | Indicates the specific article and paragraph of the tax treaty under which the beneficial owner is claiming benefits. | [optional] | +|**withholdingRate** | **String** | Specifies the reduced withholding rate claimed under the applicable tax treaty. | [optional] | +|**incomeType** | **String** | Specifies the type of income for which the reduced treaty withholding rate is being claimed. | [optional] | +|**treatyReasons** | **String** | The additional conditions in the article the beneficial owner meets to be eligible for the rate of withholding. | [optional] | +|**ffiSponsoringEntity** | **String** | The name of the entity that sponsors the foreign financial institution (FFI). | [optional] | +|**investmentEntityCertification** | **Boolean** | Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. | [optional] | +|**controlledForeignCorporationCertification** | **Boolean** | Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. | [optional] | +|**compliantNonregisteringLocalBankCertification** | **Boolean** | Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. | [optional] | +|**compliantFfiLowValueAccountsCertification** | **Boolean** | Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. | [optional] | +|**sponsoredCloselyHeldEntitySponsoringEntity** | **String** | The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. | [optional] | +|**sponsoredCloselyHeldInvestmentVehicleCertification** | **Boolean** | Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. | [optional] | +|**compliantLimitedLifeDebtEntityCertification** | **Boolean** | Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. | [optional] | +|**investmentEntityNoFinancialAccountsCertification** | **Boolean** | Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. | [optional] | +|**ownerDocumentedFfiCertification** | **Boolean** | Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. | [optional] | +|**ownerDocumentedFfiReportingStatementCertification** | **Boolean** | Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. | [optional] | +|**ownerDocumentedFfiAuditorLetterCertification** | **Boolean** | Certifies that the FFI will provide an auditor’s letter and required owner reporting documentation to confirm its status as an owner-documented FFI. | [optional] | +|**ownerDocumentedFfiTrustBeneficiariesCertification** | **Boolean** | Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. | [optional] | +|**restrictedDistributorCertification** | **Boolean** | Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. | [optional] | +|**restrictedDistributorAgreementCertification** | **Boolean** | Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. | [optional] | +|**restrictedDistributorPreexistingSalesComplianceCertification** | **Boolean** | Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. | [optional] | +|**nonreportingIgaFfiCertification** | **Boolean** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] | +|**igaCountry** | **String** | The country for the applicable IGA with the United States. | [optional] | +|**igaModel** | **String** | The applicable IGA model. | [optional] | +|**igaLegalStatusTreatment** | **String** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] | +|**igaFfiTrusteeOrSponsor** | **String** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] | +|**igaFfiTrusteeIsForeign** | **Boolean** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] | +|**nonCommercialFinancialActivityCertification** | **Boolean** | Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. | [optional] | +|**internationOrganizationCertification** | **Boolean** | Certifies that the entity is an international organization described in section 7701(a)(18). | [optional] | +|**intergovernmentalOrganizationCertification** | **Boolean** | Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. | [optional] | +|**treatyQualifiedPensionFundCertification** | **Boolean** | Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. | [optional] | +|**qualifiedRetirementFundCertification** | **Boolean** | Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. | [optional] | +|**narrowParticipationRetirementFundCertification** | **Boolean** | Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. | [optional] | +|**section401AEquivalentPensionPlanCertification** | **Boolean** | Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. | [optional] | +|**investmentEntityForRetirementFundsCertification** | **Boolean** | Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. | [optional] | +|**exemptBeneficialOwnerSponsoredRetirementFundCertification** | **Boolean** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] | +|**exemptBeneficialOwnerOwnedInvestmentEntityCertification** | **Boolean** | Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. | [optional] | +|**territoryFinancialInstitutionCertification** | **Boolean** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] | +|**exceptedNonfinancialGroupEntityCertification** | **Boolean** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] | +|**exceptedNonfinancialStartUpCertification** | **Boolean** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] | +|**startupFormationOrResolutionDate** | **LocalDate** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] | +|**exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification** | **Boolean** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] | +|**nonfinancialEntityFilingDate** | **LocalDate** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] | +|**section501COrganizationCertification** | **Boolean** | Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. | [optional] | +|**determinationLetterDate** | **LocalDate** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] | +|**nonprofitOrganizationCertification** | **Boolean** | Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. | [optional] | +|**publiclyTradedNffeCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] | +|**publiclyTradedNffeSecuritiesMarket** | **String** | The name of the securities market where the corporation's stock is regularly traded. | [optional] | +|**nffeAffiliateOfPubliclyTradedEntityCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] | +|**publiclyTradedEntity** | **String** | The name of the affiliated entity whose stock is regularly traded on an established securities market. | [optional] | +|**nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket** | **String** | The name of the established securities market where the affiliated entity's stock is traded. | [optional] | +|**exceptedTerritoryNffeCertification** | **Boolean** | Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. | [optional] | +|**activeNffeCertification** | **Boolean** | Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. | [optional] | +|**passiveNffeCertification** | **Boolean** | Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. | [optional] | +|**passiveNffeNoSubstantialUsOwnersCertification** | **Boolean** | Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. | [optional] | +|**passiveNffeSubstantialUsOwnersProvidedCertification** | **Boolean** | Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. | [optional] | +|**exceptedInterAffiliateFfiCertification** | **Boolean** | Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. | [optional] | +|**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] | +|**substantialUsOwners** | [**List<SubstantialUsOwnerRequest>**](SubstantialUsOwnerRequest.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] | +|**companyId** | **String** | The ID of the associated company. | [optional] | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W8BenEFormResponse.md b/docs/A1099/V2/W8BenEFormResponse.md index 09b3fff..2703b03 100644 --- a/docs/A1099/V2/W8BenEFormResponse.md +++ b/docs/A1099/V2/W8BenEFormResponse.md @@ -81,11 +81,11 @@ |**territoryFinancialInstitutionCertification** | **Boolean** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] | |**exceptedNonfinancialGroupEntityCertification** | **Boolean** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] | |**exceptedNonfinancialStartUpCertification** | **Boolean** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] | -|**startupFormationOrResolutionDate** | **OffsetDateTime** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] | +|**startupFormationOrResolutionDate** | **LocalDate** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] | |**exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification** | **Boolean** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] | -|**nonfinancialEntityFilingDate** | **OffsetDateTime** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] | +|**nonfinancialEntityFilingDate** | **LocalDate** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] | |**section501COrganizationCertification** | **Boolean** | Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. | [optional] | -|**determinationLetterDate** | **OffsetDateTime** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] | +|**determinationLetterDate** | **LocalDate** | The date of the IRS determination letter confirming the entity’s section 501(c) status. | [optional] | |**nonprofitOrganizationCertification** | **Boolean** | Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. | [optional] | |**publiclyTradedNffeCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] | |**publiclyTradedNffeSecuritiesMarket** | **String** | The name of the securities market where the corporation's stock is regularly traded. | [optional] | diff --git a/docs/A1099/V2/W8BenFormDataModel.md b/docs/A1099/V2/W8BenFormDataModel.md index 0db3f26..9a58b2a 100644 --- a/docs/A1099/V2/W8BenFormDataModel.md +++ b/docs/A1099/V2/W8BenFormDataModel.md @@ -133,9 +133,9 @@ W-8 BEN form |**certifyBox41** | **Boolean** | | [optional] | |**certifyBox43** | **Boolean** | | [optional] | |**certifyPart29Signature** | **Boolean** | | [optional] | -|**part19FormationOrResolutionDate** | **OffsetDateTime** | | [optional] | -|**part20FilingDate** | **OffsetDateTime** | | [optional] | -|**part21DeterminationDate** | **OffsetDateTime** | | [optional] | +|**part19FormationOrResolutionDate** | **LocalDate** | | [optional] | +|**part20FilingDate** | **LocalDate** | | [optional] | +|**part21DeterminationDate** | **LocalDate** | | [optional] | |**substantialUsOwners** | [**List<W8BenESubstantialUsOwnerDataModel>**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] | |**ein** | **String** | The employer identification number (EIN). | [optional] | |**einType** | **String** | The type of employer identification number (EIN). | [optional] | @@ -205,8 +205,8 @@ W-8 BEN form |**certifyBox40** | **Boolean** | Indicates certification for box 40. | [optional] | |**box41SponsoringEntity** | **String** | The sponsoring entity information for box 41. | [optional] | |**certifyBox42** | **Boolean** | Indicates certification for box 42. | [optional] | -|**box35FormedOnDate** | **OffsetDateTime** | | [optional] | -|**box36FiledOnDate** | **OffsetDateTime** | | [optional] | +|**box35FormedOnDate** | **LocalDate** | | [optional] | +|**box36FiledOnDate** | **LocalDate** | | [optional] | |**tinMatchStatus** | **String** | The status of the TIN match. | [optional] | |**signature** | **String** | The signature itself | [optional] | |**businessClassification** | **String** | The classification of the business. | [optional] | diff --git a/docs/A1099/V2/W8BenFormRequest.md b/docs/A1099/V2/W8BenFormRequest.md new file mode 100644 index 0000000..893d197 --- /dev/null +++ b/docs/A1099/V2/W8BenFormRequest.md @@ -0,0 +1,54 @@ + + +# W8BenFormRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w8ben\" for this model). | [optional] [readonly] | +|**name** | **String** | The name of the individual or entity associated with the form. | [optional] | +|**citizenshipCountry** | **String** | The country of citizenship. | [optional] | +|**residenceAddress** | **String** | The residential address of the individual or entity. | [optional] | +|**residenceCity** | **String** | The city of residence. | [optional] | +|**residenceState** | **String** | The state of residence. | [optional] | +|**residenceZip** | **String** | The ZIP code of the residence. | [optional] | +|**residenceCountry** | **String** | The country of residence. | [optional] | +|**residenceIsMailing** | **Boolean** | Indicates whether the residence address is the mailing address. | [optional] | +|**mailingAddress** | **String** | The mailing address. | [optional] | +|**mailingCity** | **String** | The city of the mailing address. | [optional] | +|**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] | +|**tin** | **String** | The taxpayer identification number (TIN). | [optional] | +|**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not legally required. | [optional] | +|**foreignTin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**birthday** | **LocalDate** | The birthday of the individual associated with the form. | [optional] | +|**treatyCountry** | **String** | The country for which the treaty applies. | [optional] | +|**treatyArticle** | **String** | The specific article of the treaty being claimed. | [optional] | +|**treatyReasons** | **String** | The reasons for claiming treaty benefits. | [optional] | +|**withholdingRate** | **String** | The withholding rate applied as per the treaty. | [optional] | +|**incomeType** | **String** | The type of income covered by the treaty. | [optional] | +|**signerName** | **String** | The name of the signer of the form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | [optional] | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W8BeneFormDataModel.md b/docs/A1099/V2/W8BeneFormDataModel.md index fd31b9c..9951265 100644 --- a/docs/A1099/V2/W8BeneFormDataModel.md +++ b/docs/A1099/V2/W8BeneFormDataModel.md @@ -107,9 +107,9 @@ W-8 BEN-E form |**certifyBox41** | **Boolean** | | [optional] | |**certifyBox43** | **Boolean** | | [optional] | |**certifyPart29Signature** | **Boolean** | | [optional] | -|**part19FormationOrResolutionDate** | **OffsetDateTime** | | [optional] | -|**part20FilingDate** | **OffsetDateTime** | | [optional] | -|**part21DeterminationDate** | **OffsetDateTime** | | [optional] | +|**part19FormationOrResolutionDate** | **LocalDate** | | [optional] | +|**part20FilingDate** | **LocalDate** | | [optional] | +|**part21DeterminationDate** | **LocalDate** | | [optional] | |**substantialUsOwners** | [**List<W8BenESubstantialUsOwnerDataModel>**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] | |**employeeFirstName** | **String** | The first name of the employee. | [optional] | |**employeeMiddleName** | **String** | The middle name of the employee. | [optional] | @@ -205,8 +205,8 @@ W-8 BEN-E form |**certifyBox40** | **Boolean** | Indicates certification for box 40. | [optional] | |**box41SponsoringEntity** | **String** | The sponsoring entity information for box 41. | [optional] | |**certifyBox42** | **Boolean** | Indicates certification for box 42. | [optional] | -|**box35FormedOnDate** | **OffsetDateTime** | | [optional] | -|**box36FiledOnDate** | **OffsetDateTime** | | [optional] | +|**box35FormedOnDate** | **LocalDate** | | [optional] | +|**box36FiledOnDate** | **LocalDate** | | [optional] | |**tinMatchStatus** | **String** | The status of the TIN match. | [optional] | |**signature** | **String** | The signature itself | [optional] | |**businessClassification** | **String** | The classification of the business. | [optional] | diff --git a/docs/A1099/V2/W8ImyFormDataModel.md b/docs/A1099/V2/W8ImyFormDataModel.md index 6f6b7e8..8d1a4ab 100644 --- a/docs/A1099/V2/W8ImyFormDataModel.md +++ b/docs/A1099/V2/W8ImyFormDataModel.md @@ -126,8 +126,8 @@ W-8 IMY form |**certifyBox42** | **Boolean** | Indicates certification for box 42. | [optional] | |**signerName** | **String** | The name of the signer of the form. | [optional] | |**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**box35FormedOnDate** | **OffsetDateTime** | | [optional] | -|**box36FiledOnDate** | **OffsetDateTime** | | [optional] | +|**box35FormedOnDate** | **LocalDate** | | [optional] | +|**box36FiledOnDate** | **LocalDate** | | [optional] | |**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] | @@ -197,9 +197,9 @@ W-8 IMY form |**certifyBox41** | **Boolean** | | [optional] | |**certifyBox43** | **Boolean** | | [optional] | |**certifyPart29Signature** | **Boolean** | | [optional] | -|**part19FormationOrResolutionDate** | **OffsetDateTime** | | [optional] | -|**part20FilingDate** | **OffsetDateTime** | | [optional] | -|**part21DeterminationDate** | **OffsetDateTime** | | [optional] | +|**part19FormationOrResolutionDate** | **LocalDate** | | [optional] | +|**part20FilingDate** | **LocalDate** | | [optional] | +|**part21DeterminationDate** | **LocalDate** | | [optional] | |**substantialUsOwners** | [**List<W8BenESubstantialUsOwnerDataModel>**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] | |**birthday** | **String** | The birthday of the individual associated with the form. | [optional] | |**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not required. | [optional] | diff --git a/docs/A1099/V2/W8ImyFormRequest.md b/docs/A1099/V2/W8ImyFormRequest.md new file mode 100644 index 0000000..0f6000d --- /dev/null +++ b/docs/A1099/V2/W8ImyFormRequest.md @@ -0,0 +1,141 @@ + + +# W8ImyFormRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w8imy\" for this model). | [optional] [readonly] | +|**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] | +|**entityType** | **String** | The entity type. | [optional] | +|**fatcaStatus** | **String** | The FATCA status. | [optional] | +|**residenceAddress** | **String** | The residential address of the individual or entity. | [optional] | +|**residenceCity** | **String** | The city of residence. | [optional] | +|**residenceState** | **String** | The state of residence. | [optional] | +|**residenceZip** | **String** | The ZIP code of the residence. | [optional] | +|**residenceCountry** | **String** | The country of residence. | [optional] | +|**residenceIsMailing** | **Boolean** | Indicates whether the residence address is also the mailing address. | [optional] | +|**mailingAddress** | **String** | The mailing address. | [optional] | +|**mailingCity** | **String** | The city of the mailing address. | [optional] | +|**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] | +|**foreignTin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | +|**referenceNumber** | **String** | A reference number for the form. | [optional] | +|**disregardedEntityFatcaStatus** | **String** | The FATCA status of disregarded entity or branch receiving payment. | [optional] | +|**disregardedAddress** | **String** | The address for disregarded entities. | [optional] | +|**disregardedCity** | **String** | The city for disregarded entities. | [optional] | +|**disregardedState** | **String** | The state for disregarded entities. | [optional] | +|**disregardedZip** | **String** | The ZIP code for disregarded entities. | [optional] | +|**disregardedCountry** | **String** | The country for disregarded entities. | [optional] | +|**disregardedEntityGiin** | **String** | The GIIN for disregarded entities. | [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] | +|**qiPrimaryWithholdingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding responsibility under chapters 3 and 4 for the specified accounts. | [optional] | +|**qiWithholdingResponsibilityForPtpSalesCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding and reporting responsibility under section 1446(f) for amounts realized from sales of interests in publicly traded partnerships. | [optional] | +|**qiNomineeWithholdingResponsibilityForPtpDistributionsCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding responsibility as a nominee under Regulations section 1.1446-4(b)(3) for publicly traded partnership distributions. | [optional] | +|**qiSecuritiesLenderSubstituteDividendWithholdingCertification** | **Boolean** | Certifies that the Qualified Intermediary is acting as a qualified securities lender and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] | +|**qiWithholdingAnd1099ReportingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes primary withholding under chapters 3 and 4, and primary Form 1099 reporting and backup withholding responsibility for U.S. source interest and substitute interest payments. | [optional] | +|**qiForm1099OrFatcaReportingResponsibilityCertification** | **Boolean** | Certifies that the Qualified Intermediary assumes Form 1099 reporting and backup withholding responsibility, or FATCA reporting responsibility as a participating or registered deemed-compliant FFI, for accounts held by specified U.S. persons. | [optional] | +|**qiOptOutOfForm1099ReportingCertification** | **Boolean** | Certifies that the Qualified Intermediary does not assume primary Form 1099 reporting and backup withholding responsibility for the accounts associated with this form. | [optional] | +|**qiWithholdingRatePoolCertification** | **Boolean** | Certifies that the Qualified Intermediary meets the requirements for allocating payments to a chapter 4 withholding rate pool of U.S. payees under Regulations section 1.6049-4(c)(4)(iii). | [optional] | +|**qiIntermediaryOrFlowThroughEntityDocumentationCertification** | **Boolean** | Certifies that the Qualified Intermediary has obtained or will obtain documentation confirming the status of any intermediary or flow-through entity as a participating FFI, registered deemed-compliant FFI, or QI for U.S. payees in a chapter 4 withholding rate pool. | [optional] | +|**qualifiedDerivativesDealerCertification** | **Boolean** | Certifies that the Qualified Derivatives Dealer (QDD) is approved by the IRS and assumes primary withholding and reporting responsibilities for payments related to potential section 871(m) transactions. | [optional] | +|**qddCorporation** | **Boolean** | Indicates QDD classification is Corporation. | [optional] | +|**qddPartnership** | **Boolean** | Indicates QDD classification is Partnership. | [optional] | +|**qddDisregardedEntity** | **Boolean** | Indicates QDD classification is Disregarded Entity. | [optional] | +|**nonqualifiedIntermediaryCertification** | **Boolean** | Certifies that the entity is not acting as a Qualified Intermediary and is not acting for its own account for the accounts covered by this form. | [optional] | +|**nqiWithholdingStatementTransmissionCertification** | **Boolean** | Certifies that the nonqualified intermediary is submitting this form to transmit withholding certificates and/or other required documentation along with a withholding statement. | [optional] | +|**nqiWithholdingRatePoolComplianceCertification** | **Boolean** | Certifies that the nonqualified intermediary meets the requirements of Regulations section 1.6049-4(c)(4)(iii) for U.S. payees included in a withholding rate pool, excluding publicly traded partnership distributions. | [optional] | +|**nqiQualifiedSecuritiesLenderCertification** | **Boolean** | Certifies that the nonqualified intermediary is acting as a qualified securities lender (not as a QI) and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. | [optional] | +|**nqiAlternativeWithholdingStatementVerificationCertification** | **Boolean** | Certifies that the nonqualified intermediary has verified, or will verify, all information on alternative withholding statements for consistency with account data to determine the correct withholding rate, as required under sections 1441 or 1471. | [optional] | +|**territoryFinancialInstitutionCertification** | **Boolean** | Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. | [optional] | +|**tfiTreatedAsUsPersonCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person for chapters 3 and 4 purposes concerning reportable amounts and withholdable payments. | [optional] | +|**tfiWithholdingStatementTransmissionCertification** | **Boolean** | Certifies that the territory financial institution is transmitting withholding certificates or other required documentation and has provided or will provide a withholding statement for reportable or withholdable payments. | [optional] | +|**tfiTreatedAsUsPersonForPtpSalesCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person under Regulations section 1.1446(f)-4(a)(2)(i)(B) for amounts realized from sales of publicly traded partnership interests. | [optional] | +|**tfiNomineeUsPersonForPtpDistributionsCertification** | **Boolean** | Certifies that the territory financial institution agrees to be treated as a U.S. person and as a nominee for purposes of publicly traded partnership distributions under the applicable regulations. | [optional] | +|**tfiNotNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the territory financial institution is not acting as a nominee for publicly traded partnership distributions and is providing withholding statements for those distributions. | [optional] | +|**usBranchNonEffectivelyConnectedIncomeCertification** | **Boolean** | Certifies that the U.S. branch is receiving reportable or withholdable payments that are not effectively connected income, PTP distributions, or proceeds from PTP sales. | [optional] | +|**usBranchAgreementToBeTreatedAsUsPersonCertification** | **Boolean** | Certifies that the U.S. branch of a foreign bank or insurance company agrees to be treated as a U.S. person for reportable amounts or withholdable payments under the applicable regulations. | [optional] | +|**usBranchWithholdingStatementAndComplianceCertification** | **Boolean** | Certifies that the U.S. branch is transmitting required documentation and withholding statements for reportable or withholdable payments and is applying the appropriate FATCA regulations. | [optional] | +|**usBranchActingAsUsPersonForPtpSalesCertification** | **Boolean** | Certifies that the U.S. branch is acting as a U.S. person for purposes of amounts realized from sales of publicly traded partnership interests under the applicable regulations. | [optional] | +|**usBranchNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the U.S. branch is treated as a U.S. person and as a nominee for publicly traded partnership distributions under the applicable regulations. | [optional] | +|**usBranchNotNomineeForPtpDistributionsCertification** | **Boolean** | Certifies that the U.S. branch is not acting as a nominee for publicly traded partnership distributions and is providing the required withholding statements. | [optional] | +|**withholdingForeignPartnershipOrTrustCertification** | **Boolean** | Certifies that the entity is a withholding foreign partnership (WP) or a withholding foreign trust (WT) that is compliant with the terms of its WP or WT agreement. | [optional] | +|**nonwithholdingForeignEntityWithholdingStatementCertification** | **Boolean** | Certifies that the entity is a nonwithholding foreign partnership or trust, providing the form for non-effectively connected payments and transmitting required withholding documentation for chapters 3 and 4. | [optional] | +|**foreignEntityPartnerInLowerTierPartnershipCertification** | **Boolean** | Certifies that the entity is a foreign partnership or grantor trust acting as a partner in a lower-tier partnership and is submitting the form for purposes of section 1446(a). | [optional] | +|**foreignPartnershipAmountRealizedSection1446FCertification** | **Boolean** | Certifies that the entity is a foreign partnership receiving an amount realized from the transfer of a partnership interest for purposes of section 1446(f). | [optional] | +|**foreignPartnershipModifiedAmountRealizedCertification** | **Boolean** | Certifies that the foreign partnership is providing a withholding statement for a modified amount realized from the transfer of a partnership interest, when applicable. | [optional] | +|**foreignGrantorTrustAmountRealizedAllocationCertification** | **Boolean** | Certifies that the foreign grantor trust is submitting the form on behalf of each grantor or owner and providing a withholding statement to allocate the amount realized in accordance with the regulations. | [optional] | +|**alternativeWithholdingStatementRelianceCertification** | **Boolean** | Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement. | [optional] | +|**npFfiWithExemptBeneficialOwnersCertification** | **Boolean** | Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners. | [optional] | +|**ffiSponsoringEntity** | **String** | The name of the entity that sponsors the foreign financial institution (FFI). | [optional] | +|**investmentEntityCertification** | **Boolean** | Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. | [optional] | +|**controlledForeignCorporationCertification** | **Boolean** | Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. | [optional] | +|**ownerDocumentedFfiCertification** | **Boolean** | Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. | [optional] | +|**ownerDocumentedFfiReportingStatementCertification** | **Boolean** | Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. | [optional] | +|**ownerDocumentedFfiAuditorLetterCertification** | **Boolean** | Certifies that the FFI has provided or will provide an auditor’s letter and required owner documentation, including a reporting statement and Form W-9s, to meet owner-documented FFI requirements under the regulations. | [optional] | +|**compliantNonregisteringLocalBankCertification** | **Boolean** | Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. | [optional] | +|**compliantFfiLowValueAccountsCertification** | **Boolean** | Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. | [optional] | +|**sponsoredCloselyHeldEntitySponsoringEntity** | **String** | The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. | [optional] | +|**sponsoredCloselyHeldInvestmentVehicleCertification** | **Boolean** | Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. | [optional] | +|**compliantLimitedLifeDebtEntityCertification** | **Boolean** | Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. | [optional] | +|**investmentEntityNoFinancialAccountsCertification** | **Boolean** | Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. | [optional] | +|**restrictedDistributorCertification** | **Boolean** | Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. | [optional] | +|**restrictedDistributorAgreementCertification** | **Boolean** | Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. | [optional] | +|**restrictedDistributorPreexistingSalesComplianceCertification** | **Boolean** | Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. | [optional] | +|**foreignCentralBankOfIssueCertification** | **Boolean** | Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4). | [optional] | +|**nonreportingIgaFfiCertification** | **Boolean** | Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. | [optional] | +|**igaCountry** | **String** | The country for the applicable IGA with the United States. | [optional] | +|**igaModel** | **String** | The applicable IGA model. | [optional] | +|**igaLegalStatusTreatment** | **String** | Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. | [optional] | +|**igaFfiTrusteeOrSponsor** | **String** | The trustee or sponsor name for the nonreporting IGA FFI. | [optional] | +|**igaFfiTrusteeIsForeign** | **Boolean** | Indicates whether the trustee for the nonreporting IGA FFI is foreign. | [optional] | +|**treatyQualifiedPensionFundCertification** | **Boolean** | Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. | [optional] | +|**qualifiedRetirementFundCertification** | **Boolean** | Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. | [optional] | +|**narrowParticipationRetirementFundCertification** | **Boolean** | Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. | [optional] | +|**section401AEquivalentPensionPlanCertification** | **Boolean** | Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. | [optional] | +|**investmentEntityForRetirementFundsCertification** | **Boolean** | Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. | [optional] | +|**exemptBeneficialOwnerSponsoredRetirementFundCertification** | **Boolean** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] | +|**exceptedNonfinancialGroupEntityCertification** | **Boolean** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] | +|**exceptedNonfinancialStartUpCertification** | **Boolean** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] | +|**startupFormationOrResolutionDate** | **LocalDate** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] | +|**exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification** | **Boolean** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] | +|**nonfinancialEntityFilingDate** | **LocalDate** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] | +|**publiclyTradedNffeCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] | +|**publiclyTradedNffeSecuritiesMarket** | **String** | The name of the securities market where the corporation's stock is regularly traded. | [optional] | +|**nffeAffiliateOfPubliclyTradedEntityCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] | +|**publiclyTradedEntity** | **String** | The name of the affiliated entity whose stock is regularly traded on an established securities market. | [optional] | +|**nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket** | **String** | The name of the established securities market where the affiliated entity's stock is traded. | [optional] | +|**exceptedTerritoryNffeCertification** | **Boolean** | Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. | [optional] | +|**activeNffeCertification** | **Boolean** | Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. | [optional] | +|**passiveNffeCertification** | **Boolean** | Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. | [optional] | +|**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] | +|**companyId** | **String** | The ID of the associated company. | [optional] | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W8ImyFormResponse.md b/docs/A1099/V2/W8ImyFormResponse.md index dd4731d..56b1535 100644 --- a/docs/A1099/V2/W8ImyFormResponse.md +++ b/docs/A1099/V2/W8ImyFormResponse.md @@ -104,9 +104,9 @@ |**exemptBeneficialOwnerSponsoredRetirementFundCertification** | **Boolean** | Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. | [optional] | |**exceptedNonfinancialGroupEntityCertification** | **Boolean** | Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. | [optional] | |**exceptedNonfinancialStartUpCertification** | **Boolean** | Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. | [optional] | -|**startupFormationOrResolutionDate** | **OffsetDateTime** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] | +|**startupFormationOrResolutionDate** | **LocalDate** | The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). | [optional] | |**exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification** | **Boolean** | Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. | [optional] | -|**nonfinancialEntityFilingDate** | **OffsetDateTime** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] | +|**nonfinancialEntityFilingDate** | **LocalDate** | The filed date for a plan of reorganization, liquidation or bankruptcy. | [optional] | |**publiclyTradedNffeCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. | [optional] | |**publiclyTradedNffeSecuritiesMarket** | **String** | The name of the securities market where the corporation's stock is regularly traded. | [optional] | |**nffeAffiliateOfPubliclyTradedEntityCertification** | **Boolean** | Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. | [optional] | diff --git a/docs/A1099/V2/W9FormBaseRequest.md b/docs/A1099/V2/W9FormBaseRequest.md new file mode 100644 index 0000000..8ce3737 --- /dev/null +++ b/docs/A1099/V2/W9FormBaseRequest.md @@ -0,0 +1,30 @@ + + +# W9FormBaseRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type. | [optional] [readonly] | +|**companyId** | **String** | The ID of the associated company. | [optional] | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/A1099/V2/W9FormDataModel.md b/docs/A1099/V2/W9FormDataModel.md index 19c2432..a2531de 100644 --- a/docs/A1099/V2/W9FormDataModel.md +++ b/docs/A1099/V2/W9FormDataModel.md @@ -136,9 +136,9 @@ |**certifyBox41** | **Boolean** | | [optional] | |**certifyBox43** | **Boolean** | | [optional] | |**certifyPart29Signature** | **Boolean** | | [optional] | -|**part19FormationOrResolutionDate** | **OffsetDateTime** | | [optional] | -|**part20FilingDate** | **OffsetDateTime** | | [optional] | -|**part21DeterminationDate** | **OffsetDateTime** | | [optional] | +|**part19FormationOrResolutionDate** | **LocalDate** | | [optional] | +|**part20FilingDate** | **LocalDate** | | [optional] | +|**part21DeterminationDate** | **LocalDate** | | [optional] | |**substantialUsOwners** | [**List<W8BenESubstantialUsOwnerDataModel>**](W8BenESubstantialUsOwnerDataModel.md) | | [optional] | |**birthday** | **String** | The birthday of the individual associated with the form. | [optional] | |**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not required. | [optional] | @@ -217,8 +217,8 @@ |**certifyBox40** | **Boolean** | Indicates certification for box 40. | [optional] | |**box41SponsoringEntity** | **String** | The sponsoring entity information for box 41. | [optional] | |**certifyBox42** | **Boolean** | Indicates certification for box 42. | [optional] | -|**box35FormedOnDate** | **OffsetDateTime** | | [optional] | -|**box36FiledOnDate** | **OffsetDateTime** | | [optional] | +|**box35FormedOnDate** | **LocalDate** | | [optional] | +|**box36FiledOnDate** | **LocalDate** | | [optional] | diff --git a/docs/A1099/V2/W9FormRequest.md b/docs/A1099/V2/W9FormRequest.md new file mode 100644 index 0000000..720e980 --- /dev/null +++ b/docs/A1099/V2/W9FormRequest.md @@ -0,0 +1,48 @@ + + +# W9FormRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w9\" for this model). | [optional] [readonly] | +|**name** | **String** | The name of the individual or entity associated with the form. | [optional] | +|**businessName** | **String** | The name of the business associated with the form. | [optional] | +|**businessClassification** | **String** | The classification of the business. | [optional] | +|**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | +|**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | +|**exemptPayeeCode** | **String** | The exempt payee code. | [optional] | +|**exemptFatcaCode** | **String** | The exemption from FATCA reporting code. | [optional] | +|**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] | +|**tinType** | **String** | The type of TIN provided. | [optional] | +|**tin** | **String** | The taxpayer identification number (TIN). | [optional] | +|**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | +|**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | +|**companyId** | **String** | The ID of the associated company. | [optional] | +|**referenceId** | **String** | A reference identifier for the form. | [optional] | +|**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| W4 | "W4" | +| W8_BEN | "W8Ben" | +| W8_BEN_E | "W8BenE" | +| W8_IMY | "W8Imy" | +| W9 | "W9" | + + + diff --git a/docs/EInvoicing/V1/Address.md b/docs/EInvoicing/V1/Address.md new file mode 100644 index 0000000..cbdb094 --- /dev/null +++ b/docs/EInvoicing/V1/Address.md @@ -0,0 +1,18 @@ + + +# Address + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**line1** | **String** | Address line 1 | [optional] | +|**line2** | **String** | Address line 2 | [optional] | +|**city** | **String** | City | [optional] | +|**state** | **String** | State | [optional] | +|**country** | **String** | Country (ISO 3166) | | +|**postalCode** | **String** | Postal code | [optional] | + + + diff --git a/docs/EInvoicing/V1/BatchErrorDetail.md b/docs/EInvoicing/V1/BatchErrorDetail.md new file mode 100644 index 0000000..d6ea499 --- /dev/null +++ b/docs/EInvoicing/V1/BatchErrorDetail.md @@ -0,0 +1,15 @@ + + +# BatchErrorDetail + +Represents detailed error information for an individual entry in a batch request. Includes the index of the failed item and associated validation errors. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**index** | **Integer** | The index of the request that caused the error in the batch. | [optional] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | | [optional] | + + + diff --git a/docs/EInvoicing/V1/BatchSearch.md b/docs/EInvoicing/V1/BatchSearch.md index c906860..77affc4 100644 --- a/docs/EInvoicing/V1/BatchSearch.md +++ b/docs/EInvoicing/V1/BatchSearch.md @@ -2,7 +2,7 @@ # BatchSearch -Provides details about a batch search operation, including status, timestamps, and potential errors. +Represents a single batch search operation ## Properties diff --git a/docs/EInvoicing/V1/BatchSearchListResponse.md b/docs/EInvoicing/V1/BatchSearchListResponse.md index dd6d2fc..2575425 100644 --- a/docs/EInvoicing/V1/BatchSearchListResponse.md +++ b/docs/EInvoicing/V1/BatchSearchListResponse.md @@ -2,15 +2,15 @@ # BatchSearchListResponse -Schema for batch search list +Response schema for listing batch search details. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**atRecordSetCount** | **Integer** | The count of records in the result set | [optional] | +|**atRecordSetCount** | **Integer** | The count of records in the result set. | [optional] | |**atNextLink** | **String** | Next Link | [optional] | -|**value** | [**List<BatchSearch>**](BatchSearch.md) | | [optional] | +|**value** | [**List<BatchSearch>**](BatchSearch.md) | List of batch search records. | [optional] | diff --git a/docs/EInvoicing/V1/Consents.md b/docs/EInvoicing/V1/Consents.md new file mode 100644 index 0000000..b5cc15f --- /dev/null +++ b/docs/EInvoicing/V1/Consents.md @@ -0,0 +1,13 @@ + + +# Consents + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**listInAvalaraDirectory** | **Boolean** | Indicates whether the trading partner consents to being listed in the directory. If not provided in the payload, its value will default to true. | [optional] | + + + diff --git a/docs/EInvoicing/V1/CreateTradingPartner201Response.md b/docs/EInvoicing/V1/CreateTradingPartner201Response.md new file mode 100644 index 0000000..cfae44c --- /dev/null +++ b/docs/EInvoicing/V1/CreateTradingPartner201Response.md @@ -0,0 +1,15 @@ + + +# CreateTradingPartner201Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Avalara unique ID of the participant in the directory. | [optional] | +|**status** | **String** | The status of the create operation. | [optional] | +|**message** | **String** | A human-readable message providing additional context or feedback about the outcome of the operation. | [optional] | + + + diff --git a/docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md b/docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md new file mode 100644 index 0000000..3e7e5ac --- /dev/null +++ b/docs/EInvoicing/V1/CreateTradingPartnersBatch200Response.md @@ -0,0 +1,15 @@ + + +# CreateTradingPartnersBatch200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | | [optional] | +|**message** | **String** | A message indicating the result of the batch operation. | [optional] | +|**value** | [**List<CreateTradingPartnersBatch200ResponseValueInner>**](CreateTradingPartnersBatch200ResponseValueInner.md) | A list of trading partners successfully created. | [optional] | + + + diff --git a/docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md b/docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md new file mode 100644 index 0000000..9a23433 --- /dev/null +++ b/docs/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.md @@ -0,0 +1,15 @@ + + +# CreateTradingPartnersBatch200ResponseValueInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The unique identifier of the created trading partner. | [optional] | +|**index** | **Integer** | Index number of the trading partner. | [optional] | +|**message** | **String** | A success message for the specific created record. | [optional] | + + + diff --git a/docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md b/docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md new file mode 100644 index 0000000..9d40fa5 --- /dev/null +++ b/docs/EInvoicing/V1/CreateTradingPartnersBatchRequest.md @@ -0,0 +1,13 @@ + + +# CreateTradingPartnersBatchRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | [**List<TradingPartner>**](TradingPartner.md) | | [optional] | + + + diff --git a/docs/EInvoicing/V1/DataInputFieldsApi.md b/docs/EInvoicing/V1/DataInputFieldsApi.md index 73d6d22..6044faf 100644 --- a/docs/EInvoicing/V1/DataInputFieldsApi.md +++ b/docs/EInvoicing/V1/DataInputFieldsApi.md @@ -44,11 +44,11 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); DataInputFieldsApi apiInstance = new DataInputFieldsApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. String $filter = "requiredFor/countryMandate eq AU-B2G-PEPPOL"; // String | Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. - BigDecimal $top = new BigDecimal(78); // BigDecimal | The number of items to include in the result. - String $skip = "$skip_example"; // String | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. + BigDecimal $top = new BigDecimal("10"); // BigDecimal | 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. + BigDecimal $skip = new BigDecimal("10"); // BigDecimal | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. Boolean $count = true; // Boolean | When set to true, the count of the collection is also returned in the response body Boolean $countOnly = true; // Boolean | When set to true, only the count of the collection is returned try { @@ -73,8 +73,8 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used | **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] **$filter** | **String**| Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. | [optional] - **$top** | **BigDecimal**| The number of items to include in the result. | [optional] - **$skip** | **String**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] + **$top** | **BigDecimal**| If nonzero, return no more than this number of results. Used with <code>$skip</code> 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] + **$skip** | **BigDecimal**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] **$count** | **Boolean**| When set to true, the count of the collection is also returned in the response body | [optional] **$countOnly** | **Boolean**| When set to true, only the count of the collection is returned | [optional] diff --git a/docs/EInvoicing/V1/DataInputFieldsResponse.md b/docs/EInvoicing/V1/DataInputFieldsResponse.md index 079f911..0d68d94 100644 --- a/docs/EInvoicing/V1/DataInputFieldsResponse.md +++ b/docs/EInvoicing/V1/DataInputFieldsResponse.md @@ -2,7 +2,6 @@ # DataInputFieldsResponse -Response model providing a list of input fields required, optional, or conditional for different country mandates. ## Properties diff --git a/docs/EInvoicing/V1/DocumentFetch.md b/docs/EInvoicing/V1/DocumentFetch.md index 43194e2..6365f61 100644 --- a/docs/EInvoicing/V1/DocumentFetch.md +++ b/docs/EInvoicing/V1/DocumentFetch.md @@ -2,7 +2,6 @@ # DocumentFetch -An object of the inbound document ## Properties diff --git a/docs/EInvoicing/V1/DocumentsApi.md b/docs/EInvoicing/V1/DocumentsApi.md index 61246f7..ae1e3e8 100644 --- a/docs/EInvoicing/V1/DocumentsApi.md +++ b/docs/EInvoicing/V1/DocumentsApi.md @@ -48,7 +48,7 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); DocumentsApi apiInstance = new DocumentsApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used String accept = "application/pdf"; // String | This header indicates the MIME type of the document String documentId = "documentId_example"; // String | The unique ID for this document that was returned in the POST /einvoicing/document response body String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. @@ -136,7 +136,7 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); DocumentsApi apiInstance = new DocumentsApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used FetchDocumentsRequest fetchDocumentsRequest = new FetchDocumentsRequest(); // FetchDocumentsRequest | String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { @@ -221,7 +221,7 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); DocumentsApi apiInstance = new DocumentsApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. OffsetDateTime startDate = OffsetDateTime.now(); // OffsetDateTime | Start date of documents to return. This defaults to the previous month. OffsetDateTime endDate = OffsetDateTime.now(); // OffsetDateTime | End date of documents to return. This defaults to the current date. @@ -229,7 +229,7 @@ public class Example { String $count = "true"; // String | When set to true, the count of the collection is also returned in the response body String $countOnly = "false"; // String | When set to true, only the count of the collection is returned String $filter = "id eq 52f60401-44d0-4667-ad47-4afe519abb53"; // String | Filter by field name and value. This filter only supports eq . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. - BigDecimal $top = new BigDecimal(78); // BigDecimal | The number of items to include in the result. + BigDecimal $top = new BigDecimal("10"); // BigDecimal | 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 200 records. String $skip = "10"; // String | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. try { DocumentListResponse result = apiInstance.getDocumentList(avalaraVersion, xAvalaraClient, startDate, endDate, flow, $count, $countOnly, $filter, $top, $skip); @@ -258,7 +258,7 @@ Name | Type | Description | Notes **$count** | **String**| When set to true, the count of the collection is also returned in the response body | [optional] **$countOnly** | **String**| When set to true, only the count of the collection is returned | [optional] **$filter** | **String**| Filter by field name and value. This filter only supports <code>eq</code> . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. | [optional] - **$top** | **BigDecimal**| The number of items to include in the result. | [optional] + **$top** | **BigDecimal**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. | [optional] **$skip** | **String**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] ### Return type @@ -320,7 +320,7 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); DocumentsApi apiInstance = new DocumentsApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used String documentId = "documentId_example"; // String | The unique ID for this document that was returned in the POST /einvoicing/documents response body String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. try { @@ -405,7 +405,7 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); DocumentsApi apiInstance = new DocumentsApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used SubmitDocumentMetadata metadata = new SubmitDocumentMetadata(); // SubmitDocumentMetadata | Object data = null; // Object | The document to be submitted, as indicated by the metadata fields 'dataFormat' and 'dataFormatVersion' String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. diff --git a/docs/EInvoicing/V1/ErrorResponse.md b/docs/EInvoicing/V1/ErrorResponse.md index 6c78388..4c231eb 100644 --- a/docs/EInvoicing/V1/ErrorResponse.md +++ b/docs/EInvoicing/V1/ErrorResponse.md @@ -2,7 +2,7 @@ # ErrorResponse -Structure for reporting errors encountered during API operations, including title, status, and detailed message. +Standard format for API error responses. ## Properties diff --git a/docs/EInvoicing/V1/Extension.md b/docs/EInvoicing/V1/Extension.md new file mode 100644 index 0000000..05c6c59 --- /dev/null +++ b/docs/EInvoicing/V1/Extension.md @@ -0,0 +1,14 @@ + + +# Extension + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | Name of the custom attribute. | | +|**values** | **List<String>** | Array of string values associated with the custom attribute. | | + + + diff --git a/docs/EInvoicing/V1/HmacSignatureValue.md b/docs/EInvoicing/V1/HmacSignatureValue.md index 2368e40..cc74768 100644 --- a/docs/EInvoicing/V1/HmacSignatureValue.md +++ b/docs/EInvoicing/V1/HmacSignatureValue.md @@ -2,7 +2,6 @@ # HmacSignatureValue -Contains the HMAC algorithm and the resulting signature value used for verifying message integrity. ## Properties diff --git a/docs/EInvoicing/V1/Identifier.md b/docs/EInvoicing/V1/Identifier.md new file mode 100644 index 0000000..0c4cfdc --- /dev/null +++ b/docs/EInvoicing/V1/Identifier.md @@ -0,0 +1,15 @@ + + +# Identifier + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Identifier name (e.g., Peppol Participant ID). | | +|**displayName** | **String** | Display name of the identifier. | [optional] | +|**value** | **String** | Value of the identifier. | | + + + diff --git a/docs/EInvoicing/V1/InteropApi.md b/docs/EInvoicing/V1/InteropApi.md index edb3650..7a01b68 100644 --- a/docs/EInvoicing/V1/InteropApi.md +++ b/docs/EInvoicing/V1/InteropApi.md @@ -46,7 +46,7 @@ public class Example { InteropApi apiInstance = new InteropApi(apiClient); String documentType = "ubl-invoice-2.1"; // String | Type of the document being uploaded. Partners will be configured in Avalara system to send only certain types of documents. String interchangeType = "FI-B2B-TIEKE"; // String | Type of interchange (codes in Avalara system that uniquely identifies a type of interchange). Partners will be configured in Avalara system to send documents belonging to certain types of interchanges. - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. File fileName = new File("/path/to/file"); // File | The file to be uploaded (e.g., UBL XML, CII XML). diff --git a/docs/EInvoicing/V1/Mandate.md b/docs/EInvoicing/V1/Mandate.md index b422924..3a64f89 100644 --- a/docs/EInvoicing/V1/Mandate.md +++ b/docs/EInvoicing/V1/Mandate.md @@ -2,7 +2,6 @@ # Mandate -An object representing the country mandate ## Properties diff --git a/docs/EInvoicing/V1/MandatesApi.md b/docs/EInvoicing/V1/MandatesApi.md index f6ed75b..158c095 100644 --- a/docs/EInvoicing/V1/MandatesApi.md +++ b/docs/EInvoicing/V1/MandatesApi.md @@ -45,7 +45,7 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); MandatesApi apiInstance = new MandatesApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used String mandateId = "AD-B2G-PEPPOL"; // String | The unique ID for the mandate that was returned in the GET /einvoicing/mandates response body String documentType = "ubl-invoice"; // String | Select the documentType for which you wish to view the data-input-fields (You may obtain the supported documentTypes from the GET /mandates endpoint) String documentVersion = "2.1"; // String | Select the document version of the documentType (You may obtain the supported documentVersion from the GET /mandates endpoint) @@ -136,11 +136,11 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); MandatesApi apiInstance = new MandatesApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. String $filter = "countryMandate eq DE-B2G-PEPPOL"; // String | Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. - BigDecimal $top = new BigDecimal(78); // BigDecimal | The number of items to include in the result. - String $skip = "$skip_example"; // String | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. + BigDecimal $top = new BigDecimal("10"); // BigDecimal | 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. + BigDecimal $skip = new BigDecimal("10"); // BigDecimal | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. Boolean $count = true; // Boolean | When set to true, the count of the collection is also returned in the response body. Boolean $countOnly = true; // Boolean | When set to true, only the count of the collection is returned try { @@ -165,8 +165,8 @@ Name | Type | Description | Notes **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used | **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. | [optional] **$filter** | **String**| Filter by field name and value. This filter only supports <code>eq</code> and <code>contains</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. | [optional] - **$top** | **BigDecimal**| The number of items to include in the result. | [optional] - **$skip** | **String**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] + **$top** | **BigDecimal**| If nonzero, return no more than this number of results. Used with <code>$skip</code> 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] + **$skip** | **BigDecimal**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] **$count** | **Boolean**| When set to true, the count of the collection is also returned in the response body. | [optional] **$countOnly** | **Boolean**| When set to true, only the count of the collection is returned | [optional] diff --git a/docs/EInvoicing/V1/Pagination.md b/docs/EInvoicing/V1/Pagination.md index fb8049d..1d346d6 100644 --- a/docs/EInvoicing/V1/Pagination.md +++ b/docs/EInvoicing/V1/Pagination.md @@ -2,7 +2,6 @@ # Pagination -Pagination information for the dataset. ## Properties diff --git a/docs/EInvoicing/V1/RequiredWhenField.md b/docs/EInvoicing/V1/RequiredWhenField.md index bf24124..434a007 100644 --- a/docs/EInvoicing/V1/RequiredWhenField.md +++ b/docs/EInvoicing/V1/RequiredWhenField.md @@ -2,7 +2,6 @@ # RequiredWhenField -Mandates for which this field is required ## Properties diff --git a/docs/EInvoicing/V1/SearchParticipants200Response.md b/docs/EInvoicing/V1/SearchParticipants200Response.md new file mode 100644 index 0000000..7d34758 --- /dev/null +++ b/docs/EInvoicing/V1/SearchParticipants200Response.md @@ -0,0 +1,15 @@ + + +# SearchParticipants200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**atRecordSetCount** | **Integer** | The count of records in the result set. | [optional] | +|**atNextLink** | **String** | The next page link to get the next set of results. | [optional] | +|**value** | [**List<TradingPartner>**](TradingPartner.md) | | [optional] | + + + diff --git a/docs/EInvoicing/V1/Signature.md b/docs/EInvoicing/V1/Signature.md index 094dfc2..4f5a456 100644 --- a/docs/EInvoicing/V1/Signature.md +++ b/docs/EInvoicing/V1/Signature.md @@ -2,7 +2,6 @@ # Signature -Defines the signature configuration, specifying whether and how messages are signed for webhook delivery. ## Properties diff --git a/docs/EInvoicing/V1/SignatureValue.md b/docs/EInvoicing/V1/SignatureValue.md index bbd7e6c..15b014f 100644 --- a/docs/EInvoicing/V1/SignatureValue.md +++ b/docs/EInvoicing/V1/SignatureValue.md @@ -2,7 +2,6 @@ # SignatureValue -Includes the actual signature applied to a webhook message along with the algorithm used. ## Properties diff --git a/docs/EInvoicing/V1/SubscriptionCommon.md b/docs/EInvoicing/V1/SubscriptionCommon.md index 0bc4a89..79ad277 100644 --- a/docs/EInvoicing/V1/SubscriptionCommon.md +++ b/docs/EInvoicing/V1/SubscriptionCommon.md @@ -2,7 +2,6 @@ # SubscriptionCommon -Basic configuration for a webhook subscription, including description and target notification URL. ## Properties diff --git a/docs/EInvoicing/V1/SubscriptionsApi.md b/docs/EInvoicing/V1/SubscriptionsApi.md index 72df3fc..c3994b1 100644 --- a/docs/EInvoicing/V1/SubscriptionsApi.md +++ b/docs/EInvoicing/V1/SubscriptionsApi.md @@ -47,7 +47,7 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - String avalaraVersion = "avalaraVersion_example"; // String | The version of the API to use, e.g., \"1.3\". + String avalaraVersion = "avalaraVersion_example"; // String | The version of the API to use, e.g., \"1.4\". SubscriptionRegistration subscriptionRegistration = new SubscriptionRegistration(); // SubscriptionRegistration | String xCorrelationID = "xCorrelationID_example"; // String | A unique identifier for tracking the request and its response String xAvalaraClient = "xAvalaraClient_example"; // String | Client application identification @@ -70,7 +70,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalaraVersion** | **String**| The version of the API to use, e.g., \"1.3\". | + **avalaraVersion** | **String**| The version of the API to use, e.g., \"1.4\". | **subscriptionRegistration** | [**SubscriptionRegistration**](SubscriptionRegistration.md)| | **xCorrelationID** | **String**| A unique identifier for tracking the request and its response | [optional] **xAvalaraClient** | **String**| Client application identification | [optional] @@ -135,7 +135,7 @@ public class Example { SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); String subscriptionId = "subscriptionId_example"; // String | - String avalaraVersion = "avalaraVersion_example"; // String | The version of the API to use, e.g., \"1.3\". + String avalaraVersion = "avalaraVersion_example"; // String | The version of the API to use, e.g., \"1.4\". String xCorrelationID = "xCorrelationID_example"; // String | A unique identifier for tracking the request and its response String xAvalaraClient = "xAvalaraClient_example"; // String | Client application identification try { @@ -157,7 +157,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **subscriptionId** | **String**| | - **avalaraVersion** | **String**| The version of the API to use, e.g., \"1.3\". | + **avalaraVersion** | **String**| The version of the API to use, e.g., \"1.4\". | **xCorrelationID** | **String**| A unique identifier for tracking the request and its response | [optional] **xAvalaraClient** | **String**| Client application identification | [optional] @@ -221,7 +221,7 @@ public class Example { SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); String subscriptionId = "subscriptionId_example"; // String | - String avalaraVersion = "avalaraVersion_example"; // String | The version of the API to use, e.g., \"1.3\". + String avalaraVersion = "avalaraVersion_example"; // String | The version of the API to use, e.g., \"1.4\". String xCorrelationID = "xCorrelationID_example"; // String | A unique identifier for tracking the request and its response String xAvalaraClient = "xAvalaraClient_example"; // String | Client application identification try { @@ -244,7 +244,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **subscriptionId** | **String**| | - **avalaraVersion** | **String**| The version of the API to use, e.g., \"1.3\". | + **avalaraVersion** | **String**| The version of the API to use, e.g., \"1.4\". | **xCorrelationID** | **String**| A unique identifier for tracking the request and its response | [optional] **xAvalaraClient** | **String**| Client application identification | [optional] @@ -307,11 +307,11 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); SubscriptionsApi apiInstance = new SubscriptionsApi(apiClient); - String avalaraVersion = "avalaraVersion_example"; // String | The version of the API to use, e.g., \"1.3\". + String avalaraVersion = "avalaraVersion_example"; // String | The version of the API to use, e.g., \"1.4\". String xCorrelationID = "xCorrelationID_example"; // String | A unique identifier for tracking the request and its response String xAvalaraClient = "xAvalaraClient_example"; // String | Client application identification - BigDecimal $top = new BigDecimal(78); // BigDecimal | The number of items to include in the result. - BigDecimal $skip = new BigDecimal(78); // BigDecimal | The number of items to skip in the result. + Integer $top = 56; // Integer | The number of items to include in the result. + Integer $skip = 56; // Integer | The number of items to skip in the result. Boolean count = true; // Boolean | Whether to include the total count of records in the result. Boolean countOnly = true; // Boolean | Whether to return only the count of records, without the list of records. try { @@ -333,11 +333,11 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalaraVersion** | **String**| The version of the API to use, e.g., \"1.3\". | + **avalaraVersion** | **String**| The version of the API to use, e.g., \"1.4\". | **xCorrelationID** | **String**| A unique identifier for tracking the request and its response | [optional] **xAvalaraClient** | **String**| Client application identification | [optional] - **$top** | **BigDecimal**| The number of items to include in the result. | [optional] - **$skip** | **BigDecimal**| The number of items to skip in the result. | [optional] + **$top** | **Integer**| The number of items to include in the result. | [optional] + **$skip** | **Integer**| The number of items to skip in the result. | [optional] **count** | **Boolean**| Whether to include the total count of records in the result. | [optional] **countOnly** | **Boolean**| Whether to return only the count of records, without the list of records. | [optional] diff --git a/docs/EInvoicing/V1/SuccessResponse.md b/docs/EInvoicing/V1/SuccessResponse.md index 964414f..576e771 100644 --- a/docs/EInvoicing/V1/SuccessResponse.md +++ b/docs/EInvoicing/V1/SuccessResponse.md @@ -2,7 +2,6 @@ # SuccessResponse -Indicates a successful outcome of an API operation, including a generated ID and success message. ## Properties diff --git a/docs/EInvoicing/V1/SupportedDocumentTypes.md b/docs/EInvoicing/V1/SupportedDocumentTypes.md new file mode 100644 index 0000000..7c4b90d --- /dev/null +++ b/docs/EInvoicing/V1/SupportedDocumentTypes.md @@ -0,0 +1,17 @@ + + +# SupportedDocumentTypes + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Document type name. | [optional] | +|**value** | **String** | Document type value. | | +|**supportedByTradingPartner** | **Boolean** | Does trading partner support receiving this document type. | | +|**supportedByAvalara** | **Boolean** | Does avalara support exchanging this document type. | [optional] | +|**extensions** | [**List<Extension>**](Extension.md) | Optional array used to carry additional metadata or configuration values that may be required by specific document types. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. | [optional] | + + + diff --git a/docs/EInvoicing/V1/TaxIdentifierRequest.md b/docs/EInvoicing/V1/TaxIdentifierRequest.md new file mode 100644 index 0000000..abcbfa2 --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifierRequest.md @@ -0,0 +1,17 @@ + + +# TaxIdentifierRequest + +Represents a request to validate company’s tax identifier. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**countryCode** | **String** | The two-letter ISO-3166 country code of the tax identifier. | | +|**identifierType** | **String** | Type of the identifier. | | +|**identifier** | **String** | The tax identifier of the company. | | +|**extensions** | **Object** | Optional field for adding additional details required by specific tax authorities. Refer to the GET /tax-identifiers/schema API endpoint for the full request structure for a given country. | [optional] | + + + diff --git a/docs/EInvoicing/V1/TaxIdentifierResponse.md b/docs/EInvoicing/V1/TaxIdentifierResponse.md new file mode 100644 index 0000000..a9b84fe --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifierResponse.md @@ -0,0 +1,15 @@ + + +# TaxIdentifierResponse + +Represents the response for a tax identifier validation request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**countryCode** | **String** | The two-letter ISO-3166 country code of the tax identifier. | | +|**value** | [**TaxIdentifierResponseValue**](TaxIdentifierResponseValue.md) | | [optional] | + + + diff --git a/docs/EInvoicing/V1/TaxIdentifierResponseValue.md b/docs/EInvoicing/V1/TaxIdentifierResponseValue.md new file mode 100644 index 0000000..5ac03f4 --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifierResponseValue.md @@ -0,0 +1,15 @@ + + +# TaxIdentifierResponseValue + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**identifierType** | **String** | Type of the identifier. | [optional] | +|**identifier** | **String** | The tax identifier of the company. | [optional] | +|**extensions** | **Object** | Optional field containing additional company-related information such as companyName, companyAddress, blockListed, tradeName, and taxPayerType. It may also include other details specific to the given tax authority. Refer to the GET /tax-identifiers/schema API endpoint for the full response structure for a given country. | [optional] | + + + diff --git a/docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md b/docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md new file mode 100644 index 0000000..4eb793b --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.md @@ -0,0 +1,14 @@ + + +# TaxIdentifierSchemaByCountry200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**countryCode** | **String** | The two-letter ISO-3166 country code of the tax identifier. | | +|**schema** | **Object** | The JSON Schema definition, following Draft-07 specification, used to validate tax identifier data. | | + + + diff --git a/docs/EInvoicing/V1/TaxIdentifiersApi.md b/docs/EInvoicing/V1/TaxIdentifiersApi.md new file mode 100644 index 0000000..2047db3 --- /dev/null +++ b/docs/EInvoicing/V1/TaxIdentifiersApi.md @@ -0,0 +1,189 @@ +# TaxIdentifiersApi + +All URIs are relative to *https://api.sbx.avalara.com/einvoicing* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**taxIdentifierSchemaByCountry**](TaxIdentifiersApi.md#taxIdentifierSchemaByCountry) | **GET** /tax-identifiers/schema | Returns the tax identifier request & response schema for a specific country. +[**validateTaxIdentifier**](TaxIdentifiersApi.md#validateTaxIdentifier) | **POST** /tax-identifiers/validate | Validates a tax identifier. + + + +## taxIdentifierSchemaByCountry + +> TaxIdentifierSchemaByCountry200Response taxIdentifierSchemaByCountry(avalaraVersion, countryCode, xAvalaraClient, xCorrelationID, type) + +Returns the tax identifier request & response schema for a specific country. + +This endpoint retrieves the request and response schema required to validate tax identifiers based on a specific country's requirements. This can include both standard fields and any additional parameters required by the respective country's tax authority. + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.EInvoicing.V1.TaxIdentifiersApi; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + TaxIdentifiersApi apiInstance = new TaxIdentifiersApi(apiClient); + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + String countryCode = "DE"; // String | The two-letter ISO-3166 country code for which the schema should be retrieved. + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". + String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. + String type = "request"; // String | Specifies whether to return the request or response schema. + try { + TaxIdentifierSchemaByCountry200Response result = apiInstance.taxIdentifierSchemaByCountry(avalaraVersion, countryCode, xAvalaraClient, xCorrelationID, type); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaxIdentifiersApi#taxIdentifierSchemaByCountry"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **countryCode** | **String**| The two-letter ISO-3166 country code for which the schema should be retrieved. | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + **type** | **String**| Specifies whether to return the request or response schema. | [optional] [enum: request, response] + +### Return type + +[**TaxIdentifierSchemaByCountry200Response**](TaxIdentifierSchemaByCountry200Response.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | * X-Correlation-Id -
| +| **400** | Invalid request | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + + +## validateTaxIdentifier + +> TaxIdentifierResponse validateTaxIdentifier(avalaraVersion, taxIdentifierRequest, xAvalaraClient, xCorrelationID) + +Validates a tax identifier. + +This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.EInvoicing.V1.TaxIdentifiersApi; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + TaxIdentifiersApi apiInstance = new TaxIdentifiersApi(apiClient); + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + TaxIdentifierRequest taxIdentifierRequest = new TaxIdentifierRequest(); // TaxIdentifierRequest | + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". + String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. + try { + TaxIdentifierResponse result = apiInstance.validateTaxIdentifier(avalaraVersion, taxIdentifierRequest, xAvalaraClient, xCorrelationID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TaxIdentifiersApi#validateTaxIdentifier"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **taxIdentifierRequest** | [**TaxIdentifierRequest**](TaxIdentifierRequest.md)| | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**TaxIdentifierResponse**](TaxIdentifierResponse.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success response. | * X-Correlation-Id -
| +| **400** | Invalid request | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **429** | Rate limit exceeded | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + diff --git a/docs/EInvoicing/V1/TradingPartner.md b/docs/EInvoicing/V1/TradingPartner.md new file mode 100644 index 0000000..2fa0678 --- /dev/null +++ b/docs/EInvoicing/V1/TradingPartner.md @@ -0,0 +1,22 @@ + + +# TradingPartner + +Represents a participant in the Avalara directory. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Avalara unique ID of the participant in the directory. | [optional] [readonly] | +|**name** | **String** | Name of the participant (typically, the name of the business entity). | | +|**network** | **String** | The network where the participant is present. When creating or updating a trading partner, the value provided for the attribute 'network' will be ignored. | [optional] [readonly] | +|**registrationDate** | **String** | Registration date of the participant if available. | [optional] | +|**identifiers** | [**List<Identifier>**](Identifier.md) | A list of identifiers associated with the trading partner. Each identifier should consistently include the fields name, and value to maintain clarity and ensure consistent structure across entries. When creating or updating a trading partner, the attribute 'name' must be agreed upon with Avalara to ensure consistency. Failing to adhere to the agreed values will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attribute 'displayName' will be ignored and instead retrieved from the standard set of display names maintained. | | +|**addresses** | [**List<Address>**](Address.md) | | | +|**supportedDocumentTypes** | [**List<SupportedDocumentTypes>**](SupportedDocumentTypes.md) | A list of document types supported by the trading partner for exchange. Each document type identifier value must match the standard list maintained by Avalara, which includes Peppol and other public network document type identifier schemes and values, as well as any approved partner-specific identifiers. The 'value' field must exactly match an entry from the provided document identifier list. Any attempt to submit unsupported document types will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attributes 'name' and 'supportedByAvalara' will be ignored. | | +|**consents** | [**Consents**](Consents.md) | | [optional] | +|**extensions** | [**List<Extension>**](Extension.md) | Optional array used to carry additional metadata or configuration values that may be required by specific networks. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. | [optional] | + + + diff --git a/docs/EInvoicing/V1/TradingPartnersApi.md b/docs/EInvoicing/V1/TradingPartnersApi.md index 374fdb5..8fee56e 100644 --- a/docs/EInvoicing/V1/TradingPartnersApi.md +++ b/docs/EInvoicing/V1/TradingPartnersApi.md @@ -4,11 +4,15 @@ All URIs are relative to *https://api.sbx.avalara.com/einvoicing* Method | HTTP request | Description ------------- | ------------- | ------------- -[**batchSearchParticipants**](TradingPartnersApi.md#batchSearchParticipants) | **POST** /trading-partners/batch-searches | Creates a batch search and performs a batch search in the directory for participants in the background. -[**downloadBatchSearchReport**](TradingPartnersApi.md#downloadBatchSearchReport) | **GET** /trading-partners/batch-searches/{id}/$download-results | Download batch search results in a csv file. -[**getBatchSearchDetail**](TradingPartnersApi.md#getBatchSearchDetail) | **GET** /trading-partners/batch-searches/{id} | Get the batch search details for a given id. -[**listBatchSearches**](TradingPartnersApi.md#listBatchSearches) | **GET** /trading-partners/batch-searches | List all batch searches that were previously submitted. +[**batchSearchParticipants**](TradingPartnersApi.md#batchSearchParticipants) | **POST** /trading-partners/batch-searches | Handles batch search requests by uploading a file containing search parameters. +[**createTradingPartner**](TradingPartnersApi.md#createTradingPartner) | **POST** /trading-partners | Creates a new trading partner. +[**createTradingPartnersBatch**](TradingPartnersApi.md#createTradingPartnersBatch) | **POST** /trading-partners/batch | Creates a batch of multiple trading partners. +[**deleteTradingPartner**](TradingPartnersApi.md#deleteTradingPartner) | **DELETE** /trading-partners/{id} | Deletes a trading partner using ID. +[**downloadBatchSearchReport**](TradingPartnersApi.md#downloadBatchSearchReport) | **GET** /trading-partners/batch-searches/{id}/$download-results | Downloads batch search results in a csv file. +[**getBatchSearchDetail**](TradingPartnersApi.md#getBatchSearchDetail) | **GET** /trading-partners/batch-searches/{id} | Returns the batch search details using ID. +[**listBatchSearches**](TradingPartnersApi.md#listBatchSearches) | **GET** /trading-partners/batch-searches | Lists all batch searches that were previously submitted. [**searchParticipants**](TradingPartnersApi.md#searchParticipants) | **GET** /trading-partners | Returns a list of participants matching the input query. +[**updateTradingPartner**](TradingPartnersApi.md#updateTradingPartner) | **PUT** /trading-partners/{id} | Updates a trading partner using ID. @@ -16,10 +20,10 @@ Method | HTTP request | Description > BatchSearchParticipants202Response batchSearchParticipants(avalaraVersion, name, notificationEmail, _file, xAvalaraClient, xCorrelationID) -Creates a batch search and performs a batch search in the directory for participants in the background. - Handles batch search requests by uploading a file containing search parameters. +This endpoint creates a batch search and performs a batch search in the directory for participants in the background. + ### Example ```java @@ -48,11 +52,11 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used - String name = "Automotive Companies in London Search"; // String | The human readable name given to this batch search. - String notificationEmail = "user@example.com"; // String | The email address of the user to whom the batch search completion notification must go to. - File _file = new File("/path/to/file"); // File | CSV file containing search parameters. - String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + String name = "Automotive Companies in London Search"; // String | A human-readable name for the batch search. + String notificationEmail = "user@example.com"; // String | The email address to which a notification will be sent once the batch search is complete. + File _file = new File("/path/to/file"); // File | CSV file containing search parameters. Input Constraints: - Maximum file size: 1 MB - File Header: Must be less than 500 KB - Total number of lines (including header): Must be 101 or fewer + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. try { BatchSearchParticipants202Response result = apiInstance.batchSearchParticipants(avalaraVersion, name, notificationEmail, _file, xAvalaraClient, xCorrelationID); @@ -73,11 +77,11 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used | - **name** | **String**| The human readable name given to this batch search. | - **notificationEmail** | **String**| The email address of the user to whom the batch search completion notification must go to. | - **_file** | **File**| CSV file containing search parameters. | - **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **name** | **String**| A <b>human-readable</b> name for the batch search. | + **notificationEmail** | **String**| The email address to which a notification will be sent once the batch search is complete. | + **_file** | **File**| CSV file containing search parameters. Input Constraints: - Maximum file size: 1 MB - File Header: Must be less than 500 KB - Total number of lines (including header): Must be 101 or fewer | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type @@ -104,13 +108,279 @@ Name | Type | Description | Notes | **500** | Internal server error | * X-Correlation-Id -
| +## createTradingPartner + +> CreateTradingPartner201Response createTradingPartner(avalaraVersion, tradingPartner, xAvalaraClient, xCorrelationID) + +Creates a new trading partner. + +This endpoint creates a new trading partner with the provided details. The request body must include the necessary information as defined in the `TradingPartner` schema. + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.EInvoicing.V1.TradingPartnersApi; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + TradingPartner tradingPartner = new TradingPartner(); // TradingPartner | + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". + String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. + try { + CreateTradingPartner201Response result = apiInstance.createTradingPartner(avalaraVersion, tradingPartner, xAvalaraClient, xCorrelationID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradingPartnersApi#createTradingPartner"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **tradingPartner** | [**TradingPartner**](TradingPartner.md)| | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**CreateTradingPartner201Response**](CreateTradingPartner201Response.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The trading partner has been successfully created. | * X-Correlation-Id -
| +| **400** | Bad request | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **409** | Conflict | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + + +## createTradingPartnersBatch + +> CreateTradingPartnersBatch200Response createTradingPartnersBatch(avalaraVersion, createTradingPartnersBatchRequest, xAvalaraClient, xCorrelationID) + +Creates a batch of multiple trading partners. + +This endpoint creates multiple trading partners in a single batch request. It accepts an array of trading partners and processes them synchronously. Supports a maximum of 100 records or 1 MB request payload. The batch is processed atomically and partial success is not allowed. + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.EInvoicing.V1.TradingPartnersApi; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + CreateTradingPartnersBatchRequest createTradingPartnersBatchRequest = new CreateTradingPartnersBatchRequest(); // CreateTradingPartnersBatchRequest | + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". + String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. + try { + CreateTradingPartnersBatch200Response result = apiInstance.createTradingPartnersBatch(avalaraVersion, createTradingPartnersBatchRequest, xAvalaraClient, xCorrelationID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradingPartnersApi#createTradingPartnersBatch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **createTradingPartnersBatchRequest** | [**CreateTradingPartnersBatchRequest**](CreateTradingPartnersBatchRequest.md)| | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**CreateTradingPartnersBatch200Response**](CreateTradingPartnersBatch200Response.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Batch processing completed | * X-Correlation-Id -
| +| **400** | Bad request | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **409** | Conflict | * X-Correlation-Id -
| +| **413** | ContentTooLarge | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + + +## deleteTradingPartner + +> deleteTradingPartner(avalaraVersion, id, xAvalaraClient, xCorrelationID) + +Deletes a trading partner using ID. + +This endpoint deletes an existing trading partner identified by the provided ID. + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.EInvoicing.V1.TradingPartnersApi; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + String id = "id_example"; // String | The ID of the trading partner which is being deleted. + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". + String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. + try { + apiInstance.deleteTradingPartner(avalaraVersion, id, xAvalaraClient, xCorrelationID); + } catch (ApiException e) { + System.err.println("Exception when calling TradingPartnersApi#deleteTradingPartner"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **id** | **String**| The ID of the trading partner which is being deleted. | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Trading partner deleted successfully. | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **404** | NotFound | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + + ## downloadBatchSearchReport > File downloadBatchSearchReport(avalaraVersion, id, xAvalaraClient, xCorrelationID) -Download batch search results in a csv file. +Downloads batch search results in a csv file. -Downloads the report for a specific batch search using the batch search ID. +This endpoint downloads the report for a specific batch search using the batch search ID. It returns a CSV file containing up to 1,000 query results. ### Example @@ -140,9 +410,9 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used - String id = "2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99"; // String | The ID of the batch search whose report is to be downloaded. - String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + String id = "2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99"; // String | The ID of the batch search for which the report should be downloaded. + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. try { File result = apiInstance.downloadBatchSearchReport(avalaraVersion, id, xAvalaraClient, xCorrelationID); @@ -163,9 +433,9 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used | - **id** | **String**| The ID of the batch search whose report is to be downloaded. | - **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **id** | **String**| The ID of the batch search for which the report should be downloaded. | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type @@ -185,7 +455,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Successful report download | * X-Correlation-Id -
| +| **200** | Successful report download Output Constraints: - Maximum of 1000 query results returned in the CSV | * X-Correlation-Id -
| | **401** | Unauthorized | * X-Correlation-Id -
| | **403** | Forbidden | * X-Correlation-Id -
| | **404** | Report not found | * X-Correlation-Id -
| @@ -196,9 +466,9 @@ Name | Type | Description | Notes > BatchSearch getBatchSearchDetail(avalaraVersion, id, xAvalaraClient, xCorrelationID) -Get the batch search details for a given id. +Returns the batch search details using ID. -This endpoint provides a detailed information for a specific batch search based on a given ID. It is ideal for tracking the progress of a previously initiated batch search operation. +This endpoint returns detailed information for a specific batch search using the provided ID. It is useful for tracking the status and progress of a previously initiated batch search operation. ### Example @@ -228,9 +498,9 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. String id = "2f5ea4b5-4dae-445a-b3e4-9f65a61eaa99"; // String | The ID of the batch search that was submitted earlier. - String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. try { BatchSearch result = apiInstance.getBatchSearchDetail(avalaraVersion, id, xAvalaraClient, xCorrelationID); @@ -251,9 +521,9 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used | + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | **id** | **String**| The ID of the batch search that was submitted earlier. | - **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type @@ -273,10 +543,10 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Get the batch search details for a given id. | * X-Correlation-Id -
| +| **200** | The batch search details for a given ID. | * X-Correlation-Id -
| | **401** | Unauthorized | * X-Correlation-Id -
| -| **404** | Report not found | * X-Correlation-Id -
| | **403** | Forbidden | * X-Correlation-Id -
| +| **404** | Report not found | * X-Correlation-Id -
| | **500** | Internal server error | * X-Correlation-Id -
| @@ -284,9 +554,9 @@ Name | Type | Description | Notes > BatchSearchListResponse listBatchSearches(avalaraVersion, xAvalaraClient, $filter, count, $top, $skip, $orderBy, xCorrelationID) -List all batch searches that were previously submitted. +Lists all batch searches that were previously submitted. -This endpoint provides a way to retrieve a comprehensive list of all batch search operations that have been previously submitted. This endpoint returns details about each batch search, such as their id, status, created date and associated metadata, allowing users to easily view past batch search requests. It's particularly useful for tracking the progress of a previously initiated batch search operations. +This endpoint retrieves a list of all batch search operations that have been previously submitted. It returns details such as the batch search ID, status, creation date, and associated metadata. It is useful for tracking the progress of a previously initiated batch search operations. ### Example @@ -316,13 +586,13 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used - String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" - String $filter = "name eq 'Batch_Search_Import_V4'"; // String | Filter by field name and value. This filter only supports eq .The parameters supported is name. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. - Boolean count = true; // Boolean | When set to true, the count of the collection is included as @recordSetCount in the response body. - BigDecimal $top = new BigDecimal(78); // BigDecimal | The number of items to include in the result. + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". + String $filter = "name eq 'Batch_Search_Import_V4'"; // String | Filters the results by field name. Only the eq operator and the name field is supported. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). + Boolean count = true; // Boolean | When set to true, returns the total count of matching records included as @recordSetCount in the response body. + String $top = "10"; // String | 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 200 records. String $skip = "10"; // String | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. - String $orderBy = "name desc"; // String | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. + String $orderBy = "name desc"; // String | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. try { BatchSearchListResponse result = apiInstance.listBatchSearches(avalaraVersion, xAvalaraClient, $filter, count, $top, $skip, $orderBy, xCorrelationID); @@ -343,13 +613,13 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used | - **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] - **$filter** | **String**| Filter by field name and value. This filter only supports <code>eq</code> .The parameters supported is <code>name</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. | [optional] - **count** | **Boolean**| When set to true, the count of the collection is included as @recordSetCount in the response body. | [optional] - **$top** | **BigDecimal**| The number of items to include in the result. | [optional] + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **$filter** | **String**| Filters the results by field name. Only the <code>eq</code> operator and the name field is supported. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). | [optional] + **count** | **Boolean**| When set to <code>true</code>, returns the total count of matching records included as <code>@recordSetCount</code> in the response body. | [optional] + **$top** | **String**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. | [optional] **$skip** | **String**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] - **$orderBy** | **String**| The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] + **$orderBy** | **String**| The <code>$orderBy</code> query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type @@ -378,11 +648,11 @@ Name | Type | Description | Notes ## searchParticipants -> DirectorySearchResponse searchParticipants(avalaraVersion, $search, xAvalaraClient, count, $filter, $top, $skip, $orderBy, xCorrelationID) +> SearchParticipants200Response searchParticipants(avalaraVersion, $search, xAvalaraClient, count, $filter, $top, $skip, $orderBy, xCorrelationID) Returns a list of participants matching the input query. -This endpoint provides a list of trading partners that match a specified input query. The search is performed based on various filters, search text, and other relevant parameters. +This endpoint retrieves a list of trading partners that match the specified search criteria. It supports filtering, search text, and other relevant query parameters to narrow down the results. ### Example @@ -412,17 +682,17 @@ public class Example { ApiClient apiClient = new ApiClient(configuration); TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); - String avalaraVersion = "1.2"; // String | The HTTP Header meant to specify the version of the API intended to be used - String $search = "Acme and 7726627177 or BMW"; // String | Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over name and identifier parameters only. - String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" - Boolean count = true; // Boolean | When set to true, the count of the collection is included as @recordSetCount in the response body. - String $filter = "network eq 'Peppol' and country eq 'Australia'"; // String | Filter by field name and value. This filter only supports eq .The parameters supported are network, country, documentType, idType. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. - BigDecimal $top = new BigDecimal(78); // BigDecimal | The number of items to include in the result. + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + String $search = "Acme and 7726627177 or BMW"; // String | Search by value supports logical AND / OR operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". + Boolean count = true; // Boolean | When set to true, returns the total count of matching records included as @recordSetCount in the response body. + String $filter = "network eq 'Peppol' and country eq 'Australia'"; // String | Filters the results using the eq operator. Supported fields: network, country, documentType, idType. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). + String $top = "10"; // String | 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 200 records. String $skip = "10"; // String | If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. - String $orderBy = "name desc"; // String | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. + String $orderBy = "name desc"; // String | The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. try { - DirectorySearchResponse result = apiInstance.searchParticipants(avalaraVersion, $search, xAvalaraClient, count, $filter, $top, $skip, $orderBy, xCorrelationID); + SearchParticipants200Response result = apiInstance.searchParticipants(avalaraVersion, $search, xAvalaraClient, count, $filter, $top, $skip, $orderBy, xCorrelationID); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TradingPartnersApi#searchParticipants"); @@ -440,19 +710,19 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used | - **$search** | **String**| Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over <code>name</code> and <code>identifier</code> parameters only. | - **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" | [optional] - **count** | **Boolean**| When set to true, the count of the collection is included as @recordSetCount in the response body. | [optional] - **$filter** | **String**| Filter by field name and value. This filter only supports <code>eq</code> .The parameters supported are <code>network</code>, <code>country</code>, <code>documentType</code>, <code>idType</code>. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. | [optional] - **$top** | **BigDecimal**| The number of items to include in the result. | [optional] + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **$search** | **String**| Search by value supports logical <code>AND</code> / <code>OR</code> operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **count** | **Boolean**| When set to <code>true</code>, returns the total count of matching records included as <code>@recordSetCount</code> in the response body. | [optional] + **$filter** | **String**| Filters the results using the <code>eq</code> operator. Supported fields: <code>network</code>, <code>country</code>, <code>documentType</code>, <code>idType</code>. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). | [optional] + **$top** | **String**| If nonzero, return no more than this number of results. Used with <code>$skip</code> to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 200 records. | [optional] **$skip** | **String**| If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. | [optional] - **$orderBy** | **String**| The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] + **$orderBy** | **String**| The <code>$orderBy</code> query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. | [optional] **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] ### Return type -[**DirectorySearchResponse**](DirectorySearchResponse.md) +[**SearchParticipants200Response**](SearchParticipants200Response.md) ### Authorization @@ -473,3 +743,95 @@ Name | Type | Description | Notes | **403** | Forbidden | * X-Correlation-Id -
| | **500** | Internal server error | * X-Correlation-Id -
| + +## updateTradingPartner + +> UpdateTradingPartner200Response updateTradingPartner(avalaraVersion, id, tradingPartner, xAvalaraClient, xCorrelationID) + +Updates a trading partner using ID. + +This endpoint updates the details of an existing trading partner specified by the provided ID. It performs a full update, and the request body must include all required fields. + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.EInvoicing.V1.TradingPartnersApi; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + TradingPartnersApi apiInstance = new TradingPartnersApi(apiClient); + String avalaraVersion = "1.4"; // String | The HTTP Header meant to specify the version of the API intended to be used. + String id = "id_example"; // String | The ID of the trading partner which is being updated. + TradingPartner tradingPartner = new TradingPartner(); // TradingPartner | + String xAvalaraClient = "John's E-Invoicing-API Client"; // String | You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". + String xCorrelationID = "f3f0d19a-01a1-4748-8a58-f000d0424f43"; // String | The caller can use this as an identifier to use as a correlation id to trace the call. + try { + UpdateTradingPartner200Response result = apiInstance.updateTradingPartner(avalaraVersion, id, tradingPartner, xAvalaraClient, xCorrelationID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TradingPartnersApi#updateTradingPartner"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalaraVersion** | **String**| The HTTP Header meant to specify the version of the API intended to be used. | + **id** | **String**| The ID of the trading partner which is being updated. | + **tradingPartner** | [**TradingPartner**](TradingPartner.md)| | + **xAvalaraClient** | **String**| You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". | [optional] + **xCorrelationID** | **String**| The caller can use this as an identifier to use as a correlation id to trace the call. | [optional] + +### Return type + +[**UpdateTradingPartner200Response**](UpdateTradingPartner200Response.md) + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The trading partner has been successfully created. | - | +| **400** | Bad request | * X-Correlation-Id -
| +| **401** | Unauthorized | * X-Correlation-Id -
| +| **403** | Forbidden | * X-Correlation-Id -
| +| **404** | NotFound | * X-Correlation-Id -
| +| **409** | Conflict | * X-Correlation-Id -
| +| **500** | Internal server error | * X-Correlation-Id -
| + diff --git a/docs/EInvoicing/V1/UpdateTradingPartner200Response.md b/docs/EInvoicing/V1/UpdateTradingPartner200Response.md new file mode 100644 index 0000000..e1fcff2 --- /dev/null +++ b/docs/EInvoicing/V1/UpdateTradingPartner200Response.md @@ -0,0 +1,15 @@ + + +# UpdateTradingPartner200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Avalara unique ID of the participant in the directory. | [optional] | +|**status** | **String** | The status of the create operation. | [optional] | +|**message** | **String** | A human-readable message providing additional context or feedback about the outcome of the operation. | [optional] | + + + diff --git a/docs/EInvoicing/V1/ValidationError.md b/docs/EInvoicing/V1/ValidationError.md new file mode 100644 index 0000000..3b93cab --- /dev/null +++ b/docs/EInvoicing/V1/ValidationError.md @@ -0,0 +1,15 @@ + + +# ValidationError + +Represents a specific validation failure within a request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**field** | **String** | The name of the field that failed validation. | [optional] | +|**message** | **String** | A human-readable explanation of the error for the specific field. | [optional] | + + + diff --git a/docs/EInvoicing/V1/WebhooksErrorResponse.md b/docs/EInvoicing/V1/WebhooksErrorResponse.md index 5656438..66558de 100644 --- a/docs/EInvoicing/V1/WebhooksErrorResponse.md +++ b/docs/EInvoicing/V1/WebhooksErrorResponse.md @@ -2,7 +2,6 @@ # WebhooksErrorResponse -Wrapper for errors occurring during webhook subscription or delivery processing. ## Properties diff --git a/pom.xml b/pom.xml index eb30313..bd25367 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,11 @@ - 4.0.0 net.avalara avalara-sdk jar avalara-sdk - 25.7.2 + 25.8.0 https://github.com/avadev/Avalara-SDK-Java OpenAPI Java @@ -25,7 +24,7 @@ - svc.developer@avalara.com + SVC.Developer svc.developer@avalara.com Avalara https://developer.avalara.com/ @@ -33,24 +32,24 @@ - Avalara - https://developer.avalara.com/ + Avalara + https://developer.avalara.com/ - - ossrh - https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/ - ossrh https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/ + + ossrh + https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/ + - + - + org.sonatype.central central-publishing-maven-plugin @@ -62,8 +61,7 @@ published - - + org.apache.maven.plugins maven-compiler-plugin 3.8.1 @@ -73,11 +71,10 @@ 512m -Xlint:all - -J-Xss4m + -J-Xss4m - org.apache.maven.plugins maven-enforcer-plugin @@ -98,7 +95,6 @@ - org.apache.maven.plugins maven-surefire-plugin @@ -115,7 +111,6 @@ 10 - maven-dependency-plugin @@ -130,7 +125,7 @@ - + org.apache.maven.plugins maven-jar-plugin @@ -142,8 +137,9 @@ + + - org.codehaus.mojo build-helper-maven-plugin @@ -175,7 +171,6 @@ - org.apache.maven.plugins maven-javadoc-plugin @@ -199,7 +194,6 @@ - org.apache.maven.plugins maven-source-plugin @@ -213,28 +207,33 @@ - + - com.diffplug.spotless - spotless-maven-plugin - ${spotless.version} - - - + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + .gitignore - - + + true 4 - - - + + + + @@ -244,10 +243,11 @@ true - - - - + + + + + @@ -282,6 +282,7 @@ swagger-annotations ${swagger-core-version} + com.google.code.findbugs jsr305 @@ -354,6 +355,7 @@ javax.ws.rs-api ${javax-version} + junit junit @@ -367,7 +369,6 @@ test - 1.8 ${java.version} 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 0a266f7..aa8555f 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.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 @@ -168,8 +168,8 @@ private okhttp3.Call createCompanyValidateBeforeCall(CreateCompanyRequest reques } /** - * Creates a new company - * Creates a new company + * Create a company + * Create a company. * @param requestOptions Object which represents the options available for a given API/request * @return CompanyResponseModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -187,8 +187,8 @@ public CompanyResponseModel createCompany(CreateCompanyRequest requestParameters } /** - * Creates a new company - * Creates a new company + * Create a company + * Create a company. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<CompanyResponseModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -207,8 +207,8 @@ public ApiResponse createCompanyWithHttpInfo(CreateCompany } /** - * Creates a new company (asynchronously) - * Creates a new company + * Create a company (asynchronously) + * Create a company. * @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 @@ -360,8 +360,8 @@ private okhttp3.Call deleteCompanyValidateBeforeCall(DeleteCompanyRequest reques } /** - * Deletes a company - * Deletes a company + * Delete a company + * Delete a company. * @param requestOptions Object which represents the options available for a given API/request * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -379,8 +379,8 @@ public void deleteCompany(DeleteCompanyRequest requestParameters) throws ApiExce } /** - * Deletes a company - * Deletes a company + * Delete a company + * Delete a company. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -400,8 +400,8 @@ public ApiResponse deleteCompanyWithHttpInfo(DeleteCompanyRequest requestP } /** - * Deletes a company (asynchronously) - * Deletes a company + * Delete a company (asynchronously) + * Delete a company. * @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 @@ -791,7 +791,7 @@ private okhttp3.Call getCompanyValidateBeforeCall(GetCompanyRequest requestParam /** * Retrieve a company - * Retrieve an existing company + * Retrieve a company. * @param requestOptions Object which represents the options available for a given API/request * @return CompanyResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -812,7 +812,7 @@ public CompanyResponse getCompany(GetCompanyRequest requestParameters) throws Ap /** * Retrieve a company - * Retrieve an existing company + * Retrieve a company. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<CompanyResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -834,7 +834,7 @@ public ApiResponse getCompanyWithHttpInfo(GetCompanyRequest req /** * Retrieve a company (asynchronously) - * Retrieve an existing company + * Retrieve a company. * @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 @@ -988,7 +988,7 @@ private okhttp3.Call updateCompanyValidateBeforeCall(UpdateCompanyRequest reques /** * Update a company - * Update a company + * Update a company. * @param requestOptions Object which represents the options available for a given API/request * @return CompanyResponseModel * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1008,7 +1008,7 @@ public CompanyResponseModel updateCompany(UpdateCompanyRequest requestParameters /** * Update a company - * Update a company + * Update a company. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<CompanyResponseModel> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1029,7 +1029,7 @@ public ApiResponse updateCompanyWithHttpInfo(UpdateCompany /** * Update a company (asynchronously) - * Update a company + * Update a company. * @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 @@ -1091,7 +1091,7 @@ public UpdateCompanyRequest getUpdateCompanyRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java index 614e9f7..f1cf55e 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.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 @@ -37,8 +37,10 @@ import Avalara.SDK.model.A1099.V2.BulkUpsert1099FormsRequest; +import Avalara.SDK.model.A1099.V2.Create1099Form201Response; import Avalara.SDK.model.A1099.V2.ErrorResponse; -import Avalara.SDK.model.A1099.V2.Form1099List; +import java.io.File; +import Avalara.SDK.model.A1099.V2.Form1099ListResponse; import Avalara.SDK.model.A1099.V2.Form1099ProccessResult; import Avalara.SDK.model.A1099.V2.Get1099Form200Response; import Avalara.SDK.model.A1099.V2.ICreateForm1099Request; @@ -176,8 +178,8 @@ private okhttp3.Call bulkUpsert1099FormsValidateBeforeCall(BulkUpsert1099FormsRe } /** - * Creates or updates multiple 1099 forms. - * This endpoint allows you to create or update multiple 1099 forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"987-65-4321\", \"TinType\": \"IEN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"PayerMadeDirectSales\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"987-65-4321\", \"tinType\": \"IEN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"payerMadeDirectSales\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\" \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34 \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. + * Create or update multiple 1099/1095/W2/1042S forms + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. * @param requestOptions Object which represents the options available for a given API/request * @return Form1099ProccessResult * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -197,8 +199,8 @@ public Form1099ProccessResult bulkUpsert1099Forms(BulkUpsert1099FormsRequest req } /** - * Creates or updates multiple 1099 forms. - * This endpoint allows you to create or update multiple 1099 forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"987-65-4321\", \"TinType\": \"IEN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"PayerMadeDirectSales\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"987-65-4321\", \"tinType\": \"IEN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"payerMadeDirectSales\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\" \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34 \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. + * Create or update multiple 1099/1095/W2/1042S forms + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<Form1099ProccessResult> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -219,8 +221,8 @@ public ApiResponse bulkUpsert1099FormsWithHttpInfo(BulkU } /** - * Creates or updates multiple 1099 forms. (asynchronously) - * This endpoint allows you to create or update multiple 1099 forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"987-65-4321\", \"TinType\": \"IEN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"PayerMadeDirectSales\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"987-65-4321\", \"tinType\": \"IEN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"payerMadeDirectSales\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\" \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34 \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. + * Create or update multiple 1099/1095/W2/1042S forms (asynchronously) + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. You can use one of the following payload structures: **Form 1099-MISC:** ```json { \"formType\": \"1099-MISC\", \"forms\": [ { \"IssuerId\": \"123456\", \"IssuerReferenceId\": \"REF123\", \"IssuerTin\": \"12-3456789\", \"TaxYear\": 2023, \"ReferenceId\": \"FORM123456\", \"RecipientName\": \"John Doe\", \"RecipientTin\": \"587-65-4321\", \"TinType\": \"SSN\", \"RecipientSecondName\": \"Jane Doe\", \"Address\": \"123 Main Street\", \"Address2\": \"Apt 4B\", \"City\": \"New York\", \"State\": \"NY\", \"Zip\": \"10001\", \"RecipientEmail\": \"john.doe@email.com\", \"AccountNumber\": \"ACC123456\", \"OfficeCode\": \"NYC01\", \"SecondTinNotice\": false, \"RecipientNonUsProvince\": \"\", \"CountryCode\": \"US\", \"Rents\": 12000.00, \"Royalties\": 5000.00, \"OtherIncome\": 3000.00, \"FishingBoatProceeds\": 0.00, \"MedicalHealthCarePayments\": 15000.00, \"SubstitutePayments\": 1000.00, \"CropInsuranceProceeds\": 0.00, \"GrossProceedsPaidToAttorney\": 7500.00, \"FishPurchasedForResale\": 0.00, \"FedIncomeTaxWithheld\": 5000.00, \"Section409ADeferrals\": 0.00, \"ExcessGoldenParachutePayments\": 0.00, \"NonqualifiedDeferredCompensation\": 0.00, \"DirectSalesIndicator\": false, \"FatcaFilingRequirement\": false, \"StateAndLocalWithholding\": { \"StateTaxWithheld\": 2500.00, \"LocalTaxWithheld\": 1000.00, \"State\": \"NY\", \"StateIdNumber\": \"NY123456\", \"Locality\": \"New York City\", \"StateIncome\": 35000.00, \"LocalIncome\": 35000.00 } } ] } ``` **Form 1099-NEC:** ```json { \"formType\": \"1099-NEC\", \"forms\": [ { \"issuerID\": \"180337282\", \"issuerReferenceId\": \"ISS123\", \"issuerTin\": \"12-3000000\", \"taxYear\": 2024, \"referenceID\": \"REF-002\", \"recipientName\": \"Jane Smith\", \"recipientSecondName\": \"\", \"recipientTin\": \"587-65-4321\", \"tinType\": \"SSN\", \"address\": \"123 Center St\", \"address2\": \"\", \"city\": \"Santa Monica\", \"state\": \"CA\", \"zip\": \"90401\", \"countryCode\": \"US\", \"recipientNonUsProvince\": \"\", \"recipientEmail\": \"\", \"accountNumber\": \"\", \"officeCode\": \"\", \"secondTinNotice\": false, \"nonemployeeCompensation\": 123.45, \"directSalesIndicator\": false, \"federalIncomeTaxWithheld\": 12.34, \"stateAndLocalWithholding\": { \"state\": \"CA\", \"stateIdNumber\": \"123123123\", \"stateIncome\": 123.45, \"stateTaxWithheld\": 12.34, \"locality\": \"Santa Monica\", \"localityIdNumber\": \"456456\", \"localTaxWithheld\": 12.34, \"localIncome\": 50000.00 }, \"federalEFile\": true, \"postalMail\": true, \"stateEFile\": true, \"tinMatch\": true, \"addressVerification\": true } ] } ``` For the full version of the payload and its schema details, refer to the Swagger schemas section. * @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 @@ -371,10 +373,10 @@ private okhttp3.Call create1099FormValidateBeforeCall(Create1099FormRequest requ } /** - * Creates a 1099 form. - * + * Create a 1099/1095/W2/1042S form + * Create a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request - * @return Get1099Form200Response + * @return Create1099Form201Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -385,16 +387,16 @@ private okhttp3.Call create1099FormValidateBeforeCall(Create1099FormRequest requ
401 Unauthorized -
*/ - public Get1099Form200Response create1099Form(Create1099FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = create1099FormWithHttpInfo(requestParameters); + public Create1099Form201Response create1099Form(Create1099FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = create1099FormWithHttpInfo(requestParameters); return localVarResp.getData(); } /** - * Creates a 1099 form. - * + * Create a 1099/1095/W2/1042S form + * Create a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Get1099Form200Response> + * @return ApiResponse<Create1099Form201Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -405,15 +407,15 @@ public Get1099Form200Response create1099Form(Create1099FormRequest requestParame
401 Unauthorized -
*/ - public ApiResponse create1099FormWithHttpInfo(Create1099FormRequest requestParameters) throws ApiException { + public ApiResponse create1099FormWithHttpInfo(Create1099FormRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = create1099FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Creates a 1099 form. (asynchronously) - * + * Create a 1099/1095/W2/1042S form (asynchronously) + * Create a 1099/1095/W2/1042S form. * @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 @@ -427,10 +429,10 @@ public ApiResponse create1099FormWithHttpInfo(Create1099 401 Unauthorized - */ - public okhttp3.Call create1099FormAsync(Create1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call create1099FormAsync(Create1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = create1099FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -567,8 +569,8 @@ private okhttp3.Call delete1099FormValidateBeforeCall(Delete1099FormRequest requ } /** - * Deletes a 1099 form. - * + * Delete a 1099/1095/W2/1042S form + * Delete a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -587,8 +589,8 @@ public void delete1099Form(Delete1099FormRequest requestParameters) throws ApiEx } /** - * Deletes a 1099 form. - * + * Delete a 1099/1095/W2/1042S form + * Delete a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -609,8 +611,8 @@ public ApiResponse delete1099FormWithHttpInfo(Delete1099FormRequest reques } /** - * Deletes a 1099 form. (asynchronously) - * + * Delete a 1099/1095/W2/1042S form (asynchronously) + * Delete a 1099/1095/W2/1042S form. * @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 @@ -764,8 +766,8 @@ private okhttp3.Call get1099FormValidateBeforeCall(Get1099FormRequest requestPar } /** - * Retrieves a 1099 form. - * + * Retrieve a 1099/1095/W2/1042S form + * Retrieve a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request * @return Get1099Form200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -785,8 +787,8 @@ public Get1099Form200Response get1099Form(Get1099FormRequest requestParameters) } /** - * Retrieves a 1099 form. - * + * Retrieve a 1099/1095/W2/1042S form + * Retrieve a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<Get1099Form200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -807,8 +809,8 @@ public ApiResponse get1099FormWithHttpInfo(Get1099FormRe } /** - * Retrieves a 1099 form. (asynchronously) - * + * Retrieve a 1099/1095/W2/1042S form (asynchronously) + * Retrieve a 1099/1095/W2/1042S form. * @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 @@ -928,7 +930,7 @@ public okhttp3.Call get1099FormPdfCall(Get1099FormPdfRequest requestParameters, } final String[] localVarAccepts = { - "application/json" + "application/pdf", "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -966,10 +968,10 @@ private okhttp3.Call get1099FormPdfValidateBeforeCall(Get1099FormPdfRequest requ } /** - * Retrieves the PDF file for a single 1099 by form id. - * + * Retrieve the PDF file for a 1099/1095/W2/1042S form + * Retrieve the PDF file for a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request - * @return Update1099Form200Response + * @return File * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -981,16 +983,16 @@ private okhttp3.Call get1099FormPdfValidateBeforeCall(Get1099FormPdfRequest requ
401 Unauthorized -
*/ - public Update1099Form200Response get1099FormPdf(Get1099FormPdfRequest requestParameters) throws ApiException { - ApiResponse localVarResp = get1099FormPdfWithHttpInfo(requestParameters); + public File get1099FormPdf(Get1099FormPdfRequest requestParameters) throws ApiException { + ApiResponse localVarResp = get1099FormPdfWithHttpInfo(requestParameters); return localVarResp.getData(); } /** - * Retrieves the PDF file for a single 1099 by form id. - * + * Retrieve the PDF file for a 1099/1095/W2/1042S form + * Retrieve the PDF file for a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Update1099Form200Response> + * @return ApiResponse<File> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1002,15 +1004,15 @@ public Update1099Form200Response get1099FormPdf(Get1099FormPdfRequest requestPar
401 Unauthorized -
*/ - public ApiResponse get1099FormPdfWithHttpInfo(Get1099FormPdfRequest requestParameters) throws ApiException { + public ApiResponse get1099FormPdfWithHttpInfo(Get1099FormPdfRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = get1099FormPdfValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Retrieves the PDF file for a single 1099 by form id. (asynchronously) - * + * Retrieve the PDF file for a 1099/1095/W2/1042S form (asynchronously) + * Retrieve the PDF file for a 1099/1095/W2/1042S form. * @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 @@ -1025,19 +1027,19 @@ public ApiResponse get1099FormPdfWithHttpInfo(Get1099 401 Unauthorized - */ - public okhttp3.Call get1099FormPdfAsync(Get1099FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call get1099FormPdfAsync(Get1099FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = get1099FormPdfValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Represents the Request object for the Get1099FormPdf API * - * @param id + * @param id The ID of the form * @param avalaraVersion API version - * @param markEdelivered The parameter for marked e-delivered (optional) + * @param markEdelivered Optional boolean that if set indicates that the form should be marked as having been successfully edelivered (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) */ @@ -1178,10 +1180,10 @@ private okhttp3.Call list1099FormsValidateBeforeCall(List1099FormsRequest reques } /** - * Retrieves a list of 1099 forms based on query parameters. - * + * List 1099/1095/W2/1042S forms + * List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. * @param requestOptions Object which represents the options available for a given API/request - * @return Form1099List + * @return Form1099ListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1193,16 +1195,16 @@ private okhttp3.Call list1099FormsValidateBeforeCall(List1099FormsRequest reques
401 Unauthorized -
*/ - public Form1099List list1099Forms(List1099FormsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = list1099FormsWithHttpInfo(requestParameters); + public Form1099ListResponse list1099Forms(List1099FormsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = list1099FormsWithHttpInfo(requestParameters); return localVarResp.getData(); } /** - * Retrieves a list of 1099 forms based on query parameters. - * + * List 1099/1095/W2/1042S forms + * List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Form1099List> + * @return ApiResponse<Form1099ListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1214,15 +1216,15 @@ public Form1099List list1099Forms(List1099FormsRequest requestParameters) throws
401 Unauthorized -
*/ - public ApiResponse list1099FormsWithHttpInfo(List1099FormsRequest requestParameters) throws ApiException { + public ApiResponse list1099FormsWithHttpInfo(List1099FormsRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = list1099FormsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Retrieves a list of 1099 forms based on query parameters. (asynchronously) - * + * List 1099/1095/W2/1042S forms (asynchronously) + * List 1099/1095/W2/1042S forms. Filterable fields are name, referenceId and taxYear. * @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 @@ -1237,10 +1239,10 @@ public ApiResponse list1099FormsWithHttpInfo(List1099FormsRequest 401 Unauthorized - */ - public okhttp3.Call list1099FormsAsync(List1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call list1099FormsAsync(List1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = list1099FormsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1388,8 +1390,8 @@ private okhttp3.Call update1099FormValidateBeforeCall(Update1099FormRequest requ } /** - * Updates a 1099 form. - * + * Update a 1099/1095/W2/1042S form + * Update a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request * @return Update1099Form200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1409,8 +1411,8 @@ public Update1099Form200Response update1099Form(Update1099FormRequest requestPar } /** - * Updates a 1099 form. - * + * Update a 1099/1095/W2/1042S form + * Update a 1099/1095/W2/1042S form. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<Update1099Form200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1431,8 +1433,8 @@ public ApiResponse update1099FormWithHttpInfo(Update1 } /** - * Updates a 1099 form. (asynchronously) - * + * Update a 1099/1095/W2/1042S form (asynchronously) + * Update a 1099/1095/W2/1042S form. * @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 @@ -1495,7 +1497,7 @@ public Update1099FormRequest getUpdate1099FormRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java index a160c41..1fd871f 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.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 @@ -36,6 +36,8 @@ import java.util.*; +import Avalara.SDK.model.A1099.V2.CreateW9Form201Response; +import Avalara.SDK.model.A1099.V2.CreateW9FormRequest; import Avalara.SDK.model.A1099.V2.ErrorModel; import Avalara.SDK.model.A1099.V2.ErrorResponse; import java.io.File; @@ -87,7 +89,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @http.response.details - +
Status Code Description Response Headers
200 The created W9/W4/W8 form -
201 The created W9/W4/W8 form -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
@@ -110,7 +112,7 @@ public okhttp3.Call createW9FormCall(CreateW9FormRequest requestParameters, fina basePath = null; } - Object localVarPostBody = requestParameters.getIw9FormDataModelsOneOf(); + Object localVarPostBody = requestParameters.getCreateW9FormRequest(); // create path and map variables String localVarPath = "/w9/forms"; @@ -168,46 +170,46 @@ private okhttp3.Call createW9FormValidateBeforeCall(CreateW9FormRequest requestP /** * Create a W9/W4/W8 form - * + * Create a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request - * @return IW9FormDataModelsOneOf + * @return CreateW9Form201Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 The created W9/W4/W8 form -
201 The created W9/W4/W8 form -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
*/ - public IW9FormDataModelsOneOf createW9Form(CreateW9FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = createW9FormWithHttpInfo(requestParameters); + public CreateW9Form201Response createW9Form(CreateW9FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createW9FormWithHttpInfo(requestParameters); return localVarResp.getData(); } /** * Create a W9/W4/W8 form - * + * Create a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<IW9FormDataModelsOneOf> + * @return ApiResponse<CreateW9Form201Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 The created W9/W4/W8 form -
201 The created W9/W4/W8 form -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
*/ - public ApiResponse createW9FormWithHttpInfo(CreateW9FormRequest requestParameters) throws ApiException { + public ApiResponse createW9FormWithHttpInfo(CreateW9FormRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = createW9FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create a W9/W4/W8 form (asynchronously) - * + * Create a W9/W4/W8 form. * @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 @@ -215,15 +217,15 @@ public ApiResponse createW9FormWithHttpInfo(CreateW9Form * @http.response.details - +
Status Code Description Response Headers
200 The created W9/W4/W8 form -
201 The created W9/W4/W8 form -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
*/ - public okhttp3.Call createW9FormAsync(CreateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createW9FormAsync(CreateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createW9FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -233,13 +235,13 @@ public okhttp3.Call createW9FormAsync(CreateW9FormRequest requestParameters, fin * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param iw9FormDataModelsOneOf Form to be created (optional) + * @param createW9FormRequest Form to be created (optional) */ public class CreateW9FormRequest { private String avalaraVersion; private String xCorrelationId; private String xAvalaraClient; - private IW9FormDataModelsOneOf iw9FormDataModelsOneOf; + private CreateW9FormRequest createW9FormRequest; public CreateW9FormRequest () { } @@ -250,8 +252,8 @@ public CreateW9FormRequest () { public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public IW9FormDataModelsOneOf getIw9FormDataModelsOneOf() { return iw9FormDataModelsOneOf; } - public void setIw9FormDataModelsOneOf(IW9FormDataModelsOneOf iw9FormDataModelsOneOf) { this.iw9FormDataModelsOneOf = iw9FormDataModelsOneOf; } + public CreateW9FormRequest getCreateW9FormRequest() { return createW9FormRequest; } + public void setCreateW9FormRequest(CreateW9FormRequest createW9FormRequest) { this.createW9FormRequest = createW9FormRequest; } } /** @@ -357,8 +359,8 @@ private okhttp3.Call deleteW9FormValidateBeforeCall(DeleteW9FormRequest requestP } /** - * Delete a form - * Delete a form + * Delete a W9/W4/W8 form + * Delete a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -374,8 +376,8 @@ public void deleteW9Form(DeleteW9FormRequest requestParameters) throws ApiExcept } /** - * Delete a form - * Delete a form + * Delete a W9/W4/W8 form + * Delete a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -393,8 +395,8 @@ public ApiResponse deleteW9FormWithHttpInfo(DeleteW9FormRequest requestPar } /** - * Delete a form (asynchronously) - * Delete a form + * Delete a W9/W4/W8 form (asynchronously) + * Delete a W9/W4/W8 form. * @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 @@ -416,7 +418,7 @@ public okhttp3.Call deleteW9FormAsync(DeleteW9FormRequest requestParameters, fin /** * Represents the Request object for the DeleteW9Form API * - * @param id Id of the form to delete + * @param id ID of the form to delete * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) @@ -544,9 +546,9 @@ private okhttp3.Call getW9FormValidateBeforeCall(GetW9FormRequest requestParamet /** * Retrieve a W9/W4/W8 form - * Retrieve a W9/W4/W8 form + * Retrieve a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request - * @return IW9FormDataModelsOneOf + * @return CreateW9Form201Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -556,16 +558,16 @@ private okhttp3.Call getW9FormValidateBeforeCall(GetW9FormRequest requestParamet
404 W9/W4/W8 form not found -
*/ - public IW9FormDataModelsOneOf getW9Form(GetW9FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getW9FormWithHttpInfo(requestParameters); + public CreateW9Form201Response getW9Form(GetW9FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getW9FormWithHttpInfo(requestParameters); return localVarResp.getData(); } /** * Retrieve a W9/W4/W8 form - * Retrieve a W9/W4/W8 form + * Retrieve a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<IW9FormDataModelsOneOf> + * @return ApiResponse<CreateW9Form201Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -575,15 +577,15 @@ public IW9FormDataModelsOneOf getW9Form(GetW9FormRequest requestParameters) thro
404 W9/W4/W8 form not found -
*/ - public ApiResponse getW9FormWithHttpInfo(GetW9FormRequest requestParameters) throws ApiException { + public ApiResponse getW9FormWithHttpInfo(GetW9FormRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = getW9FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Retrieve a W9/W4/W8 form (asynchronously) - * Retrieve a W9/W4/W8 form + * Retrieve a W9/W4/W8 form. * @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 @@ -596,17 +598,17 @@ public ApiResponse getW9FormWithHttpInfo(GetW9FormReques 404 W9/W4/W8 form not found - */ - public okhttp3.Call getW9FormAsync(GetW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getW9FormAsync(GetW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getW9FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Represents the Request object for the GetW9Form API * - * @param id Id of the form + * @param id ID of the form * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) @@ -747,7 +749,7 @@ private okhttp3.Call listW9FormsValidateBeforeCall(ListW9FormsRequest requestPar } /** - * List W9/W4/W8 forms. + * List W9/W4/W8 forms * List W9/W4/W8 forms. * @param requestOptions Object which represents the options available for a given API/request * @return PaginatedW9FormsModel @@ -766,7 +768,7 @@ public PaginatedW9FormsModel listW9Forms(ListW9FormsRequest requestParameters) t } /** - * List W9/W4/W8 forms. + * List W9/W4/W8 forms * List W9/W4/W8 forms. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<PaginatedW9FormsModel> @@ -786,7 +788,7 @@ public ApiResponse listW9FormsWithHttpInfo(ListW9FormsReq } /** - * List W9/W4/W8 forms. (asynchronously) + * List W9/W4/W8 forms (asynchronously) * List W9/W4/W8 forms. * @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 @@ -953,8 +955,8 @@ private okhttp3.Call sendW9FormEmailValidateBeforeCall(SendW9FormEmailRequest re } /** - * Sends a W9 email request to a vendor/payee - * + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request * @return IW9FormDataModelsOneOf * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -972,8 +974,8 @@ public IW9FormDataModelsOneOf sendW9FormEmail(SendW9FormEmailRequest requestPara } /** - * Sends a W9 email request to a vendor/payee - * + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<IW9FormDataModelsOneOf> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -992,8 +994,8 @@ public ApiResponse sendW9FormEmailWithHttpInfo(SendW9For } /** - * Sends a W9 email request to a vendor/payee (asynchronously) - * + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form (asynchronously) + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. * @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 @@ -1144,7 +1146,7 @@ private okhttp3.Call updateW9FormValidateBeforeCall(UpdateW9FormRequest requestP /** * Update a W9/W4/W8 form - * + * Update a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request * @return IW9FormDataModelsOneOf * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1163,7 +1165,7 @@ public IW9FormDataModelsOneOf updateW9Form(UpdateW9FormRequest requestParameters /** * Update a W9/W4/W8 form - * + * Update a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<IW9FormDataModelsOneOf> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1183,7 +1185,7 @@ public ApiResponse updateW9FormWithHttpInfo(UpdateW9Form /** * Update a W9/W4/W8 form (asynchronously) - * + * Update a W9/W4/W8 form. * @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 @@ -1206,7 +1208,7 @@ public okhttp3.Call updateW9FormAsync(UpdateW9FormRequest requestParameters, fin /** * Represents the Request object for the UpdateW9Form API * - * @param id Id of the form to update + * @param id ID of the form to update * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) @@ -1251,8 +1253,8 @@ public UpdateW9FormRequest getUpdateW9FormRequest() { * @http.response.details - - + +
Status Code Description Response Headers
200 W9/W4/W8 form with id -
400 Bad request (e.g., invalid sort key) -
200 -
400 Bad request (e.g., Only .pdf files are allowed.) -
401 Authentication failed -
404 Not Found -
@@ -1319,7 +1321,7 @@ public okhttp3.Call uploadW9FilesCall(UploadW9FilesRequest requestParameters, fi localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); } @SuppressWarnings("rawtypes") @@ -1342,49 +1344,46 @@ private okhttp3.Call uploadW9FilesValidateBeforeCall(UploadW9FilesRequest reques } /** - * Upload files for a W9/W4/W8 form - * Upload files for a W9/W4/W8 form + * Replace the PDF file for a W9/W4/W8 form + * Replaces the PDF file for a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request - * @return String * @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 W9/W4/W8 form with id -
400 Bad request (e.g., invalid sort key) -
200 -
400 Bad request (e.g., Only .pdf files are allowed.) -
401 Authentication failed -
404 Not Found -
*/ - public String uploadW9Files(UploadW9FilesRequest requestParameters) throws ApiException { - ApiResponse localVarResp = uploadW9FilesWithHttpInfo(requestParameters); - return localVarResp.getData(); + public void uploadW9Files(UploadW9FilesRequest requestParameters) throws ApiException { + uploadW9FilesWithHttpInfo(requestParameters); } /** - * Upload files for a W9/W4/W8 form - * Upload files for a W9/W4/W8 form + * Replace the PDF file for a W9/W4/W8 form + * Replaces the PDF file for a W9/W4/W8 form. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<String> + * @return ApiResponse<Void> * @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 W9/W4/W8 form with id -
400 Bad request (e.g., invalid sort key) -
200 -
400 Bad request (e.g., Only .pdf files are allowed.) -
401 Authentication failed -
404 Not Found -
*/ - public ApiResponse uploadW9FilesWithHttpInfo(UploadW9FilesRequest requestParameters) throws ApiException { + public ApiResponse uploadW9FilesWithHttpInfo(UploadW9FilesRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = uploadW9FilesValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + return localVarApiClient.execute(localVarCall); } /** - * Upload files for a W9/W4/W8 form (asynchronously) - * Upload files for a W9/W4/W8 form + * Replace the PDF file for a W9/W4/W8 form (asynchronously) + * Replaces the PDF file for a W9/W4/W8 form. * @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 @@ -1392,17 +1391,16 @@ public ApiResponse uploadW9FilesWithHttpInfo(UploadW9FilesRequest reques * @http.response.details - - + +
Status Code Description Response Headers
200 W9/W4/W8 form with id -
400 Bad request (e.g., invalid sort key) -
200 -
400 Bad request (e.g., Only .pdf files are allowed.) -
401 Authentication failed -
404 Not Found -
*/ - public okhttp3.Call uploadW9FilesAsync(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadW9FilesAsync(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadW9FilesValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** @@ -1446,7 +1444,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java index 47fcf93..e39345c 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.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 @@ -167,7 +167,7 @@ private okhttp3.Call createIssuerValidateBeforeCall(CreateIssuerRequest requestP /** * Create an issuer - * Create a new issuer + * Create an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request * @return IssuerResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -186,7 +186,7 @@ public IssuerResponse createIssuer(CreateIssuerRequest requestParameters) throws /** * Create an issuer - * Create a new issuer + * Create an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<IssuerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -206,7 +206,7 @@ public ApiResponse createIssuerWithHttpInfo(CreateIssuerRequest /** * Create an issuer (asynchronously) - * Create a new issuer + * Create an issuer (also known as a Payer). * @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 @@ -357,7 +357,7 @@ private okhttp3.Call deleteIssuerValidateBeforeCall(DeleteIssuerRequest requestP /** * Delete an issuer - * Delete an issuer + * Delete an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -374,7 +374,7 @@ public void deleteIssuer(DeleteIssuerRequest requestParameters) throws ApiExcept /** * Delete an issuer - * Delete an issuer + * Delete an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -393,7 +393,7 @@ public ApiResponse deleteIssuerWithHttpInfo(DeleteIssuerRequest requestPar /** * Delete an issuer (asynchronously) - * Delete an issuer + * Delete an issuer (also known as a Payer). * @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 @@ -542,8 +542,8 @@ private okhttp3.Call getIssuerValidateBeforeCall(GetIssuerRequest requestParamet } /** - * Get an issuer - * Get an issuer + * Retrieve an issuer + * Retrieve an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request * @return IssuerResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -561,8 +561,8 @@ public IssuerResponse getIssuer(GetIssuerRequest requestParameters) throws ApiEx } /** - * Get an issuer - * Get an issuer + * Retrieve an issuer + * Retrieve an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<IssuerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -581,8 +581,8 @@ public ApiResponse getIssuerWithHttpInfo(GetIssuerRequest reques } /** - * Get an issuer (asynchronously) - * Get an issuer + * Retrieve an issuer (asynchronously) + * Retrieve an issuer (also known as a Payer). * @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 @@ -605,7 +605,7 @@ public okhttp3.Call getIssuerAsync(GetIssuerRequest requestParameters, final Api /** * Represents the Request object for the GetIssuer API * - * @param id + * @param id Id of the issuer to retrieve * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) @@ -753,7 +753,7 @@ private okhttp3.Call getIssuersValidateBeforeCall(GetIssuersRequest requestParam /** * List issuers - * List issuers for a given tax year. Filterable fields are name, referenceId and taxYear + * List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. * @param requestOptions Object which represents the options available for a given API/request * @return PaginatedQueryResultModelIssuerResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -774,7 +774,7 @@ public PaginatedQueryResultModelIssuerResponse getIssuers(GetIssuersRequest requ /** * List issuers - * List issuers for a given tax year. Filterable fields are name, referenceId and taxYear + * List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<PaginatedQueryResultModelIssuerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -796,7 +796,7 @@ public ApiResponse getIssuersWithHttpIn /** * List issuers (asynchronously) - * List issuers for a given tax year. Filterable fields are name, referenceId and taxYear + * List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. * @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 @@ -970,7 +970,7 @@ private okhttp3.Call updateIssuerValidateBeforeCall(UpdateIssuerRequest requestP /** * Update an issuer - * Update an existing issuer + * Update an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -988,7 +988,7 @@ public void updateIssuer(UpdateIssuerRequest requestParameters) throws ApiExcept /** * Update an issuer - * Update an existing issuer + * Update an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1008,7 +1008,7 @@ public ApiResponse updateIssuerWithHttpInfo(UpdateIssuerRequest requestPar /** * Update an issuer (asynchronously) - * Update an existing issuer + * Update an issuer (also known as a Payer). * @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 @@ -1031,7 +1031,7 @@ public okhttp3.Call updateIssuerAsync(UpdateIssuerRequest requestParameters, fin /** * Represents the Request object for the UpdateIssuer API * - * @param id Id of the issuer to Update + * @param id Id of the issuer to update * @param avalaraVersion API version * @param xCorrelationId Unique correlation Id in a GUID format (optional) * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) @@ -1069,7 +1069,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } 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 8da26c6..a1b381e 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Jobs1099Api.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 @@ -275,7 +275,7 @@ public GetJobRequest getGetJobRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java index 81bb1d0..fa31bec 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java @@ -252,7 +252,7 @@ public okhttp3.Call getDataInputFieldsAsync(GetDataInputFieldsRequest requestPar * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) * @param $filter Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) - * @param $top The number of items to include in the result. (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) * @param $skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) * @param $count When set to true, the count of the collection is also returned in the response body (optional) * @param $countOnly When set to true, only the count of the collection is returned (optional) @@ -262,14 +262,14 @@ public class GetDataInputFieldsRequest { private String xAvalaraClient; private String $filter; private BigDecimal $top; - private String $skip; + private BigDecimal $skip; private Boolean $count; private Boolean $countOnly; public GetDataInputFieldsRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } @@ -277,8 +277,8 @@ public GetDataInputFieldsRequest () { public void set$filter(String $filter) { this.$filter = $filter; } public BigDecimal get$top() { return $top; } public void set$top(BigDecimal $top) { this.$top = $top; } - public String get$skip() { return $skip; } - public void set$skip(String $skip) { this.$skip = $skip; } + public BigDecimal get$skip() { return $skip; } + public void set$skip(BigDecimal $skip) { this.$skip = $skip; } public Boolean get$count() { return $count; } public void set$count(Boolean $count) { this.$count = $count; } public Boolean get$countOnly() { return $countOnly; } @@ -295,7 +295,7 @@ public GetDataInputFieldsRequest getGetDataInputFieldsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java index 8ade589..2c3b455 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java @@ -273,7 +273,7 @@ public class DownloadDocumentRequest { public DownloadDocumentRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getAccept() { return accept; } public void setAccept(String accept) { this.accept = accept; } @@ -460,7 +460,7 @@ public class FetchDocumentsRequest { public FetchDocumentsRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public FetchDocumentsRequest getFetchDocumentsRequest() { return fetchDocumentsRequest; } public void setFetchDocumentsRequest(FetchDocumentsRequest fetchDocumentsRequest) { this.fetchDocumentsRequest = fetchDocumentsRequest; } @@ -668,7 +668,7 @@ public okhttp3.Call getDocumentListAsync(GetDocumentListRequest requestParameter * @param $count When set to true, the count of the collection is also returned in the response body (optional) * @param $countOnly When set to true, only the count of the collection is returned (optional) * @param $filter Filter by field name and value. This filter only supports eq . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. (optional) - * @param $top The number of items to include in the result. (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 200 records. (optional) * @param $skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) */ public class GetDocumentListRequest { @@ -686,7 +686,7 @@ public class GetDocumentListRequest { public GetDocumentListRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } @@ -886,7 +886,7 @@ public class GetDocumentStatusRequest { public GetDocumentStatusRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getDocumentId() { return documentId; } public void setDocumentId(String documentId) { this.documentId = documentId; } @@ -1086,7 +1086,7 @@ public class SubmitDocumentRequest { public SubmitDocumentRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public SubmitDocumentMetadata getMetadata() { return metadata; } public void setMetadata(SubmitDocumentMetadata metadata) { this.metadata = metadata; } @@ -1106,7 +1106,7 @@ public SubmitDocumentRequest getSubmitDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java index 5001e23..0396783 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java @@ -280,7 +280,7 @@ public SubmitInteropDocumentRequest () { public void setDocumentType(String documentType) { this.documentType = documentType; } public String getInterchangeType() { return interchangeType; } public void setInterchangeType(String interchangeType) { this.interchangeType = interchangeType; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } @@ -300,7 +300,7 @@ public SubmitInteropDocumentRequest getSubmitInteropDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java index 5fe172f..8717edc 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java @@ -280,7 +280,7 @@ public class GetMandateDataInputFieldsRequest { public GetMandateDataInputFieldsRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getMandateId() { return mandateId; } public void setMandateId(String mandateId) { this.mandateId = mandateId; } @@ -479,7 +479,7 @@ public okhttp3.Call getMandatesAsync(GetMandatesRequest requestParameters, final * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional) * @param $filter Filter by field name and value. This filter only supports eq and contains. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. (optional) - * @param $top The number of items to include in the result. (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) * @param $skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets. (optional) * @param $count When set to true, the count of the collection is also returned in the response body. (optional) * @param $countOnly When set to true, only the count of the collection is returned (optional) @@ -489,14 +489,14 @@ public class GetMandatesRequest { private String xAvalaraClient; private String $filter; private BigDecimal $top; - private String $skip; + private BigDecimal $skip; private Boolean $count; private Boolean $countOnly; public GetMandatesRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } @@ -504,8 +504,8 @@ public GetMandatesRequest () { public void set$filter(String $filter) { this.$filter = $filter; } public BigDecimal get$top() { return $top; } public void set$top(BigDecimal $top) { this.$top = $top; } - public String get$skip() { return $skip; } - public void set$skip(String $skip) { this.$skip = $skip; } + public BigDecimal get$skip() { return $skip; } + public void set$skip(BigDecimal $skip) { this.$skip = $skip; } public Boolean get$count() { return $count; } public void set$count(Boolean $count) { this.$count = $count; } public Boolean get$countOnly() { return $countOnly; } @@ -522,7 +522,7 @@ public GetMandatesRequest getGetMandatesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java index cbf7c51..0372876 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java @@ -36,7 +36,6 @@ import java.util.*; -import java.math.BigDecimal; import Avalara.SDK.model.EInvoicing.V1.SubscriptionDetail; import Avalara.SDK.model.EInvoicing.V1.SubscriptionListResponse; import Avalara.SDK.model.EInvoicing.V1.SubscriptionRegistration; @@ -240,7 +239,7 @@ public okhttp3.Call createWebhookSubscriptionAsync(CreateWebhookSubscriptionRequ /** * Represents the Request object for the CreateWebhookSubscription API * - * @param avalaraVersion The version of the API to use, e.g., \"1.3\". + * @param avalaraVersion The version of the API to use, e.g., \"1.4\". * @param subscriptionRegistration * @param xCorrelationID A unique identifier for tracking the request and its response (optional) * @param xAvalaraClient Client application identification (optional) @@ -254,7 +253,7 @@ public class CreateWebhookSubscriptionRequest { public CreateWebhookSubscriptionRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public SubscriptionRegistration getSubscriptionRegistration() { return subscriptionRegistration; } public void setSubscriptionRegistration(SubscriptionRegistration subscriptionRegistration) { this.subscriptionRegistration = subscriptionRegistration; } @@ -431,7 +430,7 @@ public okhttp3.Call deleteWebhookSubscriptionAsync(DeleteWebhookSubscriptionRequ * Represents the Request object for the DeleteWebhookSubscription API * * @param subscriptionId - * @param avalaraVersion The version of the API to use, e.g., \"1.3\". + * @param avalaraVersion The version of the API to use, e.g., \"1.4\". * @param xCorrelationID A unique identifier for tracking the request and its response (optional) * @param xAvalaraClient Client application identification (optional) */ @@ -446,7 +445,7 @@ public DeleteWebhookSubscriptionRequest () { public String getSubscriptionId() { return subscriptionId; } public void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getXCorrelationID() { return xCorrelationID; } public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } @@ -625,7 +624,7 @@ public okhttp3.Call getWebhookSubscriptionAsync(GetWebhookSubscriptionRequest re * Represents the Request object for the GetWebhookSubscription API * * @param subscriptionId - * @param avalaraVersion The version of the API to use, e.g., \"1.3\". + * @param avalaraVersion The version of the API to use, e.g., \"1.4\". * @param xCorrelationID A unique identifier for tracking the request and its response (optional) * @param xAvalaraClient Client application identification (optional) */ @@ -640,7 +639,7 @@ public GetWebhookSubscriptionRequest () { public String getSubscriptionId() { return subscriptionId; } public void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getXCorrelationID() { return xCorrelationID; } public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } @@ -828,7 +827,7 @@ public okhttp3.Call listWebhookSubscriptionsAsync(ListWebhookSubscriptionsReques /** * Represents the Request object for the ListWebhookSubscriptions API * - * @param avalaraVersion The version of the API to use, e.g., \"1.3\". + * @param avalaraVersion The version of the API to use, e.g., \"1.4\". * @param xCorrelationID A unique identifier for tracking the request and its response (optional) * @param xAvalaraClient Client application identification (optional) * @param $top The number of items to include in the result. (optional) @@ -840,24 +839,24 @@ public class ListWebhookSubscriptionsRequest { private String avalaraVersion; private String xCorrelationID; private String xAvalaraClient; - private BigDecimal $top; - private BigDecimal $skip; + private Integer $top; + private Integer $skip; private Boolean count; private Boolean countOnly; public ListWebhookSubscriptionsRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getXCorrelationID() { return xCorrelationID; } public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public BigDecimal get$top() { return $top; } - public void set$top(BigDecimal $top) { this.$top = $top; } - public BigDecimal get$skip() { return $skip; } - public void set$skip(BigDecimal $skip) { this.$skip = $skip; } + public Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } public Boolean getCount() { return count; } public void setCount(Boolean count) { this.count = count; } public Boolean getCountOnly() { return countOnly; } @@ -874,7 +873,7 @@ public ListWebhookSubscriptionsRequest getListWebhookSubscriptionsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java new file mode 100644 index 0000000..a234848 --- /dev/null +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java @@ -0,0 +1,495 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.api.EInvoicing.V1; + +import Avalara.SDK.ApiCallback; +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.ApiResponse; +import Avalara.SDK.Configuration; +import Avalara.SDK.Pair; +import Avalara.SDK.ProgressRequestBody; +import Avalara.SDK.ProgressResponseBody; +import Avalara.SDK.AvalaraMicroservice; + + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; +import java.util.*; + + +import Avalara.SDK.model.EInvoicing.V1.ErrorResponse; +import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierRequest; +import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierResponse; +import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierSchemaByCountry200Response; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class TaxIdentifiersApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public TaxIdentifiersApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + SetConfiguration(apiClient); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for taxIdentifierSchemaByCountry + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 OK * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call taxIdentifierSchemaByCountryCall(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/tax-identifiers/schema"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getCountryCode() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countryCode", requestParameters.getCountryCode())); + } + + if (requestParameters.getType() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", requestParameters.getType())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call taxIdentifierSchemaByCountryValidateBeforeCall(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling taxIdentifierSchemaByCountry(Async)"); + } + + // verify the required parameter 'requestParameters.countryCode' is set + if (requestParameters.getCountryCode() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.countryCode' when calling taxIdentifierSchemaByCountry(Async)"); + } + + + okhttp3.Call localVarCall = taxIdentifierSchemaByCountryCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Returns the tax identifier request & response schema for a specific country. + * This endpoint retrieves the request and response schema required to validate tax identifiers based on a specific country's requirements. This can include both standard fields and any additional parameters required by the respective country's tax authority. + * @param requestOptions Object which represents the options available for a given API/request + * @return TaxIdentifierSchemaByCountry200Response + * @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 OK * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public TaxIdentifierSchemaByCountry200Response taxIdentifierSchemaByCountry(TaxIdentifierSchemaByCountryRequest requestParameters) throws ApiException { + ApiResponse localVarResp = taxIdentifierSchemaByCountryWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Returns the tax identifier request & response schema for a specific country. + * This endpoint retrieves the request and response schema required to validate tax identifiers based on a specific country's requirements. This can include both standard fields and any additional parameters required by the respective country's tax authority. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<TaxIdentifierSchemaByCountry200Response> + * @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 OK * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public ApiResponse taxIdentifierSchemaByCountryWithHttpInfo(TaxIdentifierSchemaByCountryRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = taxIdentifierSchemaByCountryValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns the tax identifier request & response schema for a specific country. (asynchronously) + * This endpoint retrieves the request and response schema required to validate tax identifiers based on a specific country's requirements. This can include both standard fields and any additional parameters required by the respective country's tax authority. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 OK * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call taxIdentifierSchemaByCountryAsync(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = taxIdentifierSchemaByCountryValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the TaxIdentifierSchemaByCountry API + * + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param countryCode The two-letter ISO-3166 country code for which the schema should be retrieved. + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + * @param type Specifies whether to return the request or response schema. (optional) + */ + public class TaxIdentifierSchemaByCountryRequest { + private String avalaraVersion; + private String countryCode; + private String xAvalaraClient; + private String xCorrelationID; + private String type; + + public TaxIdentifierSchemaByCountryRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getCountryCode() { return countryCode; } + public void setCountryCode(String countryCode) { this.countryCode = countryCode; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + public String getType() { return type; } + public void setType(String type) { this.type = type; } + } + + /** + * Getter function to instantiate Request class + * @returns TaxIdentifierSchemaByCountryRequest + */ + public TaxIdentifierSchemaByCountryRequest getTaxIdentifierSchemaByCountryRequest() { + return this.new TaxIdentifierSchemaByCountryRequest(); + } + + /** + * Build call for validateTaxIdentifier + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 Success response. * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
429 Rate limit exceeded * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call validateTaxIdentifierCall(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = requestParameters.getTaxIdentifierRequest(); + + // create path and map variables + String localVarPath = "/einvoicing/tax-identifiers/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateTaxIdentifierValidateBeforeCall(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling validateTaxIdentifier(Async)"); + } + + // verify the required parameter 'requestParameters.taxIdentifierRequest' is set + if (requestParameters.getTaxIdentifierRequest() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.taxIdentifierRequest' when calling validateTaxIdentifier(Async)"); + } + + + okhttp3.Call localVarCall = validateTaxIdentifierCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Validates a tax identifier. + * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. + * @param requestOptions Object which represents the options available for a given API/request + * @return TaxIdentifierResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 Success response. * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
429 Rate limit exceeded * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public TaxIdentifierResponse validateTaxIdentifier(ValidateTaxIdentifierRequest requestParameters) throws ApiException { + ApiResponse localVarResp = validateTaxIdentifierWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Validates a tax identifier. + * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<TaxIdentifierResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 Success response. * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
429 Rate limit exceeded * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public ApiResponse validateTaxIdentifierWithHttpInfo(ValidateTaxIdentifierRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = validateTaxIdentifierValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Validates a tax identifier. (asynchronously) + * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 Success response. * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
429 Rate limit exceeded * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call validateTaxIdentifierAsync(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = validateTaxIdentifierValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the ValidateTaxIdentifier API + * + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param taxIdentifierRequest + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ + public class ValidateTaxIdentifierRequest { + private String avalaraVersion; + private TaxIdentifierRequest taxIdentifierRequest; + private String xAvalaraClient; + private String xCorrelationID; + + public ValidateTaxIdentifierRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public TaxIdentifierRequest getTaxIdentifierRequest() { return taxIdentifierRequest; } + public void setTaxIdentifierRequest(TaxIdentifierRequest taxIdentifierRequest) { this.taxIdentifierRequest = taxIdentifierRequest; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + } + + /** + * Getter function to instantiate Request class + * @returns ValidateTaxIdentifierRequest + */ + public ValidateTaxIdentifierRequest getValidateTaxIdentifierRequest() { + return this.new ValidateTaxIdentifierRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("25.8.0"); + } +} + diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java index 68c069c..9e61899 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java @@ -39,10 +39,14 @@ import Avalara.SDK.model.EInvoicing.V1.BatchSearch; import Avalara.SDK.model.EInvoicing.V1.BatchSearchListResponse; import Avalara.SDK.model.EInvoicing.V1.BatchSearchParticipants202Response; -import java.math.BigDecimal; -import Avalara.SDK.model.EInvoicing.V1.DirectorySearchResponse; +import Avalara.SDK.model.EInvoicing.V1.CreateTradingPartner201Response; +import Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatch200Response; +import Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatchRequest; import Avalara.SDK.model.EInvoicing.V1.ErrorResponse; import java.io.File; +import Avalara.SDK.model.EInvoicing.V1.SearchParticipants200Response; +import Avalara.SDK.model.EInvoicing.V1.TradingPartner; +import Avalara.SDK.model.EInvoicing.V1.UpdateTradingPartner200Response; import java.lang.reflect.Type; import java.util.ArrayList; @@ -198,8 +202,8 @@ private okhttp3.Call batchSearchParticipantsValidateBeforeCall(BatchSearchPartic } /** - * Creates a batch search and performs a batch search in the directory for participants in the background. * Handles batch search requests by uploading a file containing search parameters. + * This endpoint creates a batch search and performs a batch search in the directory for participants in the background. * @param requestOptions Object which represents the options available for a given API/request * @return BatchSearchParticipants202Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -219,8 +223,8 @@ public BatchSearchParticipants202Response batchSearchParticipants(BatchSearchPar } /** - * Creates a batch search and performs a batch search in the directory for participants in the background. * Handles batch search requests by uploading a file containing search parameters. + * This endpoint creates a batch search and performs a batch search in the directory for participants in the background. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<BatchSearchParticipants202Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -241,8 +245,617 @@ public ApiResponse batchSearchParticipantsWi } /** - * Creates a batch search and performs a batch search in the directory for participants in the background. (asynchronously) - * Handles batch search requests by uploading a file containing search parameters. + * Handles batch search requests by uploading a file containing search parameters. (asynchronously) + * This endpoint creates a batch search and performs a batch search in the directory for participants in the background. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
202 Batch search file accepted for processing the search. * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call batchSearchParticipantsAsync(BatchSearchParticipantsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = batchSearchParticipantsValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the BatchSearchParticipants API + * + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param name A human-readable name for the batch search. + * @param notificationEmail The email address to which a notification will be sent once the batch search is complete. + * @param _file CSV file containing search parameters. Input Constraints: - Maximum file size: 1 MB - File Header: Must be less than 500 KB - Total number of lines (including header): Must be 101 or fewer + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ + public class BatchSearchParticipantsRequest { + private String avalaraVersion; + private String name; + private String notificationEmail; + private File _file; + private String xAvalaraClient; + private String xCorrelationID; + + public BatchSearchParticipantsRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getName() { return name; } + public void setName(String name) { this.name = name; } + public String getNotificationEmail() { return notificationEmail; } + public void setNotificationEmail(String notificationEmail) { this.notificationEmail = notificationEmail; } + public File get_file() { return _file; } + public void set_file(File _file) { this._file = _file; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + } + + /** + * Getter function to instantiate Request class + * @returns BatchSearchParticipantsRequest + */ + public BatchSearchParticipantsRequest getBatchSearchParticipantsRequest() { + return this.new BatchSearchParticipantsRequest(); + } + + /** + * Build call for createTradingPartner + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
201 The trading partner has been successfully created. * X-Correlation-Id -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call createTradingPartnerCall(CreateTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = requestParameters.getTradingPartner(); + + // create path and map variables + String localVarPath = "/einvoicing/trading-partners"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createTradingPartnerValidateBeforeCall(CreateTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling createTradingPartner(Async)"); + } + + // verify the required parameter 'requestParameters.tradingPartner' is set + if (requestParameters.getTradingPartner() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.tradingPartner' when calling createTradingPartner(Async)"); + } + + + okhttp3.Call localVarCall = createTradingPartnerCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Creates a new trading partner. + * This endpoint creates a new trading partner with the provided details. The request body must include the necessary information as defined in the `TradingPartner` schema. + * @param requestOptions Object which represents the options available for a given API/request + * @return CreateTradingPartner201Response + * @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
201 The trading partner has been successfully created. * X-Correlation-Id -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public CreateTradingPartner201Response createTradingPartner(CreateTradingPartnerRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createTradingPartnerWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Creates a new trading partner. + * This endpoint creates a new trading partner with the provided details. The request body must include the necessary information as defined in the `TradingPartner` schema. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CreateTradingPartner201Response> + * @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
201 The trading partner has been successfully created. * X-Correlation-Id -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public ApiResponse createTradingPartnerWithHttpInfo(CreateTradingPartnerRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = createTradingPartnerValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Creates a new trading partner. (asynchronously) + * This endpoint creates a new trading partner with the provided details. The request body must include the necessary information as defined in the `TradingPartner` schema. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
201 The trading partner has been successfully created. * X-Correlation-Id -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call createTradingPartnerAsync(CreateTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createTradingPartnerValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the CreateTradingPartner API + * + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param tradingPartner + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ + public class CreateTradingPartnerRequest { + private String avalaraVersion; + private TradingPartner tradingPartner; + private String xAvalaraClient; + private String xCorrelationID; + + public CreateTradingPartnerRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public TradingPartner getTradingPartner() { return tradingPartner; } + public void setTradingPartner(TradingPartner tradingPartner) { this.tradingPartner = tradingPartner; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + } + + /** + * Getter function to instantiate Request class + * @returns CreateTradingPartnerRequest + */ + public CreateTradingPartnerRequest getCreateTradingPartnerRequest() { + return this.new CreateTradingPartnerRequest(); + } + + /** + * Build call for createTradingPartnersBatch + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 Batch processing completed * X-Correlation-Id -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
413 ContentTooLarge * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call createTradingPartnersBatchCall(CreateTradingPartnersBatchRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = requestParameters.getCreateTradingPartnersBatchRequest(); + + // create path and map variables + String localVarPath = "/einvoicing/trading-partners/batch"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createTradingPartnersBatchValidateBeforeCall(CreateTradingPartnersBatchRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling createTradingPartnersBatch(Async)"); + } + + // verify the required parameter 'requestParameters.createTradingPartnersBatchRequest' is set + if (requestParameters.getCreateTradingPartnersBatchRequest() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.createTradingPartnersBatchRequest' when calling createTradingPartnersBatch(Async)"); + } + + + okhttp3.Call localVarCall = createTradingPartnersBatchCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Creates a batch of multiple trading partners. + * This endpoint creates multiple trading partners in a single batch request. It accepts an array of trading partners and processes them synchronously. Supports a maximum of 100 records or 1 MB request payload. The batch is processed atomically and partial success is not allowed. + * @param requestOptions Object which represents the options available for a given API/request + * @return CreateTradingPartnersBatch200Response + * @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 Batch processing completed * X-Correlation-Id -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
413 ContentTooLarge * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public CreateTradingPartnersBatch200Response createTradingPartnersBatch(CreateTradingPartnersBatchRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createTradingPartnersBatchWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Creates a batch of multiple trading partners. + * This endpoint creates multiple trading partners in a single batch request. It accepts an array of trading partners and processes them synchronously. Supports a maximum of 100 records or 1 MB request payload. The batch is processed atomically and partial success is not allowed. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CreateTradingPartnersBatch200Response> + * @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 Batch processing completed * X-Correlation-Id -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
413 ContentTooLarge * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public ApiResponse createTradingPartnersBatchWithHttpInfo(CreateTradingPartnersBatchRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = createTradingPartnersBatchValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Creates a batch of multiple trading partners. (asynchronously) + * This endpoint creates multiple trading partners in a single batch request. It accepts an array of trading partners and processes them synchronously. Supports a maximum of 100 records or 1 MB request payload. The batch is processed atomically and partial success is not allowed. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 Batch processing completed * X-Correlation-Id -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
413 ContentTooLarge * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call createTradingPartnersBatchAsync(CreateTradingPartnersBatchRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createTradingPartnersBatchValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the CreateTradingPartnersBatch API + * + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param createTradingPartnersBatchRequest + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ + public class CreateTradingPartnersBatchRequest { + private String avalaraVersion; + private CreateTradingPartnersBatchRequest createTradingPartnersBatchRequest; + private String xAvalaraClient; + private String xCorrelationID; + + public CreateTradingPartnersBatchRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public CreateTradingPartnersBatchRequest getCreateTradingPartnersBatchRequest() { return createTradingPartnersBatchRequest; } + public void setCreateTradingPartnersBatchRequest(CreateTradingPartnersBatchRequest createTradingPartnersBatchRequest) { this.createTradingPartnersBatchRequest = createTradingPartnersBatchRequest; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + } + + /** + * Getter function to instantiate Request class + * @returns CreateTradingPartnersBatchRequest + */ + public CreateTradingPartnersBatchRequest getCreateTradingPartnersBatchRequest() { + return this.new CreateTradingPartnersBatchRequest(); + } + + /** + * Build call for deleteTradingPartner + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Trading partner deleted successfully. * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 NotFound * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call deleteTradingPartnerCall(DeleteTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/trading-partners/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteTradingPartnerValidateBeforeCall(DeleteTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteTradingPartner(Async)"); + } + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling deleteTradingPartner(Async)"); + } + + + okhttp3.Call localVarCall = deleteTradingPartnerCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Deletes a trading partner using ID. + * This endpoint deletes an existing trading partner identified by the provided ID. + * @param requestOptions Object which represents the options available for a given API/request + * @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
204 Trading partner deleted successfully. * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 NotFound * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public void deleteTradingPartner(DeleteTradingPartnerRequest requestParameters) throws ApiException { + deleteTradingPartnerWithHttpInfo(requestParameters); + } + + /** + * Deletes a trading partner using ID. + * This endpoint deletes an existing trading partner identified by the provided ID. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Void> + * @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
204 Trading partner deleted successfully. * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 NotFound * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public ApiResponse deleteTradingPartnerWithHttpInfo(DeleteTradingPartnerRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = deleteTradingPartnerValidateBeforeCall(requestParameters, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Deletes a trading partner using ID. (asynchronously) + * This endpoint deletes an existing trading partner identified by the provided ID. * @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 @@ -250,49 +863,40 @@ public ApiResponse batchSearchParticipantsWi * @http.response.details - - + +
Status Code Description Response Headers
202 Batch search file accepted for processing the search. * X-Correlation-Id -
400 Invalid request * X-Correlation-Id -
204 Trading partner deleted successfully. * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 NotFound * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
*/ - public okhttp3.Call batchSearchParticipantsAsync(BatchSearchParticipantsRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteTradingPartnerAsync(DeleteTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = batchSearchParticipantsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = deleteTradingPartnerValidateBeforeCall(requestParameters, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Represents the Request object for the BatchSearchParticipants API + * Represents the Request object for the DeleteTradingPartner API * - * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used - * @param name The human readable name given to this batch search. - * @param notificationEmail The email address of the user to whom the batch search completion notification must go to. - * @param _file CSV file containing search parameters. - * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param id The ID of the trading partner which is being deleted. + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) */ - public class BatchSearchParticipantsRequest { + public class DeleteTradingPartnerRequest { private String avalaraVersion; - private String name; - private String notificationEmail; - private File _file; + private String id; private String xAvalaraClient; private String xCorrelationID; - public BatchSearchParticipantsRequest () { + public DeleteTradingPartnerRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getName() { return name; } - public void setName(String name) { this.name = name; } - public String getNotificationEmail() { return notificationEmail; } - public void setNotificationEmail(String notificationEmail) { this.notificationEmail = notificationEmail; } - public File get_file() { return _file; } - public void set_file(File _file) { this._file = _file; } + public String getId() { return id; } + public void setId(String id) { this.id = id; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } public String getXCorrelationID() { return xCorrelationID; } @@ -301,10 +905,10 @@ public BatchSearchParticipantsRequest () { /** * Getter function to instantiate Request class - * @returns BatchSearchParticipantsRequest + * @returns DeleteTradingPartnerRequest */ - public BatchSearchParticipantsRequest getBatchSearchParticipantsRequest() { - return this.new BatchSearchParticipantsRequest(); + public DeleteTradingPartnerRequest getDeleteTradingPartnerRequest() { + return this.new DeleteTradingPartnerRequest(); } /** @@ -316,7 +920,7 @@ public BatchSearchParticipantsRequest getBatchSearchParticipantsRequest() { * @http.response.details - + @@ -404,15 +1008,15 @@ private okhttp3.Call downloadBatchSearchReportValidateBeforeCall(DownloadBatchSe } /** - * Download batch search results in a csv file. - * Downloads the report for a specific batch search using the batch search ID. + * Downloads batch search results in a csv file. + * This endpoint downloads the report for a specific batch search using the batch search ID. It returns a CSV file containing up to 1,000 query results. * @param requestOptions Object which represents the options available for a given API/request * @return File * @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 Successful report download * X-Correlation-Id -
200 Successful report download Output Constraints: - Maximum of 1000 query results returned in the CSV * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
- + @@ -425,15 +1029,15 @@ public File downloadBatchSearchReport(DownloadBatchSearchReportRequest requestPa } /** - * Download batch search results in a csv file. - * Downloads the report for a specific batch search using the batch search ID. + * Downloads batch search results in a csv file. + * This endpoint downloads the report for a specific batch search using the batch search ID. It returns a CSV file containing up to 1,000 query results. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<File> * @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 Successful report download * X-Correlation-Id -
200 Successful report download Output Constraints: - Maximum of 1000 query results returned in the CSV * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
- + @@ -447,8 +1051,8 @@ public ApiResponse downloadBatchSearchReportWithHttpInfo(DownloadBatchSear } /** - * Download batch search results in a csv file. (asynchronously) - * Downloads the report for a specific batch search using the batch search ID. + * Downloads batch search results in a csv file. (asynchronously) + * This endpoint downloads the report for a specific batch search using the batch search ID. It returns a CSV file containing up to 1,000 query results. * @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 @@ -456,7 +1060,7 @@ public ApiResponse downloadBatchSearchReportWithHttpInfo(DownloadBatchSear * @http.response.details
Status Code Description Response Headers
200 Successful report download * X-Correlation-Id -
200 Successful report download Output Constraints: - Maximum of 1000 query results returned in the CSV * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
- + @@ -473,9 +1077,9 @@ public okhttp3.Call downloadBatchSearchReportAsync(DownloadBatchSearchReportRequ /** * Represents the Request object for the DownloadBatchSearchReport API * - * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used - * @param id The ID of the batch search whose report is to be downloaded. - * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param id The ID of the batch search for which the report should be downloaded. + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) */ public class DownloadBatchSearchReportRequest { @@ -487,7 +1091,7 @@ public class DownloadBatchSearchReportRequest { public DownloadBatchSearchReportRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getId() { return id; } public void setId(String id) { this.id = id; } @@ -514,10 +1118,10 @@ public DownloadBatchSearchReportRequest getDownloadBatchSearchReportRequest() { * @http.response.details
Status Code Description Response Headers
200 Successful report download * X-Correlation-Id -
200 Successful report download Output Constraints: - Maximum of 1000 query results returned in the CSV * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
- + - +
Status Code Description Response Headers
200 Get the batch search details for a given id. * X-Correlation-Id -
200 The batch search details for a given ID. * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
*/ @@ -602,18 +1206,18 @@ private okhttp3.Call getBatchSearchDetailValidateBeforeCall(GetBatchSearchDetail } /** - * Get the batch search details for a given id. - * This endpoint provides a detailed information for a specific batch search based on a given ID. It is ideal for tracking the progress of a previously initiated batch search operation. + * Returns the batch search details using ID. + * This endpoint returns detailed information for a specific batch search using the provided ID. It is useful for tracking the status and progress of a previously initiated batch search operation. * @param requestOptions Object which represents the options available for a given API/request * @return BatchSearch * @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 Get the batch search details for a given id. * X-Correlation-Id -
200 The batch search details for a given ID. * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
*/ @@ -623,18 +1227,18 @@ public BatchSearch getBatchSearchDetail(GetBatchSearchDetailRequest requestParam } /** - * Get the batch search details for a given id. - * This endpoint provides a detailed information for a specific batch search based on a given ID. It is ideal for tracking the progress of a previously initiated batch search operation. + * Returns the batch search details using ID. + * This endpoint returns detailed information for a specific batch search using the provided ID. It is useful for tracking the status and progress of a previously initiated batch search operation. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<BatchSearch> * @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 Get the batch search details for a given id. * X-Correlation-Id -
200 The batch search details for a given ID. * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
*/ @@ -645,8 +1249,8 @@ public ApiResponse getBatchSearchDetailWithHttpInfo(GetBatchSearchD } /** - * Get the batch search details for a given id. (asynchronously) - * This endpoint provides a detailed information for a specific batch search based on a given ID. It is ideal for tracking the progress of a previously initiated batch search operation. + * Returns the batch search details using ID. (asynchronously) + * This endpoint returns detailed information for a specific batch search using the provided ID. It is useful for tracking the status and progress of a previously initiated batch search operation. * @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 @@ -654,10 +1258,10 @@ public ApiResponse getBatchSearchDetailWithHttpInfo(GetBatchSearchD * @http.response.details - + - +
Status Code Description Response Headers
200 Get the batch search details for a given id. * X-Correlation-Id -
200 The batch search details for a given ID. * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 Report not found * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
*/ @@ -671,9 +1275,9 @@ public okhttp3.Call getBatchSearchDetailAsync(GetBatchSearchDetailRequest reques /** * Represents the Request object for the GetBatchSearchDetail API * - * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. * @param id The ID of the batch search that was submitted earlier. - * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) */ public class GetBatchSearchDetailRequest { @@ -685,7 +1289,7 @@ public class GetBatchSearchDetailRequest { public GetBatchSearchDetailRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getId() { return id; } public void setId(String id) { this.id = id; } @@ -814,8 +1418,8 @@ private okhttp3.Call listBatchSearchesValidateBeforeCall(ListBatchSearchesReques } /** - * List all batch searches that were previously submitted. - * This endpoint provides a way to retrieve a comprehensive list of all batch search operations that have been previously submitted. This endpoint returns details about each batch search, such as their id, status, created date and associated metadata, allowing users to easily view past batch search requests. It's particularly useful for tracking the progress of a previously initiated batch search operations. + * Lists all batch searches that were previously submitted. + * This endpoint retrieves a list of all batch search operations that have been previously submitted. It returns details such as the batch search ID, status, creation date, and associated metadata. It is useful for tracking the progress of a previously initiated batch search operations. * @param requestOptions Object which represents the options available for a given API/request * @return BatchSearchListResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -835,8 +1439,8 @@ public BatchSearchListResponse listBatchSearches(ListBatchSearchesRequest reques } /** - * List all batch searches that were previously submitted. - * This endpoint provides a way to retrieve a comprehensive list of all batch search operations that have been previously submitted. This endpoint returns details about each batch search, such as their id, status, created date and associated metadata, allowing users to easily view past batch search requests. It's particularly useful for tracking the progress of a previously initiated batch search operations. + * Lists all batch searches that were previously submitted. + * This endpoint retrieves a list of all batch search operations that have been previously submitted. It returns details such as the batch search ID, status, creation date, and associated metadata. It is useful for tracking the progress of a previously initiated batch search operations. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<BatchSearchListResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -857,8 +1461,8 @@ public ApiResponse listBatchSearchesWithHttpInfo(ListBa } /** - * List all batch searches that were previously submitted. (asynchronously) - * This endpoint provides a way to retrieve a comprehensive list of all batch search operations that have been previously submitted. This endpoint returns details about each batch search, such as their id, status, created date and associated metadata, allowing users to easily view past batch search requests. It's particularly useful for tracking the progress of a previously initiated batch search operations. + * Lists all batch searches that were previously submitted. (asynchronously) + * This endpoint retrieves a list of all batch search operations that have been previously submitted. It returns details such as the batch search ID, status, creation date, and associated metadata. It is useful for tracking the progress of a previously initiated batch search operations. * @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 @@ -883,13 +1487,13 @@ public okhttp3.Call listBatchSearchesAsync(ListBatchSearchesRequest requestParam /** * Represents the Request object for the ListBatchSearches API * - * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used - * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) - * @param $filter Filter by field name and value. This filter only supports eq .The parameters supported is name. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. (optional) - * @param count When set to true, the count of the collection is included as @recordSetCount in the response body. (optional) - * @param $top The number of items to include in the result. (optional) + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param $filter Filters the results by field name. Only the eq operator and the name field is supported. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/filtering-in-rest/). (optional) + * @param count When set to true, returns the total count of matching records included as @recordSetCount in the response body. (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 200 records. (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 The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) + * @param $orderBy The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) */ public class ListBatchSearchesRequest { @@ -897,7 +1501,7 @@ public class ListBatchSearchesRequest { private String xAvalaraClient; private String $filter; private Boolean count; - private BigDecimal $top; + private String $top; private String $skip; private String $orderBy; private String xCorrelationID; @@ -905,7 +1509,7 @@ public class ListBatchSearchesRequest { public ListBatchSearchesRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String getXAvalaraClient() { return xAvalaraClient; } public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } @@ -913,8 +1517,8 @@ public ListBatchSearchesRequest () { public void set$filter(String $filter) { this.$filter = $filter; } public Boolean getCount() { return count; } public void setCount(Boolean count) { this.count = count; } - public BigDecimal get$top() { return $top; } - public void set$top(BigDecimal $top) { this.$top = $top; } + public String get$top() { return $top; } + public void set$top(String $top) { this.$top = $top; } public String get$skip() { return $skip; } public void set$skip(String $skip) { this.$skip = $skip; } public String get$orderBy() { return $orderBy; } @@ -1052,9 +1656,9 @@ private okhttp3.Call searchParticipantsValidateBeforeCall(SearchParticipantsRequ /** * Returns a list of participants matching the input query. - * This endpoint provides a list of trading partners that match a specified input query. The search is performed based on various filters, search text, and other relevant parameters. + * This endpoint retrieves a list of trading partners that match the specified search criteria. It supports filtering, search text, and other relevant query parameters to narrow down the results. * @param requestOptions Object which represents the options available for a given API/request - * @return DirectorySearchResponse + * @return SearchParticipants200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1066,16 +1670,16 @@ private okhttp3.Call searchParticipantsValidateBeforeCall(SearchParticipantsRequ
500 Internal server error * X-Correlation-Id -
*/ - public DirectorySearchResponse searchParticipants(SearchParticipantsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = searchParticipantsWithHttpInfo(requestParameters); + public SearchParticipants200Response searchParticipants(SearchParticipantsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = searchParticipantsWithHttpInfo(requestParameters); return localVarResp.getData(); } /** * Returns a list of participants matching the input query. - * This endpoint provides a list of trading partners that match a specified input query. The search is performed based on various filters, search text, and other relevant parameters. + * This endpoint retrieves a list of trading partners that match the specified search criteria. It supports filtering, search text, and other relevant query parameters to narrow down the results. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<DirectorySearchResponse> + * @return ApiResponse<SearchParticipants200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1087,15 +1691,15 @@ public DirectorySearchResponse searchParticipants(SearchParticipantsRequest requ
500 Internal server error * X-Correlation-Id -
*/ - public ApiResponse searchParticipantsWithHttpInfo(SearchParticipantsRequest requestParameters) throws ApiException { + public ApiResponse searchParticipantsWithHttpInfo(SearchParticipantsRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = searchParticipantsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Returns a list of participants matching the input query. (asynchronously) - * This endpoint provides a list of trading partners that match a specified input query. The search is performed based on various filters, search text, and other relevant parameters. + * This endpoint retrieves a list of trading partners that match the specified search criteria. It supports filtering, search text, and other relevant query parameters to narrow down the results. * @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 @@ -1110,24 +1714,24 @@ public ApiResponse searchParticipantsWithHttpInfo(Searc 500 Internal server error * X-Correlation-Id -
*/ - public okhttp3.Call searchParticipantsAsync(SearchParticipantsRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call searchParticipantsAsync(SearchParticipantsRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = searchParticipantsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Represents the Request object for the SearchParticipants API * - * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used - * @param $search Search by value supports logical AND and OR. Refer to [https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search) for more information on search. Search will be done over name and identifier parameters only. - * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\" (optional) - * @param count When set to true, the count of the collection is included as @recordSetCount in the response body. (optional) - * @param $filter Filter by field name and value. This filter only supports eq .The parameters supported are network, country, documentType, idType. Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided parameters. (optional) - * @param $top The number of items to include in the result. (optional) + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param $search Search by value supports logical AND / OR operators. Search is performed only over the name and identifier value fields. For more information, refer to [Query options overview - OData.](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#search). + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param count When set to true, returns the total count of matching records included as @recordSetCount in the response body. (optional) + * @param $filter Filters the results using the eq operator. Supported fields: network, country, documentType, idType. For more information, refer to [AvaTax filtering guide](https://developer.avalara.com/avatax/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 200 records. (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 The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) + * @param $orderBy The $orderBy query parameter specifies the field and sorting direction for ordering the result set. The value is a string that combines a field name and a sorting direction (asc for ascending or desc for descending), separated by a space. (optional) * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) */ public class SearchParticipantsRequest { @@ -1136,7 +1740,7 @@ public class SearchParticipantsRequest { private String xAvalaraClient; private Boolean count; private String $filter; - private BigDecimal $top; + private String $top; private String $skip; private String $orderBy; private String xCorrelationID; @@ -1144,7 +1748,7 @@ public class SearchParticipantsRequest { public SearchParticipantsRequest () { } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } public String get$search() { return $search; } public void set$search(String $search) { this.$search = $search; } @@ -1154,8 +1758,8 @@ public SearchParticipantsRequest () { public void setCount(Boolean count) { this.count = count; } public String get$filter() { return $filter; } public void set$filter(String $filter) { this.$filter = $filter; } - public BigDecimal get$top() { return $top; } - public void set$top(BigDecimal $top) { this.$top = $top; } + public String get$top() { return $top; } + public void set$top(String $top) { this.$top = $top; } public String get$skip() { return $skip; } public void set$skip(String $skip) { this.$skip = $skip; } public String get$orderBy() { return $orderBy; } @@ -1172,9 +1776,224 @@ public SearchParticipantsRequest getSearchParticipantsRequest() { return this.new SearchParticipantsRequest(); } + /** + * Build call for updateTradingPartner + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 The trading partner has been successfully created. -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 NotFound * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call updateTradingPartnerCall(UpdateTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = requestParameters.getTradingPartner(); + + // create path and map variables + String localVarPath = "/einvoicing/trading-partners/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateTradingPartnerValidateBeforeCall(UpdateTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling updateTradingPartner(Async)"); + } + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling updateTradingPartner(Async)"); + } + + // verify the required parameter 'requestParameters.tradingPartner' is set + if (requestParameters.getTradingPartner() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.tradingPartner' when calling updateTradingPartner(Async)"); + } + + + okhttp3.Call localVarCall = updateTradingPartnerCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Updates a trading partner using ID. + * This endpoint updates the details of an existing trading partner specified by the provided ID. It performs a full update, and the request body must include all required fields. + * @param requestOptions Object which represents the options available for a given API/request + * @return UpdateTradingPartner200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 The trading partner has been successfully created. -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 NotFound * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public UpdateTradingPartner200Response updateTradingPartner(UpdateTradingPartnerRequest requestParameters) throws ApiException { + ApiResponse localVarResp = updateTradingPartnerWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Updates a trading partner using ID. + * This endpoint updates the details of an existing trading partner specified by the provided ID. It performs a full update, and the request body must include all required fields. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<UpdateTradingPartner200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 The trading partner has been successfully created. -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 NotFound * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public ApiResponse updateTradingPartnerWithHttpInfo(UpdateTradingPartnerRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = updateTradingPartnerValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Updates a trading partner using ID. (asynchronously) + * This endpoint updates the details of an existing trading partner specified by the provided ID. It performs a full update, and the request body must include all required fields. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Status Code Description Response Headers
200 The trading partner has been successfully created. -
400 Bad request * X-Correlation-Id -
401 Unauthorized * X-Correlation-Id -
403 Forbidden * X-Correlation-Id -
404 NotFound * X-Correlation-Id -
409 Conflict * X-Correlation-Id -
500 Internal server error * X-Correlation-Id -
+ */ + public okhttp3.Call updateTradingPartnerAsync(UpdateTradingPartnerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateTradingPartnerValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the UpdateTradingPartner API + * + * @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used. + * @param id The ID of the trading partner which is being updated. + * @param tradingPartner + * @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a \"Fingerprint\". (optional) + * @param xCorrelationID The caller can use this as an identifier to use as a correlation id to trace the call. (optional) + */ + public class UpdateTradingPartnerRequest { + private String avalaraVersion; + private String id; + private TradingPartner tradingPartner; + private String xAvalaraClient; + private String xCorrelationID; + + public UpdateTradingPartnerRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.4"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public TradingPartner getTradingPartner() { return tradingPartner; } + public void setTradingPartner(TradingPartner tradingPartner) { this.tradingPartner = tradingPartner; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + } + + /** + * Getter function to instantiate Request class + * @returns UpdateTradingPartnerRequest + */ + public UpdateTradingPartnerRequest getUpdateTradingPartnerRequest() { + return this.new UpdateTradingPartnerRequest(); + } + private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("25.7.2"); + this.localVarApiClient.setSdkVersion("25.8.0"); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java b/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java index 0f8bd65..e472b9c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.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/Attribute.java b/src/main/java/Avalara/SDK/model/A1099/V2/Attribute.java index 9522260..7f0117f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Attribute.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Attribute.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/AuthorizedApiRequestModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/AuthorizedApiRequestModel.java index 4f6a79b..9955c65 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/AuthorizedApiRequestModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/AuthorizedApiRequestModel.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/AuthorizedApiRequestV2DataModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/AuthorizedApiRequestV2DataModel.java index 7affe39..b81f35c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/AuthorizedApiRequestV2DataModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/AuthorizedApiRequestV2DataModel.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/BaseCompanyModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/BaseCompanyModel.java index 3268eed..f1c6e8d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/BaseCompanyModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BaseCompanyModel.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/BaseFormListRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/BaseFormListRequest.java index 329ee26..a5296db 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/BaseFormListRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BaseFormListRequest.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/BulkUpsert1099FormsRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java index bc88397..b661075 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BulkUpsert1099FormsRequest.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 @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Form1042SList; import Avalara.SDK.model.A1099.V2.Form1095BList; import Avalara.SDK.model.A1099.V2.Form1099DivList; import Avalara.SDK.model.A1099.V2.Form1099KList; @@ -84,6 +85,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { return null; // this class only serializes 'BulkUpsert1099FormsRequest' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterForm1042SList = gson.getDelegateAdapter(this, TypeToken.get(Form1042SList.class)); final TypeAdapter adapterForm1095BList = gson.getDelegateAdapter(this, TypeToken.get(Form1095BList.class)); final TypeAdapter adapterForm1099DivList = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivList.class)); final TypeAdapter adapterForm1099KList = gson.getDelegateAdapter(this, TypeToken.get(Form1099KList.class)); @@ -99,6 +101,12 @@ public void write(JsonWriter out, BulkUpsert1099FormsRequest value) throws IOExc return; } + // check if the actual instance is of the type `Form1042SList` + if (value.getActualInstance() instanceof Form1042SList) { + JsonElement element = adapterForm1042SList.toJsonTree((Form1042SList)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1095BList` if (value.getActualInstance() instanceof Form1095BList) { JsonElement element = adapterForm1095BList.toJsonTree((Form1095BList)value.getActualInstance()); @@ -135,7 +143,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: Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); } @Override @@ -147,6 +155,18 @@ public BulkUpsert1099FormsRequest read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; + // deserialize Form1042SList + try { + // validate the JSON object to see if any exception is thrown + Form1042SList.validateJsonElement(jsonElement); + actualAdapter = adapterForm1042SList; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1042SList'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1042SList failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1042SList'", e); + } // deserialize Form1095BList try { // validate the JSON object to see if any exception is thrown @@ -245,6 +265,7 @@ public BulkUpsert1099FormsRequest(Object o) { } static { + schemas.put("Form1042SList", Form1042SList.class); schemas.put("Form1095BList", Form1095BList.class); schemas.put("Form1099DivList", Form1099DivList.class); schemas.put("Form1099KList", Form1099KList.class); @@ -261,12 +282,17 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList + * Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList * * It could be an instance of the 'oneOf' schemas. */ @Override public void setActualInstance(Object instance) { + if (instance instanceof Form1042SList) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1095BList) { super.setActualInstance(instance); return; @@ -297,14 +323,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); + throw new RuntimeException("Invalid instance type. Must be Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList"); } /** * Get the actual instance, which can be the following: - * Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList + * Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList * - * @return The actual instance (Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList) + * @return The actual instance (Form1042SList, Form1095BList, Form1099DivList, Form1099KList, Form1099MiscList, Form1099NecList, Form1099RList) */ @SuppressWarnings("unchecked") @Override @@ -312,6 +338,16 @@ public Object getActualInstance() { return super.getActualInstance(); } + /** + * Get the actual instance of `Form1042SList`. If the actual instance is not `Form1042SList`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1042SList` + * @throws ClassCastException if the instance is not `Form1042SList` + */ + public Form1042SList getForm1042SList() throws ClassCastException { + return (Form1042SList)super.getActualInstance(); + } /** * Get the actual instance of `Form1095BList`. If the actual instance is not `Form1095BList`, * the ClassCastException will be thrown. @@ -383,6 +419,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); + // validate the json string with Form1042SList + try { + Form1042SList.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1042SList failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1095BList try { Form1095BList.validateJsonElement(jsonElement); @@ -432,7 +476,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: Form1095BList, 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, 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())); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java index bdbcbf3..2f28f64 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyCreateUpdateRequestModel.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/CompanyModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyModel.java index 67cc068..02dded8 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyModel.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/CompanyResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java index d93e91c..fe54e4e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.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/CompanyResponseModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponseModel.java index a064929..b03cd41 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponseModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponseModel.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/CoveredIndividualReferenceResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReferenceResponse.java new file mode 100644 index 0000000..a6caef1 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualReferenceResponse.java @@ -0,0 +1,734 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * CoveredIndividualReferenceResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class CoveredIndividualReferenceResponse { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; + @SerializedName(SERIALIZED_NAME_FIRST_NAME) + private String firstName; + + public static final String SERIALIZED_NAME_MIDDLE_NAME = "middleName"; + @SerializedName(SERIALIZED_NAME_MIDDLE_NAME) + private String middleName; + + public static final String SERIALIZED_NAME_LAST_NAME = "lastName"; + @SerializedName(SERIALIZED_NAME_LAST_NAME) + private String lastName; + + public static final String SERIALIZED_NAME_NAME_SUFFIX = "nameSuffix"; + @SerializedName(SERIALIZED_NAME_NAME_SUFFIX) + private String nameSuffix; + + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_BIRTH_DATE = "birthDate"; + @SerializedName(SERIALIZED_NAME_BIRTH_DATE) + private OffsetDateTime birthDate; + + public static final String SERIALIZED_NAME_COVERED_MONTH0 = "coveredMonth0"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH0) + private Boolean coveredMonth0; + + public static final String SERIALIZED_NAME_COVERED_MONTH1 = "coveredMonth1"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH1) + private Boolean coveredMonth1; + + public static final String SERIALIZED_NAME_COVERED_MONTH2 = "coveredMonth2"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH2) + private Boolean coveredMonth2; + + public static final String SERIALIZED_NAME_COVERED_MONTH3 = "coveredMonth3"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH3) + private Boolean coveredMonth3; + + public static final String SERIALIZED_NAME_COVERED_MONTH4 = "coveredMonth4"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH4) + private Boolean coveredMonth4; + + public static final String SERIALIZED_NAME_COVERED_MONTH5 = "coveredMonth5"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH5) + private Boolean coveredMonth5; + + public static final String SERIALIZED_NAME_COVERED_MONTH6 = "coveredMonth6"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH6) + private Boolean coveredMonth6; + + public static final String SERIALIZED_NAME_COVERED_MONTH7 = "coveredMonth7"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH7) + private Boolean coveredMonth7; + + public static final String SERIALIZED_NAME_COVERED_MONTH8 = "coveredMonth8"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH8) + private Boolean coveredMonth8; + + public static final String SERIALIZED_NAME_COVERED_MONTH9 = "coveredMonth9"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH9) + private Boolean coveredMonth9; + + public static final String SERIALIZED_NAME_COVERED_MONTH10 = "coveredMonth10"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH10) + private Boolean coveredMonth10; + + public static final String SERIALIZED_NAME_COVERED_MONTH11 = "coveredMonth11"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH11) + private Boolean coveredMonth11; + + public static final String SERIALIZED_NAME_COVERED_MONTH12 = "coveredMonth12"; + @SerializedName(SERIALIZED_NAME_COVERED_MONTH12) + private Boolean coveredMonth12; + + public CoveredIndividualReferenceResponse() { + } + + public CoveredIndividualReferenceResponse id(String id) { + this.id = id; + return this; + } + + /** + * Covered individual ID + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public CoveredIndividualReferenceResponse firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Covered individual's first name + * @return firstName + */ + @javax.annotation.Nullable + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + public CoveredIndividualReferenceResponse middleName(String middleName) { + this.middleName = middleName; + return this; + } + + /** + * Covered individual's middle name + * @return middleName + */ + @javax.annotation.Nullable + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + + public CoveredIndividualReferenceResponse lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Covered individual's last name + * @return lastName + */ + @javax.annotation.Nullable + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + + public CoveredIndividualReferenceResponse nameSuffix(String nameSuffix) { + this.nameSuffix = nameSuffix; + return this; + } + + /** + * Covered individual's name suffix + * @return nameSuffix + */ + @javax.annotation.Nullable + public String getNameSuffix() { + return nameSuffix; + } + + public void setNameSuffix(String nameSuffix) { + this.nameSuffix = nameSuffix; + } + + + public CoveredIndividualReferenceResponse tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Covered individual's TIN (SSN or ITIN) + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public CoveredIndividualReferenceResponse birthDate(OffsetDateTime birthDate) { + this.birthDate = birthDate; + return this; + } + + /** + * Covered individual's date of birth + * @return birthDate + */ + @javax.annotation.Nullable + public OffsetDateTime getBirthDate() { + return birthDate; + } + + public void setBirthDate(OffsetDateTime birthDate) { + this.birthDate = birthDate; + } + + + public CoveredIndividualReferenceResponse coveredMonth0(Boolean coveredMonth0) { + this.coveredMonth0 = coveredMonth0; + return this; + } + + /** + * Coverage indicator for all 12 months + * @return coveredMonth0 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth0() { + return coveredMonth0; + } + + public void setCoveredMonth0(Boolean coveredMonth0) { + this.coveredMonth0 = coveredMonth0; + } + + + public CoveredIndividualReferenceResponse coveredMonth1(Boolean coveredMonth1) { + this.coveredMonth1 = coveredMonth1; + return this; + } + + /** + * Coverage indicator for January + * @return coveredMonth1 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth1() { + return coveredMonth1; + } + + public void setCoveredMonth1(Boolean coveredMonth1) { + this.coveredMonth1 = coveredMonth1; + } + + + public CoveredIndividualReferenceResponse coveredMonth2(Boolean coveredMonth2) { + this.coveredMonth2 = coveredMonth2; + return this; + } + + /** + * Coverage indicator for February + * @return coveredMonth2 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth2() { + return coveredMonth2; + } + + public void setCoveredMonth2(Boolean coveredMonth2) { + this.coveredMonth2 = coveredMonth2; + } + + + public CoveredIndividualReferenceResponse coveredMonth3(Boolean coveredMonth3) { + this.coveredMonth3 = coveredMonth3; + return this; + } + + /** + * Coverage indicator for March + * @return coveredMonth3 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth3() { + return coveredMonth3; + } + + public void setCoveredMonth3(Boolean coveredMonth3) { + this.coveredMonth3 = coveredMonth3; + } + + + public CoveredIndividualReferenceResponse coveredMonth4(Boolean coveredMonth4) { + this.coveredMonth4 = coveredMonth4; + return this; + } + + /** + * Coverage indicator for April + * @return coveredMonth4 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth4() { + return coveredMonth4; + } + + public void setCoveredMonth4(Boolean coveredMonth4) { + this.coveredMonth4 = coveredMonth4; + } + + + public CoveredIndividualReferenceResponse coveredMonth5(Boolean coveredMonth5) { + this.coveredMonth5 = coveredMonth5; + return this; + } + + /** + * Coverage indicator for May + * @return coveredMonth5 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth5() { + return coveredMonth5; + } + + public void setCoveredMonth5(Boolean coveredMonth5) { + this.coveredMonth5 = coveredMonth5; + } + + + public CoveredIndividualReferenceResponse coveredMonth6(Boolean coveredMonth6) { + this.coveredMonth6 = coveredMonth6; + return this; + } + + /** + * Coverage indicator for June + * @return coveredMonth6 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth6() { + return coveredMonth6; + } + + public void setCoveredMonth6(Boolean coveredMonth6) { + this.coveredMonth6 = coveredMonth6; + } + + + public CoveredIndividualReferenceResponse coveredMonth7(Boolean coveredMonth7) { + this.coveredMonth7 = coveredMonth7; + return this; + } + + /** + * Coverage indicator for July + * @return coveredMonth7 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth7() { + return coveredMonth7; + } + + public void setCoveredMonth7(Boolean coveredMonth7) { + this.coveredMonth7 = coveredMonth7; + } + + + public CoveredIndividualReferenceResponse coveredMonth8(Boolean coveredMonth8) { + this.coveredMonth8 = coveredMonth8; + return this; + } + + /** + * Coverage indicator for August + * @return coveredMonth8 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth8() { + return coveredMonth8; + } + + public void setCoveredMonth8(Boolean coveredMonth8) { + this.coveredMonth8 = coveredMonth8; + } + + + public CoveredIndividualReferenceResponse coveredMonth9(Boolean coveredMonth9) { + this.coveredMonth9 = coveredMonth9; + return this; + } + + /** + * Coverage indicator for September + * @return coveredMonth9 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth9() { + return coveredMonth9; + } + + public void setCoveredMonth9(Boolean coveredMonth9) { + this.coveredMonth9 = coveredMonth9; + } + + + public CoveredIndividualReferenceResponse coveredMonth10(Boolean coveredMonth10) { + this.coveredMonth10 = coveredMonth10; + return this; + } + + /** + * Coverage indicator for October + * @return coveredMonth10 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth10() { + return coveredMonth10; + } + + public void setCoveredMonth10(Boolean coveredMonth10) { + this.coveredMonth10 = coveredMonth10; + } + + + public CoveredIndividualReferenceResponse coveredMonth11(Boolean coveredMonth11) { + this.coveredMonth11 = coveredMonth11; + return this; + } + + /** + * Coverage indicator for November + * @return coveredMonth11 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth11() { + return coveredMonth11; + } + + public void setCoveredMonth11(Boolean coveredMonth11) { + this.coveredMonth11 = coveredMonth11; + } + + + public CoveredIndividualReferenceResponse coveredMonth12(Boolean coveredMonth12) { + this.coveredMonth12 = coveredMonth12; + return this; + } + + /** + * Coverage indicator for December + * @return coveredMonth12 + */ + @javax.annotation.Nullable + public Boolean getCoveredMonth12() { + return coveredMonth12; + } + + public void setCoveredMonth12(Boolean coveredMonth12) { + this.coveredMonth12 = coveredMonth12; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CoveredIndividualReferenceResponse coveredIndividualReferenceResponse = (CoveredIndividualReferenceResponse) o; + return Objects.equals(this.id, coveredIndividualReferenceResponse.id) && + Objects.equals(this.firstName, coveredIndividualReferenceResponse.firstName) && + Objects.equals(this.middleName, coveredIndividualReferenceResponse.middleName) && + Objects.equals(this.lastName, coveredIndividualReferenceResponse.lastName) && + Objects.equals(this.nameSuffix, coveredIndividualReferenceResponse.nameSuffix) && + Objects.equals(this.tin, coveredIndividualReferenceResponse.tin) && + Objects.equals(this.birthDate, coveredIndividualReferenceResponse.birthDate) && + Objects.equals(this.coveredMonth0, coveredIndividualReferenceResponse.coveredMonth0) && + Objects.equals(this.coveredMonth1, coveredIndividualReferenceResponse.coveredMonth1) && + Objects.equals(this.coveredMonth2, coveredIndividualReferenceResponse.coveredMonth2) && + Objects.equals(this.coveredMonth3, coveredIndividualReferenceResponse.coveredMonth3) && + Objects.equals(this.coveredMonth4, coveredIndividualReferenceResponse.coveredMonth4) && + Objects.equals(this.coveredMonth5, coveredIndividualReferenceResponse.coveredMonth5) && + Objects.equals(this.coveredMonth6, coveredIndividualReferenceResponse.coveredMonth6) && + Objects.equals(this.coveredMonth7, coveredIndividualReferenceResponse.coveredMonth7) && + Objects.equals(this.coveredMonth8, coveredIndividualReferenceResponse.coveredMonth8) && + Objects.equals(this.coveredMonth9, coveredIndividualReferenceResponse.coveredMonth9) && + Objects.equals(this.coveredMonth10, coveredIndividualReferenceResponse.coveredMonth10) && + Objects.equals(this.coveredMonth11, coveredIndividualReferenceResponse.coveredMonth11) && + Objects.equals(this.coveredMonth12, coveredIndividualReferenceResponse.coveredMonth12); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(id, firstName, middleName, lastName, nameSuffix, tin, birthDate, coveredMonth0, coveredMonth1, coveredMonth2, coveredMonth3, coveredMonth4, coveredMonth5, coveredMonth6, coveredMonth7, coveredMonth8, coveredMonth9, coveredMonth10, coveredMonth11, coveredMonth12); + } + + 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 CoveredIndividualReferenceResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" middleName: ").append(toIndentedString(middleName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" nameSuffix: ").append(toIndentedString(nameSuffix)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" birthDate: ").append(toIndentedString(birthDate)).append("\n"); + sb.append(" coveredMonth0: ").append(toIndentedString(coveredMonth0)).append("\n"); + sb.append(" coveredMonth1: ").append(toIndentedString(coveredMonth1)).append("\n"); + sb.append(" coveredMonth2: ").append(toIndentedString(coveredMonth2)).append("\n"); + sb.append(" coveredMonth3: ").append(toIndentedString(coveredMonth3)).append("\n"); + sb.append(" coveredMonth4: ").append(toIndentedString(coveredMonth4)).append("\n"); + sb.append(" coveredMonth5: ").append(toIndentedString(coveredMonth5)).append("\n"); + sb.append(" coveredMonth6: ").append(toIndentedString(coveredMonth6)).append("\n"); + sb.append(" coveredMonth7: ").append(toIndentedString(coveredMonth7)).append("\n"); + sb.append(" coveredMonth8: ").append(toIndentedString(coveredMonth8)).append("\n"); + sb.append(" coveredMonth9: ").append(toIndentedString(coveredMonth9)).append("\n"); + sb.append(" coveredMonth10: ").append(toIndentedString(coveredMonth10)).append("\n"); + sb.append(" coveredMonth11: ").append(toIndentedString(coveredMonth11)).append("\n"); + sb.append(" coveredMonth12: ").append(toIndentedString(coveredMonth12)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("nameSuffix"); + openapiFields.add("tin"); + openapiFields.add("birthDate"); + openapiFields.add("coveredMonth0"); + openapiFields.add("coveredMonth1"); + openapiFields.add("coveredMonth2"); + openapiFields.add("coveredMonth3"); + openapiFields.add("coveredMonth4"); + openapiFields.add("coveredMonth5"); + openapiFields.add("coveredMonth6"); + openapiFields.add("coveredMonth7"); + openapiFields.add("coveredMonth8"); + openapiFields.add("coveredMonth9"); + openapiFields.add("coveredMonth10"); + openapiFields.add("coveredMonth11"); + openapiFields.add("coveredMonth12"); + + // 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 CoveredIndividualReferenceResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CoveredIndividualReferenceResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CoveredIndividualReferenceResponse is not found in the empty JSON string", CoveredIndividualReferenceResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CoveredIndividualReferenceResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CoveredIndividualReferenceResponse` 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("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + } + if ((jsonObj.get("middleName") != null && !jsonObj.get("middleName").isJsonNull()) && !jsonObj.get("middleName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `middleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("middleName").toString())); + } + if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + } + if ((jsonObj.get("nameSuffix") != null && !jsonObj.get("nameSuffix").isJsonNull()) && !jsonObj.get("nameSuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nameSuffix").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CoveredIndividualReferenceResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CoveredIndividualReferenceResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CoveredIndividualReferenceResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CoveredIndividualReferenceResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CoveredIndividualReferenceResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CoveredIndividualReferenceResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CoveredIndividualReferenceResponse + * @throws IOException if the JSON string is invalid with respect to CoveredIndividualReferenceResponse + */ + public static CoveredIndividualReferenceResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CoveredIndividualReferenceResponse.class); + } + + /** + * Convert an instance of CoveredIndividualReferenceResponse 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/CoveredIndividualRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualRequest.java index 112cead..0c1a57b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividualRequest.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 @@ -144,7 +144,7 @@ public CoveredIndividualRequest firstName(String firstName) { } /** - * Get firstName + * Covered individual's first name * @return firstName */ @javax.annotation.Nullable @@ -163,7 +163,7 @@ public CoveredIndividualRequest middleName(String middleName) { } /** - * Get middleName + * Covered individual's middle name * @return middleName */ @javax.annotation.Nullable @@ -182,7 +182,7 @@ public CoveredIndividualRequest lastName(String lastName) { } /** - * Get lastName + * Covered individual's last name * @return lastName */ @javax.annotation.Nullable @@ -201,7 +201,7 @@ public CoveredIndividualRequest nameSuffix(String nameSuffix) { } /** - * Get nameSuffix + * Covered individual's name suffix * @return nameSuffix */ @javax.annotation.Nullable @@ -220,7 +220,7 @@ public CoveredIndividualRequest tin(String tin) { } /** - * Get tin + * Covered individual's TIN (SSN or ITIN) * @return tin */ @javax.annotation.Nullable @@ -239,7 +239,7 @@ public CoveredIndividualRequest birthDate(OffsetDateTime birthDate) { } /** - * Get birthDate + * Covered individual's date of birth * @return birthDate */ @javax.annotation.Nullable @@ -258,7 +258,7 @@ public CoveredIndividualRequest coveredMonthIndicator0(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator0 + * Coverage indicator for all 12 months * @return coveredMonthIndicator0 */ @javax.annotation.Nullable @@ -277,7 +277,7 @@ public CoveredIndividualRequest coveredMonthIndicator1(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator1 + * Coverage indicator for January * @return coveredMonthIndicator1 */ @javax.annotation.Nullable @@ -296,7 +296,7 @@ public CoveredIndividualRequest coveredMonthIndicator2(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator2 + * Coverage indicator for February * @return coveredMonthIndicator2 */ @javax.annotation.Nullable @@ -315,7 +315,7 @@ public CoveredIndividualRequest coveredMonthIndicator3(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator3 + * Coverage indicator for March * @return coveredMonthIndicator3 */ @javax.annotation.Nullable @@ -334,7 +334,7 @@ public CoveredIndividualRequest coveredMonthIndicator4(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator4 + * Coverage indicator for April * @return coveredMonthIndicator4 */ @javax.annotation.Nullable @@ -353,7 +353,7 @@ public CoveredIndividualRequest coveredMonthIndicator5(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator5 + * Coverage indicator for May * @return coveredMonthIndicator5 */ @javax.annotation.Nullable @@ -372,7 +372,7 @@ public CoveredIndividualRequest coveredMonthIndicator6(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator6 + * Coverage indicator for June * @return coveredMonthIndicator6 */ @javax.annotation.Nullable @@ -391,7 +391,7 @@ public CoveredIndividualRequest coveredMonthIndicator7(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator7 + * Coverage indicator for July * @return coveredMonthIndicator7 */ @javax.annotation.Nullable @@ -410,7 +410,7 @@ public CoveredIndividualRequest coveredMonthIndicator8(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator8 + * Coverage indicator for August * @return coveredMonthIndicator8 */ @javax.annotation.Nullable @@ -429,7 +429,7 @@ public CoveredIndividualRequest coveredMonthIndicator9(Boolean coveredMonthIndic } /** - * Get coveredMonthIndicator9 + * Coverage indicator for September * @return coveredMonthIndicator9 */ @javax.annotation.Nullable @@ -448,7 +448,7 @@ public CoveredIndividualRequest coveredMonthIndicator10(Boolean coveredMonthIndi } /** - * Get coveredMonthIndicator10 + * Coverage indicator for October * @return coveredMonthIndicator10 */ @javax.annotation.Nullable @@ -467,7 +467,7 @@ public CoveredIndividualRequest coveredMonthIndicator11(Boolean coveredMonthIndi } /** - * Get coveredMonthIndicator11 + * Coverage indicator for November * @return coveredMonthIndicator11 */ @javax.annotation.Nullable @@ -486,7 +486,7 @@ public CoveredIndividualRequest coveredMonthIndicator12(Boolean coveredMonthIndi } /** - * Get coveredMonthIndicator12 + * Coverage indicator for December * @return coveredMonthIndicator12 */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java new file mode 100644 index 0000000..a1b1d9e --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Create1099Form201Response.java @@ -0,0 +1,511 @@ +/* + * 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.CoveredIndividualReferenceResponse; +import Avalara.SDK.model.A1099.V2.Form1042SListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; +import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099RListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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 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 Create1099Form201Response extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Create1099Form201Response.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Create1099Form201Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Create1099Form201Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterForm1099BaseResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099BaseResponse.class)); + final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); + final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.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)); + final TypeAdapter adapterForm1099RListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Create1099Form201Response value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Form1099BaseResponse` + if (value.getActualInstance() instanceof Form1099BaseResponse) { + JsonElement element = adapterForm1099BaseResponse.toJsonTree((Form1099BaseResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1042SListItemResponse` + if (value.getActualInstance() instanceof Form1042SListItemResponse) { + JsonElement element = adapterForm1042SListItemResponse.toJsonTree((Form1042SListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1095BListItemResponse` + if (value.getActualInstance() instanceof Form1095BListItemResponse) { + JsonElement element = adapterForm1095BListItemResponse.toJsonTree((Form1095BListItemResponse)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()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099MiscListItemResponse` + if (value.getActualInstance() instanceof Form1099MiscListItemResponse) { + JsonElement element = adapterForm1099MiscListItemResponse.toJsonTree((Form1099MiscListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099NecListItemResponse` + if (value.getActualInstance() instanceof Form1099NecListItemResponse) { + JsonElement element = adapterForm1099NecListItemResponse.toJsonTree((Form1099NecListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099RListItemResponse` + if (value.getActualInstance() instanceof Form1099RListItemResponse) { + JsonElement element = adapterForm1099RListItemResponse.toJsonTree((Form1099RListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + } + + @Override + public Create1099Form201Response read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Form1099BaseResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099BaseResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099BaseResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099BaseResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099BaseResponse'", e); + } + // deserialize Form1042SListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1042SListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1042SListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1042SListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1042SListItemResponse'", e); + } + // deserialize Form1095BListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1095BListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1095BListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1095BListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1095BListItemResponse'", e); + } + // deserialize Form1099KListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099KListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099KListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099KListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099KListItemResponse'", e); + } + // deserialize Form1099MiscListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099MiscListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099MiscListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099MiscListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099MiscListItemResponse'", e); + } + // deserialize Form1099NecListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099NecListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099NecListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099NecListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099NecListItemResponse'", e); + } + // deserialize Form1099RListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099RListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099RListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099RListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099RListItemResponse'", e); + } + + if (match == 1) { + Create1099Form201Response ret = new Create1099Form201Response(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for Create1099Form201Response: %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 Create1099Form201Response() { + super("oneOf", Boolean.FALSE); + } + + public Create1099Form201Response(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Form1099BaseResponse", Form1099BaseResponse.class); + schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); + schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); + schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); + schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); + schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); + schemas.put("Form1099RListItemResponse", Form1099RListItemResponse.class); + } + + @Override + public Map> getSchemas() { + return Create1099Form201Response.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Form1099BaseResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1042SListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1095BListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099KListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099MiscListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099NecListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099RListItemResponse) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + } + + /** + * Get the actual instance, which can be the following: + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * + * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Form1099BaseResponse`. If the actual instance is not `Form1099BaseResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099BaseResponse` + * @throws ClassCastException if the instance is not `Form1099BaseResponse` + */ + public Form1099BaseResponse getForm1099BaseResponse() throws ClassCastException { + return (Form1099BaseResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1042SListItemResponse`. If the actual instance is not `Form1042SListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1042SListItemResponse` + * @throws ClassCastException if the instance is not `Form1042SListItemResponse` + */ + public Form1042SListItemResponse getForm1042SListItemResponse() throws ClassCastException { + return (Form1042SListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1095BListItemResponse`. If the actual instance is not `Form1095BListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1095BListItemResponse` + * @throws ClassCastException if the instance is not `Form1095BListItemResponse` + */ + public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCastException { + return (Form1095BListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099KListItemResponse` + * @throws ClassCastException if the instance is not `Form1099KListItemResponse` + */ + public Form1099KListItemResponse getForm1099KListItemResponse() throws ClassCastException { + return (Form1099KListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099MiscListItemResponse`. If the actual instance is not `Form1099MiscListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099MiscListItemResponse` + * @throws ClassCastException if the instance is not `Form1099MiscListItemResponse` + */ + public Form1099MiscListItemResponse getForm1099MiscListItemResponse() throws ClassCastException { + return (Form1099MiscListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099NecListItemResponse`. If the actual instance is not `Form1099NecListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099NecListItemResponse` + * @throws ClassCastException if the instance is not `Form1099NecListItemResponse` + */ + public Form1099NecListItemResponse getForm1099NecListItemResponse() throws ClassCastException { + return (Form1099NecListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099RListItemResponse`. If the actual instance is not `Form1099RListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099RListItemResponse` + * @throws ClassCastException if the instance is not `Form1099RListItemResponse` + */ + public Form1099RListItemResponse getForm1099RListItemResponse() throws ClassCastException { + return (Form1099RListItemResponse)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 Create1099Form201Response + */ + 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 Form1099BaseResponse + try { + Form1099BaseResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1042SListItemResponse + try { + Form1042SListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1095BListItemResponse + try { + Form1095BListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099KListItemResponse + try { + Form1099KListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099MiscListItemResponse + try { + Form1099MiscListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099NecListItemResponse + try { + Form1099NecListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099RListItemResponse + try { + Form1099RListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); + // 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, 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())); + } + } + + /** + * Create an instance of Create1099Form201Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of Create1099Form201Response + * @throws IOException if the JSON string is invalid with respect to Create1099Form201Response + */ + public static Create1099Form201Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Create1099Form201Response.class); + } + + /** + * Convert an instance of Create1099Form201Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java new file mode 100644 index 0000000..302b835 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java @@ -0,0 +1,418 @@ +/* + * 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.SubstantialUsOwnerResponse; +import Avalara.SDK.model.A1099.V2.W4FormResponse; +import Avalara.SDK.model.A1099.V2.W8BenEFormResponse; +import Avalara.SDK.model.A1099.V2.W8BenFormResponse; +import Avalara.SDK.model.A1099.V2.W8ImyFormResponse; +import Avalara.SDK.model.A1099.V2.W9FormResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.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 CreateW9Form201Response extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateW9Form201Response.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateW9Form201Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateW9Form201Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterW4FormResponse = gson.getDelegateAdapter(this, TypeToken.get(W4FormResponse.class)); + final TypeAdapter adapterW8BenEFormResponse = gson.getDelegateAdapter(this, TypeToken.get(W8BenEFormResponse.class)); + final TypeAdapter adapterW8BenFormResponse = gson.getDelegateAdapter(this, TypeToken.get(W8BenFormResponse.class)); + final TypeAdapter adapterW8ImyFormResponse = gson.getDelegateAdapter(this, TypeToken.get(W8ImyFormResponse.class)); + final TypeAdapter adapterW9FormResponse = gson.getDelegateAdapter(this, TypeToken.get(W9FormResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateW9Form201Response value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `W4FormResponse` + if (value.getActualInstance() instanceof W4FormResponse) { + JsonElement element = adapterW4FormResponse.toJsonTree((W4FormResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8BenEFormResponse` + if (value.getActualInstance() instanceof W8BenEFormResponse) { + JsonElement element = adapterW8BenEFormResponse.toJsonTree((W8BenEFormResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8BenFormResponse` + if (value.getActualInstance() instanceof W8BenFormResponse) { + JsonElement element = adapterW8BenFormResponse.toJsonTree((W8BenFormResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8ImyFormResponse` + if (value.getActualInstance() instanceof W8ImyFormResponse) { + JsonElement element = adapterW8ImyFormResponse.toJsonTree((W8ImyFormResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W9FormResponse` + if (value.getActualInstance() instanceof W9FormResponse) { + JsonElement element = adapterW9FormResponse.toJsonTree((W9FormResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse"); + } + + @Override + public CreateW9Form201Response read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize W4FormResponse + try { + // validate the JSON object to see if any exception is thrown + W4FormResponse.validateJsonElement(jsonElement); + actualAdapter = adapterW4FormResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'W4FormResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W4FormResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W4FormResponse'", e); + } + // deserialize W8BenEFormResponse + try { + // validate the JSON object to see if any exception is thrown + W8BenEFormResponse.validateJsonElement(jsonElement); + actualAdapter = adapterW8BenEFormResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'W8BenEFormResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8BenEFormResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8BenEFormResponse'", e); + } + // deserialize W8BenFormResponse + try { + // validate the JSON object to see if any exception is thrown + W8BenFormResponse.validateJsonElement(jsonElement); + actualAdapter = adapterW8BenFormResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'W8BenFormResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8BenFormResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8BenFormResponse'", e); + } + // deserialize W8ImyFormResponse + try { + // validate the JSON object to see if any exception is thrown + W8ImyFormResponse.validateJsonElement(jsonElement); + actualAdapter = adapterW8ImyFormResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'W8ImyFormResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8ImyFormResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8ImyFormResponse'", e); + } + // deserialize W9FormResponse + try { + // validate the JSON object to see if any exception is thrown + W9FormResponse.validateJsonElement(jsonElement); + actualAdapter = adapterW9FormResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'W9FormResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W9FormResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W9FormResponse'", e); + } + + if (match == 1) { + CreateW9Form201Response ret = new CreateW9Form201Response(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for CreateW9Form201Response: %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 CreateW9Form201Response() { + super("oneOf", Boolean.FALSE); + } + + public CreateW9Form201Response(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("W4FormResponse", W4FormResponse.class); + schemas.put("W8BenEFormResponse", W8BenEFormResponse.class); + schemas.put("W8BenFormResponse", W8BenFormResponse.class); + schemas.put("W8ImyFormResponse", W8ImyFormResponse.class); + schemas.put("W9FormResponse", W9FormResponse.class); + } + + @Override + public Map> getSchemas() { + return CreateW9Form201Response.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof W4FormResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8BenEFormResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8BenFormResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8ImyFormResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W9FormResponse) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse"); + } + + /** + * Get the actual instance, which can be the following: + * W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse + * + * @return The actual instance (W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `W4FormResponse`. If the actual instance is not `W4FormResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W4FormResponse` + * @throws ClassCastException if the instance is not `W4FormResponse` + */ + public W4FormResponse getW4FormResponse() throws ClassCastException { + return (W4FormResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `W8BenEFormResponse`. If the actual instance is not `W8BenEFormResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8BenEFormResponse` + * @throws ClassCastException if the instance is not `W8BenEFormResponse` + */ + public W8BenEFormResponse getW8BenEFormResponse() throws ClassCastException { + return (W8BenEFormResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `W8BenFormResponse`. If the actual instance is not `W8BenFormResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8BenFormResponse` + * @throws ClassCastException if the instance is not `W8BenFormResponse` + */ + public W8BenFormResponse getW8BenFormResponse() throws ClassCastException { + return (W8BenFormResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `W8ImyFormResponse`. If the actual instance is not `W8ImyFormResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8ImyFormResponse` + * @throws ClassCastException if the instance is not `W8ImyFormResponse` + */ + public W8ImyFormResponse getW8ImyFormResponse() throws ClassCastException { + return (W8ImyFormResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `W9FormResponse`. If the actual instance is not `W9FormResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W9FormResponse` + * @throws ClassCastException if the instance is not `W9FormResponse` + */ + public W9FormResponse getW9FormResponse() throws ClassCastException { + return (W9FormResponse)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 CreateW9Form201Response + */ + 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 W4FormResponse + try { + W4FormResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W4FormResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8BenEFormResponse + try { + W8BenEFormResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8BenEFormResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8BenFormResponse + try { + W8BenFormResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8BenFormResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8ImyFormResponse + try { + W8ImyFormResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8ImyFormResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W9FormResponse + try { + W9FormResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W9FormResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for CreateW9Form201Response with oneOf schemas: W4FormResponse, W8BenEFormResponse, W8BenFormResponse, W8ImyFormResponse, W9FormResponse. %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 CreateW9Form201Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateW9Form201Response + * @throws IOException if the JSON string is invalid with respect to CreateW9Form201Response + */ + public static CreateW9Form201Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateW9Form201Response.class); + } + + /** + * Convert an instance of CreateW9Form201Response 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/CreateW9FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java new file mode 100644 index 0000000..ad257a5 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java @@ -0,0 +1,418 @@ +/* + * 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.SubstantialUsOwnerRequest; +import Avalara.SDK.model.A1099.V2.W4FormRequest; +import Avalara.SDK.model.A1099.V2.W8BenEFormRequest; +import Avalara.SDK.model.A1099.V2.W8BenFormRequest; +import Avalara.SDK.model.A1099.V2.W8ImyFormRequest; +import Avalara.SDK.model.A1099.V2.W9FormRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.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 CreateW9FormRequest extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateW9FormRequest.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateW9FormRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateW9FormRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterW9FormRequest = gson.getDelegateAdapter(this, TypeToken.get(W9FormRequest.class)); + final TypeAdapter adapterW8ImyFormRequest = gson.getDelegateAdapter(this, TypeToken.get(W8ImyFormRequest.class)); + final TypeAdapter adapterW8BenEFormRequest = gson.getDelegateAdapter(this, TypeToken.get(W8BenEFormRequest.class)); + final TypeAdapter adapterW8BenFormRequest = gson.getDelegateAdapter(this, TypeToken.get(W8BenFormRequest.class)); + final TypeAdapter adapterW4FormRequest = gson.getDelegateAdapter(this, TypeToken.get(W4FormRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateW9FormRequest value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `W9FormRequest` + if (value.getActualInstance() instanceof W9FormRequest) { + JsonElement element = adapterW9FormRequest.toJsonTree((W9FormRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8ImyFormRequest` + if (value.getActualInstance() instanceof W8ImyFormRequest) { + JsonElement element = adapterW8ImyFormRequest.toJsonTree((W8ImyFormRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8BenEFormRequest` + if (value.getActualInstance() instanceof W8BenEFormRequest) { + JsonElement element = adapterW8BenEFormRequest.toJsonTree((W8BenEFormRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W8BenFormRequest` + if (value.getActualInstance() instanceof W8BenFormRequest) { + JsonElement element = adapterW8BenFormRequest.toJsonTree((W8BenFormRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `W4FormRequest` + if (value.getActualInstance() instanceof W4FormRequest) { + JsonElement element = adapterW4FormRequest.toJsonTree((W4FormRequest)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest"); + } + + @Override + public CreateW9FormRequest read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize W9FormRequest + try { + // validate the JSON object to see if any exception is thrown + W9FormRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW9FormRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W9FormRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W9FormRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W9FormRequest'", e); + } + // deserialize W8ImyFormRequest + try { + // validate the JSON object to see if any exception is thrown + W8ImyFormRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW8ImyFormRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W8ImyFormRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8ImyFormRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8ImyFormRequest'", e); + } + // deserialize W8BenEFormRequest + try { + // validate the JSON object to see if any exception is thrown + W8BenEFormRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW8BenEFormRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W8BenEFormRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8BenEFormRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8BenEFormRequest'", e); + } + // deserialize W8BenFormRequest + try { + // validate the JSON object to see if any exception is thrown + W8BenFormRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW8BenFormRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W8BenFormRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W8BenFormRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W8BenFormRequest'", e); + } + // deserialize W4FormRequest + try { + // validate the JSON object to see if any exception is thrown + W4FormRequest.validateJsonElement(jsonElement); + actualAdapter = adapterW4FormRequest; + match++; + log.log(Level.FINER, "Input data matches schema 'W4FormRequest'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for W4FormRequest failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'W4FormRequest'", e); + } + + if (match == 1) { + CreateW9FormRequest ret = new CreateW9FormRequest(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for CreateW9FormRequest: %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 CreateW9FormRequest() { + super("oneOf", Boolean.FALSE); + } + + public CreateW9FormRequest(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("W9FormRequest", W9FormRequest.class); + schemas.put("W8ImyFormRequest", W8ImyFormRequest.class); + schemas.put("W8BenEFormRequest", W8BenEFormRequest.class); + schemas.put("W8BenFormRequest", W8BenFormRequest.class); + schemas.put("W4FormRequest", W4FormRequest.class); + } + + @Override + public Map> getSchemas() { + return CreateW9FormRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof W9FormRequest) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8ImyFormRequest) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8BenEFormRequest) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W8BenFormRequest) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof W4FormRequest) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest"); + } + + /** + * Get the actual instance, which can be the following: + * W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest + * + * @return The actual instance (W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `W9FormRequest`. If the actual instance is not `W9FormRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W9FormRequest` + * @throws ClassCastException if the instance is not `W9FormRequest` + */ + public W9FormRequest getW9FormRequest() throws ClassCastException { + return (W9FormRequest)super.getActualInstance(); + } + /** + * Get the actual instance of `W8ImyFormRequest`. If the actual instance is not `W8ImyFormRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8ImyFormRequest` + * @throws ClassCastException if the instance is not `W8ImyFormRequest` + */ + public W8ImyFormRequest getW8ImyFormRequest() throws ClassCastException { + return (W8ImyFormRequest)super.getActualInstance(); + } + /** + * Get the actual instance of `W8BenEFormRequest`. If the actual instance is not `W8BenEFormRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8BenEFormRequest` + * @throws ClassCastException if the instance is not `W8BenEFormRequest` + */ + public W8BenEFormRequest getW8BenEFormRequest() throws ClassCastException { + return (W8BenEFormRequest)super.getActualInstance(); + } + /** + * Get the actual instance of `W8BenFormRequest`. If the actual instance is not `W8BenFormRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W8BenFormRequest` + * @throws ClassCastException if the instance is not `W8BenFormRequest` + */ + public W8BenFormRequest getW8BenFormRequest() throws ClassCastException { + return (W8BenFormRequest)super.getActualInstance(); + } + /** + * Get the actual instance of `W4FormRequest`. If the actual instance is not `W4FormRequest`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `W4FormRequest` + * @throws ClassCastException if the instance is not `W4FormRequest` + */ + public W4FormRequest getW4FormRequest() throws ClassCastException { + return (W4FormRequest)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 CreateW9FormRequest + */ + 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 W9FormRequest + try { + W9FormRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W9FormRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8ImyFormRequest + try { + W8ImyFormRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8ImyFormRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8BenEFormRequest + try { + W8BenEFormRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8BenEFormRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W8BenFormRequest + try { + W8BenFormRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W8BenFormRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with W4FormRequest + try { + W4FormRequest.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for W4FormRequest failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for CreateW9FormRequest with oneOf schemas: W4FormRequest, W8BenEFormRequest, W8BenFormRequest, W8ImyFormRequest, W9FormRequest. %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 CreateW9FormRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateW9FormRequest + * @throws IOException if the JSON string is invalid with respect to CreateW9FormRequest + */ + public static CreateW9FormRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateW9FormRequest.class); + } + + /** + * Convert an instance of CreateW9FormRequest 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/Data.java b/src/main/java/Avalara/SDK/model/A1099/V2/Data.java index cb95245..3c8bb1f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Data.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Data.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/ErrorModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorModel.java index e0b0b10..ce068a5 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorModel.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 @@ -80,7 +80,7 @@ public class ErrorModel { public static final String SERIALIZED_NAME_SOURCE = "source"; @SerializedName(SERIALIZED_NAME_SOURCE) - private Object source = null; + private Object source; public ErrorModel() { } 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 bc2f348..a16b21c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.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/ErrorResponseErrorsInner.java b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseErrorsInner.java index 73899d7..2bdc27b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseErrorsInner.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseErrorsInner.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/Form1042SList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SList.java new file mode 100644 index 0000000..f03868b --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SList.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.Form1042SListItem; +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; + +/** + * Form1042SList + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1042SList { + 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 Form1042SList() { + } + + public Form1042SList forms(List forms) { + this.forms = forms; + return this; + } + + public Form1042SList addFormsItem(Form1042SListItem 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 Form1042SList 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; + } + Form1042SList form1042SList = (Form1042SList) o; + return Objects.equals(this.forms, form1042SList.forms) && + Objects.equals(this.formType, form1042SList.formType); + } + + @Override + public int hashCode() { + return Objects.hash(forms, formType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Form1042SList {\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 Form1042SList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1042SList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SList is not found in the empty JSON string", Form1042SList.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1042SList.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SList` 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++) { + Form1042SListItem.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 (!Form1042SList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1042SList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1042SList.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1042SList value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1042SList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1042SList given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1042SList + * @throws IOException if the JSON string is invalid with respect to Form1042SList + */ + public static Form1042SList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1042SList.class); + } + + /** + * Convert an instance of Form1042SList 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 new file mode 100644 index 0000000..7d9d031 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItem.java @@ -0,0 +1,2050 @@ +/* + * 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.IntermediaryOrFlowThrough; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent; +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.time.OffsetDateTime; +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; + +/** + * Form1042SListItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1042SListItem { + 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_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + 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; + + /** + * Limitation on benefits code + */ + @JsonAdapter(LobCodeEnum.Adapter.class) + public enum LobCodeEnum { + INDIVIDUAL("Individual"), + + GOVERNMENT_CONTRACTING_STATE("GovernmentContractingState"), + + TAX_EXEMPT_PENSION_TRUST("TaxExemptPensionTrust"), + + TAX_EXEMPT_CHARITABLE_ORGANIZATION("TaxExemptCharitableOrganization"), + + PUBLICLY_TRADED_CORPORATION("PubliclyTradedCorporation"), + + SUBSIDIARY_OF_PUBLICLY_TRADED_CORPORATION("SubsidiaryOfPubliclyTradedCorporation"), + + COMPANY_OWNERSHIP_BASE_EROSION_TEST("CompanyOwnershipBaseErosionTest"), + + COMPANY_DERIVATIVE_BENEFITS_TEST("CompanyDerivativeBenefitsTest"), + + COMPANY_ACTIVE_TRADE_OR_BUSINESS_TEST("CompanyActiveTradeOrBusinessTest"), + + DISCRETIONARY_DETERMINATION("DiscretionaryDetermination"), + + OTHER("Other"), + + NO_LOB_ARTICLE_IN_TREATY("NoLobArticleInTreaty"); + + private String value; + + LobCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LobCodeEnum fromValue(String value) { + for (LobCodeEnum b : LobCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LobCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LobCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LobCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LobCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_LOB_CODE = "lobCode"; + @SerializedName(SERIALIZED_NAME_LOB_CODE) + private LobCodeEnum 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; + + /** + * Exemption code (Chapter 3) + */ + @JsonAdapter(ExemptionCodeChap3Enum.Adapter.class) + public enum ExemptionCodeChap3Enum { + TAX_RATE_DUE_TO_BACKUP_WITHHOLDING("TaxRateDueToBackupWithholding"), + + EFFECTIVELY_CONNECTED_INCOME("EffectivelyConnectedIncome"), + + EXEMPT_UNDER_IRC("ExemptUnderIrc"), + + INCOME_NOT_FROM_US_SOURCES("IncomeNotFromUsSources"), + + EXEMPT_UNDER_TAX_TREATY("ExemptUnderTaxTreaty"), + + PORTFOLIO_INTEREST_EXEMPT_UNDER_IRC("PortfolioInterestExemptUnderIrc"), + + QI_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY("QiThatAssumesPrimaryWithholdingResponsibility"), + + WF_POR_WFT("WfPorWft"), + + US_BRANCH_TREATED_AS_US_PERSON("UsBranchTreatedAsUsPerson"), + + TERRITORY_FI_TREATED_AS_US_PERSON("TerritoryFiTreatedAsUsPerson"), + + QI_REPRESENTS_INCOME_EXEMPT("QiRepresentsIncomeExempt"), + + QSL_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY("QslThatAssumesPrimaryWithholdingResponsibility"), + + PAYEE_SUBJECTED_TO_CHAPTER4_WITHHOLDING("PayeeSubjectedToChapter4Withholding"), + + QDD_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY("QddThatAssumesPrimaryWithholdingResponsibility"), + + EXEMPT_UNDER_SECTION897_L("ExemptUnderSection897L"), + + EXEMPT_UNDER_SECTION892("ExemptUnderSection892"); + + private String value; + + ExemptionCodeChap3Enum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ExemptionCodeChap3Enum fromValue(String value) { + for (ExemptionCodeChap3Enum b : ExemptionCodeChap3Enum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ExemptionCodeChap3Enum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ExemptionCodeChap3Enum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ExemptionCodeChap3Enum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ExemptionCodeChap3Enum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP3 = "exemptionCodeChap3"; + @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP3) + private ExemptionCodeChap3Enum exemptionCodeChap3; + + /** + * Exemption code (Chapter 4) + */ + @JsonAdapter(ExemptionCodeChap4Enum.Adapter.class) + public enum ExemptionCodeChap4Enum { + NOT_EXEMPT("NotExempt"), + + GRANDFATHERED_PAYMENT("GrandfatheredPayment"), + + EFFECTIVELY_CONNECTED_INCOME("EffectivelyConnectedIncome"), + + PAYEE_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING("PayeeNotSubjectToChapter4Withholding"), + + EXCLUDED_NONFINANCIAL_PAYMENT("ExcludedNonfinancialPayment"), + + FOREIGN_ENTITY_THAT_ASSUMES_PRIMARY_WITHHOLDING_RESPONSIBILITY("ForeignEntityThatAssumesPrimaryWithholdingResponsibility"), + + US_PAYEES_OF_PARTICIPATING_FFI("UsPayeesOfParticipatingFfi"), + + EXEMPT_FROM_WITHHOLDING_UNDER_IGA("ExemptFromWithholdingUnderIga"), + + DORMANT_ACCOUNT("DormantAccount"), + + OTHER_PAYMENT_NOT_SUBJECT_TO_CHAPTER4_WITHHOLDING("OtherPaymentNotSubjectToChapter4Withholding"); + + private String value; + + ExemptionCodeChap4Enum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ExemptionCodeChap4Enum fromValue(String value) { + for (ExemptionCodeChap4Enum b : ExemptionCodeChap4Enum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ExemptionCodeChap4Enum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ExemptionCodeChap4Enum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ExemptionCodeChap4Enum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ExemptionCodeChap4Enum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_EXEMPTION_CODE_CHAP4 = "exemptionCodeChap4"; + @SerializedName(SERIALIZED_NAME_EXEMPTION_CODE_CHAP4) + private ExemptionCodeChap4Enum 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; + + /** + * Chapter 3 status code + */ + @JsonAdapter(Chap3StatusCodeEnum.Adapter.class) + public enum Chap3StatusCodeEnum { + US_WITHHOLDING_AGENT_FI("USWithholdingAgentFI"), + + US_WITHHOLDING_AGENT_OTHER("USWithholdingAgentOther"), + + TERRITORY_FI_TREATED_AS_US_PERSON("TerritoryFITreatedAsUSPerson"), + + TERRITORY_FI_NOT_TREATED_AS_US_PERSON("TerritoryFINotTreatedAsUSPerson"), + + US_BRANCH_TREATED_AS_US_PERSON("USBranchTreatedAsUSPerson"), + + US_BRANCH_NOT_TREATED_AS_US_PERSON("USBranchNotTreatedAsUSPerson"), + + US_BRANCH_ECI_PRESUMPTION_APPLIED("USBranchECIPresumptionApplied"), + + PARTNERSHIP_OTHER_THAN_WITHHOLDING_FOREIGN_PARTNERSHIP("PartnershipOtherThanWithholdingForeignPartnership"), + + WITHHOLDING_FOREIGN_PARTNERSHIP("WithholdingForeignPartnership"), + + TRUST_OTHER_THAN_WITHHOLDING_FOREIGN_TRUST("TrustOtherThanWithholdingForeignTrust"), + + WITHHOLDING_FOREIGN_TRUST("WithholdingForeignTrust"), + + QUALIFIED_INTERMEDIARY("QualifiedIntermediary"), + + QUALIFIED_SECURITIES_LENDER_QUALIFIED_INTERMEDIARY("QualifiedSecuritiesLenderQualifiedIntermediary"), + + QUALIFIED_SECURITIES_LENDER_OTHER("QualifiedSecuritiesLenderOther"), + + CORPORATION("Corporation"), + + INDIVIDUAL("Individual"), + + ESTATE("Estate"), + + PRIVATE_FOUNDATION("PrivateFoundation"), + + GOVERNMENT_OR_INTERNATIONAL_ORGANIZATION("GovernmentOrInternationalOrganization"), + + TAX_EXEMPT_ORGANIZATION_SECTION501C_ENTITIES("TaxExemptOrganizationSection501cEntities"), + + UNKNOWN_RECIPIENT("UnknownRecipient"), + + ARTIST_OR_ATHLETE("ArtistOrAthlete"), + + PENSION("Pension"), + + FOREIGN_CENTRAL_BANK_OF_ISSUE("ForeignCentralBankOfIssue"), + + NONQUALIFIED_INTERMEDIARY("NonqualifiedIntermediary"), + + HYBRID_ENTITY_MAKING_TREATY_CLAIM("HybridEntityMakingTreatyClaim"), + + WITHHOLDING_RATE_POOL_GENERAL("WithholdingRatePoolGeneral"), + + WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION("WithholdingRatePoolExemptOrganization"), + + PAI_WITHHOLDING_RATE_POOL_GENERAL("PAIWithholdingRatePoolGeneral"), + + PAI_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION("PAIWithholdingRatePoolExemptOrganization"), + + AGENCY_WITHHOLDING_RATE_POOL_GENERAL("AgencyWithholdingRatePoolGeneral"), + + AGENCY_WITHHOLDING_RATE_POOL_EXEMPT_ORGANIZATION("AgencyWithholdingRatePoolExemptOrganization"), + + US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI("USWithholdingAgentForeignBranchOfFI"), + + QUALIFIED_DERIVATIVES_DEALER("QualifiedDerivativesDealer"), + + FOREIGN_GOVERNMENT_INTEGRAL_PART("ForeignGovernmentIntegralPart"), + + FOREIGN_GOVERNMENT_CONTROLLED_ENTITY("ForeignGovernmentControlledEntity"), + + PUBLICLY_TRADED_PARTNERSHIP("PubliclyTradedPartnership"), + + DISCLOSING_QUALIFIED_INTERMEDIARY("DisclosingQualifiedIntermediary"); + + private String value; + + Chap3StatusCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Chap3StatusCodeEnum fromValue(String value) { + for (Chap3StatusCodeEnum b : Chap3StatusCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Chap3StatusCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Chap3StatusCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Chap3StatusCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Chap3StatusCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHAP3_STATUS_CODE = "chap3StatusCode"; + @SerializedName(SERIALIZED_NAME_CHAP3_STATUS_CODE) + private Chap3StatusCodeEnum chap3StatusCode; + + /** + * Chapter 4 status code + */ + @JsonAdapter(Chap4StatusCodeEnum.Adapter.class) + public enum Chap4StatusCodeEnum { + US_WITHHOLDING_AGENT_FI("UsWithholdingAgentFi"), + + US_WITHHOLDING_AGENT_OTHER("UsWithholdingAgentOther"), + + TERRITORY_FI_NOT_TREATED_AS_US_PERSON("TerritoryFiNotTreatedAsUsPerson"), + + TERRITORY_FI_TREATED_AS_US_PERSON("TerritoryFiTreatedAsUsPerson"), + + PARTICIPATING_FFI_OTHER("ParticipatingFfiOther"), + + PARTICIPATING_FFI_REPORTING_MODEL2_FFI("ParticipatingFfiReportingModel2Ffi"), + + REGISTERED_DEEMED_COMPLIANT_FFI_REPORTING_MODEL1_FFI("RegisteredDeemedCompliantFfiReportingModel1Ffi"), + + REGISTERED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY("RegisteredDeemedCompliantFfiSponsoredEntity"), + + REGISTERED_DEEMED_COMPLIANT_FFI_OTHER("RegisteredDeemedCompliantFfiOther"), + + CERTIFIED_DEEMED_COMPLIANT_FFI_OTHER("CertifiedDeemedCompliantFfiOther"), + + CERTIFIED_DEEMED_COMPLIANT_FFIFFI_WITH_LOW_VALUE_ACCOUNTS("CertifiedDeemedCompliantFfiffiWithLowValueAccounts"), + + CERTIFIED_DEEMED_COMPLIANT_FFI_NON_REGISTERING_LOCAL_BANK("CertifiedDeemedCompliantFfiNonRegisteringLocalBank"), + + CERTIFIED_DEEMED_COMPLIANT_FFI_SPONSORED_ENTITY("CertifiedDeemedCompliantFfiSponsoredEntity"), + + CERTIFIED_DEEMED_COMPLIANT_FFI_INVESTMENT_ADVISOR_OR_MANAGER("CertifiedDeemedCompliantFfiInvestmentAdvisorOrManager"), + + NONPARTICIPATING_FFI("NonparticipatingFfi"), + + OWNER_DOCUMENTED_FFI("OwnerDocumentedFfi"), + + US_BRANCH_TREATED_AS_US_PERSON("UsBranchTreatedAsUsPerson"), + + US_BRANCH_NOT_TREATED_AS_US_PERSON("UsBranchNotTreatedAsUsPerson"), + + PASSIVE_NFFE_IDENTIFYING_SUBSTANTIAL_US_OWNERS("PassiveNffeIdentifyingSubstantialUsOwners"), + + PASSIVE_NFFE_WITH_NO_SUBSTANTIAL_US_OWNERS("PassiveNffeWithNoSubstantialUsOwners"), + + PUBLICLY_TRADED_NFFE_OR_AFFILIATE("PubliclyTradedNffeOrAffiliate"), + + ACTIVE_NFFE("ActiveNffe"), + + INDIVIDUAL("Individual"), + + SECTION501_C_ENTITIES("Section501CEntities"), + + EXCEPTED_TERRITORY_NFFE("ExceptedTerritoryNffe"), + + EXCEPTED_NFFE_OTHER("ExceptedNffeOther"), + + EXEMPT_BENEFICIAL_OWNER("ExemptBeneficialOwner"), + + ENTITY_WHOLLY_OWNED_BY_EXEMPT_BENEFICIAL_OWNERS("EntityWhollyOwnedByExemptBeneficialOwners"), + + UNKNOWN_RECIPIENT("UnknownRecipient"), + + RECALCITRANT_ACCOUNT_HOLDER("RecalcitrantAccountHolder"), + + NONREPORTING_IGAFII("NonreportingIgafii"), + + DIRECT_REPORTING_NFFE("DirectReportingNffe"), + + US_REPORTABLE_ACCOUNT("UsReportableAccount"), + + NON_CONSENTING_US_ACCOUNT("NonConsentingUsAccount"), + + SPONSORED_DIRECT_REPORTING_NFFE("SponsoredDirectReportingNffe"), + + EXCEPTED_INTER_AFFILIATE_FFI("ExceptedInterAffiliateFfi"), + + UNDOCUMENTED_PREEXISTING_OBLIGATION("UndocumentedPreexistingObligation"), + + US_BRANCH_ECI_PRESUMPTION_APPLIED("UsBranchEciPresumptionApplied"), + + ACCOUNT_HOLDER_OF_EXCLUDED_FINANCIAL_ACCOUNT("AccountHolderOfExcludedFinancialAccount"), + + PASSIVE_NFFE_REPORTED_BY_FFI("PassiveNffeReportedByFfi"), + + NFFE_SUBJECT_TO1472_WITHHOLDING("NffeSubjectTo1472Withholding"), + + RECALCITRANT_POOL_NO_US_INDICIA("RecalcitrantPoolNoUsIndicia"), + + RECALCITRANT_POOL_US_INDICIA("RecalcitrantPoolUsIndicia"), + + RECALCITRANT_POOL_DORMANT_ACCOUNT("RecalcitrantPoolDormantAccount"), + + RECALCITRANT_POOL_US_PERSONS("RecalcitrantPoolUsPersons"), + + RECALCITRANT_POOL_PASSIVE_NFF_ES("RecalcitrantPoolPassiveNffEs"), + + NONPARTICIPATING_FFI_POOL("NonparticipatingFfiPool"), + + US_PAYEES_POOL("UsPayeesPool"), + + QI_RECALCITRANT_POOL_GENERAL("QiRecalcitrantPoolGeneral"), + + US_WITHHOLDING_AGENT_FOREIGN_BRANCH_OF_FI("UsWithholdingAgentForeignBranchOfFi"); + + private String value; + + Chap4StatusCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static Chap4StatusCodeEnum fromValue(String value) { + for (Chap4StatusCodeEnum b : Chap4StatusCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final Chap4StatusCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public Chap4StatusCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return Chap4StatusCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + Chap4StatusCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_CHAP4_STATUS_CODE = "chap4StatusCode"; + @SerializedName(SERIALIZED_NAME_CHAP4_STATUS_CODE) + private Chap4StatusCodeEnum 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_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_RECIPIENT_EMAIL = "recipientEmail"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EMAIL) + private String recipientEmail; + + 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_RECIPIENT_NON_US_PROVINCE = "recipientNonUsProvince"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NON_US_PROVINCE) + private String recipientNonUsProvince; + + 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_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 Form1042SListItem() { + } + + public Form1042SListItem uniqueFormId(String uniqueFormId) { + this.uniqueFormId = uniqueFormId; + return this; + } + + /** + * Unique form identifier + * @return uniqueFormId + */ + @javax.annotation.Nullable + public String getUniqueFormId() { + return uniqueFormId; + } + + public void setUniqueFormId(String uniqueFormId) { + this.uniqueFormId = uniqueFormId; + } + + + public Form1042SListItem noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * No TIN indicator + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1042SListItem recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; + return this; + } + + /** + * Recipient's date of birth + * @return recipientDateOfBirth + */ + @javax.annotation.Nullable + public OffsetDateTime getRecipientDateOfBirth() { + return recipientDateOfBirth; + } + + public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; + } + + + public Form1042SListItem recipientGiin(String recipientGiin) { + this.recipientGiin = recipientGiin; + return this; + } + + /** + * Recipient's GIIN (Global Intermediary Identification Number) + * @return recipientGiin + */ + @javax.annotation.Nullable + public String getRecipientGiin() { + return recipientGiin; + } + + public void setRecipientGiin(String recipientGiin) { + this.recipientGiin = recipientGiin; + } + + + public Form1042SListItem recipientForeignTin(String recipientForeignTin) { + this.recipientForeignTin = recipientForeignTin; + return this; + } + + /** + * Recipient's foreign TIN + * @return recipientForeignTin + */ + @javax.annotation.Nullable + public String getRecipientForeignTin() { + return recipientForeignTin; + } + + public void setRecipientForeignTin(String recipientForeignTin) { + this.recipientForeignTin = recipientForeignTin; + } + + + public Form1042SListItem lobCode(LobCodeEnum lobCode) { + this.lobCode = lobCode; + return this; + } + + /** + * Limitation on benefits code + * @return lobCode + */ + @javax.annotation.Nullable + public LobCodeEnum getLobCode() { + return lobCode; + } + + public void setLobCode(LobCodeEnum lobCode) { + this.lobCode = lobCode; + } + + + public Form1042SListItem incomeCode(String incomeCode) { + this.incomeCode = incomeCode; + return this; + } + + /** + * Income code + * @return incomeCode + */ + @javax.annotation.Nullable + public String getIncomeCode() { + return incomeCode; + } + + public void setIncomeCode(String incomeCode) { + this.incomeCode = incomeCode; + } + + + public Form1042SListItem grossIncome(Double grossIncome) { + this.grossIncome = grossIncome; + return this; + } + + /** + * Gross income + * @return grossIncome + */ + @javax.annotation.Nullable + public Double getGrossIncome() { + return grossIncome; + } + + public void setGrossIncome(Double grossIncome) { + this.grossIncome = grossIncome; + } + + + public Form1042SListItem withholdingIndicator(String withholdingIndicator) { + this.withholdingIndicator = withholdingIndicator; + return this; + } + + /** + * Withholding indicator + * @return withholdingIndicator + */ + @javax.annotation.Nullable + public String getWithholdingIndicator() { + return withholdingIndicator; + } + + public void setWithholdingIndicator(String withholdingIndicator) { + this.withholdingIndicator = withholdingIndicator; + } + + + public Form1042SListItem taxCountryCode(String taxCountryCode) { + this.taxCountryCode = taxCountryCode; + return this; + } + + /** + * Country code + * @return taxCountryCode + */ + @javax.annotation.Nullable + public String getTaxCountryCode() { + return taxCountryCode; + } + + public void setTaxCountryCode(String taxCountryCode) { + this.taxCountryCode = taxCountryCode; + } + + + public Form1042SListItem exemptionCodeChap3(ExemptionCodeChap3Enum exemptionCodeChap3) { + this.exemptionCodeChap3 = exemptionCodeChap3; + return this; + } + + /** + * Exemption code (Chapter 3) + * @return exemptionCodeChap3 + */ + @javax.annotation.Nullable + public ExemptionCodeChap3Enum getExemptionCodeChap3() { + return exemptionCodeChap3; + } + + public void setExemptionCodeChap3(ExemptionCodeChap3Enum exemptionCodeChap3) { + this.exemptionCodeChap3 = exemptionCodeChap3; + } + + + public Form1042SListItem exemptionCodeChap4(ExemptionCodeChap4Enum exemptionCodeChap4) { + this.exemptionCodeChap4 = exemptionCodeChap4; + return this; + } + + /** + * Exemption code (Chapter 4) + * @return exemptionCodeChap4 + */ + @javax.annotation.Nullable + public ExemptionCodeChap4Enum getExemptionCodeChap4() { + return exemptionCodeChap4; + } + + public void setExemptionCodeChap4(ExemptionCodeChap4Enum exemptionCodeChap4) { + this.exemptionCodeChap4 = exemptionCodeChap4; + } + + + public Form1042SListItem taxRateChap3(String taxRateChap3) { + this.taxRateChap3 = taxRateChap3; + return this; + } + + /** + * Tax rate (Chapter 3) + * @return taxRateChap3 + */ + @javax.annotation.Nullable + public String getTaxRateChap3() { + return taxRateChap3; + } + + public void setTaxRateChap3(String taxRateChap3) { + this.taxRateChap3 = taxRateChap3; + } + + + public Form1042SListItem withholdingAllowance(Double withholdingAllowance) { + this.withholdingAllowance = withholdingAllowance; + return this; + } + + /** + * Withholding allowance + * @return withholdingAllowance + */ + @javax.annotation.Nullable + public Double getWithholdingAllowance() { + return withholdingAllowance; + } + + public void setWithholdingAllowance(Double withholdingAllowance) { + this.withholdingAllowance = withholdingAllowance; + } + + + public Form1042SListItem federalTaxWithheld(Double federalTaxWithheld) { + this.federalTaxWithheld = federalTaxWithheld; + return this; + } + + /** + * Federal tax withheld + * @return federalTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalTaxWithheld() { + return federalTaxWithheld; + } + + public void setFederalTaxWithheld(Double federalTaxWithheld) { + this.federalTaxWithheld = federalTaxWithheld; + } + + + public Form1042SListItem taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { + this.taxNotDepositedIndicator = taxNotDepositedIndicator; + return this; + } + + /** + * Tax not deposited indicator + * @return taxNotDepositedIndicator + */ + @javax.annotation.Nullable + public Boolean getTaxNotDepositedIndicator() { + return taxNotDepositedIndicator; + } + + public void setTaxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { + this.taxNotDepositedIndicator = taxNotDepositedIndicator; + } + + + public Form1042SListItem academicIndicator(Boolean academicIndicator) { + this.academicIndicator = academicIndicator; + return this; + } + + /** + * Academic indicator + * @return academicIndicator + */ + @javax.annotation.Nullable + public Boolean getAcademicIndicator() { + return academicIndicator; + } + + public void setAcademicIndicator(Boolean academicIndicator) { + this.academicIndicator = academicIndicator; + } + + + public Form1042SListItem taxWithheldOtherAgents(Double taxWithheldOtherAgents) { + this.taxWithheldOtherAgents = taxWithheldOtherAgents; + return this; + } + + /** + * Tax withheld by other agents + * @return taxWithheldOtherAgents + */ + @javax.annotation.Nullable + public Double getTaxWithheldOtherAgents() { + return taxWithheldOtherAgents; + } + + public void setTaxWithheldOtherAgents(Double taxWithheldOtherAgents) { + this.taxWithheldOtherAgents = taxWithheldOtherAgents; + } + + + public Form1042SListItem amountRepaid(Double amountRepaid) { + this.amountRepaid = amountRepaid; + return this; + } + + /** + * Amount repaid to recipient + * @return amountRepaid + */ + @javax.annotation.Nullable + public Double getAmountRepaid() { + return amountRepaid; + } + + public void setAmountRepaid(Double amountRepaid) { + this.amountRepaid = amountRepaid; + } + + + public Form1042SListItem taxPaidAgent(Double taxPaidAgent) { + this.taxPaidAgent = taxPaidAgent; + return this; + } + + /** + * Tax paid by withholding agent + * @return taxPaidAgent + */ + @javax.annotation.Nullable + public Double getTaxPaidAgent() { + return taxPaidAgent; + } + + public void setTaxPaidAgent(Double taxPaidAgent) { + this.taxPaidAgent = taxPaidAgent; + } + + + public Form1042SListItem chap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) { + this.chap3StatusCode = chap3StatusCode; + return this; + } + + /** + * Chapter 3 status code + * @return chap3StatusCode + */ + @javax.annotation.Nullable + public Chap3StatusCodeEnum getChap3StatusCode() { + return chap3StatusCode; + } + + public void setChap3StatusCode(Chap3StatusCodeEnum chap3StatusCode) { + this.chap3StatusCode = chap3StatusCode; + } + + + public Form1042SListItem chap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) { + this.chap4StatusCode = chap4StatusCode; + return this; + } + + /** + * Chapter 4 status code + * @return chap4StatusCode + */ + @javax.annotation.Nullable + public Chap4StatusCodeEnum getChap4StatusCode() { + return chap4StatusCode; + } + + public void setChap4StatusCode(Chap4StatusCodeEnum chap4StatusCode) { + this.chap4StatusCode = chap4StatusCode; + } + + + public Form1042SListItem primaryWithholdingAgent(PrimaryWithholdingAgent primaryWithholdingAgent) { + this.primaryWithholdingAgent = primaryWithholdingAgent; + return this; + } + + /** + * Primary withholding agent information + * @return primaryWithholdingAgent + */ + @javax.annotation.Nullable + public PrimaryWithholdingAgent getPrimaryWithholdingAgent() { + return primaryWithholdingAgent; + } + + public void setPrimaryWithholdingAgent(PrimaryWithholdingAgent primaryWithholdingAgent) { + this.primaryWithholdingAgent = primaryWithholdingAgent; + } + + + public Form1042SListItem intermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediaryOrFlowThrough) { + this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; + return this; + } + + /** + * Intermediary or flow-through entity information + * @return intermediaryOrFlowThrough + */ + @javax.annotation.Nullable + public IntermediaryOrFlowThrough getIntermediaryOrFlowThrough() { + return intermediaryOrFlowThrough; + } + + public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThrough intermediaryOrFlowThrough) { + this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; + } + + + public Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Recipient name + * @return recipientName + */ + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem address(String address) { + this.address = address; + return this; + } + + /** + * Address + * @return address + */ + @javax.annotation.Nonnull + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1042SListItem 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 Form1042SListItem city(String city) { + this.city = city; + return this; + } + + /** + * City + * @return city + */ + @javax.annotation.Nonnull + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem recipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + return this; + } + + /** + * Recipient email address + * @return recipientEmail + */ + @javax.annotation.Nullable + public String getRecipientEmail() { + return recipientEmail; + } + + public void setRecipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + } + + + public Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem recipientNonUsProvince(String recipientNonUsProvince) { + this.recipientNonUsProvince = recipientNonUsProvince; + return this; + } + + /** + * Foreign province + * @return recipientNonUsProvince + */ + @javax.annotation.Nullable + public String getRecipientNonUsProvince() { + return recipientNonUsProvince; + } + + public void setRecipientNonUsProvince(String recipientNonUsProvince) { + this.recipientNonUsProvince = recipientNonUsProvince; + } + + + public Form1042SListItem 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.Nonnull + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem 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 Form1042SListItem 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; + } + Form1042SListItem form1042SListItem = (Form1042SListItem) o; + return Objects.equals(this.uniqueFormId, form1042SListItem.uniqueFormId) && + Objects.equals(this.noTin, form1042SListItem.noTin) && + Objects.equals(this.recipientDateOfBirth, form1042SListItem.recipientDateOfBirth) && + Objects.equals(this.recipientGiin, form1042SListItem.recipientGiin) && + Objects.equals(this.recipientForeignTin, form1042SListItem.recipientForeignTin) && + Objects.equals(this.lobCode, form1042SListItem.lobCode) && + Objects.equals(this.incomeCode, form1042SListItem.incomeCode) && + Objects.equals(this.grossIncome, form1042SListItem.grossIncome) && + Objects.equals(this.withholdingIndicator, form1042SListItem.withholdingIndicator) && + Objects.equals(this.taxCountryCode, form1042SListItem.taxCountryCode) && + Objects.equals(this.exemptionCodeChap3, form1042SListItem.exemptionCodeChap3) && + Objects.equals(this.exemptionCodeChap4, form1042SListItem.exemptionCodeChap4) && + Objects.equals(this.taxRateChap3, form1042SListItem.taxRateChap3) && + Objects.equals(this.withholdingAllowance, form1042SListItem.withholdingAllowance) && + Objects.equals(this.federalTaxWithheld, form1042SListItem.federalTaxWithheld) && + Objects.equals(this.taxNotDepositedIndicator, form1042SListItem.taxNotDepositedIndicator) && + Objects.equals(this.academicIndicator, form1042SListItem.academicIndicator) && + Objects.equals(this.taxWithheldOtherAgents, form1042SListItem.taxWithheldOtherAgents) && + Objects.equals(this.amountRepaid, form1042SListItem.amountRepaid) && + Objects.equals(this.taxPaidAgent, form1042SListItem.taxPaidAgent) && + Objects.equals(this.chap3StatusCode, form1042SListItem.chap3StatusCode) && + Objects.equals(this.chap4StatusCode, form1042SListItem.chap4StatusCode) && + Objects.equals(this.primaryWithholdingAgent, form1042SListItem.primaryWithholdingAgent) && + Objects.equals(this.intermediaryOrFlowThrough, form1042SListItem.intermediaryOrFlowThrough) && + Objects.equals(this.issuerId, form1042SListItem.issuerId) && + Objects.equals(this.referenceId, form1042SListItem.referenceId) && + Objects.equals(this.recipientTin, form1042SListItem.recipientTin) && + Objects.equals(this.recipientName, form1042SListItem.recipientName) && + Objects.equals(this.tinType, form1042SListItem.tinType) && + Objects.equals(this.recipientSecondName, form1042SListItem.recipientSecondName) && + Objects.equals(this.address, form1042SListItem.address) && + Objects.equals(this.address2, form1042SListItem.address2) && + Objects.equals(this.city, form1042SListItem.city) && + Objects.equals(this.state, form1042SListItem.state) && + Objects.equals(this.zip, form1042SListItem.zip) && + Objects.equals(this.recipientEmail, form1042SListItem.recipientEmail) && + Objects.equals(this.accountNumber, form1042SListItem.accountNumber) && + Objects.equals(this.officeCode, form1042SListItem.officeCode) && + Objects.equals(this.recipientNonUsProvince, form1042SListItem.recipientNonUsProvince) && + Objects.equals(this.countryCode, form1042SListItem.countryCode) && + Objects.equals(this.federalEFile, form1042SListItem.federalEFile) && + Objects.equals(this.postalMail, form1042SListItem.postalMail) && + Objects.equals(this.stateEFile, form1042SListItem.stateEFile) && + Objects.equals(this.tinMatch, form1042SListItem.tinMatch) && + Objects.equals(this.addressVerification, form1042SListItem.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1042SListItem.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, 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, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, 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 Form1042SListItem {\n"); + sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).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(" 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(" recipientEmail: ").append(toIndentedString(recipientEmail)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" recipientNonUsProvince: ").append(toIndentedString(recipientNonUsProvince)).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(" 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("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("recipientEmail"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("recipientNonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Form1042SListItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1042SListItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SListItem is not found in the empty JSON string", Form1042SListItem.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1042SListItem.openapiFields.contains(entry.getKey())) { + 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())); + } + 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())); + } + // validate the optional field `lobCode` + if (jsonObj.get("lobCode") != null && !jsonObj.get("lobCode").isJsonNull()) { + LobCodeEnum.validateJsonElement(jsonObj.get("lobCode")); + } + 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())); + } + // validate the optional field `exemptionCodeChap3` + if (jsonObj.get("exemptionCodeChap3") != null && !jsonObj.get("exemptionCodeChap3").isJsonNull()) { + ExemptionCodeChap3Enum.validateJsonElement(jsonObj.get("exemptionCodeChap3")); + } + 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())); + } + // validate the optional field `exemptionCodeChap4` + if (jsonObj.get("exemptionCodeChap4") != null && !jsonObj.get("exemptionCodeChap4").isJsonNull()) { + ExemptionCodeChap4Enum.validateJsonElement(jsonObj.get("exemptionCodeChap4")); + } + 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())); + } + // validate the optional field `chap3StatusCode` + if (jsonObj.get("chap3StatusCode") != null && !jsonObj.get("chap3StatusCode").isJsonNull()) { + Chap3StatusCodeEnum.validateJsonElement(jsonObj.get("chap3StatusCode")); + } + if ((jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) && !jsonObj.get("chap4StatusCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `chap4StatusCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chap4StatusCode").toString())); + } + // validate the optional field `chap4StatusCode` + if (jsonObj.get("chap4StatusCode") != null && !jsonObj.get("chap4StatusCode").isJsonNull()) { + Chap4StatusCodeEnum.validateJsonElement(jsonObj.get("chap4StatusCode")); + } + // 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("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").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").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()) { + 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("recipientEmail") != null && !jsonObj.get("recipientEmail").isJsonNull()) && !jsonObj.get("recipientEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientEmail").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("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); + } + if (!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 (!Form1042SListItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1042SListItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1042SListItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1042SListItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1042SListItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1042SListItem + * @throws IOException if the JSON string is invalid with respect to Form1042SListItem + */ + public static Form1042SListItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1042SListItem.class); + } + + /** + * Convert an instance of Form1042SListItem 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/Form1042SListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItemResponse.java new file mode 100644 index 0000000..79b5f82 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SListItemResponse.java @@ -0,0 +1,1771 @@ +/* + * 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.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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; + +/** + * Form1042SListItemResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1042SListItemResponse { + 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_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + 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 PrimaryWithholdingAgentResponse primaryWithholdingAgent; + + public static final String SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH = "intermediaryOrFlowThrough"; + @SerializedName(SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH) + private IntermediaryOrFlowThroughResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse addressVerificationStatus; + + 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_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_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_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 Form1042SListItemResponse() { + } + + public Form1042SListItemResponse( + String id, + Form1099StatusDetailResponse federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetailResponse postalMailStatus, + Form1099StatusDetailResponse tinMatchStatus, + Form1099StatusDetailResponse addressVerificationStatus, + 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.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1042SListItemResponse uniqueFormId(String uniqueFormId) { + this.uniqueFormId = uniqueFormId; + return this; + } + + /** + * Unique form identifier + * @return uniqueFormId + */ + @javax.annotation.Nullable + public String getUniqueFormId() { + return uniqueFormId; + } + + public void setUniqueFormId(String uniqueFormId) { + this.uniqueFormId = uniqueFormId; + } + + + public Form1042SListItemResponse noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * No TIN indicator + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1042SListItemResponse recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; + return this; + } + + /** + * Recipient's date of birth + * @return recipientDateOfBirth + */ + @javax.annotation.Nullable + public OffsetDateTime getRecipientDateOfBirth() { + return recipientDateOfBirth; + } + + public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; + } + + + public Form1042SListItemResponse recipientGiin(String recipientGiin) { + this.recipientGiin = recipientGiin; + return this; + } + + /** + * Recipient's GIIN (Global Intermediary Identification Number) + * @return recipientGiin + */ + @javax.annotation.Nullable + public String getRecipientGiin() { + return recipientGiin; + } + + public void setRecipientGiin(String recipientGiin) { + this.recipientGiin = recipientGiin; + } + + + public Form1042SListItemResponse recipientForeignTin(String recipientForeignTin) { + this.recipientForeignTin = recipientForeignTin; + return this; + } + + /** + * Recipient's foreign TIN + * @return recipientForeignTin + */ + @javax.annotation.Nullable + public String getRecipientForeignTin() { + return recipientForeignTin; + } + + public void setRecipientForeignTin(String recipientForeignTin) { + this.recipientForeignTin = recipientForeignTin; + } + + + public Form1042SListItemResponse lobCode(String lobCode) { + this.lobCode = lobCode; + return this; + } + + /** + * Limitation on benefits code + * @return lobCode + */ + @javax.annotation.Nullable + public String getLobCode() { + return lobCode; + } + + public void setLobCode(String lobCode) { + this.lobCode = lobCode; + } + + + public Form1042SListItemResponse incomeCode(String incomeCode) { + this.incomeCode = incomeCode; + return this; + } + + /** + * Income code + * @return incomeCode + */ + @javax.annotation.Nullable + public String getIncomeCode() { + return incomeCode; + } + + public void setIncomeCode(String incomeCode) { + this.incomeCode = incomeCode; + } + + + public Form1042SListItemResponse grossIncome(Double grossIncome) { + this.grossIncome = grossIncome; + return this; + } + + /** + * Gross income + * @return grossIncome + */ + @javax.annotation.Nullable + public Double getGrossIncome() { + return grossIncome; + } + + public void setGrossIncome(Double grossIncome) { + this.grossIncome = grossIncome; + } + + + public Form1042SListItemResponse withholdingIndicator(String withholdingIndicator) { + this.withholdingIndicator = withholdingIndicator; + return this; + } + + /** + * Withholding indicator + * @return withholdingIndicator + */ + @javax.annotation.Nullable + public String getWithholdingIndicator() { + return withholdingIndicator; + } + + public void setWithholdingIndicator(String withholdingIndicator) { + this.withholdingIndicator = withholdingIndicator; + } + + + public Form1042SListItemResponse taxCountryCode(String taxCountryCode) { + this.taxCountryCode = taxCountryCode; + return this; + } + + /** + * Country code + * @return taxCountryCode + */ + @javax.annotation.Nullable + public String getTaxCountryCode() { + return taxCountryCode; + } + + public void setTaxCountryCode(String taxCountryCode) { + this.taxCountryCode = taxCountryCode; + } + + + public Form1042SListItemResponse exemptionCodeChap3(String exemptionCodeChap3) { + this.exemptionCodeChap3 = exemptionCodeChap3; + return this; + } + + /** + * Exemption code (Chapter 3) + * @return exemptionCodeChap3 + */ + @javax.annotation.Nullable + public String getExemptionCodeChap3() { + return exemptionCodeChap3; + } + + public void setExemptionCodeChap3(String exemptionCodeChap3) { + this.exemptionCodeChap3 = exemptionCodeChap3; + } + + + public Form1042SListItemResponse exemptionCodeChap4(String exemptionCodeChap4) { + this.exemptionCodeChap4 = exemptionCodeChap4; + return this; + } + + /** + * Exemption code (Chapter 4) + * @return exemptionCodeChap4 + */ + @javax.annotation.Nullable + public String getExemptionCodeChap4() { + return exemptionCodeChap4; + } + + public void setExemptionCodeChap4(String exemptionCodeChap4) { + this.exemptionCodeChap4 = exemptionCodeChap4; + } + + + public Form1042SListItemResponse taxRateChap3(String taxRateChap3) { + this.taxRateChap3 = taxRateChap3; + return this; + } + + /** + * Tax rate (Chapter 3) + * @return taxRateChap3 + */ + @javax.annotation.Nullable + public String getTaxRateChap3() { + return taxRateChap3; + } + + public void setTaxRateChap3(String taxRateChap3) { + this.taxRateChap3 = taxRateChap3; + } + + + public Form1042SListItemResponse withholdingAllowance(Double withholdingAllowance) { + this.withholdingAllowance = withholdingAllowance; + return this; + } + + /** + * Withholding allowance + * @return withholdingAllowance + */ + @javax.annotation.Nullable + public Double getWithholdingAllowance() { + return withholdingAllowance; + } + + public void setWithholdingAllowance(Double withholdingAllowance) { + this.withholdingAllowance = withholdingAllowance; + } + + + public Form1042SListItemResponse federalTaxWithheld(Double federalTaxWithheld) { + this.federalTaxWithheld = federalTaxWithheld; + return this; + } + + /** + * Federal tax withheld + * @return federalTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalTaxWithheld() { + return federalTaxWithheld; + } + + public void setFederalTaxWithheld(Double federalTaxWithheld) { + this.federalTaxWithheld = federalTaxWithheld; + } + + + public Form1042SListItemResponse taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { + this.taxNotDepositedIndicator = taxNotDepositedIndicator; + return this; + } + + /** + * Tax not deposited indicator + * @return taxNotDepositedIndicator + */ + @javax.annotation.Nullable + public Boolean getTaxNotDepositedIndicator() { + return taxNotDepositedIndicator; + } + + public void setTaxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { + this.taxNotDepositedIndicator = taxNotDepositedIndicator; + } + + + public Form1042SListItemResponse academicIndicator(Boolean academicIndicator) { + this.academicIndicator = academicIndicator; + return this; + } + + /** + * Academic indicator + * @return academicIndicator + */ + @javax.annotation.Nullable + public Boolean getAcademicIndicator() { + return academicIndicator; + } + + public void setAcademicIndicator(Boolean academicIndicator) { + this.academicIndicator = academicIndicator; + } + + + public Form1042SListItemResponse taxWithheldOtherAgents(Double taxWithheldOtherAgents) { + this.taxWithheldOtherAgents = taxWithheldOtherAgents; + return this; + } + + /** + * Tax withheld by other agents + * @return taxWithheldOtherAgents + */ + @javax.annotation.Nullable + public Double getTaxWithheldOtherAgents() { + return taxWithheldOtherAgents; + } + + public void setTaxWithheldOtherAgents(Double taxWithheldOtherAgents) { + this.taxWithheldOtherAgents = taxWithheldOtherAgents; + } + + + public Form1042SListItemResponse amountRepaid(Double amountRepaid) { + this.amountRepaid = amountRepaid; + return this; + } + + /** + * Amount repaid to recipient + * @return amountRepaid + */ + @javax.annotation.Nullable + public Double getAmountRepaid() { + return amountRepaid; + } + + public void setAmountRepaid(Double amountRepaid) { + this.amountRepaid = amountRepaid; + } + + + public Form1042SListItemResponse taxPaidAgent(Double taxPaidAgent) { + this.taxPaidAgent = taxPaidAgent; + return this; + } + + /** + * Tax paid by withholding agent + * @return taxPaidAgent + */ + @javax.annotation.Nullable + public Double getTaxPaidAgent() { + return taxPaidAgent; + } + + public void setTaxPaidAgent(Double taxPaidAgent) { + this.taxPaidAgent = taxPaidAgent; + } + + + public Form1042SListItemResponse chap3StatusCode(String chap3StatusCode) { + this.chap3StatusCode = chap3StatusCode; + return this; + } + + /** + * Chapter 3 status code + * @return chap3StatusCode + */ + @javax.annotation.Nullable + public String getChap3StatusCode() { + return chap3StatusCode; + } + + public void setChap3StatusCode(String chap3StatusCode) { + this.chap3StatusCode = chap3StatusCode; + } + + + public Form1042SListItemResponse chap4StatusCode(String chap4StatusCode) { + this.chap4StatusCode = chap4StatusCode; + return this; + } + + /** + * Chapter 4 status code + * @return chap4StatusCode + */ + @javax.annotation.Nullable + public String getChap4StatusCode() { + return chap4StatusCode; + } + + public void setChap4StatusCode(String chap4StatusCode) { + this.chap4StatusCode = chap4StatusCode; + } + + + public Form1042SListItemResponse primaryWithholdingAgent(PrimaryWithholdingAgentResponse primaryWithholdingAgent) { + this.primaryWithholdingAgent = primaryWithholdingAgent; + return this; + } + + /** + * Primary withholding agent information + * @return primaryWithholdingAgent + */ + @javax.annotation.Nullable + public PrimaryWithholdingAgentResponse getPrimaryWithholdingAgent() { + return primaryWithholdingAgent; + } + + public void setPrimaryWithholdingAgent(PrimaryWithholdingAgentResponse primaryWithholdingAgent) { + this.primaryWithholdingAgent = primaryWithholdingAgent; + } + + + public Form1042SListItemResponse intermediaryOrFlowThrough(IntermediaryOrFlowThroughResponse intermediaryOrFlowThrough) { + this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; + return this; + } + + /** + * Intermediary or flow-through entity information + * @return intermediaryOrFlowThrough + */ + @javax.annotation.Nullable + public IntermediaryOrFlowThroughResponse getIntermediaryOrFlowThrough() { + return intermediaryOrFlowThrough; + } + + public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThroughResponse intermediaryOrFlowThrough) { + this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; + } + + + /** + * ID of the form + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + + public Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1099StatusDetailResponse getFederalEfileStatus() { + return federalEfileStatus; + } + + + + public Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1099StatusDetailResponse getPostalMailStatus() { + return postalMailStatus; + } + + + + public Form1042SListItemResponse 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 Form1099StatusDetailResponse getTinMatchStatus() { + return tinMatchStatus; + } + + + + public Form1042SListItemResponse 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 Form1099StatusDetailResponse getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + public Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse 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 Form1042SListItemResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + return this; + } + + /** + * Foreign province + * @return foreignProvince + */ + @javax.annotation.Nullable + public String getForeignProvince() { + return foreignProvince; + } + + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public Form1042SListItemResponse 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; + } + + + /** + * 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 Form1042SListItemResponse 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; + } + Form1042SListItemResponse form1042SListItemResponse = (Form1042SListItemResponse) o; + return Objects.equals(this.uniqueFormId, form1042SListItemResponse.uniqueFormId) && + Objects.equals(this.noTin, form1042SListItemResponse.noTin) && + Objects.equals(this.recipientDateOfBirth, form1042SListItemResponse.recipientDateOfBirth) && + Objects.equals(this.recipientGiin, form1042SListItemResponse.recipientGiin) && + Objects.equals(this.recipientForeignTin, form1042SListItemResponse.recipientForeignTin) && + Objects.equals(this.lobCode, form1042SListItemResponse.lobCode) && + Objects.equals(this.incomeCode, form1042SListItemResponse.incomeCode) && + Objects.equals(this.grossIncome, form1042SListItemResponse.grossIncome) && + Objects.equals(this.withholdingIndicator, form1042SListItemResponse.withholdingIndicator) && + Objects.equals(this.taxCountryCode, form1042SListItemResponse.taxCountryCode) && + Objects.equals(this.exemptionCodeChap3, form1042SListItemResponse.exemptionCodeChap3) && + Objects.equals(this.exemptionCodeChap4, form1042SListItemResponse.exemptionCodeChap4) && + Objects.equals(this.taxRateChap3, form1042SListItemResponse.taxRateChap3) && + Objects.equals(this.withholdingAllowance, form1042SListItemResponse.withholdingAllowance) && + Objects.equals(this.federalTaxWithheld, form1042SListItemResponse.federalTaxWithheld) && + Objects.equals(this.taxNotDepositedIndicator, form1042SListItemResponse.taxNotDepositedIndicator) && + Objects.equals(this.academicIndicator, form1042SListItemResponse.academicIndicator) && + Objects.equals(this.taxWithheldOtherAgents, form1042SListItemResponse.taxWithheldOtherAgents) && + Objects.equals(this.amountRepaid, form1042SListItemResponse.amountRepaid) && + Objects.equals(this.taxPaidAgent, form1042SListItemResponse.taxPaidAgent) && + Objects.equals(this.chap3StatusCode, form1042SListItemResponse.chap3StatusCode) && + Objects.equals(this.chap4StatusCode, form1042SListItemResponse.chap4StatusCode) && + Objects.equals(this.primaryWithholdingAgent, form1042SListItemResponse.primaryWithholdingAgent) && + Objects.equals(this.intermediaryOrFlowThrough, form1042SListItemResponse.intermediaryOrFlowThrough) && + Objects.equals(this.id, form1042SListItemResponse.id) && + Objects.equals(this.type, form1042SListItemResponse.type) && + Objects.equals(this.issuerId, form1042SListItemResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1042SListItemResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1042SListItemResponse.issuerTin) && + Objects.equals(this.taxYear, form1042SListItemResponse.taxYear) && + Objects.equals(this.federalEfile, form1042SListItemResponse.federalEfile) && + Objects.equals(this.federalEfileStatus, form1042SListItemResponse.federalEfileStatus) && + Objects.equals(this.stateEfile, form1042SListItemResponse.stateEfile) && + Objects.equals(this.stateEfileStatus, form1042SListItemResponse.stateEfileStatus) && + Objects.equals(this.postalMail, form1042SListItemResponse.postalMail) && + Objects.equals(this.postalMailStatus, form1042SListItemResponse.postalMailStatus) && + Objects.equals(this.tinMatch, form1042SListItemResponse.tinMatch) && + Objects.equals(this.tinMatchStatus, form1042SListItemResponse.tinMatchStatus) && + Objects.equals(this.addressVerification, form1042SListItemResponse.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1042SListItemResponse.addressVerificationStatus) && + Objects.equals(this.referenceId, form1042SListItemResponse.referenceId) && + Objects.equals(this.email, form1042SListItemResponse.email) && + Objects.equals(this.tinType, form1042SListItemResponse.tinType) && + Objects.equals(this.tin, form1042SListItemResponse.tin) && + Objects.equals(this.recipientName, form1042SListItemResponse.recipientName) && + Objects.equals(this.recipientSecondName, form1042SListItemResponse.recipientSecondName) && + Objects.equals(this.address, form1042SListItemResponse.address) && + Objects.equals(this.address2, form1042SListItemResponse.address2) && + Objects.equals(this.city, form1042SListItemResponse.city) && + Objects.equals(this.state, form1042SListItemResponse.state) && + Objects.equals(this.zip, form1042SListItemResponse.zip) && + Objects.equals(this.foreignProvince, form1042SListItemResponse.foreignProvince) && + Objects.equals(this.countryCode, form1042SListItemResponse.countryCode) && + Objects.equals(this.validationErrors, form1042SListItemResponse.validationErrors) && + Objects.equals(this.createdAt, form1042SListItemResponse.createdAt) && + Objects.equals(this.updatedAt, form1042SListItemResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1042SListItemResponse.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, noTin, 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, referenceId, email, tinType, tin, recipientName, recipientSecondName, address, address2, city, state, zip, foreignProvince, countryCode, 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 Form1042SListItemResponse {\n"); + sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).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(" 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(" 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(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).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("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("foreignProvince"); + openapiFields.add("countryCode"); + 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 Form1042SListItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1042SListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SListItemResponse is not found in the empty JSON string", Form1042SListItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1042SListItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1042SListItemResponse.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())); + } + 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()) { + PrimaryWithholdingAgentResponse.validateJsonElement(jsonObj.get("primaryWithholdingAgent")); + } + // validate the optional field `intermediaryOrFlowThrough` + if (jsonObj.get("intermediaryOrFlowThrough") != null && !jsonObj.get("intermediaryOrFlowThrough").isJsonNull()) { + IntermediaryOrFlowThroughResponse.validateJsonElement(jsonObj.get("intermediaryOrFlowThrough")); + } + 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()) { + Form1099StatusDetailResponse.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()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + 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 (!Form1042SListItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1042SListItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1042SListItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1042SListItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1042SListItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1042SListItemResponse + * @throws IOException if the JSON string is invalid with respect to Form1042SListItemResponse + */ + public static Form1042SListItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1042SListItemResponse.class); + } + + /** + * Convert an instance of Form1042SListItemResponse 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/Form1042SRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java new file mode 100644 index 0000000..720c2b9 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SRequest.java @@ -0,0 +1,1633 @@ +/* + * 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.IntermediaryOrFlowThroughRequest; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentRequest; +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.time.OffsetDateTime; +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; + +/** + * Form1042SRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1042SRequest { + 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_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + 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 PrimaryWithholdingAgentRequest primaryWithholdingAgent; + + public static final String SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH = "intermediaryOrFlowThrough"; + @SerializedName(SERIALIZED_NAME_INTERMEDIARY_OR_FLOW_THROUGH) + private IntermediaryOrFlowThroughRequest intermediaryOrFlowThrough; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholdingRequest stateAndLocalWithholding; + + /** + * 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"); + + 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_RECIPIENT_EMAIL = "recipientEmail"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EMAIL) + private String recipientEmail; + + 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_RECIPIENT_NON_US_PROVINCE = "recipientNonUsProvince"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NON_US_PROVINCE) + private String recipientNonUsProvince; + + 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_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public Form1042SRequest() { + } + + public Form1042SRequest uniqueFormId(String uniqueFormId) { + this.uniqueFormId = uniqueFormId; + return this; + } + + /** + * Unique form identifier + * @return uniqueFormId + */ + @javax.annotation.Nullable + public String getUniqueFormId() { + return uniqueFormId; + } + + public void setUniqueFormId(String uniqueFormId) { + this.uniqueFormId = uniqueFormId; + } + + + public Form1042SRequest noTin(Boolean noTin) { + this.noTin = noTin; + return this; + } + + /** + * No TIN indicator + * @return noTin + */ + @javax.annotation.Nullable + public Boolean getNoTin() { + return noTin; + } + + public void setNoTin(Boolean noTin) { + this.noTin = noTin; + } + + + public Form1042SRequest recipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; + return this; + } + + /** + * Recipient's date of birth + * @return recipientDateOfBirth + */ + @javax.annotation.Nullable + public OffsetDateTime getRecipientDateOfBirth() { + return recipientDateOfBirth; + } + + public void setRecipientDateOfBirth(OffsetDateTime recipientDateOfBirth) { + this.recipientDateOfBirth = recipientDateOfBirth; + } + + + public Form1042SRequest recipientGiin(String recipientGiin) { + this.recipientGiin = recipientGiin; + return this; + } + + /** + * Recipient's GIIN (Global Intermediary Identification Number) + * @return recipientGiin + */ + @javax.annotation.Nullable + public String getRecipientGiin() { + return recipientGiin; + } + + public void setRecipientGiin(String recipientGiin) { + this.recipientGiin = recipientGiin; + } + + + public Form1042SRequest recipientForeignTin(String recipientForeignTin) { + this.recipientForeignTin = recipientForeignTin; + return this; + } + + /** + * Recipient's foreign TIN + * @return recipientForeignTin + */ + @javax.annotation.Nullable + public String getRecipientForeignTin() { + return recipientForeignTin; + } + + public void setRecipientForeignTin(String recipientForeignTin) { + this.recipientForeignTin = recipientForeignTin; + } + + + public Form1042SRequest lobCode(String lobCode) { + this.lobCode = lobCode; + return this; + } + + /** + * Limitation on benefits code + * @return lobCode + */ + @javax.annotation.Nullable + public String getLobCode() { + return lobCode; + } + + public void setLobCode(String lobCode) { + this.lobCode = lobCode; + } + + + public Form1042SRequest incomeCode(String incomeCode) { + this.incomeCode = incomeCode; + return this; + } + + /** + * Income code + * @return incomeCode + */ + @javax.annotation.Nullable + public String getIncomeCode() { + return incomeCode; + } + + public void setIncomeCode(String incomeCode) { + this.incomeCode = incomeCode; + } + + + public Form1042SRequest grossIncome(Double grossIncome) { + this.grossIncome = grossIncome; + return this; + } + + /** + * Gross income + * @return grossIncome + */ + @javax.annotation.Nullable + public Double getGrossIncome() { + return grossIncome; + } + + public void setGrossIncome(Double grossIncome) { + this.grossIncome = grossIncome; + } + + + public Form1042SRequest withholdingIndicator(String withholdingIndicator) { + this.withholdingIndicator = withholdingIndicator; + return this; + } + + /** + * Withholding indicator + * @return withholdingIndicator + */ + @javax.annotation.Nullable + public String getWithholdingIndicator() { + return withholdingIndicator; + } + + public void setWithholdingIndicator(String withholdingIndicator) { + this.withholdingIndicator = withholdingIndicator; + } + + + public Form1042SRequest taxCountryCode(String taxCountryCode) { + this.taxCountryCode = taxCountryCode; + return this; + } + + /** + * Country code + * @return taxCountryCode + */ + @javax.annotation.Nullable + public String getTaxCountryCode() { + return taxCountryCode; + } + + public void setTaxCountryCode(String taxCountryCode) { + this.taxCountryCode = taxCountryCode; + } + + + public Form1042SRequest exemptionCodeChap3(String exemptionCodeChap3) { + this.exemptionCodeChap3 = exemptionCodeChap3; + return this; + } + + /** + * Exemption code (Chapter 3) + * @return exemptionCodeChap3 + */ + @javax.annotation.Nullable + public String getExemptionCodeChap3() { + return exemptionCodeChap3; + } + + public void setExemptionCodeChap3(String exemptionCodeChap3) { + this.exemptionCodeChap3 = exemptionCodeChap3; + } + + + public Form1042SRequest exemptionCodeChap4(String exemptionCodeChap4) { + this.exemptionCodeChap4 = exemptionCodeChap4; + return this; + } + + /** + * Exemption code (Chapter 4) + * @return exemptionCodeChap4 + */ + @javax.annotation.Nullable + public String getExemptionCodeChap4() { + return exemptionCodeChap4; + } + + public void setExemptionCodeChap4(String exemptionCodeChap4) { + this.exemptionCodeChap4 = exemptionCodeChap4; + } + + + public Form1042SRequest taxRateChap3(String taxRateChap3) { + this.taxRateChap3 = taxRateChap3; + return this; + } + + /** + * Tax rate (Chapter 3) + * @return taxRateChap3 + */ + @javax.annotation.Nullable + public String getTaxRateChap3() { + return taxRateChap3; + } + + public void setTaxRateChap3(String taxRateChap3) { + this.taxRateChap3 = taxRateChap3; + } + + + public Form1042SRequest withholdingAllowance(Double withholdingAllowance) { + this.withholdingAllowance = withholdingAllowance; + return this; + } + + /** + * Withholding allowance + * @return withholdingAllowance + */ + @javax.annotation.Nullable + public Double getWithholdingAllowance() { + return withholdingAllowance; + } + + public void setWithholdingAllowance(Double withholdingAllowance) { + this.withholdingAllowance = withholdingAllowance; + } + + + public Form1042SRequest federalTaxWithheld(Double federalTaxWithheld) { + this.federalTaxWithheld = federalTaxWithheld; + return this; + } + + /** + * Federal tax withheld + * @return federalTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalTaxWithheld() { + return federalTaxWithheld; + } + + public void setFederalTaxWithheld(Double federalTaxWithheld) { + this.federalTaxWithheld = federalTaxWithheld; + } + + + public Form1042SRequest taxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { + this.taxNotDepositedIndicator = taxNotDepositedIndicator; + return this; + } + + /** + * Tax not deposited indicator + * @return taxNotDepositedIndicator + */ + @javax.annotation.Nullable + public Boolean getTaxNotDepositedIndicator() { + return taxNotDepositedIndicator; + } + + public void setTaxNotDepositedIndicator(Boolean taxNotDepositedIndicator) { + this.taxNotDepositedIndicator = taxNotDepositedIndicator; + } + + + public Form1042SRequest academicIndicator(Boolean academicIndicator) { + this.academicIndicator = academicIndicator; + return this; + } + + /** + * Academic indicator + * @return academicIndicator + */ + @javax.annotation.Nullable + public Boolean getAcademicIndicator() { + return academicIndicator; + } + + public void setAcademicIndicator(Boolean academicIndicator) { + this.academicIndicator = academicIndicator; + } + + + public Form1042SRequest taxWithheldOtherAgents(Double taxWithheldOtherAgents) { + this.taxWithheldOtherAgents = taxWithheldOtherAgents; + return this; + } + + /** + * Tax withheld by other agents + * @return taxWithheldOtherAgents + */ + @javax.annotation.Nullable + public Double getTaxWithheldOtherAgents() { + return taxWithheldOtherAgents; + } + + public void setTaxWithheldOtherAgents(Double taxWithheldOtherAgents) { + this.taxWithheldOtherAgents = taxWithheldOtherAgents; + } + + + public Form1042SRequest amountRepaid(Double amountRepaid) { + this.amountRepaid = amountRepaid; + return this; + } + + /** + * Amount repaid to recipient + * @return amountRepaid + */ + @javax.annotation.Nullable + public Double getAmountRepaid() { + return amountRepaid; + } + + public void setAmountRepaid(Double amountRepaid) { + this.amountRepaid = amountRepaid; + } + + + public Form1042SRequest taxPaidAgent(Double taxPaidAgent) { + this.taxPaidAgent = taxPaidAgent; + return this; + } + + /** + * Tax paid by withholding agent + * @return taxPaidAgent + */ + @javax.annotation.Nullable + public Double getTaxPaidAgent() { + return taxPaidAgent; + } + + public void setTaxPaidAgent(Double taxPaidAgent) { + this.taxPaidAgent = taxPaidAgent; + } + + + public Form1042SRequest chap3StatusCode(String chap3StatusCode) { + this.chap3StatusCode = chap3StatusCode; + return this; + } + + /** + * Chapter 3 status code + * @return chap3StatusCode + */ + @javax.annotation.Nullable + public String getChap3StatusCode() { + return chap3StatusCode; + } + + public void setChap3StatusCode(String chap3StatusCode) { + this.chap3StatusCode = chap3StatusCode; + } + + + public Form1042SRequest chap4StatusCode(String chap4StatusCode) { + this.chap4StatusCode = chap4StatusCode; + return this; + } + + /** + * Chapter 4 status code + * @return chap4StatusCode + */ + @javax.annotation.Nullable + public String getChap4StatusCode() { + return chap4StatusCode; + } + + public void setChap4StatusCode(String chap4StatusCode) { + this.chap4StatusCode = chap4StatusCode; + } + + + public Form1042SRequest primaryWithholdingAgent(PrimaryWithholdingAgentRequest primaryWithholdingAgent) { + this.primaryWithholdingAgent = primaryWithholdingAgent; + return this; + } + + /** + * Primary withholding agent information + * @return primaryWithholdingAgent + */ + @javax.annotation.Nullable + public PrimaryWithholdingAgentRequest getPrimaryWithholdingAgent() { + return primaryWithholdingAgent; + } + + public void setPrimaryWithholdingAgent(PrimaryWithholdingAgentRequest primaryWithholdingAgent) { + this.primaryWithholdingAgent = primaryWithholdingAgent; + } + + + public Form1042SRequest intermediaryOrFlowThrough(IntermediaryOrFlowThroughRequest intermediaryOrFlowThrough) { + this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; + return this; + } + + /** + * Intermediary or flow-through entity information + * @return intermediaryOrFlowThrough + */ + @javax.annotation.Nullable + public IntermediaryOrFlowThroughRequest getIntermediaryOrFlowThrough() { + return intermediaryOrFlowThrough; + } + + public void setIntermediaryOrFlowThrough(IntermediaryOrFlowThroughRequest intermediaryOrFlowThrough) { + this.intermediaryOrFlowThrough = intermediaryOrFlowThrough; + } + + + public Form1042SRequest 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; + } + + + public Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Recipient name + * @return recipientName + */ + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest address(String address) { + this.address = address; + return this; + } + + /** + * Address + * @return address + */ + @javax.annotation.Nonnull + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public Form1042SRequest 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 Form1042SRequest city(String city) { + this.city = city; + return this; + } + + /** + * City + * @return city + */ + @javax.annotation.Nonnull + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest recipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + return this; + } + + /** + * Recipient email address + * @return recipientEmail + */ + @javax.annotation.Nullable + public String getRecipientEmail() { + return recipientEmail; + } + + public void setRecipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + } + + + public Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest recipientNonUsProvince(String recipientNonUsProvince) { + this.recipientNonUsProvince = recipientNonUsProvince; + return this; + } + + /** + * Foreign province + * @return recipientNonUsProvince + */ + @javax.annotation.Nullable + public String getRecipientNonUsProvince() { + return recipientNonUsProvince; + } + + public void setRecipientNonUsProvince(String recipientNonUsProvince) { + this.recipientNonUsProvince = recipientNonUsProvince; + } + + + public Form1042SRequest 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.Nonnull + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest 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 Form1042SRequest 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1042SRequest form1042SRequest = (Form1042SRequest) o; + return Objects.equals(this.uniqueFormId, form1042SRequest.uniqueFormId) && + Objects.equals(this.noTin, form1042SRequest.noTin) && + Objects.equals(this.recipientDateOfBirth, form1042SRequest.recipientDateOfBirth) && + Objects.equals(this.recipientGiin, form1042SRequest.recipientGiin) && + Objects.equals(this.recipientForeignTin, form1042SRequest.recipientForeignTin) && + Objects.equals(this.lobCode, form1042SRequest.lobCode) && + Objects.equals(this.incomeCode, form1042SRequest.incomeCode) && + Objects.equals(this.grossIncome, form1042SRequest.grossIncome) && + Objects.equals(this.withholdingIndicator, form1042SRequest.withholdingIndicator) && + Objects.equals(this.taxCountryCode, form1042SRequest.taxCountryCode) && + Objects.equals(this.exemptionCodeChap3, form1042SRequest.exemptionCodeChap3) && + Objects.equals(this.exemptionCodeChap4, form1042SRequest.exemptionCodeChap4) && + Objects.equals(this.taxRateChap3, form1042SRequest.taxRateChap3) && + Objects.equals(this.withholdingAllowance, form1042SRequest.withholdingAllowance) && + Objects.equals(this.federalTaxWithheld, form1042SRequest.federalTaxWithheld) && + Objects.equals(this.taxNotDepositedIndicator, form1042SRequest.taxNotDepositedIndicator) && + Objects.equals(this.academicIndicator, form1042SRequest.academicIndicator) && + Objects.equals(this.taxWithheldOtherAgents, form1042SRequest.taxWithheldOtherAgents) && + Objects.equals(this.amountRepaid, form1042SRequest.amountRepaid) && + Objects.equals(this.taxPaidAgent, form1042SRequest.taxPaidAgent) && + Objects.equals(this.chap3StatusCode, form1042SRequest.chap3StatusCode) && + Objects.equals(this.chap4StatusCode, form1042SRequest.chap4StatusCode) && + Objects.equals(this.primaryWithholdingAgent, form1042SRequest.primaryWithholdingAgent) && + Objects.equals(this.intermediaryOrFlowThrough, form1042SRequest.intermediaryOrFlowThrough) && + Objects.equals(this.stateAndLocalWithholding, form1042SRequest.stateAndLocalWithholding) && + Objects.equals(this.type, form1042SRequest.type) && + Objects.equals(this.issuerId, form1042SRequest.issuerId) && + Objects.equals(this.referenceId, form1042SRequest.referenceId) && + Objects.equals(this.recipientTin, form1042SRequest.recipientTin) && + Objects.equals(this.recipientName, form1042SRequest.recipientName) && + Objects.equals(this.tinType, form1042SRequest.tinType) && + Objects.equals(this.recipientSecondName, form1042SRequest.recipientSecondName) && + Objects.equals(this.address, form1042SRequest.address) && + Objects.equals(this.address2, form1042SRequest.address2) && + Objects.equals(this.city, form1042SRequest.city) && + Objects.equals(this.state, form1042SRequest.state) && + Objects.equals(this.zip, form1042SRequest.zip) && + Objects.equals(this.recipientEmail, form1042SRequest.recipientEmail) && + Objects.equals(this.accountNumber, form1042SRequest.accountNumber) && + Objects.equals(this.officeCode, form1042SRequest.officeCode) && + Objects.equals(this.recipientNonUsProvince, form1042SRequest.recipientNonUsProvince) && + Objects.equals(this.countryCode, form1042SRequest.countryCode) && + Objects.equals(this.federalEFile, form1042SRequest.federalEFile) && + Objects.equals(this.postalMail, form1042SRequest.postalMail) && + Objects.equals(this.stateEFile, form1042SRequest.stateEFile) && + Objects.equals(this.tinMatch, form1042SRequest.tinMatch) && + Objects.equals(this.addressVerification, form1042SRequest.addressVerification); + } + + 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, noTin, 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, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification); + } + + 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 Form1042SRequest {\n"); + sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).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(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).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(" recipientEmail: ").append(toIndentedString(recipientEmail)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" recipientNonUsProvince: ").append(toIndentedString(recipientNonUsProvince)).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(" addressVerification: ").append(toIndentedString(addressVerification)).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("recipientEmail"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("recipientNonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Form1042SRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1042SRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SRequest is not found in the empty JSON string", Form1042SRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1042SRequest.openapiFields.contains(entry.getKey())) { + 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())); + } + 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()) { + PrimaryWithholdingAgentRequest.validateJsonElement(jsonObj.get("primaryWithholdingAgent")); + } + // validate the optional field `intermediaryOrFlowThrough` + if (jsonObj.get("intermediaryOrFlowThrough") != null && !jsonObj.get("intermediaryOrFlowThrough").isJsonNull()) { + IntermediaryOrFlowThroughRequest.validateJsonElement(jsonObj.get("intermediaryOrFlowThrough")); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholdingRequest.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + 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").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").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()) { + 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("recipientEmail") != null && !jsonObj.get("recipientEmail").isJsonNull()) && !jsonObj.get("recipientEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientEmail").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("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); + } + if (!jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1042SRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1042SRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1042SRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1042SRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1042SRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1042SRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1042SRequest + * @throws IOException if the JSON string is invalid with respect to Form1042SRequest + */ + public static Form1042SRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1042SRequest.class); + } + + /** + * Convert an instance of Form1042SRequest 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/Form1042SResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java new file mode 100644 index 0000000..3226509 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042SResponse.java @@ -0,0 +1,1390 @@ +/* + * 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; + +/** + * Form1042SResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1042SResponse { + /** + * 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"); + + 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_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + 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_RECIPIENT_EMAIL = "recipientEmail"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EMAIL) + private String recipientEmail; + + 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_RECIPIENT_NON_US_PROVINCE = "recipientNonUsProvince"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NON_US_PROVINCE) + private String recipientNonUsProvince; + + 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_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_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 Form1042SResponse() { + } + + public Form1042SResponse( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * Get type + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse userId(String userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + */ + @javax.annotation.Nullable + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + + public Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse recipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + return this; + } + + /** + * Get recipientEmail + * @return recipientEmail + */ + @javax.annotation.Nullable + public String getRecipientEmail() { + return recipientEmail; + } + + public void setRecipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + } + + + public Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse recipientNonUsProvince(String recipientNonUsProvince) { + this.recipientNonUsProvince = recipientNonUsProvince; + return this; + } + + /** + * Get recipientNonUsProvince + * @return recipientNonUsProvince + */ + @javax.annotation.Nullable + public String getRecipientNonUsProvince() { + return recipientNonUsProvince; + } + + public void setRecipientNonUsProvince(String recipientNonUsProvince) { + this.recipientNonUsProvince = recipientNonUsProvince; + } + + + public Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse stateEfileStatus(List stateEfileStatus) { + this.stateEfileStatus = stateEfileStatus; + return this; + } + + public Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse 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 Form1042SResponse validationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + public Form1042SResponse 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; + } + Form1042SResponse form1042SResponse = (Form1042SResponse) o; + return Objects.equals(this.type, form1042SResponse.type) && + Objects.equals(this.createdAt, form1042SResponse.createdAt) && + Objects.equals(this.updatedAt, form1042SResponse.updatedAt) && + Objects.equals(this.userId, form1042SResponse.userId) && + Objects.equals(this.stateAndLocalWithholding, form1042SResponse.stateAndLocalWithholding) && + Objects.equals(this.tinType, form1042SResponse.tinType) && + Objects.equals(this.id, form1042SResponse.id) && + Objects.equals(this.issuerId, form1042SResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1042SResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1042SResponse.issuerTin) && + Objects.equals(this.taxYear, form1042SResponse.taxYear) && + Objects.equals(this.referenceId, form1042SResponse.referenceId) && + Objects.equals(this.recipientName, form1042SResponse.recipientName) && + Objects.equals(this.recipientTin, form1042SResponse.recipientTin) && + Objects.equals(this.recipientSecondName, form1042SResponse.recipientSecondName) && + Objects.equals(this.address, form1042SResponse.address) && + Objects.equals(this.address2, form1042SResponse.address2) && + Objects.equals(this.city, form1042SResponse.city) && + Objects.equals(this.state, form1042SResponse.state) && + Objects.equals(this.zip, form1042SResponse.zip) && + Objects.equals(this.recipientEmail, form1042SResponse.recipientEmail) && + Objects.equals(this.accountNumber, form1042SResponse.accountNumber) && + Objects.equals(this.officeCode, form1042SResponse.officeCode) && + Objects.equals(this.recipientNonUsProvince, form1042SResponse.recipientNonUsProvince) && + Objects.equals(this.countryCode, form1042SResponse.countryCode) && + Objects.equals(this.federalEFile, form1042SResponse.federalEFile) && + Objects.equals(this.postalMail, form1042SResponse.postalMail) && + Objects.equals(this.stateEFile, form1042SResponse.stateEFile) && + Objects.equals(this.tinMatch, form1042SResponse.tinMatch) && + Objects.equals(this.addressVerification, form1042SResponse.addressVerification) && + Objects.equals(this.federalEfileStatus, form1042SResponse.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1042SResponse.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1042SResponse.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1042SResponse.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1042SResponse.addressVerificationStatus) && + Objects.equals(this.validationErrors, form1042SResponse.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(type, createdAt, updatedAt, userId, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, federalEfileStatus, 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 Form1042SResponse {\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(" userId: ").append(toIndentedString(userId)).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(" recipientEmail: ").append(toIndentedString(recipientEmail)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" recipientNonUsProvince: ").append(toIndentedString(recipientNonUsProvince)).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(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).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("userId"); + 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("recipientEmail"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("recipientNonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("federalEfileStatus"); + 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 Form1042SResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1042SResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1042SResponse is not found in the empty JSON string", Form1042SResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1042SResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1042SResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").toString())); + } + // 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("recipientEmail") != null && !jsonObj.get("recipientEmail").isJsonNull()) && !jsonObj.get("recipientEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientEmail").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("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").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")); + } + 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 (!Form1042SResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1042SResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1042SResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1042SResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1042SResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1042SResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1042SResponse + * @throws IOException if the JSON string is invalid with respect to Form1042SResponse + */ + public static Form1042SResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1042SResponse.class); + } + + /** + * Convert an instance of Form1042SResponse 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/Form1095BList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BList.java index ed65203..7d030d0 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BList.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BList.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 @@ -62,7 +62,7 @@ public class Form1095BList { public static final String SERIALIZED_NAME_FORMS = "forms"; @SerializedName(SERIALIZED_NAME_FORMS) - private List forms = new ArrayList<>(); + private List forms; public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; @SerializedName(SERIALIZED_NAME_FORM_TYPE) 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 4f4179e..8141e15 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItem.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 @@ -84,23 +84,23 @@ public class Form1095BListItem { private OffsetDateTime employeeDateOfBirth; /** - * Gets or Sets originOfHealthCoverageCode + * Origin of health coverage code */ @JsonAdapter(OriginOfHealthCoverageCodeEnum.Adapter.class) public enum OriginOfHealthCoverageCodeEnum { - SMALL_BUSINESS_HEALTH_OPTIONS_PROGRAM("SmallBusinessHealthOptionsProgram"), + A("A"), - EMPLOYER_SPONSORED("EmployerSponsored"), + B("B"), - GOVERNMENT_SPONSORED("GovernmentSponsored"), + C("C"), - INDIVIDUAL_MARKET("IndividualMarket"), + D("D"), - MULTIEMPLOYER_PLAN("MultiemployerPlan"), + E("E"), - OTHER_DESIGNATED_MINIMUM_ESSENTIAL_COVERAGE("OtherDesignatedMinimumEssentialCoverage"), + F("F"), - EMPLOYER_SPONSORED_INDIVIDUAL_HRA("EmployerSponsoredIndividualHra"); + G("G"); private String value; @@ -151,7 +151,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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_ISSUER_ID = "issuerId"; @SerializedName(SERIALIZED_NAME_ISSUER_ID) @@ -161,16 +161,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -306,7 +306,7 @@ public Form1095BListItem employeeFirstName(String employeeFirstName) { } /** - * Get employeeFirstName + * Employee's first name * @return employeeFirstName */ @javax.annotation.Nullable @@ -325,7 +325,7 @@ public Form1095BListItem employeeMiddleName(String employeeMiddleName) { } /** - * Get employeeMiddleName + * Employee's middle name * @return employeeMiddleName */ @javax.annotation.Nullable @@ -344,7 +344,7 @@ public Form1095BListItem employeeLastName(String employeeLastName) { } /** - * Get employeeLastName + * Employee's last name * @return employeeLastName */ @javax.annotation.Nullable @@ -363,7 +363,7 @@ public Form1095BListItem employeeNameSuffix(String employeeNameSuffix) { } /** - * Get employeeNameSuffix + * Employee's name suffix * @return employeeNameSuffix */ @javax.annotation.Nullable @@ -382,7 +382,7 @@ public Form1095BListItem employeeDateOfBirth(OffsetDateTime employeeDateOfBirth) } /** - * Get employeeDateOfBirth + * Employee's date of birth * @return employeeDateOfBirth */ @javax.annotation.Nullable @@ -401,7 +401,7 @@ public Form1095BListItem originOfHealthCoverageCode(OriginOfHealthCoverageCodeEn } /** - * Get originOfHealthCoverageCode + * Origin of health coverage code * @return originOfHealthCoverageCode */ @javax.annotation.Nullable @@ -428,7 +428,7 @@ public Form1095BListItem addCoveredIndividualsItem(CoveredIndividualRequest cove } /** - * Get coveredIndividuals + * Covered individuals information * @return coveredIndividuals */ @javax.annotation.Nullable @@ -447,7 +447,7 @@ public Form1095BListItem issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -466,7 +466,7 @@ public Form1095BListItem referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -479,41 +479,41 @@ public void setReferenceId(String referenceId) { } - public Form1095BListItem recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1095BListItem recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1095BListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1095BListItem recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -523,7 +523,7 @@ public Form1095BListItem tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -542,7 +542,7 @@ public Form1095BListItem recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -561,10 +561,10 @@ public Form1095BListItem address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -580,7 +580,7 @@ public Form1095BListItem address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -599,10 +599,10 @@ public Form1095BListItem city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -618,7 +618,7 @@ public Form1095BListItem state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -637,7 +637,7 @@ public Form1095BListItem zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -656,7 +656,7 @@ public Form1095BListItem recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -675,7 +675,7 @@ public Form1095BListItem accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -694,7 +694,7 @@ public Form1095BListItem officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -713,7 +713,7 @@ public Form1095BListItem recipientNonUsProvince(String recipientNonUsProvince) { } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -732,10 +732,10 @@ public Form1095BListItem countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -751,7 +751,7 @@ public Form1095BListItem federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -770,7 +770,7 @@ public Form1095BListItem postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -789,7 +789,7 @@ public Form1095BListItem stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -808,7 +808,7 @@ public Form1095BListItem tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -827,7 +827,7 @@ public Form1095BListItem addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -846,7 +846,7 @@ public Form1095BListItem stateAndLocalWithholding(StateAndLocalWithholdingReques } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -878,8 +878,8 @@ public boolean equals(Object o) { Objects.equals(this.coveredIndividuals, form1095BListItem.coveredIndividuals) && Objects.equals(this.issuerId, form1095BListItem.issuerId) && Objects.equals(this.referenceId, form1095BListItem.referenceId) && - Objects.equals(this.recipientName, form1095BListItem.recipientName) && Objects.equals(this.recipientTin, form1095BListItem.recipientTin) && + Objects.equals(this.recipientName, form1095BListItem.recipientName) && Objects.equals(this.tinType, form1095BListItem.tinType) && Objects.equals(this.recipientSecondName, form1095BListItem.recipientSecondName) && Objects.equals(this.address, form1095BListItem.address) && @@ -906,7 +906,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, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -929,8 +929,8 @@ public String toString() { sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).append("\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).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(" 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"); @@ -973,8 +973,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -996,6 +996,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1018,6 +1022,13 @@ 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())); @@ -1058,12 +1069,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1074,13 +1085,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1101,7 +1112,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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/Form1095BListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItemResponse.java new file mode 100644 index 0000000..35b85af --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BListItemResponse.java @@ -0,0 +1,1201 @@ +/* + * 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.CoveredIndividualReferenceResponse; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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; + +/** + * Form1095BListItemResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1095BListItemResponse { + public static final String SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE = "originOfHealthCoverageCode"; + @SerializedName(SERIALIZED_NAME_ORIGIN_OF_HEALTH_COVERAGE_CODE) + private String originOfHealthCoverageCode; + + public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; + @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) + private List coveredIndividuals; + + 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse addressVerificationStatus; + + 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_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_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_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 Form1095BListItemResponse() { + } + + public Form1095BListItemResponse( + String id, + Form1099StatusDetailResponse federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetailResponse postalMailStatus, + Form1099StatusDetailResponse tinMatchStatus, + Form1099StatusDetailResponse addressVerificationStatus, + 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.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1095BListItemResponse originOfHealthCoverageCode(String originOfHealthCoverageCode) { + this.originOfHealthCoverageCode = originOfHealthCoverageCode; + return this; + } + + /** + * Origin of health coverage code + * @return originOfHealthCoverageCode + */ + @javax.annotation.Nullable + public String getOriginOfHealthCoverageCode() { + return originOfHealthCoverageCode; + } + + public void setOriginOfHealthCoverageCode(String originOfHealthCoverageCode) { + this.originOfHealthCoverageCode = originOfHealthCoverageCode; + } + + + public Form1095BListItemResponse coveredIndividuals(List coveredIndividuals) { + this.coveredIndividuals = coveredIndividuals; + return this; + } + + public Form1095BListItemResponse addCoveredIndividualsItem(CoveredIndividualReferenceResponse coveredIndividualsItem) { + if (this.coveredIndividuals == null) { + this.coveredIndividuals = new ArrayList<>(); + } + this.coveredIndividuals.add(coveredIndividualsItem); + return this; + } + + /** + * Covered individuals information + * @return coveredIndividuals + */ + @javax.annotation.Nullable + public List getCoveredIndividuals() { + return coveredIndividuals; + } + + public void setCoveredIndividuals(List coveredIndividuals) { + this.coveredIndividuals = coveredIndividuals; + } + + + /** + * ID of the form + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + + public Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1099StatusDetailResponse getFederalEfileStatus() { + return federalEfileStatus; + } + + + + public Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1099StatusDetailResponse getPostalMailStatus() { + return postalMailStatus; + } + + + + public Form1095BListItemResponse 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 Form1099StatusDetailResponse getTinMatchStatus() { + return tinMatchStatus; + } + + + + public Form1095BListItemResponse 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 Form1099StatusDetailResponse getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + public Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse 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 Form1095BListItemResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + return this; + } + + /** + * Foreign province + * @return foreignProvince + */ + @javax.annotation.Nullable + public String getForeignProvince() { + return foreignProvince; + } + + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public Form1095BListItemResponse 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; + } + + + /** + * 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 Form1095BListItemResponse 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; + } + Form1095BListItemResponse form1095BListItemResponse = (Form1095BListItemResponse) o; + return Objects.equals(this.originOfHealthCoverageCode, form1095BListItemResponse.originOfHealthCoverageCode) && + Objects.equals(this.coveredIndividuals, form1095BListItemResponse.coveredIndividuals) && + Objects.equals(this.id, form1095BListItemResponse.id) && + Objects.equals(this.type, form1095BListItemResponse.type) && + Objects.equals(this.issuerId, form1095BListItemResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1095BListItemResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1095BListItemResponse.issuerTin) && + Objects.equals(this.taxYear, form1095BListItemResponse.taxYear) && + Objects.equals(this.federalEfile, form1095BListItemResponse.federalEfile) && + Objects.equals(this.federalEfileStatus, form1095BListItemResponse.federalEfileStatus) && + Objects.equals(this.stateEfile, form1095BListItemResponse.stateEfile) && + Objects.equals(this.stateEfileStatus, form1095BListItemResponse.stateEfileStatus) && + Objects.equals(this.postalMail, form1095BListItemResponse.postalMail) && + Objects.equals(this.postalMailStatus, form1095BListItemResponse.postalMailStatus) && + Objects.equals(this.tinMatch, form1095BListItemResponse.tinMatch) && + Objects.equals(this.tinMatchStatus, form1095BListItemResponse.tinMatchStatus) && + Objects.equals(this.addressVerification, form1095BListItemResponse.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1095BListItemResponse.addressVerificationStatus) && + Objects.equals(this.referenceId, form1095BListItemResponse.referenceId) && + Objects.equals(this.email, form1095BListItemResponse.email) && + Objects.equals(this.tinType, form1095BListItemResponse.tinType) && + Objects.equals(this.tin, form1095BListItemResponse.tin) && + Objects.equals(this.recipientName, form1095BListItemResponse.recipientName) && + Objects.equals(this.recipientSecondName, form1095BListItemResponse.recipientSecondName) && + Objects.equals(this.address, form1095BListItemResponse.address) && + Objects.equals(this.address2, form1095BListItemResponse.address2) && + Objects.equals(this.city, form1095BListItemResponse.city) && + Objects.equals(this.state, form1095BListItemResponse.state) && + Objects.equals(this.zip, form1095BListItemResponse.zip) && + Objects.equals(this.foreignProvince, form1095BListItemResponse.foreignProvince) && + Objects.equals(this.countryCode, form1095BListItemResponse.countryCode) && + Objects.equals(this.validationErrors, form1095BListItemResponse.validationErrors) && + Objects.equals(this.createdAt, form1095BListItemResponse.createdAt) && + Objects.equals(this.updatedAt, form1095BListItemResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1095BListItemResponse.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(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); + } + + 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 Form1095BListItemResponse {\n"); + sb.append(" originOfHealthCoverageCode: ").append(toIndentedString(originOfHealthCoverageCode)).append("\n"); + sb.append(" coveredIndividuals: ").append(toIndentedString(coveredIndividuals)).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(" 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(" 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(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).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("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("foreignProvince"); + openapiFields.add("countryCode"); + 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 Form1095BListItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1095BListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1095BListItemResponse is not found in the empty JSON string", Form1095BListItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1095BListItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1095BListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1095BListItemResponse.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("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())); + } + 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++) { + CoveredIndividualReferenceResponse.validateJsonElement(jsonArraycoveredIndividuals.get(i)); + }; + } + } + 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()) { + Form1099StatusDetailResponse.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()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + 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 (!Form1095BListItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1095BListItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1095BListItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1095BListItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1095BListItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1095BListItemResponse + * @throws IOException if the JSON string is invalid with respect to Form1095BListItemResponse + */ + public static Form1095BListItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1095BListItemResponse.class); + } + + /** + * Convert an instance of Form1095BListItemResponse 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/Form1095BRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java index 549c335..f51dbce 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095BRequest.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 @@ -84,23 +84,23 @@ public class Form1095BRequest { private OffsetDateTime employeeDateOfBirth; /** - * Gets or Sets originOfHealthCoverageCode + * Origin of health coverage code */ @JsonAdapter(OriginOfHealthCoverageCodeEnum.Adapter.class) public enum OriginOfHealthCoverageCodeEnum { - SMALL_BUSINESS_HEALTH_OPTIONS_PROGRAM("SmallBusinessHealthOptionsProgram"), + A("A"), - EMPLOYER_SPONSORED("EmployerSponsored"), + B("B"), - GOVERNMENT_SPONSORED("GovernmentSponsored"), + C("C"), - INDIVIDUAL_MARKET("IndividualMarket"), + D("D"), - MULTIEMPLOYER_PLAN("MultiemployerPlan"), + E("E"), - OTHER_DESIGNATED_MINIMUM_ESSENTIAL_COVERAGE("OtherDesignatedMinimumEssentialCoverage"), + F("F"), - EMPLOYER_SPONSORED_INDIVIDUAL_HRA("EmployerSponsoredIndividualHra"); + G("G"); private String value; @@ -151,24 +151,26 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_COVERED_INDIVIDUALS = "coveredIndividuals"; @SerializedName(SERIALIZED_NAME_COVERED_INDIVIDUALS) - private List coveredIndividuals = new ArrayList<>(); + private List coveredIndividuals; /** * Gets or Sets type */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -225,16 +227,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -364,20 +366,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public Form1095BRequest() { } - public Form1095BRequest( - TypeEnum type - ) { - this(); - this.type = type; - } - public Form1095BRequest employeeFirstName(String employeeFirstName) { this.employeeFirstName = employeeFirstName; return this; } /** - * Get employeeFirstName + * Employee's first name * @return employeeFirstName */ @javax.annotation.Nullable @@ -396,7 +391,7 @@ public Form1095BRequest employeeMiddleName(String employeeMiddleName) { } /** - * Get employeeMiddleName + * Employee's middle name * @return employeeMiddleName */ @javax.annotation.Nullable @@ -415,7 +410,7 @@ public Form1095BRequest employeeLastName(String employeeLastName) { } /** - * Get employeeLastName + * Employee's last name * @return employeeLastName */ @javax.annotation.Nullable @@ -434,7 +429,7 @@ public Form1095BRequest employeeNameSuffix(String employeeNameSuffix) { } /** - * Get employeeNameSuffix + * Employee's name suffix * @return employeeNameSuffix */ @javax.annotation.Nullable @@ -453,7 +448,7 @@ public Form1095BRequest employeeDateOfBirth(OffsetDateTime employeeDateOfBirth) } /** - * Get employeeDateOfBirth + * Employee's date of birth * @return employeeDateOfBirth */ @javax.annotation.Nullable @@ -472,7 +467,7 @@ public Form1095BRequest originOfHealthCoverageCode(OriginOfHealthCoverageCodeEnu } /** - * Get originOfHealthCoverageCode + * Origin of health coverage code * @return originOfHealthCoverageCode */ @javax.annotation.Nullable @@ -499,7 +494,7 @@ public Form1095BRequest addCoveredIndividualsItem(CoveredIndividualRequest cover } /** - * Get coveredIndividuals + * Covered individuals information * @return coveredIndividuals */ @javax.annotation.Nullable @@ -512,6 +507,11 @@ public void setCoveredIndividuals(List coveredIndividu } + public Form1095BRequest type(TypeEnum type) { + this.type = type; + return this; + } + /** * Get type * @return type @@ -521,6 +521,9 @@ public TypeEnum getType() { return type; } + public void setType(TypeEnum type) { + this.type = type; + } public Form1095BRequest issuerId(String issuerId) { @@ -529,7 +532,7 @@ public Form1095BRequest issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -548,7 +551,7 @@ public Form1095BRequest referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -561,41 +564,41 @@ public void setReferenceId(String referenceId) { } - public Form1095BRequest recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1095BRequest recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1095BRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1095BRequest recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -605,7 +608,7 @@ public Form1095BRequest tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -624,7 +627,7 @@ public Form1095BRequest recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -643,10 +646,10 @@ public Form1095BRequest address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -662,7 +665,7 @@ public Form1095BRequest address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -681,10 +684,10 @@ public Form1095BRequest city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -700,7 +703,7 @@ public Form1095BRequest state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -719,7 +722,7 @@ public Form1095BRequest zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -738,7 +741,7 @@ public Form1095BRequest recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -757,7 +760,7 @@ public Form1095BRequest accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -776,7 +779,7 @@ public Form1095BRequest officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -795,7 +798,7 @@ public Form1095BRequest recipientNonUsProvince(String recipientNonUsProvince) { } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -814,10 +817,10 @@ public Form1095BRequest countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -833,7 +836,7 @@ public Form1095BRequest federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -852,7 +855,7 @@ public Form1095BRequest postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -871,7 +874,7 @@ public Form1095BRequest stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -890,7 +893,7 @@ public Form1095BRequest tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -909,7 +912,7 @@ public Form1095BRequest addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -928,7 +931,7 @@ public Form1095BRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -961,8 +964,8 @@ public boolean equals(Object o) { Objects.equals(this.type, form1095BRequest.type) && Objects.equals(this.issuerId, form1095BRequest.issuerId) && Objects.equals(this.referenceId, form1095BRequest.referenceId) && - Objects.equals(this.recipientName, form1095BRequest.recipientName) && Objects.equals(this.recipientTin, form1095BRequest.recipientTin) && + Objects.equals(this.recipientName, form1095BRequest.recipientName) && Objects.equals(this.tinType, form1095BRequest.tinType) && Objects.equals(this.recipientSecondName, form1095BRequest.recipientSecondName) && Objects.equals(this.address, form1095BRequest.address) && @@ -989,7 +992,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, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1013,8 +1016,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1058,8 +1061,8 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1081,6 +1084,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1103,6 +1110,13 @@ 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())); @@ -1150,12 +1164,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1166,13 +1180,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1193,7 +1207,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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/Form1099BaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099BaseResponse.java new file mode 100644 index 0000000..dca3e6c --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099BaseResponse.java @@ -0,0 +1,1092 @@ +/* + * 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.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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; + +/** + * Form1099BaseResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099BaseResponse { + 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse addressVerificationStatus; + + 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_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_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_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 Form1099BaseResponse() { + } + + public Form1099BaseResponse( + String id, + Form1099StatusDetailResponse federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetailResponse postalMailStatus, + Form1099StatusDetailResponse tinMatchStatus, + Form1099StatusDetailResponse addressVerificationStatus, + 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.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + /** + * ID of the form + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + + public Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099StatusDetailResponse getFederalEfileStatus() { + return federalEfileStatus; + } + + + + public Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099StatusDetailResponse getPostalMailStatus() { + return postalMailStatus; + } + + + + public Form1099BaseResponse 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 Form1099StatusDetailResponse getTinMatchStatus() { + return tinMatchStatus; + } + + + + public Form1099BaseResponse 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 Form1099StatusDetailResponse getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + public Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse 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 Form1099BaseResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + return this; + } + + /** + * Foreign province + * @return foreignProvince + */ + @javax.annotation.Nullable + public String getForeignProvince() { + return foreignProvince; + } + + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public Form1099BaseResponse 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; + } + + + /** + * 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 Form1099BaseResponse 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; + } + Form1099BaseResponse form1099BaseResponse = (Form1099BaseResponse) o; + return Objects.equals(this.id, form1099BaseResponse.id) && + Objects.equals(this.type, form1099BaseResponse.type) && + Objects.equals(this.issuerId, form1099BaseResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1099BaseResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099BaseResponse.issuerTin) && + Objects.equals(this.taxYear, form1099BaseResponse.taxYear) && + Objects.equals(this.federalEfile, form1099BaseResponse.federalEfile) && + Objects.equals(this.federalEfileStatus, form1099BaseResponse.federalEfileStatus) && + Objects.equals(this.stateEfile, form1099BaseResponse.stateEfile) && + Objects.equals(this.stateEfileStatus, form1099BaseResponse.stateEfileStatus) && + Objects.equals(this.postalMail, form1099BaseResponse.postalMail) && + Objects.equals(this.postalMailStatus, form1099BaseResponse.postalMailStatus) && + Objects.equals(this.tinMatch, form1099BaseResponse.tinMatch) && + Objects.equals(this.tinMatchStatus, form1099BaseResponse.tinMatchStatus) && + Objects.equals(this.addressVerification, form1099BaseResponse.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1099BaseResponse.addressVerificationStatus) && + Objects.equals(this.referenceId, form1099BaseResponse.referenceId) && + Objects.equals(this.email, form1099BaseResponse.email) && + Objects.equals(this.tinType, form1099BaseResponse.tinType) && + Objects.equals(this.tin, form1099BaseResponse.tin) && + Objects.equals(this.recipientName, form1099BaseResponse.recipientName) && + Objects.equals(this.recipientSecondName, form1099BaseResponse.recipientSecondName) && + Objects.equals(this.address, form1099BaseResponse.address) && + Objects.equals(this.address2, form1099BaseResponse.address2) && + Objects.equals(this.city, form1099BaseResponse.city) && + Objects.equals(this.state, form1099BaseResponse.state) && + Objects.equals(this.zip, form1099BaseResponse.zip) && + Objects.equals(this.foreignProvince, form1099BaseResponse.foreignProvince) && + Objects.equals(this.countryCode, form1099BaseResponse.countryCode) && + Objects.equals(this.validationErrors, form1099BaseResponse.validationErrors) && + Objects.equals(this.createdAt, form1099BaseResponse.createdAt) && + Objects.equals(this.updatedAt, form1099BaseResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099BaseResponse.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(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); + } + + 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 Form1099BaseResponse {\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(" 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(" 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(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).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(); + + // 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 Form1099BaseResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099BaseResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099BaseResponse is not found in the empty JSON string", Form1099BaseResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099BaseResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099BaseResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099BaseResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").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()) { + Form1099StatusDetailResponse.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()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + 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 (!Form1099BaseResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099BaseResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099BaseResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099BaseResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099BaseResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099BaseResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099BaseResponse + * @throws IOException if the JSON string is invalid with respect to Form1099BaseResponse + */ + public static Form1099BaseResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099BaseResponse.class); + } + + /** + * Convert an instance of Form1099BaseResponse 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/Form1099DivList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivList.java index 15b31d7..b460d2e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivList.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivList.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 @@ -62,7 +62,7 @@ public class Form1099DivList { public static final String SERIALIZED_NAME_FORMS = "forms"; @SerializedName(SERIALIZED_NAME_FORMS) - private List forms = new ArrayList<>(); + private List forms; public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; @SerializedName(SERIALIZED_NAME_FORM_TYPE) 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 78cbb46..1dbfdbb 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivListItem.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 @@ -155,16 +155,16 @@ public class Form1099DivListItem { @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -300,7 +300,7 @@ public Form1099DivListItem totalOrdinaryDividends(String totalOrdinaryDividends) } /** - * Get totalOrdinaryDividends + * Total ordinary dividends * @return totalOrdinaryDividends */ @javax.annotation.Nullable @@ -319,7 +319,7 @@ public Form1099DivListItem qualifiedDividends(String qualifiedDividends) { } /** - * Get qualifiedDividends + * Qualified dividends * @return qualifiedDividends */ @javax.annotation.Nullable @@ -338,7 +338,7 @@ public Form1099DivListItem totalCapitalGainDistr(String totalCapitalGainDistr) { } /** - * Get totalCapitalGainDistr + * Total capital gain distributions * @return totalCapitalGainDistr */ @javax.annotation.Nullable @@ -357,7 +357,7 @@ public Form1099DivListItem unrecapSec1250Gain(String unrecapSec1250Gain) { } /** - * Get unrecapSec1250Gain + * Unrecaptured Section 1250 gain * @return unrecapSec1250Gain */ @javax.annotation.Nullable @@ -376,7 +376,7 @@ public Form1099DivListItem section1202Gain(String section1202Gain) { } /** - * Get section1202Gain + * Section 1202 gain * @return section1202Gain */ @javax.annotation.Nullable @@ -395,7 +395,7 @@ public Form1099DivListItem collectiblesGain(String collectiblesGain) { } /** - * Get collectiblesGain + * Collectibles (28%) gain * @return collectiblesGain */ @javax.annotation.Nullable @@ -414,7 +414,7 @@ public Form1099DivListItem section897OrdinaryDividends(String section897Ordinary } /** - * Get section897OrdinaryDividends + * Section 897 ordinary dividends * @return section897OrdinaryDividends */ @javax.annotation.Nullable @@ -433,7 +433,7 @@ public Form1099DivListItem section897CapitalGain(String section897CapitalGain) { } /** - * Get section897CapitalGain + * Section 897 capital gain * @return section897CapitalGain */ @javax.annotation.Nullable @@ -452,7 +452,7 @@ public Form1099DivListItem nondividendDistributions(String nondividendDistributi } /** - * Get nondividendDistributions + * Nondividend distributions * @return nondividendDistributions */ @javax.annotation.Nullable @@ -471,7 +471,7 @@ public Form1099DivListItem federalIncomeTaxWithheld(String federalIncomeTaxWithh } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -490,7 +490,7 @@ public Form1099DivListItem section199ADividends(String section199ADividends) { } /** - * Get section199ADividends + * Section 199A dividends * @return section199ADividends */ @javax.annotation.Nullable @@ -509,7 +509,7 @@ public Form1099DivListItem investmentExpenses(String investmentExpenses) { } /** - * Get investmentExpenses + * Investment expenses * @return investmentExpenses */ @javax.annotation.Nullable @@ -528,7 +528,7 @@ public Form1099DivListItem foreignTaxPaid(String foreignTaxPaid) { } /** - * Get foreignTaxPaid + * Foreign tax paid * @return foreignTaxPaid */ @javax.annotation.Nullable @@ -547,7 +547,7 @@ public Form1099DivListItem foreignCountryOrUSPossession(String foreignCountryOrU } /** - * Get foreignCountryOrUSPossession + * Foreign country or U.S. possession * @return foreignCountryOrUSPossession */ @javax.annotation.Nullable @@ -566,7 +566,7 @@ public Form1099DivListItem cashLiquidationDistributions(String cashLiquidationDi } /** - * Get cashLiquidationDistributions + * Cash liquidation distributions * @return cashLiquidationDistributions */ @javax.annotation.Nullable @@ -585,7 +585,7 @@ public Form1099DivListItem noncashLiquidationDistributions(String noncashLiquida } /** - * Get noncashLiquidationDistributions + * Noncash liquidation distributions * @return noncashLiquidationDistributions */ @javax.annotation.Nullable @@ -604,7 +604,7 @@ public Form1099DivListItem exemptInterestDividends(String exemptInterestDividend } /** - * Get exemptInterestDividends + * Exempt-interest dividends * @return exemptInterestDividends */ @javax.annotation.Nullable @@ -623,7 +623,7 @@ public Form1099DivListItem specifiedPrivateActivityBondInterestDividends(String } /** - * Get specifiedPrivateActivityBondInterestDividends + * Specified private activity bond interest dividends * @return specifiedPrivateActivityBondInterestDividends */ @javax.annotation.Nullable @@ -642,7 +642,7 @@ public Form1099DivListItem fatcaFilingRequirement(String fatcaFilingRequirement) } /** - * Get fatcaFilingRequirement + * FATCA filing requirement * @return fatcaFilingRequirement */ @javax.annotation.Nullable @@ -661,7 +661,7 @@ public Form1099DivListItem issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerReferenceId */ @javax.annotation.Nullable @@ -680,7 +680,7 @@ public Form1099DivListItem issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerTin */ @javax.annotation.Nullable @@ -699,10 +699,10 @@ public Form1099DivListItem taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax year * @return taxYear */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Integer getTaxYear() { return taxYear; } @@ -718,7 +718,7 @@ public Form1099DivListItem issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -737,7 +737,7 @@ public Form1099DivListItem referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -750,41 +750,41 @@ public void setReferenceId(String referenceId) { } - public Form1099DivListItem recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099DivListItem recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099DivListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099DivListItem recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -794,7 +794,7 @@ public Form1099DivListItem tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -813,7 +813,7 @@ public Form1099DivListItem recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -832,10 +832,10 @@ public Form1099DivListItem address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -851,7 +851,7 @@ public Form1099DivListItem address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -870,10 +870,10 @@ public Form1099DivListItem city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -889,7 +889,7 @@ public Form1099DivListItem state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -908,7 +908,7 @@ public Form1099DivListItem zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -927,7 +927,7 @@ public Form1099DivListItem recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -946,7 +946,7 @@ public Form1099DivListItem accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -965,7 +965,7 @@ public Form1099DivListItem officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -984,7 +984,7 @@ public Form1099DivListItem recipientNonUsProvince(String recipientNonUsProvince) } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -1003,10 +1003,10 @@ public Form1099DivListItem countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -1022,7 +1022,7 @@ public Form1099DivListItem federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -1041,7 +1041,7 @@ public Form1099DivListItem postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -1060,7 +1060,7 @@ public Form1099DivListItem stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -1079,7 +1079,7 @@ public Form1099DivListItem tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1098,7 +1098,7 @@ public Form1099DivListItem addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1117,7 +1117,7 @@ public Form1099DivListItem stateAndLocalWithholding(StateAndLocalWithholdingRequ } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -1164,8 +1164,8 @@ public boolean equals(Object o) { Objects.equals(this.taxYear, form1099DivListItem.taxYear) && Objects.equals(this.issuerId, form1099DivListItem.issuerId) && Objects.equals(this.referenceId, form1099DivListItem.referenceId) && - Objects.equals(this.recipientName, form1099DivListItem.recipientName) && Objects.equals(this.recipientTin, form1099DivListItem.recipientTin) && + Objects.equals(this.recipientName, form1099DivListItem.recipientName) && Objects.equals(this.tinType, form1099DivListItem.tinType) && Objects.equals(this.recipientSecondName, form1099DivListItem.recipientSecondName) && Objects.equals(this.address, form1099DivListItem.address) && @@ -1192,7 +1192,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistr, unrecapSec1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistr, unrecapSec1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1230,8 +1230,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1277,8 +1277,8 @@ private String toIndentedString(Object o) { openapiFields.add("taxYear"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1300,6 +1300,11 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1322,6 +1327,13 @@ 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 `Form1099DivListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099DivListItem.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())); @@ -1392,12 +1404,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1408,13 +1420,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1435,7 +1447,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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/Form1099DivRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java index ec2f170..65ce12d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivRequest.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 @@ -140,17 +140,19 @@ public class Form1099DivRequest { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -207,16 +209,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -346,20 +348,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public Form1099DivRequest() { } - public Form1099DivRequest( - TypeEnum type - ) { - this(); - this.type = type; - } - public Form1099DivRequest totalOrdinaryDividends(String totalOrdinaryDividends) { this.totalOrdinaryDividends = totalOrdinaryDividends; return this; } /** - * Get totalOrdinaryDividends + * Total ordinary dividends * @return totalOrdinaryDividends */ @javax.annotation.Nullable @@ -378,7 +373,7 @@ public Form1099DivRequest qualifiedDividends(String qualifiedDividends) { } /** - * Get qualifiedDividends + * Qualified dividends * @return qualifiedDividends */ @javax.annotation.Nullable @@ -397,7 +392,7 @@ public Form1099DivRequest totalCapitalGainDistr(String totalCapitalGainDistr) { } /** - * Get totalCapitalGainDistr + * Total capital gain distributions * @return totalCapitalGainDistr */ @javax.annotation.Nullable @@ -416,7 +411,7 @@ public Form1099DivRequest unrecapSec1250Gain(String unrecapSec1250Gain) { } /** - * Get unrecapSec1250Gain + * Unrecaptured Section 1250 gain * @return unrecapSec1250Gain */ @javax.annotation.Nullable @@ -435,7 +430,7 @@ public Form1099DivRequest section1202Gain(String section1202Gain) { } /** - * Get section1202Gain + * Section 1202 gain * @return section1202Gain */ @javax.annotation.Nullable @@ -454,7 +449,7 @@ public Form1099DivRequest collectiblesGain(String collectiblesGain) { } /** - * Get collectiblesGain + * Collectibles (28%) gain * @return collectiblesGain */ @javax.annotation.Nullable @@ -473,7 +468,7 @@ public Form1099DivRequest section897OrdinaryDividends(String section897OrdinaryD } /** - * Get section897OrdinaryDividends + * Section 897 ordinary dividends * @return section897OrdinaryDividends */ @javax.annotation.Nullable @@ -492,7 +487,7 @@ public Form1099DivRequest section897CapitalGain(String section897CapitalGain) { } /** - * Get section897CapitalGain + * Section 897 capital gain * @return section897CapitalGain */ @javax.annotation.Nullable @@ -511,7 +506,7 @@ public Form1099DivRequest nondividendDistributions(String nondividendDistributio } /** - * Get nondividendDistributions + * Nondividend distributions * @return nondividendDistributions */ @javax.annotation.Nullable @@ -530,7 +525,7 @@ public Form1099DivRequest federalIncomeTaxWithheld(String federalIncomeTaxWithhe } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -549,7 +544,7 @@ public Form1099DivRequest section199ADividends(String section199ADividends) { } /** - * Get section199ADividends + * Section 199A dividends * @return section199ADividends */ @javax.annotation.Nullable @@ -568,7 +563,7 @@ public Form1099DivRequest investmentExpenses(String investmentExpenses) { } /** - * Get investmentExpenses + * Investment expenses * @return investmentExpenses */ @javax.annotation.Nullable @@ -587,7 +582,7 @@ public Form1099DivRequest foreignTaxPaid(String foreignTaxPaid) { } /** - * Get foreignTaxPaid + * Foreign tax paid * @return foreignTaxPaid */ @javax.annotation.Nullable @@ -606,7 +601,7 @@ public Form1099DivRequest foreignCountryOrUSPossession(String foreignCountryOrUS } /** - * Get foreignCountryOrUSPossession + * Foreign country or U.S. possession * @return foreignCountryOrUSPossession */ @javax.annotation.Nullable @@ -625,7 +620,7 @@ public Form1099DivRequest cashLiquidationDistributions(String cashLiquidationDis } /** - * Get cashLiquidationDistributions + * Cash liquidation distributions * @return cashLiquidationDistributions */ @javax.annotation.Nullable @@ -644,7 +639,7 @@ public Form1099DivRequest noncashLiquidationDistributions(String noncashLiquidat } /** - * Get noncashLiquidationDistributions + * Noncash liquidation distributions * @return noncashLiquidationDistributions */ @javax.annotation.Nullable @@ -663,7 +658,7 @@ public Form1099DivRequest exemptInterestDividends(String exemptInterestDividends } /** - * Get exemptInterestDividends + * Exempt-interest dividends * @return exemptInterestDividends */ @javax.annotation.Nullable @@ -682,7 +677,7 @@ public Form1099DivRequest specifiedPrivateActivityBondInterestDividends(String s } /** - * Get specifiedPrivateActivityBondInterestDividends + * Specified private activity bond interest dividends * @return specifiedPrivateActivityBondInterestDividends */ @javax.annotation.Nullable @@ -701,7 +696,7 @@ public Form1099DivRequest fatcaFilingRequirement(String fatcaFilingRequirement) } /** - * Get fatcaFilingRequirement + * FATCA filing requirement * @return fatcaFilingRequirement */ @javax.annotation.Nullable @@ -714,6 +709,11 @@ public void setFatcaFilingRequirement(String fatcaFilingRequirement) { } + public Form1099DivRequest type(TypeEnum type) { + this.type = type; + return this; + } + /** * Get type * @return type @@ -723,6 +723,9 @@ public TypeEnum getType() { return type; } + public void setType(TypeEnum type) { + this.type = type; + } public Form1099DivRequest issuerId(String issuerId) { @@ -731,7 +734,7 @@ public Form1099DivRequest issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -750,7 +753,7 @@ public Form1099DivRequest referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -763,41 +766,41 @@ public void setReferenceId(String referenceId) { } - public Form1099DivRequest recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099DivRequest recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099DivRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099DivRequest recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -807,7 +810,7 @@ public Form1099DivRequest tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -826,7 +829,7 @@ public Form1099DivRequest recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -845,10 +848,10 @@ public Form1099DivRequest address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -864,7 +867,7 @@ public Form1099DivRequest address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -883,10 +886,10 @@ public Form1099DivRequest city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -902,7 +905,7 @@ public Form1099DivRequest state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -921,7 +924,7 @@ public Form1099DivRequest zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -940,7 +943,7 @@ public Form1099DivRequest recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -959,7 +962,7 @@ public Form1099DivRequest accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -978,7 +981,7 @@ public Form1099DivRequest officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -997,7 +1000,7 @@ public Form1099DivRequest recipientNonUsProvince(String recipientNonUsProvince) } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -1016,10 +1019,10 @@ public Form1099DivRequest countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -1035,7 +1038,7 @@ public Form1099DivRequest federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -1054,7 +1057,7 @@ public Form1099DivRequest postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -1073,7 +1076,7 @@ public Form1099DivRequest stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -1092,7 +1095,7 @@ public Form1099DivRequest tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1111,7 +1114,7 @@ public Form1099DivRequest addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1130,7 +1133,7 @@ public Form1099DivRequest stateAndLocalWithholding(StateAndLocalWithholdingReque } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -1175,8 +1178,8 @@ public boolean equals(Object o) { Objects.equals(this.type, form1099DivRequest.type) && Objects.equals(this.issuerId, form1099DivRequest.issuerId) && Objects.equals(this.referenceId, form1099DivRequest.referenceId) && - Objects.equals(this.recipientName, form1099DivRequest.recipientName) && Objects.equals(this.recipientTin, form1099DivRequest.recipientTin) && + Objects.equals(this.recipientName, form1099DivRequest.recipientName) && Objects.equals(this.tinType, form1099DivRequest.tinType) && Objects.equals(this.recipientSecondName, form1099DivRequest.recipientSecondName) && Objects.equals(this.address, form1099DivRequest.address) && @@ -1203,7 +1206,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistr, unrecapSec1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, type, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistr, unrecapSec1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1239,8 +1242,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1284,8 +1287,8 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1307,6 +1310,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1329,6 +1336,13 @@ 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())); @@ -1400,12 +1414,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1416,13 +1430,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1443,7 +1457,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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 7499ceb..4de2ebc 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099DivResponse.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 @@ -21,9 +21,9 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailApp; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorApp; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -70,17 +70,19 @@ public class Form1099DivResponse { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -307,7 +309,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + private List stateEfileStatus; public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) @@ -323,7 +325,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; + private List validationErrors; public Form1099DivResponse() { } @@ -916,12 +918,12 @@ public void setFederalEfileStatus(StatusDetail federalEfileStatus) { } - public Form1099DivResponse stateEfileStatus(List stateEfileStatus) { + public Form1099DivResponse stateEfileStatus(List stateEfileStatus) { this.stateEfileStatus = stateEfileStatus; return this; } - public Form1099DivResponse addStateEfileStatusItem(StateEfileStatusDetailApp stateEfileStatusItem) { + public Form1099DivResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { if (this.stateEfileStatus == null) { this.stateEfileStatus = new ArrayList<>(); } @@ -934,11 +936,11 @@ public Form1099DivResponse addStateEfileStatusItem(StateEfileStatusDetailApp sta * @return stateEfileStatus */ @javax.annotation.Nullable - public List getStateEfileStatus() { + public List getStateEfileStatus() { return stateEfileStatus; } - public void setStateEfileStatus(List stateEfileStatus) { + public void setStateEfileStatus(List stateEfileStatus) { this.stateEfileStatus = stateEfileStatus; } @@ -1000,12 +1002,12 @@ public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) } - public Form1099DivResponse validationErrors(List validationErrors) { + public Form1099DivResponse validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; } - public Form1099DivResponse addValidationErrorsItem(ValidationErrorApp validationErrorsItem) { + public Form1099DivResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { if (this.validationErrors == null) { this.validationErrors = new ArrayList<>(); } @@ -1018,11 +1020,11 @@ public Form1099DivResponse addValidationErrorsItem(ValidationErrorApp validation * @return validationErrors */ @javax.annotation.Nullable - public List getValidationErrors() { + public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { + public void setValidationErrors(List validationErrors) { this.validationErrors = validationErrors; } @@ -1304,7 +1306,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `stateEfileStatus` (array) for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailApp.validateJsonElement(jsonArraystateEfileStatus.get(i)); + StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); }; } } @@ -1330,7 +1332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `validationErrors` (array) for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorApp.validateJsonElement(jsonArrayvalidationErrors.get(i)); + ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); }; } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KList.java index a095771..5017161 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KList.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KList.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 @@ -62,7 +62,7 @@ public class Form1099KList { public static final String SERIALIZED_NAME_FORMS = "forms"; @SerializedName(SERIALIZED_NAME_FORMS) - private List forms = new ArrayList<>(); + private List forms; public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; @SerializedName(SERIALIZED_NAME_FORM_TYPE) 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 3056175..ab37817 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItem.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 @@ -60,7 +60,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099KListItem { /** - * Gets or Sets filerType + * Filer type (PSE or EPF) */ @JsonAdapter(FilerTypeEnum.Adapter.class) public enum FilerTypeEnum { @@ -118,7 +118,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private FilerTypeEnum filerType; /** - * Gets or Sets paymentType + * Payment type (payment card or third party network) */ @JsonAdapter(PaymentTypeEnum.Adapter.class) public enum PaymentTypeEnum { @@ -265,16 +265,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -410,7 +410,7 @@ public Form1099KListItem filerType(FilerTypeEnum filerType) { } /** - * Get filerType + * Filer type (PSE or EPF) * @return filerType */ @javax.annotation.Nullable @@ -429,7 +429,7 @@ public Form1099KListItem paymentType(PaymentTypeEnum paymentType) { } /** - * Get paymentType + * Payment type (payment card or third party network) * @return paymentType */ @javax.annotation.Nullable @@ -448,7 +448,7 @@ public Form1099KListItem paymentSettlementEntityNamePhoneNumber(String paymentSe } /** - * Get paymentSettlementEntityNamePhoneNumber + * Payment settlement entity name and phone number * @return paymentSettlementEntityNamePhoneNumber */ @javax.annotation.Nullable @@ -467,7 +467,7 @@ public Form1099KListItem grossAmountPaymentCard(Double grossAmountPaymentCard) { } /** - * Get grossAmountPaymentCard + * Gross amount of payment card/third party network transactions * @return grossAmountPaymentCard */ @javax.annotation.Nullable @@ -486,7 +486,7 @@ public Form1099KListItem cardNotPresentTransactions(Double cardNotPresentTransac } /** - * Get cardNotPresentTransactions + * Card not present transactions * @return cardNotPresentTransactions */ @javax.annotation.Nullable @@ -505,7 +505,7 @@ public Form1099KListItem merchantCategoryCode(String merchantCategoryCode) { } /** - * Get merchantCategoryCode + * Merchant category code * @return merchantCategoryCode */ @javax.annotation.Nullable @@ -524,7 +524,7 @@ public Form1099KListItem paymentTransactionNumber(Double paymentTransactionNumbe } /** - * Get paymentTransactionNumber + * Number of payment transactions * @return paymentTransactionNumber */ @javax.annotation.Nullable @@ -543,7 +543,7 @@ public Form1099KListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithhel } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -562,7 +562,7 @@ public Form1099KListItem january(Double january) { } /** - * Get january + * January gross payments * @return january */ @javax.annotation.Nullable @@ -581,7 +581,7 @@ public Form1099KListItem february(Double february) { } /** - * Get february + * February gross payments * @return february */ @javax.annotation.Nullable @@ -600,7 +600,7 @@ public Form1099KListItem march(Double march) { } /** - * Get march + * March gross payments * @return march */ @javax.annotation.Nullable @@ -619,7 +619,7 @@ public Form1099KListItem april(Double april) { } /** - * Get april + * April gross payments * @return april */ @javax.annotation.Nullable @@ -638,7 +638,7 @@ public Form1099KListItem may(Double may) { } /** - * Get may + * May gross payments * @return may */ @javax.annotation.Nullable @@ -657,7 +657,7 @@ public Form1099KListItem june(Double june) { } /** - * Get june + * June gross payments * @return june */ @javax.annotation.Nullable @@ -676,7 +676,7 @@ public Form1099KListItem july(Double july) { } /** - * Get july + * July gross payments * @return july */ @javax.annotation.Nullable @@ -695,7 +695,7 @@ public Form1099KListItem august(Double august) { } /** - * Get august + * August gross payments * @return august */ @javax.annotation.Nullable @@ -714,7 +714,7 @@ public Form1099KListItem sept(Double sept) { } /** - * Get sept + * September gross payments * @return sept */ @javax.annotation.Nullable @@ -733,7 +733,7 @@ public Form1099KListItem october(Double october) { } /** - * Get october + * October gross payments * @return october */ @javax.annotation.Nullable @@ -752,7 +752,7 @@ public Form1099KListItem november(Double november) { } /** - * Get november + * November gross payments * @return november */ @javax.annotation.Nullable @@ -771,7 +771,7 @@ public Form1099KListItem december(Double december) { } /** - * Get december + * December gross payments * @return december */ @javax.annotation.Nullable @@ -790,7 +790,7 @@ public Form1099KListItem issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerReferenceId */ @javax.annotation.Nullable @@ -809,7 +809,7 @@ public Form1099KListItem issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerTin */ @javax.annotation.Nullable @@ -828,10 +828,10 @@ public Form1099KListItem taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax year * @return taxYear */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Integer getTaxYear() { return taxYear; } @@ -847,7 +847,7 @@ public Form1099KListItem issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -866,7 +866,7 @@ public Form1099KListItem referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -879,41 +879,41 @@ public void setReferenceId(String referenceId) { } - public Form1099KListItem recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099KListItem recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099KListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099KListItem recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -923,7 +923,7 @@ public Form1099KListItem tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -942,7 +942,7 @@ public Form1099KListItem recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -961,10 +961,10 @@ public Form1099KListItem address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -980,7 +980,7 @@ public Form1099KListItem address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -999,10 +999,10 @@ public Form1099KListItem city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -1018,7 +1018,7 @@ public Form1099KListItem state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -1037,7 +1037,7 @@ public Form1099KListItem zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -1056,7 +1056,7 @@ public Form1099KListItem recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -1075,7 +1075,7 @@ public Form1099KListItem accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -1094,7 +1094,7 @@ public Form1099KListItem officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -1113,7 +1113,7 @@ public Form1099KListItem recipientNonUsProvince(String recipientNonUsProvince) { } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -1132,10 +1132,10 @@ public Form1099KListItem countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -1151,7 +1151,7 @@ public Form1099KListItem federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -1170,7 +1170,7 @@ public Form1099KListItem postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -1189,7 +1189,7 @@ public Form1099KListItem stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -1208,7 +1208,7 @@ public Form1099KListItem tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1227,7 +1227,7 @@ public Form1099KListItem addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1246,7 +1246,7 @@ public Form1099KListItem stateAndLocalWithholding(StateAndLocalWithholdingReques } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -1294,8 +1294,8 @@ public boolean equals(Object o) { Objects.equals(this.taxYear, form1099KListItem.taxYear) && Objects.equals(this.issuerId, form1099KListItem.issuerId) && Objects.equals(this.referenceId, form1099KListItem.referenceId) && - Objects.equals(this.recipientName, form1099KListItem.recipientName) && Objects.equals(this.recipientTin, form1099KListItem.recipientTin) && + Objects.equals(this.recipientName, form1099KListItem.recipientName) && Objects.equals(this.tinType, form1099KListItem.tinType) && Objects.equals(this.recipientSecondName, form1099KListItem.recipientSecondName) && Objects.equals(this.address, form1099KListItem.address) && @@ -1322,7 +1322,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, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, 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, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1361,8 +1361,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1408,8 +1408,8 @@ private String toIndentedString(Object o) { openapiFields.add("taxYear"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1431,6 +1431,11 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1453,6 +1458,13 @@ 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 `Form1099KListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099KListItem.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())); @@ -1486,12 +1498,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1502,13 +1514,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1529,7 +1541,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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/Form1099KListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItemResponse.java new file mode 100644 index 0000000..7d676fc --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KListItemResponse.java @@ -0,0 +1,1751 @@ +/* + * 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.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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; + +/** + * Form1099KListItemResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099KListItemResponse { + /** + * Filer type (PSE or EPF) + */ + @JsonAdapter(FilerTypeEnum.Adapter.class) + public enum FilerTypeEnum { + PSE("PSE"), + + EPF("EPF"), + + OTHER("Other"); + + private String value; + + FilerTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static FilerTypeEnum fromValue(String value) { + for (FilerTypeEnum b : FilerTypeEnum.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 FilerTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public FilerTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return FilerTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + FilerTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_FILER_TYPE = "filerType"; + @SerializedName(SERIALIZED_NAME_FILER_TYPE) + private FilerTypeEnum filerType; + + /** + * Payment type (payment card or third party network) + */ + @JsonAdapter(PaymentTypeEnum.Adapter.class) + public enum PaymentTypeEnum { + MERCHANT_PAYMENT_CARD("MerchantPaymentCard"), + + THIRD_PARTY_NETWORK("ThirdPartyNetwork"); + + private String value; + + PaymentTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PaymentTypeEnum fromValue(String value) { + for (PaymentTypeEnum b : PaymentTypeEnum.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 PaymentTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PaymentTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PaymentTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PaymentTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PAYMENT_TYPE = "paymentType"; + @SerializedName(SERIALIZED_NAME_PAYMENT_TYPE) + private PaymentTypeEnum paymentType; + + public static final String SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER = "paymentSettlementEntityNamePhoneNumber"; + @SerializedName(SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER) + private String paymentSettlementEntityNamePhoneNumber; + + public static final String SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD = "grossAmountPaymentCard"; + @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD) + private Double grossAmountPaymentCard; + + public static final String SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS = "cardNotPresentTransactions"; + @SerializedName(SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS) + private Double cardNotPresentTransactions; + + public static final String SERIALIZED_NAME_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; + @SerializedName(SERIALIZED_NAME_MERCHANT_CATEGORY_CODE) + private String merchantCategoryCode; + + public static final String SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER = "paymentTransactionNumber"; + @SerializedName(SERIALIZED_NAME_PAYMENT_TRANSACTION_NUMBER) + private Double paymentTransactionNumber; + + 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_JANUARY = "january"; + @SerializedName(SERIALIZED_NAME_JANUARY) + private Double january; + + public static final String SERIALIZED_NAME_FEBRUARY = "february"; + @SerializedName(SERIALIZED_NAME_FEBRUARY) + private Double february; + + public static final String SERIALIZED_NAME_MARCH = "march"; + @SerializedName(SERIALIZED_NAME_MARCH) + private Double march; + + public static final String SERIALIZED_NAME_APRIL = "april"; + @SerializedName(SERIALIZED_NAME_APRIL) + private Double april; + + public static final String SERIALIZED_NAME_MAY = "may"; + @SerializedName(SERIALIZED_NAME_MAY) + private Double may; + + public static final String SERIALIZED_NAME_JUNE = "june"; + @SerializedName(SERIALIZED_NAME_JUNE) + private Double june; + + public static final String SERIALIZED_NAME_JULY = "july"; + @SerializedName(SERIALIZED_NAME_JULY) + private Double july; + + public static final String SERIALIZED_NAME_AUGUST = "august"; + @SerializedName(SERIALIZED_NAME_AUGUST) + private Double august; + + public static final String SERIALIZED_NAME_SEPT = "sept"; + @SerializedName(SERIALIZED_NAME_SEPT) + private Double sept; + + public static final String SERIALIZED_NAME_OCTOBER = "october"; + @SerializedName(SERIALIZED_NAME_OCTOBER) + private Double october; + + public static final String SERIALIZED_NAME_NOVEMBER = "november"; + @SerializedName(SERIALIZED_NAME_NOVEMBER) + private Double november; + + public static final String SERIALIZED_NAME_DECEMBER = "december"; + @SerializedName(SERIALIZED_NAME_DECEMBER) + private Double december; + + 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse addressVerificationStatus; + + 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_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_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_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 Form1099KListItemResponse() { + } + + public Form1099KListItemResponse( + String id, + Form1099StatusDetailResponse federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetailResponse postalMailStatus, + Form1099StatusDetailResponse tinMatchStatus, + Form1099StatusDetailResponse addressVerificationStatus, + 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.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1099KListItemResponse filerType(FilerTypeEnum filerType) { + this.filerType = filerType; + return this; + } + + /** + * Filer type (PSE or EPF) + * @return filerType + */ + @javax.annotation.Nullable + public FilerTypeEnum getFilerType() { + return filerType; + } + + public void setFilerType(FilerTypeEnum filerType) { + this.filerType = filerType; + } + + + public Form1099KListItemResponse paymentType(PaymentTypeEnum paymentType) { + this.paymentType = paymentType; + return this; + } + + /** + * Payment type (payment card or third party network) + * @return paymentType + */ + @javax.annotation.Nullable + public PaymentTypeEnum getPaymentType() { + return paymentType; + } + + public void setPaymentType(PaymentTypeEnum paymentType) { + this.paymentType = paymentType; + } + + + public Form1099KListItemResponse paymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { + this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; + return this; + } + + /** + * Payment settlement entity name and phone number + * @return paymentSettlementEntityNamePhoneNumber + */ + @javax.annotation.Nullable + public String getPaymentSettlementEntityNamePhoneNumber() { + return paymentSettlementEntityNamePhoneNumber; + } + + public void setPaymentSettlementEntityNamePhoneNumber(String paymentSettlementEntityNamePhoneNumber) { + this.paymentSettlementEntityNamePhoneNumber = paymentSettlementEntityNamePhoneNumber; + } + + + public Form1099KListItemResponse grossAmountPaymentCard(Double grossAmountPaymentCard) { + this.grossAmountPaymentCard = grossAmountPaymentCard; + return this; + } + + /** + * Gross amount of payment card/third party network transactions + * @return grossAmountPaymentCard + */ + @javax.annotation.Nullable + public Double getGrossAmountPaymentCard() { + return grossAmountPaymentCard; + } + + public void setGrossAmountPaymentCard(Double grossAmountPaymentCard) { + this.grossAmountPaymentCard = grossAmountPaymentCard; + } + + + public Form1099KListItemResponse cardNotPresentTransactions(Double cardNotPresentTransactions) { + this.cardNotPresentTransactions = cardNotPresentTransactions; + return this; + } + + /** + * Card not present transactions + * @return cardNotPresentTransactions + */ + @javax.annotation.Nullable + public Double getCardNotPresentTransactions() { + return cardNotPresentTransactions; + } + + public void setCardNotPresentTransactions(Double cardNotPresentTransactions) { + this.cardNotPresentTransactions = cardNotPresentTransactions; + } + + + public Form1099KListItemResponse merchantCategoryCode(String merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + return this; + } + + /** + * Merchant category code + * @return merchantCategoryCode + */ + @javax.annotation.Nullable + public String getMerchantCategoryCode() { + return merchantCategoryCode; + } + + public void setMerchantCategoryCode(String merchantCategoryCode) { + this.merchantCategoryCode = merchantCategoryCode; + } + + + public Form1099KListItemResponse paymentTransactionNumber(Double paymentTransactionNumber) { + this.paymentTransactionNumber = paymentTransactionNumber; + return this; + } + + /** + * Number of payment transactions + * @return paymentTransactionNumber + */ + @javax.annotation.Nullable + public Double getPaymentTransactionNumber() { + return paymentTransactionNumber; + } + + public void setPaymentTransactionNumber(Double paymentTransactionNumber) { + this.paymentTransactionNumber = paymentTransactionNumber; + } + + + public Form1099KListItemResponse 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 Form1099KListItemResponse january(Double january) { + this.january = january; + return this; + } + + /** + * January gross payments + * @return january + */ + @javax.annotation.Nullable + public Double getJanuary() { + return january; + } + + public void setJanuary(Double january) { + this.january = january; + } + + + public Form1099KListItemResponse february(Double february) { + this.february = february; + return this; + } + + /** + * February gross payments + * @return february + */ + @javax.annotation.Nullable + public Double getFebruary() { + return february; + } + + public void setFebruary(Double february) { + this.february = february; + } + + + public Form1099KListItemResponse march(Double march) { + this.march = march; + return this; + } + + /** + * March gross payments + * @return march + */ + @javax.annotation.Nullable + public Double getMarch() { + return march; + } + + public void setMarch(Double march) { + this.march = march; + } + + + public Form1099KListItemResponse april(Double april) { + this.april = april; + return this; + } + + /** + * April gross payments + * @return april + */ + @javax.annotation.Nullable + public Double getApril() { + return april; + } + + public void setApril(Double april) { + this.april = april; + } + + + public Form1099KListItemResponse may(Double may) { + this.may = may; + return this; + } + + /** + * May gross payments + * @return may + */ + @javax.annotation.Nullable + public Double getMay() { + return may; + } + + public void setMay(Double may) { + this.may = may; + } + + + public Form1099KListItemResponse june(Double june) { + this.june = june; + return this; + } + + /** + * June gross payments + * @return june + */ + @javax.annotation.Nullable + public Double getJune() { + return june; + } + + public void setJune(Double june) { + this.june = june; + } + + + public Form1099KListItemResponse july(Double july) { + this.july = july; + return this; + } + + /** + * July gross payments + * @return july + */ + @javax.annotation.Nullable + public Double getJuly() { + return july; + } + + public void setJuly(Double july) { + this.july = july; + } + + + public Form1099KListItemResponse august(Double august) { + this.august = august; + return this; + } + + /** + * August gross payments + * @return august + */ + @javax.annotation.Nullable + public Double getAugust() { + return august; + } + + public void setAugust(Double august) { + this.august = august; + } + + + public Form1099KListItemResponse sept(Double sept) { + this.sept = sept; + return this; + } + + /** + * September gross payments + * @return sept + */ + @javax.annotation.Nullable + public Double getSept() { + return sept; + } + + public void setSept(Double sept) { + this.sept = sept; + } + + + public Form1099KListItemResponse october(Double october) { + this.october = october; + return this; + } + + /** + * October gross payments + * @return october + */ + @javax.annotation.Nullable + public Double getOctober() { + return october; + } + + public void setOctober(Double october) { + this.october = october; + } + + + public Form1099KListItemResponse november(Double november) { + this.november = november; + return this; + } + + /** + * November gross payments + * @return november + */ + @javax.annotation.Nullable + public Double getNovember() { + return november; + } + + public void setNovember(Double november) { + this.november = november; + } + + + public Form1099KListItemResponse december(Double december) { + this.december = december; + return this; + } + + /** + * December gross payments + * @return december + */ + @javax.annotation.Nullable + public Double getDecember() { + return december; + } + + public void setDecember(Double december) { + this.december = december; + } + + + /** + * ID of the form + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + + public Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099StatusDetailResponse getFederalEfileStatus() { + return federalEfileStatus; + } + + + + public Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099StatusDetailResponse getPostalMailStatus() { + return postalMailStatus; + } + + + + public Form1099KListItemResponse 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 Form1099StatusDetailResponse getTinMatchStatus() { + return tinMatchStatus; + } + + + + public Form1099KListItemResponse 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 Form1099StatusDetailResponse getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + public Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse 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 Form1099KListItemResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + return this; + } + + /** + * Foreign province + * @return foreignProvince + */ + @javax.annotation.Nullable + public String getForeignProvince() { + return foreignProvince; + } + + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public Form1099KListItemResponse 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; + } + + + /** + * 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 Form1099KListItemResponse 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; + } + Form1099KListItemResponse form1099KListItemResponse = (Form1099KListItemResponse) o; + return Objects.equals(this.filerType, form1099KListItemResponse.filerType) && + Objects.equals(this.paymentType, form1099KListItemResponse.paymentType) && + Objects.equals(this.paymentSettlementEntityNamePhoneNumber, form1099KListItemResponse.paymentSettlementEntityNamePhoneNumber) && + Objects.equals(this.grossAmountPaymentCard, form1099KListItemResponse.grossAmountPaymentCard) && + Objects.equals(this.cardNotPresentTransactions, form1099KListItemResponse.cardNotPresentTransactions) && + Objects.equals(this.merchantCategoryCode, form1099KListItemResponse.merchantCategoryCode) && + Objects.equals(this.paymentTransactionNumber, form1099KListItemResponse.paymentTransactionNumber) && + Objects.equals(this.federalIncomeTaxWithheld, form1099KListItemResponse.federalIncomeTaxWithheld) && + Objects.equals(this.january, form1099KListItemResponse.january) && + Objects.equals(this.february, form1099KListItemResponse.february) && + Objects.equals(this.march, form1099KListItemResponse.march) && + Objects.equals(this.april, form1099KListItemResponse.april) && + Objects.equals(this.may, form1099KListItemResponse.may) && + Objects.equals(this.june, form1099KListItemResponse.june) && + Objects.equals(this.july, form1099KListItemResponse.july) && + Objects.equals(this.august, form1099KListItemResponse.august) && + Objects.equals(this.sept, form1099KListItemResponse.sept) && + Objects.equals(this.october, form1099KListItemResponse.october) && + Objects.equals(this.november, form1099KListItemResponse.november) && + Objects.equals(this.december, form1099KListItemResponse.december) && + Objects.equals(this.id, form1099KListItemResponse.id) && + Objects.equals(this.type, form1099KListItemResponse.type) && + Objects.equals(this.issuerId, form1099KListItemResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1099KListItemResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099KListItemResponse.issuerTin) && + Objects.equals(this.taxYear, form1099KListItemResponse.taxYear) && + Objects.equals(this.federalEfile, form1099KListItemResponse.federalEfile) && + Objects.equals(this.federalEfileStatus, form1099KListItemResponse.federalEfileStatus) && + Objects.equals(this.stateEfile, form1099KListItemResponse.stateEfile) && + Objects.equals(this.stateEfileStatus, form1099KListItemResponse.stateEfileStatus) && + Objects.equals(this.postalMail, form1099KListItemResponse.postalMail) && + Objects.equals(this.postalMailStatus, form1099KListItemResponse.postalMailStatus) && + Objects.equals(this.tinMatch, form1099KListItemResponse.tinMatch) && + Objects.equals(this.tinMatchStatus, form1099KListItemResponse.tinMatchStatus) && + Objects.equals(this.addressVerification, form1099KListItemResponse.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1099KListItemResponse.addressVerificationStatus) && + Objects.equals(this.referenceId, form1099KListItemResponse.referenceId) && + Objects.equals(this.email, form1099KListItemResponse.email) && + Objects.equals(this.tinType, form1099KListItemResponse.tinType) && + Objects.equals(this.tin, form1099KListItemResponse.tin) && + Objects.equals(this.recipientName, form1099KListItemResponse.recipientName) && + Objects.equals(this.recipientSecondName, form1099KListItemResponse.recipientSecondName) && + Objects.equals(this.address, form1099KListItemResponse.address) && + Objects.equals(this.address2, form1099KListItemResponse.address2) && + Objects.equals(this.city, form1099KListItemResponse.city) && + Objects.equals(this.state, form1099KListItemResponse.state) && + Objects.equals(this.zip, form1099KListItemResponse.zip) && + Objects.equals(this.foreignProvince, form1099KListItemResponse.foreignProvince) && + Objects.equals(this.countryCode, form1099KListItemResponse.countryCode) && + Objects.equals(this.validationErrors, form1099KListItemResponse.validationErrors) && + Objects.equals(this.createdAt, form1099KListItemResponse.createdAt) && + Objects.equals(this.updatedAt, form1099KListItemResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099KListItemResponse.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(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); + } + + 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 Form1099KListItemResponse {\n"); + sb.append(" filerType: ").append(toIndentedString(filerType)).append("\n"); + sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); + sb.append(" paymentSettlementEntityNamePhoneNumber: ").append(toIndentedString(paymentSettlementEntityNamePhoneNumber)).append("\n"); + sb.append(" grossAmountPaymentCard: ").append(toIndentedString(grossAmountPaymentCard)).append("\n"); + sb.append(" cardNotPresentTransactions: ").append(toIndentedString(cardNotPresentTransactions)).append("\n"); + sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); + sb.append(" paymentTransactionNumber: ").append(toIndentedString(paymentTransactionNumber)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" january: ").append(toIndentedString(january)).append("\n"); + sb.append(" february: ").append(toIndentedString(february)).append("\n"); + sb.append(" march: ").append(toIndentedString(march)).append("\n"); + sb.append(" april: ").append(toIndentedString(april)).append("\n"); + sb.append(" may: ").append(toIndentedString(may)).append("\n"); + sb.append(" june: ").append(toIndentedString(june)).append("\n"); + sb.append(" july: ").append(toIndentedString(july)).append("\n"); + sb.append(" august: ").append(toIndentedString(august)).append("\n"); + sb.append(" sept: ").append(toIndentedString(sept)).append("\n"); + sb.append(" october: ").append(toIndentedString(october)).append("\n"); + sb.append(" november: ").append(toIndentedString(november)).append("\n"); + sb.append(" december: ").append(toIndentedString(december)).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(" 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(" 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(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).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("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("foreignProvince"); + openapiFields.add("countryCode"); + 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 Form1099KListItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099KListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099KListItemResponse is not found in the empty JSON string", Form1099KListItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099KListItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099KListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099KListItemResponse.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())); + } + // validate the optional field `filerType` + if (jsonObj.get("filerType") != null && !jsonObj.get("filerType").isJsonNull()) { + FilerTypeEnum.validateJsonElement(jsonObj.get("filerType")); + } + if ((jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) && !jsonObj.get("paymentType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentType").toString())); + } + // validate the optional field `paymentType` + if (jsonObj.get("paymentType") != null && !jsonObj.get("paymentType").isJsonNull()) { + PaymentTypeEnum.validateJsonElement(jsonObj.get("paymentType")); + } + if ((jsonObj.get("paymentSettlementEntityNamePhoneNumber") != null && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityNamePhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityNamePhoneNumber").toString())); + } + if ((jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull()) && !jsonObj.get("merchantCategoryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").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()) { + Form1099StatusDetailResponse.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()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + 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 (!Form1099KListItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099KListItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099KListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099KListItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099KListItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099KListItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099KListItemResponse + * @throws IOException if the JSON string is invalid with respect to Form1099KListItemResponse + */ + public static Form1099KListItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099KListItemResponse.class); + } + + /** + * Convert an instance of Form1099KListItemResponse 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/Form1099KRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java index 4633772..ca68784 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099KRequest.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 @@ -144,17 +144,19 @@ public class Form1099KRequest { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -211,16 +213,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -350,20 +352,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public Form1099KRequest() { } - public Form1099KRequest( - TypeEnum type - ) { - this(); - this.type = type; - } - public Form1099KRequest filerType(Integer filerType) { this.filerType = filerType; return this; } /** - * Get filerType + * Filer type (PSE or EPF) * @return filerType */ @javax.annotation.Nullable @@ -382,7 +377,7 @@ public Form1099KRequest paymentType(Integer paymentType) { } /** - * Get paymentType + * Payment type (payment card or third party network) * @return paymentType */ @javax.annotation.Nullable @@ -401,7 +396,7 @@ public Form1099KRequest paymentSettlementEntityNamePhoneNumber(String paymentSet } /** - * Get paymentSettlementEntityNamePhoneNumber + * Payment settlement entity name and phone number * @return paymentSettlementEntityNamePhoneNumber */ @javax.annotation.Nullable @@ -420,7 +415,7 @@ public Form1099KRequest grossAmountPaymentCard(Double grossAmountPaymentCard) { } /** - * Get grossAmountPaymentCard + * Gross amount of payment card/third party network transactions * @return grossAmountPaymentCard */ @javax.annotation.Nullable @@ -439,7 +434,7 @@ public Form1099KRequest cardNotPresentTransactions(Double cardNotPresentTransact } /** - * Get cardNotPresentTransactions + * Card not present transactions * @return cardNotPresentTransactions */ @javax.annotation.Nullable @@ -458,7 +453,7 @@ public Form1099KRequest merchantCategoryCode(String merchantCategoryCode) { } /** - * Get merchantCategoryCode + * Merchant category code * @return merchantCategoryCode */ @javax.annotation.Nullable @@ -477,7 +472,7 @@ public Form1099KRequest paymentTransactionNumber(Double paymentTransactionNumber } /** - * Get paymentTransactionNumber + * Number of payment transactions * @return paymentTransactionNumber */ @javax.annotation.Nullable @@ -496,7 +491,7 @@ public Form1099KRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -515,7 +510,7 @@ public Form1099KRequest january(Double january) { } /** - * Get january + * January gross payments * @return january */ @javax.annotation.Nullable @@ -534,7 +529,7 @@ public Form1099KRequest february(Double february) { } /** - * Get february + * February gross payments * @return february */ @javax.annotation.Nullable @@ -553,7 +548,7 @@ public Form1099KRequest march(Double march) { } /** - * Get march + * March gross payments * @return march */ @javax.annotation.Nullable @@ -572,7 +567,7 @@ public Form1099KRequest april(Double april) { } /** - * Get april + * April gross payments * @return april */ @javax.annotation.Nullable @@ -591,7 +586,7 @@ public Form1099KRequest may(Double may) { } /** - * Get may + * May gross payments * @return may */ @javax.annotation.Nullable @@ -610,7 +605,7 @@ public Form1099KRequest june(Double june) { } /** - * Get june + * June gross payments * @return june */ @javax.annotation.Nullable @@ -629,7 +624,7 @@ public Form1099KRequest july(Double july) { } /** - * Get july + * July gross payments * @return july */ @javax.annotation.Nullable @@ -648,7 +643,7 @@ public Form1099KRequest august(Double august) { } /** - * Get august + * August gross payments * @return august */ @javax.annotation.Nullable @@ -667,7 +662,7 @@ public Form1099KRequest sept(Double sept) { } /** - * Get sept + * September gross payments * @return sept */ @javax.annotation.Nullable @@ -686,7 +681,7 @@ public Form1099KRequest october(Double october) { } /** - * Get october + * October gross payments * @return october */ @javax.annotation.Nullable @@ -705,7 +700,7 @@ public Form1099KRequest november(Double november) { } /** - * Get november + * November gross payments * @return november */ @javax.annotation.Nullable @@ -724,7 +719,7 @@ public Form1099KRequest december(Double december) { } /** - * Get december + * December gross payments * @return december */ @javax.annotation.Nullable @@ -737,6 +732,11 @@ public void setDecember(Double december) { } + public Form1099KRequest type(TypeEnum type) { + this.type = type; + return this; + } + /** * Get type * @return type @@ -746,6 +746,9 @@ public TypeEnum getType() { return type; } + public void setType(TypeEnum type) { + this.type = type; + } public Form1099KRequest issuerId(String issuerId) { @@ -754,7 +757,7 @@ public Form1099KRequest issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -773,7 +776,7 @@ public Form1099KRequest referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -786,41 +789,41 @@ public void setReferenceId(String referenceId) { } - public Form1099KRequest recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099KRequest recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099KRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099KRequest recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -830,7 +833,7 @@ public Form1099KRequest tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -849,7 +852,7 @@ public Form1099KRequest recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -868,10 +871,10 @@ public Form1099KRequest address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -887,7 +890,7 @@ public Form1099KRequest address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -906,10 +909,10 @@ public Form1099KRequest city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -925,7 +928,7 @@ public Form1099KRequest state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -944,7 +947,7 @@ public Form1099KRequest zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -963,7 +966,7 @@ public Form1099KRequest recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -982,7 +985,7 @@ public Form1099KRequest accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -1001,7 +1004,7 @@ public Form1099KRequest officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -1020,7 +1023,7 @@ public Form1099KRequest recipientNonUsProvince(String recipientNonUsProvince) { } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -1039,10 +1042,10 @@ public Form1099KRequest countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -1058,7 +1061,7 @@ public Form1099KRequest federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -1077,7 +1080,7 @@ public Form1099KRequest postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -1096,7 +1099,7 @@ public Form1099KRequest stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -1115,7 +1118,7 @@ public Form1099KRequest tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1134,7 +1137,7 @@ public Form1099KRequest addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1153,7 +1156,7 @@ public Form1099KRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -1199,8 +1202,8 @@ public boolean equals(Object o) { Objects.equals(this.type, form1099KRequest.type) && Objects.equals(this.issuerId, form1099KRequest.issuerId) && Objects.equals(this.referenceId, form1099KRequest.referenceId) && - Objects.equals(this.recipientName, form1099KRequest.recipientName) && Objects.equals(this.recipientTin, form1099KRequest.recipientTin) && + Objects.equals(this.recipientName, form1099KRequest.recipientName) && Objects.equals(this.tinType, form1099KRequest.tinType) && Objects.equals(this.recipientSecondName, form1099KRequest.recipientSecondName) && Objects.equals(this.address, form1099KRequest.address) && @@ -1227,7 +1230,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, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, 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, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1264,8 +1267,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1309,8 +1312,8 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1332,6 +1335,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1354,6 +1361,13 @@ 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("paymentSettlementEntityNamePhoneNumber") != null && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityNamePhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityNamePhoneNumber").toString())); @@ -1374,12 +1388,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1390,13 +1404,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1417,7 +1431,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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/Form1099ListResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponse.java new file mode 100644 index 0000000..5a3651a --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponse.java @@ -0,0 +1,246 @@ +/* + * 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.Form1099ListResponseValueInner; +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; + +/** + * Form1099ListResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099ListResponse { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private List value; + + public Form1099ListResponse() { + } + + public Form1099ListResponse value(List value) { + this.value = value; + return this; + } + + public Form1099ListResponse addValueItem(Form1099ListResponseValueInner valueItem) { + if (this.value == null) { + this.value = new ArrayList<>(); + } + this.value.add(valueItem); + return this; + } + + /** + * List of Form 1099 responses + * @return value + */ + @javax.annotation.Nullable + public List getValue() { + return value; + } + + public void setValue(List value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099ListResponse form1099ListResponse = (Form1099ListResponse) o; + return Objects.equals(this.value, form1099ListResponse.value); + } + + 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(value); + } + + 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 Form1099ListResponse {\n"); + sb.append(" value: ").append(toIndentedString(value)).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("value"); + + // 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 Form1099ListResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099ListResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099ListResponse is not found in the empty JSON string", Form1099ListResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099ListResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099ListResponse` 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++) { + Form1099ListResponseValueInner.validateJsonElement(jsonArrayvalue.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099ListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099ListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099ListResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099ListResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099ListResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099ListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099ListResponse + * @throws IOException if the JSON string is invalid with respect to Form1099ListResponse + */ + public static Form1099ListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099ListResponse.class); + } + + /** + * Convert an instance of Form1099ListResponse 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/Form1099ListResponseValueInner.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java new file mode 100644 index 0000000..08f10db --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListResponseValueInner.java @@ -0,0 +1,511 @@ +/* + * 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.CoveredIndividualReferenceResponse; +import Avalara.SDK.model.A1099.V2.Form1042SListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; +import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099RListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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 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 Form1099ListResponseValueInner extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Form1099ListResponseValueInner.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099ListResponseValueInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099ListResponseValueInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterForm1099BaseResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099BaseResponse.class)); + final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); + final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.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)); + final TypeAdapter adapterForm1099RListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099ListResponseValueInner value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `Form1099BaseResponse` + if (value.getActualInstance() instanceof Form1099BaseResponse) { + JsonElement element = adapterForm1099BaseResponse.toJsonTree((Form1099BaseResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1042SListItemResponse` + if (value.getActualInstance() instanceof Form1042SListItemResponse) { + JsonElement element = adapterForm1042SListItemResponse.toJsonTree((Form1042SListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1095BListItemResponse` + if (value.getActualInstance() instanceof Form1095BListItemResponse) { + JsonElement element = adapterForm1095BListItemResponse.toJsonTree((Form1095BListItemResponse)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()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099MiscListItemResponse` + if (value.getActualInstance() instanceof Form1099MiscListItemResponse) { + JsonElement element = adapterForm1099MiscListItemResponse.toJsonTree((Form1099MiscListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099NecListItemResponse` + if (value.getActualInstance() instanceof Form1099NecListItemResponse) { + JsonElement element = adapterForm1099NecListItemResponse.toJsonTree((Form1099NecListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099RListItemResponse` + if (value.getActualInstance() instanceof Form1099RListItemResponse) { + JsonElement element = adapterForm1099RListItemResponse.toJsonTree((Form1099RListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + } + + @Override + public Form1099ListResponseValueInner read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize Form1099BaseResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099BaseResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099BaseResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099BaseResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099BaseResponse'", e); + } + // deserialize Form1042SListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1042SListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1042SListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1042SListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1042SListItemResponse'", e); + } + // deserialize Form1095BListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1095BListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1095BListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1095BListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1095BListItemResponse'", e); + } + // deserialize Form1099KListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099KListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099KListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099KListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099KListItemResponse'", e); + } + // deserialize Form1099MiscListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099MiscListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099MiscListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099MiscListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099MiscListItemResponse'", e); + } + // deserialize Form1099NecListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099NecListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099NecListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099NecListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099NecListItemResponse'", e); + } + // deserialize Form1099RListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099RListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099RListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099RListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099RListItemResponse'", e); + } + + if (match == 1) { + Form1099ListResponseValueInner ret = new Form1099ListResponseValueInner(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for Form1099ListResponseValueInner: %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 Form1099ListResponseValueInner() { + super("oneOf", Boolean.FALSE); + } + + public Form1099ListResponseValueInner(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Form1099BaseResponse", Form1099BaseResponse.class); + schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); + schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); + schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); + schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); + schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); + schemas.put("Form1099RListItemResponse", Form1099RListItemResponse.class); + } + + @Override + public Map> getSchemas() { + return Form1099ListResponseValueInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof Form1099BaseResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1042SListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1095BListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099KListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099MiscListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099NecListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099RListItemResponse) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); + } + + /** + * Get the actual instance, which can be the following: + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse + * + * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `Form1099BaseResponse`. If the actual instance is not `Form1099BaseResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099BaseResponse` + * @throws ClassCastException if the instance is not `Form1099BaseResponse` + */ + public Form1099BaseResponse getForm1099BaseResponse() throws ClassCastException { + return (Form1099BaseResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1042SListItemResponse`. If the actual instance is not `Form1042SListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1042SListItemResponse` + * @throws ClassCastException if the instance is not `Form1042SListItemResponse` + */ + public Form1042SListItemResponse getForm1042SListItemResponse() throws ClassCastException { + return (Form1042SListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1095BListItemResponse`. If the actual instance is not `Form1095BListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1095BListItemResponse` + * @throws ClassCastException if the instance is not `Form1095BListItemResponse` + */ + public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCastException { + return (Form1095BListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099KListItemResponse` + * @throws ClassCastException if the instance is not `Form1099KListItemResponse` + */ + public Form1099KListItemResponse getForm1099KListItemResponse() throws ClassCastException { + return (Form1099KListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099MiscListItemResponse`. If the actual instance is not `Form1099MiscListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099MiscListItemResponse` + * @throws ClassCastException if the instance is not `Form1099MiscListItemResponse` + */ + public Form1099MiscListItemResponse getForm1099MiscListItemResponse() throws ClassCastException { + return (Form1099MiscListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099NecListItemResponse`. If the actual instance is not `Form1099NecListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099NecListItemResponse` + * @throws ClassCastException if the instance is not `Form1099NecListItemResponse` + */ + public Form1099NecListItemResponse getForm1099NecListItemResponse() throws ClassCastException { + return (Form1099NecListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099RListItemResponse`. If the actual instance is not `Form1099RListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099RListItemResponse` + * @throws ClassCastException if the instance is not `Form1099RListItemResponse` + */ + public Form1099RListItemResponse getForm1099RListItemResponse() throws ClassCastException { + return (Form1099RListItemResponse)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 Form1099ListResponseValueInner + */ + 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 Form1099BaseResponse + try { + Form1099BaseResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1042SListItemResponse + try { + Form1042SListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1095BListItemResponse + try { + Form1095BListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099KListItemResponse + try { + Form1099KListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099MiscListItemResponse + try { + Form1099MiscListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099NecListItemResponse + try { + Form1099NecListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099RListItemResponse + try { + Form1099RListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); + // 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, 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())); + } + } + + /** + * Create an instance of Form1099ListResponseValueInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099ListResponseValueInner + * @throws IOException if the JSON string is invalid with respect to Form1099ListResponseValueInner + */ + public static Form1099ListResponseValueInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099ListResponseValueInner.class); + } + + /** + * Convert an instance of Form1099ListResponseValueInner 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/Form1099MiscList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscList.java index b76425c..bdbab81 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscList.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscList.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 @@ -62,7 +62,7 @@ public class Form1099MiscList { public static final String SERIALIZED_NAME_FORMS = "forms"; @SerializedName(SERIALIZED_NAME_FORMS) - private List forms = new ArrayList<>(); + private List forms; public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; @SerializedName(SERIALIZED_NAME_FORM_TYPE) 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 f5d37ac..8173f5d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItem.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 @@ -87,9 +87,9 @@ public class Form1099MiscListItem { @SerializedName(SERIALIZED_NAME_MEDICAL_HEALTH_CARE_PAYMENTS) private Double medicalHealthCarePayments; - public static final String SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES = "payerMadeDirectSales"; - @SerializedName(SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES) - private Boolean payerMadeDirectSales; + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) @@ -143,16 +143,16 @@ public class Form1099MiscListItem { @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -288,7 +288,7 @@ public Form1099MiscListItem secondTinNotice(Boolean secondTinNotice) { } /** - * Get secondTinNotice + * Second TIN notice * @return secondTinNotice */ @javax.annotation.Nullable @@ -307,7 +307,7 @@ public Form1099MiscListItem rents(Double rents) { } /** - * Get rents + * Rents * @return rents */ @javax.annotation.Nullable @@ -326,7 +326,7 @@ public Form1099MiscListItem royalties(Double royalties) { } /** - * Get royalties + * Royalties * @return royalties */ @javax.annotation.Nullable @@ -345,7 +345,7 @@ public Form1099MiscListItem otherIncome(Double otherIncome) { } /** - * Get otherIncome + * Other income * @return otherIncome */ @javax.annotation.Nullable @@ -364,7 +364,7 @@ public Form1099MiscListItem fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { } /** - * Get fedIncomeTaxWithheld + * Federal income tax withheld * @return fedIncomeTaxWithheld */ @javax.annotation.Nullable @@ -383,7 +383,7 @@ public Form1099MiscListItem fishingBoatProceeds(Double fishingBoatProceeds) { } /** - * Get fishingBoatProceeds + * Fishing boat proceeds * @return fishingBoatProceeds */ @javax.annotation.Nullable @@ -402,7 +402,7 @@ public Form1099MiscListItem medicalHealthCarePayments(Double medicalHealthCarePa } /** - * Get medicalHealthCarePayments + * Medical and health care payments * @return medicalHealthCarePayments */ @javax.annotation.Nullable @@ -415,22 +415,22 @@ public void setMedicalHealthCarePayments(Double medicalHealthCarePayments) { } - public Form1099MiscListItem payerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public Form1099MiscListItem directSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; return this; } /** - * Get payerMadeDirectSales - * @return payerMadeDirectSales + * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale + * @return directSalesIndicator */ @javax.annotation.Nullable - public Boolean getPayerMadeDirectSales() { - return payerMadeDirectSales; + public Boolean getDirectSalesIndicator() { + return directSalesIndicator; } - public void setPayerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public void setDirectSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; } @@ -440,7 +440,7 @@ public Form1099MiscListItem substitutePayments(Double substitutePayments) { } /** - * Get substitutePayments + * Substitute payments in lieu of dividends or interest * @return substitutePayments */ @javax.annotation.Nullable @@ -459,7 +459,7 @@ public Form1099MiscListItem cropInsuranceProceeds(Double cropInsuranceProceeds) } /** - * Get cropInsuranceProceeds + * Crop insurance proceeds * @return cropInsuranceProceeds */ @javax.annotation.Nullable @@ -478,7 +478,7 @@ public Form1099MiscListItem grossProceedsPaidToAttorney(Double grossProceedsPaid } /** - * Get grossProceedsPaidToAttorney + * Gross proceeds paid to an attorney * @return grossProceedsPaidToAttorney */ @javax.annotation.Nullable @@ -497,7 +497,7 @@ public Form1099MiscListItem fishPurchasedForResale(Double fishPurchasedForResale } /** - * Get fishPurchasedForResale + * Fish purchased for resale * @return fishPurchasedForResale */ @javax.annotation.Nullable @@ -516,7 +516,7 @@ public Form1099MiscListItem section409ADeferrals(Double section409ADeferrals) { } /** - * Get section409ADeferrals + * Section 409A deferrals * @return section409ADeferrals */ @javax.annotation.Nullable @@ -535,7 +535,7 @@ public Form1099MiscListItem fatcaFilingRequirement(Boolean fatcaFilingRequiremen } /** - * Get fatcaFilingRequirement + * FATCA filing requirement * @return fatcaFilingRequirement */ @javax.annotation.Nullable @@ -554,7 +554,7 @@ public Form1099MiscListItem excessGoldenParachutePayments(Double excessGoldenPar } /** - * Get excessGoldenParachutePayments + * (Legacy field) Excess golden parachute payments * @return excessGoldenParachutePayments */ @javax.annotation.Nullable @@ -573,7 +573,7 @@ public Form1099MiscListItem nonqualifiedDeferredCompensation(Double nonqualified } /** - * Get nonqualifiedDeferredCompensation + * Nonqualified deferred compensation * @return nonqualifiedDeferredCompensation */ @javax.annotation.Nullable @@ -592,7 +592,7 @@ public Form1099MiscListItem issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerReferenceId */ @javax.annotation.Nullable @@ -611,7 +611,7 @@ public Form1099MiscListItem issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerTin */ @javax.annotation.Nullable @@ -630,10 +630,10 @@ public Form1099MiscListItem taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax year * @return taxYear */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Integer getTaxYear() { return taxYear; } @@ -649,7 +649,7 @@ public Form1099MiscListItem issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -668,7 +668,7 @@ public Form1099MiscListItem referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -681,41 +681,41 @@ public void setReferenceId(String referenceId) { } - public Form1099MiscListItem recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099MiscListItem recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099MiscListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099MiscListItem recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -725,7 +725,7 @@ public Form1099MiscListItem tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -744,7 +744,7 @@ public Form1099MiscListItem recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -763,10 +763,10 @@ public Form1099MiscListItem address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -782,7 +782,7 @@ public Form1099MiscListItem address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -801,10 +801,10 @@ public Form1099MiscListItem city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -820,7 +820,7 @@ public Form1099MiscListItem state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -839,7 +839,7 @@ public Form1099MiscListItem zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -858,7 +858,7 @@ public Form1099MiscListItem recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -877,7 +877,7 @@ public Form1099MiscListItem accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -896,7 +896,7 @@ public Form1099MiscListItem officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -915,7 +915,7 @@ public Form1099MiscListItem recipientNonUsProvince(String recipientNonUsProvince } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -934,10 +934,10 @@ public Form1099MiscListItem countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -953,7 +953,7 @@ public Form1099MiscListItem federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -972,7 +972,7 @@ public Form1099MiscListItem postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -991,7 +991,7 @@ public Form1099MiscListItem stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -1010,7 +1010,7 @@ public Form1099MiscListItem tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1029,7 +1029,7 @@ public Form1099MiscListItem addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1048,7 +1048,7 @@ public Form1099MiscListItem stateAndLocalWithholding(StateAndLocalWithholdingReq } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -1078,7 +1078,7 @@ public boolean equals(Object o) { Objects.equals(this.fedIncomeTaxWithheld, form1099MiscListItem.fedIncomeTaxWithheld) && Objects.equals(this.fishingBoatProceeds, form1099MiscListItem.fishingBoatProceeds) && Objects.equals(this.medicalHealthCarePayments, form1099MiscListItem.medicalHealthCarePayments) && - Objects.equals(this.payerMadeDirectSales, form1099MiscListItem.payerMadeDirectSales) && + Objects.equals(this.directSalesIndicator, form1099MiscListItem.directSalesIndicator) && Objects.equals(this.substitutePayments, form1099MiscListItem.substitutePayments) && Objects.equals(this.cropInsuranceProceeds, form1099MiscListItem.cropInsuranceProceeds) && Objects.equals(this.grossProceedsPaidToAttorney, form1099MiscListItem.grossProceedsPaidToAttorney) && @@ -1092,8 +1092,8 @@ public boolean equals(Object o) { Objects.equals(this.taxYear, form1099MiscListItem.taxYear) && Objects.equals(this.issuerId, form1099MiscListItem.issuerId) && Objects.equals(this.referenceId, form1099MiscListItem.referenceId) && - Objects.equals(this.recipientName, form1099MiscListItem.recipientName) && Objects.equals(this.recipientTin, form1099MiscListItem.recipientTin) && + Objects.equals(this.recipientName, form1099MiscListItem.recipientName) && Objects.equals(this.tinType, form1099MiscListItem.tinType) && Objects.equals(this.recipientSecondName, form1099MiscListItem.recipientSecondName) && Objects.equals(this.address, form1099MiscListItem.address) && @@ -1120,7 +1120,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(secondTinNotice, rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalHealthCarePayments, payerMadeDirectSales, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(secondTinNotice, rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1141,7 +1141,7 @@ public String toString() { sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); sb.append(" medicalHealthCarePayments: ").append(toIndentedString(medicalHealthCarePayments)).append("\n"); - sb.append(" payerMadeDirectSales: ").append(toIndentedString(payerMadeDirectSales)).append("\n"); + sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); @@ -1155,8 +1155,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1202,8 +1202,8 @@ private String toIndentedString(Object o) { openapiFields.add("taxYear"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1225,6 +1225,11 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1247,6 +1252,13 @@ 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 `Form1099MiscListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099MiscListItem.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("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())); @@ -1260,12 +1272,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1276,13 +1288,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1303,7 +1315,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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/Form1099MiscListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItemResponse.java new file mode 100644 index 0000000..ca6eafa --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscListItemResponse.java @@ -0,0 +1,1450 @@ +/* + * 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.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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; + +/** + * Form1099MiscListItemResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099MiscListItemResponse { + public static final String SERIALIZED_NAME_RENTS = "rents"; + @SerializedName(SERIALIZED_NAME_RENTS) + private Double rents; + + public static final String SERIALIZED_NAME_ROYALTIES = "royalties"; + @SerializedName(SERIALIZED_NAME_ROYALTIES) + private Double royalties; + + public static final String SERIALIZED_NAME_OTHER_INCOME = "otherIncome"; + @SerializedName(SERIALIZED_NAME_OTHER_INCOME) + private Double otherIncome; + + public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) + private Double fedIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_FISHING_BOAT_PROCEEDS = "fishingBoatProceeds"; + @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_SUBSTITUTE_PAYMENTS = "substitutePayments"; + @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) + private Double substitutePayments; + + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; + + public static final String SERIALIZED_NAME_CROP_INSURANCE_PROCEEDS = "cropInsuranceProceeds"; + @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_GROSS_AMOUNT_PAID_ATTORNEY = "grossAmountPaidAttorney"; + @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT_PAID_ATTORNEY) + private Double grossAmountPaidAttorney; + + 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_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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse addressVerificationStatus; + + 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_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_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_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 Form1099MiscListItemResponse() { + } + + public Form1099MiscListItemResponse( + String id, + Form1099StatusDetailResponse federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetailResponse postalMailStatus, + Form1099StatusDetailResponse tinMatchStatus, + Form1099StatusDetailResponse addressVerificationStatus, + 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.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1099MiscListItemResponse rents(Double rents) { + this.rents = rents; + return this; + } + + /** + * Rents + * @return rents + */ + @javax.annotation.Nullable + public Double getRents() { + return rents; + } + + public void setRents(Double rents) { + this.rents = rents; + } + + + public Form1099MiscListItemResponse royalties(Double royalties) { + this.royalties = royalties; + return this; + } + + /** + * Royalties + * @return royalties + */ + @javax.annotation.Nullable + public Double getRoyalties() { + return royalties; + } + + public void setRoyalties(Double royalties) { + this.royalties = royalties; + } + + + public Form1099MiscListItemResponse otherIncome(Double otherIncome) { + this.otherIncome = otherIncome; + return this; + } + + /** + * Other income + * @return otherIncome + */ + @javax.annotation.Nullable + public Double getOtherIncome() { + return otherIncome; + } + + public void setOtherIncome(Double otherIncome) { + this.otherIncome = otherIncome; + } + + + public Form1099MiscListItemResponse fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { + this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld + * @return fedIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFedIncomeTaxWithheld() { + return fedIncomeTaxWithheld; + } + + public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { + this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; + } + + + public Form1099MiscListItemResponse fishingBoatProceeds(Double fishingBoatProceeds) { + this.fishingBoatProceeds = fishingBoatProceeds; + return this; + } + + /** + * Fishing boat proceeds + * @return fishingBoatProceeds + */ + @javax.annotation.Nullable + public Double getFishingBoatProceeds() { + return fishingBoatProceeds; + } + + public void setFishingBoatProceeds(Double fishingBoatProceeds) { + this.fishingBoatProceeds = fishingBoatProceeds; + } + + + public Form1099MiscListItemResponse medicalAndHealthCare(Double medicalAndHealthCare) { + this.medicalAndHealthCare = medicalAndHealthCare; + return this; + } + + /** + * Medical and health care payments + * @return medicalAndHealthCare + */ + @javax.annotation.Nullable + public Double getMedicalAndHealthCare() { + return medicalAndHealthCare; + } + + public void setMedicalAndHealthCare(Double medicalAndHealthCare) { + this.medicalAndHealthCare = medicalAndHealthCare; + } + + + public Form1099MiscListItemResponse substitutePayments(Double substitutePayments) { + this.substitutePayments = substitutePayments; + return this; + } + + /** + * Substitute payments in lieu of dividends or interest + * @return substitutePayments + */ + @javax.annotation.Nullable + public Double getSubstitutePayments() { + return substitutePayments; + } + + public void setSubstitutePayments(Double substitutePayments) { + this.substitutePayments = substitutePayments; + } + + + public Form1099MiscListItemResponse directSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; + return this; + } + + /** + * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale + * @return directSalesIndicator + */ + @javax.annotation.Nullable + public Boolean getDirectSalesIndicator() { + return directSalesIndicator; + } + + public void setDirectSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; + } + + + public Form1099MiscListItemResponse cropInsuranceProceeds(Double cropInsuranceProceeds) { + this.cropInsuranceProceeds = cropInsuranceProceeds; + return this; + } + + /** + * Crop insurance proceeds + * @return cropInsuranceProceeds + */ + @javax.annotation.Nullable + public Double getCropInsuranceProceeds() { + return cropInsuranceProceeds; + } + + public void setCropInsuranceProceeds(Double cropInsuranceProceeds) { + this.cropInsuranceProceeds = cropInsuranceProceeds; + } + + + public Form1099MiscListItemResponse excessGoldenParachute(Double excessGoldenParachute) { + this.excessGoldenParachute = excessGoldenParachute; + return this; + } + + /** + * (Legacy field) Excess golden parachute payments + * @return excessGoldenParachute + */ + @javax.annotation.Nullable + public Double getExcessGoldenParachute() { + return excessGoldenParachute; + } + + public void setExcessGoldenParachute(Double excessGoldenParachute) { + this.excessGoldenParachute = excessGoldenParachute; + } + + + public Form1099MiscListItemResponse grossAmountPaidAttorney(Double grossAmountPaidAttorney) { + this.grossAmountPaidAttorney = grossAmountPaidAttorney; + return this; + } + + /** + * Gross proceeds paid to an attorney + * @return grossAmountPaidAttorney + */ + @javax.annotation.Nullable + public Double getGrossAmountPaidAttorney() { + return grossAmountPaidAttorney; + } + + public void setGrossAmountPaidAttorney(Double grossAmountPaidAttorney) { + this.grossAmountPaidAttorney = grossAmountPaidAttorney; + } + + + public Form1099MiscListItemResponse section409ADeferrals(Double section409ADeferrals) { + this.section409ADeferrals = section409ADeferrals; + return this; + } + + /** + * Section 409A deferrals + * @return section409ADeferrals + */ + @javax.annotation.Nullable + public Double getSection409ADeferrals() { + return section409ADeferrals; + } + + public void setSection409ADeferrals(Double section409ADeferrals) { + this.section409ADeferrals = section409ADeferrals; + } + + + public Form1099MiscListItemResponse section409AIncome(Double section409AIncome) { + this.section409AIncome = section409AIncome; + return this; + } + + /** + * Nonqualified deferred compensation + * @return section409AIncome + */ + @javax.annotation.Nullable + public Double getSection409AIncome() { + return section409AIncome; + } + + public void setSection409AIncome(Double section409AIncome) { + this.section409AIncome = section409AIncome; + } + + + /** + * ID of the form + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + + public Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099StatusDetailResponse getFederalEfileStatus() { + return federalEfileStatus; + } + + + + public Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099StatusDetailResponse getPostalMailStatus() { + return postalMailStatus; + } + + + + public Form1099MiscListItemResponse 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 Form1099StatusDetailResponse getTinMatchStatus() { + return tinMatchStatus; + } + + + + public Form1099MiscListItemResponse 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 Form1099StatusDetailResponse getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + public Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse 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 Form1099MiscListItemResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + return this; + } + + /** + * Foreign province + * @return foreignProvince + */ + @javax.annotation.Nullable + public String getForeignProvince() { + return foreignProvince; + } + + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public Form1099MiscListItemResponse 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; + } + + + /** + * 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 Form1099MiscListItemResponse 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; + } + Form1099MiscListItemResponse form1099MiscListItemResponse = (Form1099MiscListItemResponse) o; + return Objects.equals(this.rents, form1099MiscListItemResponse.rents) && + Objects.equals(this.royalties, form1099MiscListItemResponse.royalties) && + Objects.equals(this.otherIncome, form1099MiscListItemResponse.otherIncome) && + Objects.equals(this.fedIncomeTaxWithheld, form1099MiscListItemResponse.fedIncomeTaxWithheld) && + Objects.equals(this.fishingBoatProceeds, form1099MiscListItemResponse.fishingBoatProceeds) && + Objects.equals(this.medicalAndHealthCare, form1099MiscListItemResponse.medicalAndHealthCare) && + Objects.equals(this.substitutePayments, form1099MiscListItemResponse.substitutePayments) && + Objects.equals(this.directSalesIndicator, form1099MiscListItemResponse.directSalesIndicator) && + Objects.equals(this.cropInsuranceProceeds, form1099MiscListItemResponse.cropInsuranceProceeds) && + Objects.equals(this.excessGoldenParachute, form1099MiscListItemResponse.excessGoldenParachute) && + Objects.equals(this.grossAmountPaidAttorney, form1099MiscListItemResponse.grossAmountPaidAttorney) && + Objects.equals(this.section409ADeferrals, form1099MiscListItemResponse.section409ADeferrals) && + Objects.equals(this.section409AIncome, form1099MiscListItemResponse.section409AIncome) && + Objects.equals(this.id, form1099MiscListItemResponse.id) && + Objects.equals(this.type, form1099MiscListItemResponse.type) && + Objects.equals(this.issuerId, form1099MiscListItemResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1099MiscListItemResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099MiscListItemResponse.issuerTin) && + Objects.equals(this.taxYear, form1099MiscListItemResponse.taxYear) && + Objects.equals(this.federalEfile, form1099MiscListItemResponse.federalEfile) && + Objects.equals(this.federalEfileStatus, form1099MiscListItemResponse.federalEfileStatus) && + Objects.equals(this.stateEfile, form1099MiscListItemResponse.stateEfile) && + Objects.equals(this.stateEfileStatus, form1099MiscListItemResponse.stateEfileStatus) && + Objects.equals(this.postalMail, form1099MiscListItemResponse.postalMail) && + Objects.equals(this.postalMailStatus, form1099MiscListItemResponse.postalMailStatus) && + Objects.equals(this.tinMatch, form1099MiscListItemResponse.tinMatch) && + Objects.equals(this.tinMatchStatus, form1099MiscListItemResponse.tinMatchStatus) && + Objects.equals(this.addressVerification, form1099MiscListItemResponse.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1099MiscListItemResponse.addressVerificationStatus) && + Objects.equals(this.referenceId, form1099MiscListItemResponse.referenceId) && + Objects.equals(this.email, form1099MiscListItemResponse.email) && + Objects.equals(this.tinType, form1099MiscListItemResponse.tinType) && + Objects.equals(this.tin, form1099MiscListItemResponse.tin) && + Objects.equals(this.recipientName, form1099MiscListItemResponse.recipientName) && + Objects.equals(this.recipientSecondName, form1099MiscListItemResponse.recipientSecondName) && + Objects.equals(this.address, form1099MiscListItemResponse.address) && + Objects.equals(this.address2, form1099MiscListItemResponse.address2) && + Objects.equals(this.city, form1099MiscListItemResponse.city) && + Objects.equals(this.state, form1099MiscListItemResponse.state) && + Objects.equals(this.zip, form1099MiscListItemResponse.zip) && + Objects.equals(this.foreignProvince, form1099MiscListItemResponse.foreignProvince) && + Objects.equals(this.countryCode, form1099MiscListItemResponse.countryCode) && + Objects.equals(this.validationErrors, form1099MiscListItemResponse.validationErrors) && + Objects.equals(this.createdAt, form1099MiscListItemResponse.createdAt) && + Objects.equals(this.updatedAt, form1099MiscListItemResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099MiscListItemResponse.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(rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCare, 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); + } + + 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 Form1099MiscListItemResponse {\n"); + sb.append(" rents: ").append(toIndentedString(rents)).append("\n"); + sb.append(" royalties: ").append(toIndentedString(royalties)).append("\n"); + 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(" 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(" section409ADeferrals: ").append(toIndentedString(section409ADeferrals)).append("\n"); + sb.append(" section409AIncome: ").append(toIndentedString(section409AIncome)).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(" 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(" 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(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).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("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("foreignProvince"); + openapiFields.add("countryCode"); + 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 Form1099MiscListItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099MiscListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099MiscListItemResponse is not found in the empty JSON string", Form1099MiscListItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099MiscListItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099MiscListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099MiscListItemResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").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()) { + Form1099StatusDetailResponse.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()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + 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 (!Form1099MiscListItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099MiscListItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099MiscListItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099MiscListItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099MiscListItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099MiscListItemResponse + * @throws IOException if the JSON string is invalid with respect to Form1099MiscListItemResponse + */ + public static Form1099MiscListItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099MiscListItemResponse.class); + } + + /** + * Convert an instance of Form1099MiscListItemResponse 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/Form1099MiscRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java index c747659..78d4b22 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscRequest.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 @@ -87,9 +87,9 @@ public class Form1099MiscRequest { @SerializedName(SERIALIZED_NAME_MEDICAL_HEALTH_CARE_PAYMENTS) private Double medicalHealthCarePayments; - public static final String SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES = "payerMadeDirectSales"; - @SerializedName(SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES) - private Boolean payerMadeDirectSales; + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) @@ -128,17 +128,19 @@ public class Form1099MiscRequest { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -195,16 +197,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -334,20 +336,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public Form1099MiscRequest() { } - public Form1099MiscRequest( - TypeEnum type - ) { - this(); - this.type = type; - } - public Form1099MiscRequest secondTinNotice(Boolean secondTinNotice) { this.secondTinNotice = secondTinNotice; return this; } /** - * Get secondTinNotice + * Second TIN notice * @return secondTinNotice */ @javax.annotation.Nullable @@ -366,7 +361,7 @@ public Form1099MiscRequest rents(Double rents) { } /** - * Get rents + * Rents * @return rents */ @javax.annotation.Nullable @@ -385,7 +380,7 @@ public Form1099MiscRequest royalties(Double royalties) { } /** - * Get royalties + * Royalties * @return royalties */ @javax.annotation.Nullable @@ -404,7 +399,7 @@ public Form1099MiscRequest otherIncome(Double otherIncome) { } /** - * Get otherIncome + * Other income * @return otherIncome */ @javax.annotation.Nullable @@ -423,7 +418,7 @@ public Form1099MiscRequest fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { } /** - * Get fedIncomeTaxWithheld + * Federal income tax withheld * @return fedIncomeTaxWithheld */ @javax.annotation.Nullable @@ -442,7 +437,7 @@ public Form1099MiscRequest fishingBoatProceeds(Double fishingBoatProceeds) { } /** - * Get fishingBoatProceeds + * Fishing boat proceeds * @return fishingBoatProceeds */ @javax.annotation.Nullable @@ -461,7 +456,7 @@ public Form1099MiscRequest medicalHealthCarePayments(Double medicalHealthCarePay } /** - * Get medicalHealthCarePayments + * Medical and health care payments * @return medicalHealthCarePayments */ @javax.annotation.Nullable @@ -474,22 +469,22 @@ public void setMedicalHealthCarePayments(Double medicalHealthCarePayments) { } - public Form1099MiscRequest payerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public Form1099MiscRequest directSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; return this; } /** - * Get payerMadeDirectSales - * @return payerMadeDirectSales + * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale + * @return directSalesIndicator */ @javax.annotation.Nullable - public Boolean getPayerMadeDirectSales() { - return payerMadeDirectSales; + public Boolean getDirectSalesIndicator() { + return directSalesIndicator; } - public void setPayerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public void setDirectSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; } @@ -499,7 +494,7 @@ public Form1099MiscRequest substitutePayments(Double substitutePayments) { } /** - * Get substitutePayments + * Substitute payments in lieu of dividends or interest * @return substitutePayments */ @javax.annotation.Nullable @@ -518,7 +513,7 @@ public Form1099MiscRequest cropInsuranceProceeds(Double cropInsuranceProceeds) { } /** - * Get cropInsuranceProceeds + * Crop insurance proceeds * @return cropInsuranceProceeds */ @javax.annotation.Nullable @@ -537,7 +532,7 @@ public Form1099MiscRequest grossProceedsPaidToAttorney(Double grossProceedsPaidT } /** - * Get grossProceedsPaidToAttorney + * Gross proceeds paid to an attorney * @return grossProceedsPaidToAttorney */ @javax.annotation.Nullable @@ -556,7 +551,7 @@ public Form1099MiscRequest fishPurchasedForResale(Double fishPurchasedForResale) } /** - * Get fishPurchasedForResale + * Fish purchased for resale * @return fishPurchasedForResale */ @javax.annotation.Nullable @@ -575,7 +570,7 @@ public Form1099MiscRequest section409ADeferrals(Double section409ADeferrals) { } /** - * Get section409ADeferrals + * Section 409A deferrals * @return section409ADeferrals */ @javax.annotation.Nullable @@ -594,7 +589,7 @@ public Form1099MiscRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement } /** - * Get fatcaFilingRequirement + * FATCA filing requirement * @return fatcaFilingRequirement */ @javax.annotation.Nullable @@ -613,7 +608,7 @@ public Form1099MiscRequest excessGoldenParachutePayments(Double excessGoldenPara } /** - * Get excessGoldenParachutePayments + * (Legacy field) Excess golden parachute payments * @return excessGoldenParachutePayments */ @javax.annotation.Nullable @@ -632,7 +627,7 @@ public Form1099MiscRequest nonqualifiedDeferredCompensation(Double nonqualifiedD } /** - * Get nonqualifiedDeferredCompensation + * Nonqualified deferred compensation * @return nonqualifiedDeferredCompensation */ @javax.annotation.Nullable @@ -645,6 +640,11 @@ public void setNonqualifiedDeferredCompensation(Double nonqualifiedDeferredCompe } + public Form1099MiscRequest type(TypeEnum type) { + this.type = type; + return this; + } + /** * Get type * @return type @@ -654,6 +654,9 @@ public TypeEnum getType() { return type; } + public void setType(TypeEnum type) { + this.type = type; + } public Form1099MiscRequest issuerId(String issuerId) { @@ -662,7 +665,7 @@ public Form1099MiscRequest issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -681,7 +684,7 @@ public Form1099MiscRequest referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -694,41 +697,41 @@ public void setReferenceId(String referenceId) { } - public Form1099MiscRequest recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099MiscRequest recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099MiscRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099MiscRequest recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -738,7 +741,7 @@ public Form1099MiscRequest tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -757,7 +760,7 @@ public Form1099MiscRequest recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -776,10 +779,10 @@ public Form1099MiscRequest address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -795,7 +798,7 @@ public Form1099MiscRequest address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -814,10 +817,10 @@ public Form1099MiscRequest city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -833,7 +836,7 @@ public Form1099MiscRequest state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -852,7 +855,7 @@ public Form1099MiscRequest zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -871,7 +874,7 @@ public Form1099MiscRequest recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -890,7 +893,7 @@ public Form1099MiscRequest accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -909,7 +912,7 @@ public Form1099MiscRequest officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -928,7 +931,7 @@ public Form1099MiscRequest recipientNonUsProvince(String recipientNonUsProvince) } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -947,10 +950,10 @@ public Form1099MiscRequest countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -966,7 +969,7 @@ public Form1099MiscRequest federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -985,7 +988,7 @@ public Form1099MiscRequest postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -1004,7 +1007,7 @@ public Form1099MiscRequest stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -1023,7 +1026,7 @@ public Form1099MiscRequest tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1042,7 +1045,7 @@ public Form1099MiscRequest addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1061,7 +1064,7 @@ public Form1099MiscRequest stateAndLocalWithholding(StateAndLocalWithholdingRequ } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -1091,7 +1094,7 @@ public boolean equals(Object o) { Objects.equals(this.fedIncomeTaxWithheld, form1099MiscRequest.fedIncomeTaxWithheld) && Objects.equals(this.fishingBoatProceeds, form1099MiscRequest.fishingBoatProceeds) && Objects.equals(this.medicalHealthCarePayments, form1099MiscRequest.medicalHealthCarePayments) && - Objects.equals(this.payerMadeDirectSales, form1099MiscRequest.payerMadeDirectSales) && + Objects.equals(this.directSalesIndicator, form1099MiscRequest.directSalesIndicator) && Objects.equals(this.substitutePayments, form1099MiscRequest.substitutePayments) && Objects.equals(this.cropInsuranceProceeds, form1099MiscRequest.cropInsuranceProceeds) && Objects.equals(this.grossProceedsPaidToAttorney, form1099MiscRequest.grossProceedsPaidToAttorney) && @@ -1103,8 +1106,8 @@ public boolean equals(Object o) { Objects.equals(this.type, form1099MiscRequest.type) && Objects.equals(this.issuerId, form1099MiscRequest.issuerId) && Objects.equals(this.referenceId, form1099MiscRequest.referenceId) && - Objects.equals(this.recipientName, form1099MiscRequest.recipientName) && Objects.equals(this.recipientTin, form1099MiscRequest.recipientTin) && + Objects.equals(this.recipientName, form1099MiscRequest.recipientName) && Objects.equals(this.tinType, form1099MiscRequest.tinType) && Objects.equals(this.recipientSecondName, form1099MiscRequest.recipientSecondName) && Objects.equals(this.address, form1099MiscRequest.address) && @@ -1131,7 +1134,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(secondTinNotice, rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalHealthCarePayments, payerMadeDirectSales, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, type, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(secondTinNotice, rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1152,7 +1155,7 @@ public String toString() { sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); sb.append(" medicalHealthCarePayments: ").append(toIndentedString(medicalHealthCarePayments)).append("\n"); - sb.append(" payerMadeDirectSales: ").append(toIndentedString(payerMadeDirectSales)).append("\n"); + sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); @@ -1164,8 +1167,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1209,8 +1212,8 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1232,6 +1235,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1254,6 +1261,13 @@ 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())); @@ -1268,12 +1282,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1284,13 +1298,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1311,7 +1325,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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 851a7bf..0aa0939 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099MiscResponse.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 @@ -21,9 +21,9 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailApp; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorApp; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -93,9 +93,9 @@ public class Form1099MiscResponse { @SerializedName(SERIALIZED_NAME_MEDICAL_HEALTH_CARE_PAYMENTS) private Double medicalHealthCarePayments; - public static final String SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES = "payerMadeDirectSales"; - @SerializedName(SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES) - private Boolean payerMadeDirectSales; + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; public static final String SERIALIZED_NAME_SUBSTITUTE_PAYMENTS = "substitutePayments"; @SerializedName(SERIALIZED_NAME_SUBSTITUTE_PAYMENTS) @@ -134,17 +134,19 @@ public class Form1099MiscResponse { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -371,7 +373,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + private List stateEfileStatus; public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) @@ -387,7 +389,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; + private List validationErrors; public Form1099MiscResponse() { } @@ -532,22 +534,22 @@ public void setMedicalHealthCarePayments(Double medicalHealthCarePayments) { } - public Form1099MiscResponse payerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public Form1099MiscResponse directSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; return this; } /** - * Get payerMadeDirectSales - * @return payerMadeDirectSales + * Get directSalesIndicator + * @return directSalesIndicator */ @javax.annotation.Nullable - public Boolean getPayerMadeDirectSales() { - return payerMadeDirectSales; + public Boolean getDirectSalesIndicator() { + return directSalesIndicator; } - public void setPayerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public void setDirectSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; } @@ -1284,12 +1286,12 @@ public void setFederalEfileStatus(StatusDetail federalEfileStatus) { } - public Form1099MiscResponse stateEfileStatus(List stateEfileStatus) { + public Form1099MiscResponse stateEfileStatus(List stateEfileStatus) { this.stateEfileStatus = stateEfileStatus; return this; } - public Form1099MiscResponse addStateEfileStatusItem(StateEfileStatusDetailApp stateEfileStatusItem) { + public Form1099MiscResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { if (this.stateEfileStatus == null) { this.stateEfileStatus = new ArrayList<>(); } @@ -1302,11 +1304,11 @@ public Form1099MiscResponse addStateEfileStatusItem(StateEfileStatusDetailApp st * @return stateEfileStatus */ @javax.annotation.Nullable - public List getStateEfileStatus() { + public List getStateEfileStatus() { return stateEfileStatus; } - public void setStateEfileStatus(List stateEfileStatus) { + public void setStateEfileStatus(List stateEfileStatus) { this.stateEfileStatus = stateEfileStatus; } @@ -1368,12 +1370,12 @@ public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) } - public Form1099MiscResponse validationErrors(List validationErrors) { + public Form1099MiscResponse validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; } - public Form1099MiscResponse addValidationErrorsItem(ValidationErrorApp validationErrorsItem) { + public Form1099MiscResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { if (this.validationErrors == null) { this.validationErrors = new ArrayList<>(); } @@ -1386,11 +1388,11 @@ public Form1099MiscResponse addValidationErrorsItem(ValidationErrorApp validatio * @return validationErrors */ @javax.annotation.Nullable - public List getValidationErrors() { + public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { + public void setValidationErrors(List validationErrors) { this.validationErrors = validationErrors; } @@ -1412,7 +1414,7 @@ public boolean equals(Object o) { Objects.equals(this.fedIncomeTaxWithheld, form1099MiscResponse.fedIncomeTaxWithheld) && Objects.equals(this.fishingBoatProceeds, form1099MiscResponse.fishingBoatProceeds) && Objects.equals(this.medicalHealthCarePayments, form1099MiscResponse.medicalHealthCarePayments) && - Objects.equals(this.payerMadeDirectSales, form1099MiscResponse.payerMadeDirectSales) && + Objects.equals(this.directSalesIndicator, form1099MiscResponse.directSalesIndicator) && Objects.equals(this.substitutePayments, form1099MiscResponse.substitutePayments) && Objects.equals(this.cropInsuranceProceeds, form1099MiscResponse.cropInsuranceProceeds) && Objects.equals(this.grossProceedsPaidToAttorney, form1099MiscResponse.grossProceedsPaidToAttorney) && @@ -1465,7 +1467,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(secondTinNotice, rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalHealthCarePayments, payerMadeDirectSales, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, type, createdAt, updatedAt, userId, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); + return Objects.hash(secondTinNotice, rents, royalties, otherIncome, fedIncomeTaxWithheld, fishingBoatProceeds, medicalHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, fatcaFilingRequirement, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, type, createdAt, updatedAt, userId, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); } private static int hashCodeNullable(JsonNullable a) { @@ -1486,7 +1488,7 @@ public String toString() { sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); sb.append(" fishingBoatProceeds: ").append(toIndentedString(fishingBoatProceeds)).append("\n"); sb.append(" medicalHealthCarePayments: ").append(toIndentedString(medicalHealthCarePayments)).append("\n"); - sb.append(" payerMadeDirectSales: ").append(toIndentedString(payerMadeDirectSales)).append("\n"); + sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); sb.append(" substitutePayments: ").append(toIndentedString(substitutePayments)).append("\n"); sb.append(" cropInsuranceProceeds: ").append(toIndentedString(cropInsuranceProceeds)).append("\n"); sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); @@ -1704,7 +1706,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `stateEfileStatus` (array) for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailApp.validateJsonElement(jsonArraystateEfileStatus.get(i)); + StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); }; } } @@ -1730,7 +1732,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `validationErrors` (array) for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorApp.validateJsonElement(jsonArrayvalidationErrors.get(i)); + ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); }; } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecList.java index 02915fb..ed1b783 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecList.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecList.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 @@ -62,7 +62,7 @@ public class Form1099NecList { public static final String SERIALIZED_NAME_FORMS = "forms"; @SerializedName(SERIALIZED_NAME_FORMS) - private List forms = new ArrayList<>(); + private List forms; public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; @SerializedName(SERIALIZED_NAME_FORM_TYPE) 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 195e8ed..e22aa0f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItem.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 @@ -55,7 +55,7 @@ import Avalara.SDK.JSON; /** - * Form1099NecListItem + * 1099-NEC - Nonemployee compensation */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099NecListItem { @@ -67,9 +67,9 @@ public class Form1099NecListItem { @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) private Double nonemployeeCompensation; - public static final String SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES = "payerMadeDirectSales"; - @SerializedName(SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES) - private Boolean payerMadeDirectSales; + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) @@ -95,16 +95,16 @@ public class Form1099NecListItem { @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -240,7 +240,7 @@ public Form1099NecListItem secondTinNotice(Boolean secondTinNotice) { } /** - * Get secondTinNotice + * Second TIN notice * @return secondTinNotice */ @javax.annotation.Nullable @@ -259,10 +259,10 @@ public Form1099NecListItem nonemployeeCompensation(Double nonemployeeCompensatio } /** - * Get nonemployeeCompensation + * Nonemployee compensation * @return nonemployeeCompensation */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Double getNonemployeeCompensation() { return nonemployeeCompensation; } @@ -272,22 +272,22 @@ public void setNonemployeeCompensation(Double nonemployeeCompensation) { } - public Form1099NecListItem payerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public Form1099NecListItem directSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; return this; } /** - * Get payerMadeDirectSales - * @return payerMadeDirectSales + * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale + * @return directSalesIndicator */ @javax.annotation.Nullable - public Boolean getPayerMadeDirectSales() { - return payerMadeDirectSales; + public Boolean getDirectSalesIndicator() { + return directSalesIndicator; } - public void setPayerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public void setDirectSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; } @@ -297,7 +297,7 @@ public Form1099NecListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithh } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -316,7 +316,7 @@ public Form1099NecListItem issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerReferenceId */ @javax.annotation.Nullable @@ -335,7 +335,7 @@ public Form1099NecListItem issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerTin */ @javax.annotation.Nullable @@ -354,10 +354,10 @@ public Form1099NecListItem taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax year * @return taxYear */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Integer getTaxYear() { return taxYear; } @@ -373,7 +373,7 @@ public Form1099NecListItem issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -392,7 +392,7 @@ public Form1099NecListItem referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -405,41 +405,41 @@ public void setReferenceId(String referenceId) { } - public Form1099NecListItem recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099NecListItem recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099NecListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099NecListItem recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -449,7 +449,7 @@ public Form1099NecListItem tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -468,7 +468,7 @@ public Form1099NecListItem recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -487,10 +487,10 @@ public Form1099NecListItem address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -506,7 +506,7 @@ public Form1099NecListItem address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -525,10 +525,10 @@ public Form1099NecListItem city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -544,7 +544,7 @@ public Form1099NecListItem state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -563,7 +563,7 @@ public Form1099NecListItem zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -582,7 +582,7 @@ public Form1099NecListItem recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -601,7 +601,7 @@ public Form1099NecListItem accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -620,7 +620,7 @@ public Form1099NecListItem officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -639,7 +639,7 @@ public Form1099NecListItem recipientNonUsProvince(String recipientNonUsProvince) } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -658,10 +658,10 @@ public Form1099NecListItem countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -677,7 +677,7 @@ public Form1099NecListItem federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -696,7 +696,7 @@ public Form1099NecListItem postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -715,7 +715,7 @@ public Form1099NecListItem stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -734,7 +734,7 @@ public Form1099NecListItem tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -753,7 +753,7 @@ public Form1099NecListItem addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -772,7 +772,7 @@ public Form1099NecListItem stateAndLocalWithholding(StateAndLocalWithholdingRequ } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -797,15 +797,15 @@ public boolean equals(Object o) { Form1099NecListItem form1099NecListItem = (Form1099NecListItem) o; return Objects.equals(this.secondTinNotice, form1099NecListItem.secondTinNotice) && Objects.equals(this.nonemployeeCompensation, form1099NecListItem.nonemployeeCompensation) && - Objects.equals(this.payerMadeDirectSales, form1099NecListItem.payerMadeDirectSales) && + Objects.equals(this.directSalesIndicator, form1099NecListItem.directSalesIndicator) && Objects.equals(this.federalIncomeTaxWithheld, form1099NecListItem.federalIncomeTaxWithheld) && Objects.equals(this.issuerReferenceId, form1099NecListItem.issuerReferenceId) && Objects.equals(this.issuerTin, form1099NecListItem.issuerTin) && Objects.equals(this.taxYear, form1099NecListItem.taxYear) && Objects.equals(this.issuerId, form1099NecListItem.issuerId) && Objects.equals(this.referenceId, form1099NecListItem.referenceId) && - Objects.equals(this.recipientName, form1099NecListItem.recipientName) && Objects.equals(this.recipientTin, form1099NecListItem.recipientTin) && + Objects.equals(this.recipientName, form1099NecListItem.recipientName) && Objects.equals(this.tinType, form1099NecListItem.tinType) && Objects.equals(this.recipientSecondName, form1099NecListItem.recipientSecondName) && Objects.equals(this.address, form1099NecListItem.address) && @@ -832,7 +832,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(secondTinNotice, nonemployeeCompensation, payerMadeDirectSales, federalIncomeTaxWithheld, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(secondTinNotice, nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -848,15 +848,15 @@ public String toString() { sb.append("class Form1099NecListItem {\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); - sb.append(" payerMadeDirectSales: ").append(toIndentedString(payerMadeDirectSales)).append("\n"); + sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -902,8 +902,8 @@ private String toIndentedString(Object o) { openapiFields.add("taxYear"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -925,6 +925,12 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("nonemployeeCompensation"); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -947,6 +953,13 @@ 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 `Form1099NecListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099NecListItem.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("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())); @@ -960,12 +973,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -976,13 +989,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1003,7 +1016,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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/Form1099NecListItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItemResponse.java new file mode 100644 index 0000000..25cae56 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecListItemResponse.java @@ -0,0 +1,1200 @@ +/* + * 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.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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; + +/** + * Form1099NecListItemResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099NecListItemResponse { + public static final String SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION = "nonemployeeCompensation"; + @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) + private Double nonemployeeCompensation; + + 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_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; + + 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse addressVerificationStatus; + + 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_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_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_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 Form1099NecListItemResponse() { + } + + public Form1099NecListItemResponse( + String id, + Form1099StatusDetailResponse federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetailResponse postalMailStatus, + Form1099StatusDetailResponse tinMatchStatus, + Form1099StatusDetailResponse addressVerificationStatus, + 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.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1099NecListItemResponse nonemployeeCompensation(Double nonemployeeCompensation) { + this.nonemployeeCompensation = nonemployeeCompensation; + return this; + } + + /** + * Nonemployee compensation + * @return nonemployeeCompensation + */ + @javax.annotation.Nullable + public Double getNonemployeeCompensation() { + return nonemployeeCompensation; + } + + public void setNonemployeeCompensation(Double nonemployeeCompensation) { + this.nonemployeeCompensation = nonemployeeCompensation; + } + + + public Form1099NecListItemResponse 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 Form1099NecListItemResponse directSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; + return this; + } + + /** + * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale + * @return directSalesIndicator + */ + @javax.annotation.Nullable + public Boolean getDirectSalesIndicator() { + return directSalesIndicator; + } + + public void setDirectSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; + } + + + /** + * ID of the form + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + + public Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099StatusDetailResponse getFederalEfileStatus() { + return federalEfileStatus; + } + + + + public Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099StatusDetailResponse getPostalMailStatus() { + return postalMailStatus; + } + + + + public Form1099NecListItemResponse 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 Form1099StatusDetailResponse getTinMatchStatus() { + return tinMatchStatus; + } + + + + public Form1099NecListItemResponse 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 Form1099StatusDetailResponse getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + public Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse 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 Form1099NecListItemResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + return this; + } + + /** + * Foreign province + * @return foreignProvince + */ + @javax.annotation.Nullable + public String getForeignProvince() { + return foreignProvince; + } + + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public Form1099NecListItemResponse 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; + } + + + /** + * 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 Form1099NecListItemResponse 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; + } + Form1099NecListItemResponse form1099NecListItemResponse = (Form1099NecListItemResponse) o; + return Objects.equals(this.nonemployeeCompensation, form1099NecListItemResponse.nonemployeeCompensation) && + Objects.equals(this.federalIncomeTaxWithheld, form1099NecListItemResponse.federalIncomeTaxWithheld) && + Objects.equals(this.directSalesIndicator, form1099NecListItemResponse.directSalesIndicator) && + Objects.equals(this.id, form1099NecListItemResponse.id) && + Objects.equals(this.type, form1099NecListItemResponse.type) && + Objects.equals(this.issuerId, form1099NecListItemResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1099NecListItemResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099NecListItemResponse.issuerTin) && + Objects.equals(this.taxYear, form1099NecListItemResponse.taxYear) && + Objects.equals(this.federalEfile, form1099NecListItemResponse.federalEfile) && + Objects.equals(this.federalEfileStatus, form1099NecListItemResponse.federalEfileStatus) && + Objects.equals(this.stateEfile, form1099NecListItemResponse.stateEfile) && + Objects.equals(this.stateEfileStatus, form1099NecListItemResponse.stateEfileStatus) && + Objects.equals(this.postalMail, form1099NecListItemResponse.postalMail) && + Objects.equals(this.postalMailStatus, form1099NecListItemResponse.postalMailStatus) && + Objects.equals(this.tinMatch, form1099NecListItemResponse.tinMatch) && + Objects.equals(this.tinMatchStatus, form1099NecListItemResponse.tinMatchStatus) && + Objects.equals(this.addressVerification, form1099NecListItemResponse.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1099NecListItemResponse.addressVerificationStatus) && + Objects.equals(this.referenceId, form1099NecListItemResponse.referenceId) && + Objects.equals(this.email, form1099NecListItemResponse.email) && + Objects.equals(this.tinType, form1099NecListItemResponse.tinType) && + Objects.equals(this.tin, form1099NecListItemResponse.tin) && + Objects.equals(this.recipientName, form1099NecListItemResponse.recipientName) && + Objects.equals(this.recipientSecondName, form1099NecListItemResponse.recipientSecondName) && + Objects.equals(this.address, form1099NecListItemResponse.address) && + Objects.equals(this.address2, form1099NecListItemResponse.address2) && + Objects.equals(this.city, form1099NecListItemResponse.city) && + Objects.equals(this.state, form1099NecListItemResponse.state) && + Objects.equals(this.zip, form1099NecListItemResponse.zip) && + Objects.equals(this.foreignProvince, form1099NecListItemResponse.foreignProvince) && + Objects.equals(this.countryCode, form1099NecListItemResponse.countryCode) && + Objects.equals(this.validationErrors, form1099NecListItemResponse.validationErrors) && + Objects.equals(this.createdAt, form1099NecListItemResponse.createdAt) && + Objects.equals(this.updatedAt, form1099NecListItemResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099NecListItemResponse.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(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); + } + + 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 Form1099NecListItemResponse {\n"); + sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).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(" 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(" 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(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).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("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("foreignProvince"); + openapiFields.add("countryCode"); + 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 Form1099NecListItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099NecListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099NecListItemResponse is not found in the empty JSON string", Form1099NecListItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099NecListItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099NecListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099NecListItemResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("id").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()) { + Form1099StatusDetailResponse.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()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + 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 (!Form1099NecListItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099NecListItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099NecListItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099NecListItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099NecListItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099NecListItemResponse + * @throws IOException if the JSON string is invalid with respect to Form1099NecListItemResponse + */ + public static Form1099NecListItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099NecListItemResponse.class); + } + + /** + * Convert an instance of Form1099NecListItemResponse 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/Form1099NecRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java index cc6256a..358687c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecRequest.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 @@ -67,9 +67,9 @@ public class Form1099NecRequest { @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) private Double nonemployeeCompensation; - public static final String SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES = "payerMadeDirectSales"; - @SerializedName(SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES) - private Boolean payerMadeDirectSales; + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) @@ -80,17 +80,19 @@ public class Form1099NecRequest { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -147,16 +149,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -286,20 +288,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public Form1099NecRequest() { } - public Form1099NecRequest( - TypeEnum type - ) { - this(); - this.type = type; - } - public Form1099NecRequest secondTinNotice(Boolean secondTinNotice) { this.secondTinNotice = secondTinNotice; return this; } /** - * Get secondTinNotice + * Second TIN notice * @return secondTinNotice */ @javax.annotation.Nullable @@ -318,10 +313,10 @@ public Form1099NecRequest nonemployeeCompensation(Double nonemployeeCompensation } /** - * Get nonemployeeCompensation + * Nonemployee compensation * @return nonemployeeCompensation */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Double getNonemployeeCompensation() { return nonemployeeCompensation; } @@ -331,22 +326,22 @@ public void setNonemployeeCompensation(Double nonemployeeCompensation) { } - public Form1099NecRequest payerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public Form1099NecRequest directSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; return this; } /** - * Get payerMadeDirectSales - * @return payerMadeDirectSales + * Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale + * @return directSalesIndicator */ @javax.annotation.Nullable - public Boolean getPayerMadeDirectSales() { - return payerMadeDirectSales; + public Boolean getDirectSalesIndicator() { + return directSalesIndicator; } - public void setPayerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public void setDirectSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; } @@ -356,7 +351,7 @@ public Form1099NecRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithhe } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -369,6 +364,11 @@ public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { } + public Form1099NecRequest type(TypeEnum type) { + this.type = type; + return this; + } + /** * Get type * @return type @@ -378,6 +378,9 @@ public TypeEnum getType() { return type; } + public void setType(TypeEnum type) { + this.type = type; + } public Form1099NecRequest issuerId(String issuerId) { @@ -386,7 +389,7 @@ public Form1099NecRequest issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -405,7 +408,7 @@ public Form1099NecRequest referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -418,41 +421,41 @@ public void setReferenceId(String referenceId) { } - public Form1099NecRequest recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099NecRequest recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099NecRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099NecRequest recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -462,7 +465,7 @@ public Form1099NecRequest tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -481,7 +484,7 @@ public Form1099NecRequest recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -500,10 +503,10 @@ public Form1099NecRequest address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -519,7 +522,7 @@ public Form1099NecRequest address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -538,10 +541,10 @@ public Form1099NecRequest city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -557,7 +560,7 @@ public Form1099NecRequest state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -576,7 +579,7 @@ public Form1099NecRequest zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -595,7 +598,7 @@ public Form1099NecRequest recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -614,7 +617,7 @@ public Form1099NecRequest accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -633,7 +636,7 @@ public Form1099NecRequest officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -652,7 +655,7 @@ public Form1099NecRequest recipientNonUsProvince(String recipientNonUsProvince) } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -671,10 +674,10 @@ public Form1099NecRequest countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -690,7 +693,7 @@ public Form1099NecRequest federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -709,7 +712,7 @@ public Form1099NecRequest postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -728,7 +731,7 @@ public Form1099NecRequest stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -747,7 +750,7 @@ public Form1099NecRequest tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -766,7 +769,7 @@ public Form1099NecRequest addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -785,7 +788,7 @@ public Form1099NecRequest stateAndLocalWithholding(StateAndLocalWithholdingReque } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -810,13 +813,13 @@ public boolean equals(Object o) { Form1099NecRequest form1099NecRequest = (Form1099NecRequest) o; return Objects.equals(this.secondTinNotice, form1099NecRequest.secondTinNotice) && Objects.equals(this.nonemployeeCompensation, form1099NecRequest.nonemployeeCompensation) && - Objects.equals(this.payerMadeDirectSales, form1099NecRequest.payerMadeDirectSales) && + Objects.equals(this.directSalesIndicator, form1099NecRequest.directSalesIndicator) && Objects.equals(this.federalIncomeTaxWithheld, form1099NecRequest.federalIncomeTaxWithheld) && Objects.equals(this.type, form1099NecRequest.type) && Objects.equals(this.issuerId, form1099NecRequest.issuerId) && Objects.equals(this.referenceId, form1099NecRequest.referenceId) && - Objects.equals(this.recipientName, form1099NecRequest.recipientName) && Objects.equals(this.recipientTin, form1099NecRequest.recipientTin) && + Objects.equals(this.recipientName, form1099NecRequest.recipientName) && Objects.equals(this.tinType, form1099NecRequest.tinType) && Objects.equals(this.recipientSecondName, form1099NecRequest.recipientSecondName) && Objects.equals(this.address, form1099NecRequest.address) && @@ -843,7 +846,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(secondTinNotice, nonemployeeCompensation, payerMadeDirectSales, federalIncomeTaxWithheld, type, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(secondTinNotice, nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -859,13 +862,13 @@ public String toString() { sb.append("class Form1099NecRequest {\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); - sb.append(" payerMadeDirectSales: ").append(toIndentedString(payerMadeDirectSales)).append("\n"); + sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -909,8 +912,8 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -932,6 +935,11 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("nonemployeeCompensation"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -954,6 +962,13 @@ 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 `Form1099NecRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099NecRequest.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())); @@ -968,12 +983,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -984,13 +999,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1011,7 +1026,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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 32acbda..d8c42fe 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099NecResponse.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 @@ -21,9 +21,9 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailApp; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorApp; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -73,9 +73,9 @@ public class Form1099NecResponse { @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) private Double nonemployeeCompensation; - public static final String SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES = "payerMadeDirectSales"; - @SerializedName(SERIALIZED_NAME_PAYER_MADE_DIRECT_SALES) - private Boolean payerMadeDirectSales; + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; + @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) + private Boolean directSalesIndicator; public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) @@ -86,17 +86,19 @@ public class Form1099NecResponse { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -323,7 +325,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + private List stateEfileStatus; public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) @@ -339,7 +341,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; + private List validationErrors; public Form1099NecResponse() { } @@ -389,22 +391,22 @@ public void setNonemployeeCompensation(Double nonemployeeCompensation) { } - public Form1099NecResponse payerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public Form1099NecResponse directSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; return this; } /** - * Get payerMadeDirectSales - * @return payerMadeDirectSales + * Get directSalesIndicator + * @return directSalesIndicator */ @javax.annotation.Nullable - public Boolean getPayerMadeDirectSales() { - return payerMadeDirectSales; + public Boolean getDirectSalesIndicator() { + return directSalesIndicator; } - public void setPayerMadeDirectSales(Boolean payerMadeDirectSales) { - this.payerMadeDirectSales = payerMadeDirectSales; + public void setDirectSalesIndicator(Boolean directSalesIndicator) { + this.directSalesIndicator = directSalesIndicator; } @@ -1008,12 +1010,12 @@ public void setFederalEfileStatus(StatusDetail federalEfileStatus) { } - public Form1099NecResponse stateEfileStatus(List stateEfileStatus) { + public Form1099NecResponse stateEfileStatus(List stateEfileStatus) { this.stateEfileStatus = stateEfileStatus; return this; } - public Form1099NecResponse addStateEfileStatusItem(StateEfileStatusDetailApp stateEfileStatusItem) { + public Form1099NecResponse addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { if (this.stateEfileStatus == null) { this.stateEfileStatus = new ArrayList<>(); } @@ -1026,11 +1028,11 @@ public Form1099NecResponse addStateEfileStatusItem(StateEfileStatusDetailApp sta * @return stateEfileStatus */ @javax.annotation.Nullable - public List getStateEfileStatus() { + public List getStateEfileStatus() { return stateEfileStatus; } - public void setStateEfileStatus(List stateEfileStatus) { + public void setStateEfileStatus(List stateEfileStatus) { this.stateEfileStatus = stateEfileStatus; } @@ -1092,12 +1094,12 @@ public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) } - public Form1099NecResponse validationErrors(List validationErrors) { + public Form1099NecResponse validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; } - public Form1099NecResponse addValidationErrorsItem(ValidationErrorApp validationErrorsItem) { + public Form1099NecResponse addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { if (this.validationErrors == null) { this.validationErrors = new ArrayList<>(); } @@ -1110,11 +1112,11 @@ public Form1099NecResponse addValidationErrorsItem(ValidationErrorApp validation * @return validationErrors */ @javax.annotation.Nullable - public List getValidationErrors() { + public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { + public void setValidationErrors(List validationErrors) { this.validationErrors = validationErrors; } @@ -1131,7 +1133,7 @@ public boolean equals(Object o) { Form1099NecResponse form1099NecResponse = (Form1099NecResponse) o; return Objects.equals(this.secondTinNotice, form1099NecResponse.secondTinNotice) && Objects.equals(this.nonemployeeCompensation, form1099NecResponse.nonemployeeCompensation) && - Objects.equals(this.payerMadeDirectSales, form1099NecResponse.payerMadeDirectSales) && + Objects.equals(this.directSalesIndicator, form1099NecResponse.directSalesIndicator) && Objects.equals(this.federalIncomeTaxWithheld, form1099NecResponse.federalIncomeTaxWithheld) && Objects.equals(this.type, form1099NecResponse.type) && Objects.equals(this.createdAt, form1099NecResponse.createdAt) && @@ -1177,7 +1179,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(secondTinNotice, nonemployeeCompensation, payerMadeDirectSales, federalIncomeTaxWithheld, type, createdAt, updatedAt, userId, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); + return Objects.hash(secondTinNotice, nonemployeeCompensation, directSalesIndicator, federalIncomeTaxWithheld, type, createdAt, updatedAt, userId, stateAndLocalWithholding, tinType, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, recipientName, recipientTin, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, validationErrors); } private static int hashCodeNullable(JsonNullable a) { @@ -1193,7 +1195,7 @@ public String toString() { sb.append("class Form1099NecResponse {\n"); sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); - sb.append(" payerMadeDirectSales: ").append(toIndentedString(payerMadeDirectSales)).append("\n"); + sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); @@ -1404,7 +1406,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `stateEfileStatus` (array) for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailApp.validateJsonElement(jsonArraystateEfileStatus.get(i)); + StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); }; } } @@ -1430,7 +1432,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `validationErrors` (array) for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorApp.validateJsonElement(jsonArrayvalidationErrors.get(i)); + ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); }; } } 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 43aeb62..7a1098e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ProccessResult.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/Form1099RList.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RList.java index e7227fb..26ca5ad 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RList.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RList.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 @@ -62,7 +62,7 @@ public class Form1099RList { public static final String SERIALIZED_NAME_FORMS = "forms"; @SerializedName(SERIALIZED_NAME_FORMS) - private List forms = new ArrayList<>(); + private List forms; public static final String SERIALIZED_NAME_FORM_TYPE = "formType"; @SerializedName(SERIALIZED_NAME_FORM_TYPE) 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 1662eb4..111c455 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItem.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 @@ -93,67 +93,67 @@ public class Form1099RListItem { private Double netUnrealizedAppreciationInEmployerSecurities; /** - * Gets or Sets distributionCode + * Distribution code */ @JsonAdapter(DistributionCodeEnum.Adapter.class) public enum DistributionCodeEnum { - EARLY_DISTRIBUTION_NO_EXCEPTION("EarlyDistributionNoException"), + _1("1"), - EARLY_DISTRIBUTION_WITH_EXCEPTION("EarlyDistributionWithException"), + _2("2"), - DISABILITY("Disability"), + _3("3"), - DEATH("Death"), + _4("4"), - PROHIBITED_TRANSACTION("ProhibitedTransaction"), + _5("5"), - SECTION1035_EXCHANGE("Section1035Exchange"), + _6("6"), - NORMAL_DISTRIBUTION("NormalDistribution"), + _7("7"), - EXCESS_CONTRIBUTIONS_CURRENT_YEAR("ExcessContributionsCurrentYear"), + _8("8"), - CURRENT_LIFE_INSURANCE_PROTECTION_COST("CurrentLifeInsuranceProtectionCost"), + _9("9"), - TEN_YEAR_TAX_OPTION("TenYearTaxOption"), + A("A"), - DESIGNATED_ROTH_DISTRIBUTION("DesignatedRothDistribution"), + B("B"), - REPORTABLE_DEATH_BENEFITS("ReportableDeathBenefits"), + C("C"), - NONQUALIFIED_ANNUITY_PAYMENTS("NonqualifiedAnnuityPayments"), + D("D"), - EPCRS_DISTRIBUTION("EPCRSDistribution"), + E("E"), - CHARITABLE_GIFT_ANNUITY("CharitableGiftAnnuity"), + F("F"), - DIRECT_ROLLOVER("DirectRollover"), + G("G"), - ROTH_ACCOUNT_TO_IRA_DIRECT_ROLLOVER("RothAccountToIRADirectRollover"), + H("H"), - EARLY_ROTH_IRA_DISTRIBUTION("EarlyRothIRADistribution"), + J("J"), - IRA_ASSETS_NO_FMV("IRAAssetsNoFMV"), + K("K"), - LOANS_DEEMED_DISTRIBUTIONS("LoansDeemedDistributions"), + L("L"), - QUALIFIED_PLAN_LOAN_OFFSETS("QualifiedPlanLoanOffsets"), + M("M"), - RECHARACTERIZED_IRA_NEXT_YEAR("RecharacterizedIRANextYear"), + N("N"), - EXCESS_CONTRIBUTIONS_PREVIOUS_YEAR("ExcessContributionsPreviousYear"), + P("P"), - QUALIFIED_ROTH_IRA_DISTRIBUTION("QualifiedRothIRADistribution"), + Q("Q"), - RECHARACTERIZED_IRA_PREVIOUS_YEAR("RecharacterizedIRAPreviousYear"), + R("R"), - EARLY_SIMPLE_IRA_DISTRIBUTION("EarlySimpleIRADistribution"), + S("S"), - ROTH_IRA_DISTRIBUTION_EXCEPTION("RothIRADistributionException"), + T("T"), - ESOP_DISTRIBUTION("ESOPDistribution"), + U("U"), - LONG_TERM_CARE_INSURANCE("LongTermCareInsurance"); + W("W"); private String value; @@ -203,7 +203,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private DistributionCodeEnum distributionCode; /** - * Gets or Sets secondDistributionCode + * Second distribution code */ @JsonAdapter(SecondDistributionCodeEnum.Adapter.class) public enum SecondDistributionCodeEnum { @@ -372,16 +372,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -517,7 +517,7 @@ public Form1099RListItem grossDistribution(Double grossDistribution) { } /** - * Get grossDistribution + * Gross distribution * @return grossDistribution */ @javax.annotation.Nullable @@ -536,7 +536,7 @@ public Form1099RListItem taxableAmount(Double taxableAmount) { } /** - * Get taxableAmount + * Taxable amount * @return taxableAmount */ @javax.annotation.Nullable @@ -555,7 +555,7 @@ public Form1099RListItem taxableAmountNotDetermined(Boolean taxableAmountNotDete } /** - * Get taxableAmountNotDetermined + * Taxable amount not determined * @return taxableAmountNotDetermined */ @javax.annotation.Nullable @@ -574,7 +574,7 @@ public Form1099RListItem totalDistributionDetermined(Boolean totalDistributionDe } /** - * Get totalDistributionDetermined + * Total distribution * @return totalDistributionDetermined */ @javax.annotation.Nullable @@ -593,7 +593,7 @@ public Form1099RListItem capitalGain(Double capitalGain) { } /** - * Get capitalGain + * Capital gain (included in Box 2a) * @return capitalGain */ @javax.annotation.Nullable @@ -612,7 +612,7 @@ public Form1099RListItem federalIncomeTaxWithheld(Double federalIncomeTaxWithhel } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -631,7 +631,7 @@ public Form1099RListItem employeeContributionsOrDesignatedRothOrInsurancePremium } /** - * Get employeeContributionsOrDesignatedRothOrInsurancePremiums + * Employee contributions/Designated Roth contributions or insurance premiums * @return employeeContributionsOrDesignatedRothOrInsurancePremiums */ @javax.annotation.Nullable @@ -650,7 +650,7 @@ public Form1099RListItem netUnrealizedAppreciationInEmployerSecurities(Double ne } /** - * Get netUnrealizedAppreciationInEmployerSecurities + * Net unrealized appreciation in employer's securities * @return netUnrealizedAppreciationInEmployerSecurities */ @javax.annotation.Nullable @@ -669,7 +669,7 @@ public Form1099RListItem distributionCode(DistributionCodeEnum distributionCode) } /** - * Get distributionCode + * Distribution code * @return distributionCode */ @javax.annotation.Nullable @@ -688,7 +688,7 @@ public Form1099RListItem secondDistributionCode(SecondDistributionCodeEnum secon } /** - * Get secondDistributionCode + * Second distribution code * @return secondDistributionCode */ @javax.annotation.Nullable @@ -707,7 +707,7 @@ public Form1099RListItem iraSepSimple(Boolean iraSepSimple) { } /** - * Get iraSepSimple + * IRA/SEP/SIMPLE * @return iraSepSimple */ @javax.annotation.Nullable @@ -726,7 +726,7 @@ public Form1099RListItem traditionalIraSepSimpleOrRothConversionAmount(Double tr } /** - * Get traditionalIraSepSimpleOrRothConversionAmount + * Traditional IRA/SEP/SIMPLE or Roth conversion amount * @return traditionalIraSepSimpleOrRothConversionAmount */ @javax.annotation.Nullable @@ -745,7 +745,7 @@ public Form1099RListItem otherAmount(Double otherAmount) { } /** - * Get otherAmount + * Other amount * @return otherAmount */ @javax.annotation.Nullable @@ -764,7 +764,7 @@ public Form1099RListItem otherPercentage(String otherPercentage) { } /** - * Get otherPercentage + * Other percentage * @return otherPercentage */ @javax.annotation.Nullable @@ -783,7 +783,7 @@ public Form1099RListItem totalDistributionPercentage(String totalDistributionPer } /** - * Get totalDistributionPercentage + * Total distribution percentage * @return totalDistributionPercentage */ @javax.annotation.Nullable @@ -802,7 +802,7 @@ public Form1099RListItem totalEmployeeContributions(Double totalEmployeeContribu } /** - * Get totalEmployeeContributions + * Total employee contributions * @return totalEmployeeContributions */ @javax.annotation.Nullable @@ -821,7 +821,7 @@ public Form1099RListItem amountAllocableToIrrWithin5Years(Double amountAllocable } /** - * Get amountAllocableToIrrWithin5Years + * Amount allocable to IRR within 5 years * @return amountAllocableToIrrWithin5Years */ @javax.annotation.Nullable @@ -840,7 +840,7 @@ public Form1099RListItem firstYearOfDesignatedRothContribution(Integer firstYear } /** - * Get firstYearOfDesignatedRothContribution + * First year of designated Roth contribution * @return firstYearOfDesignatedRothContribution */ @javax.annotation.Nullable @@ -859,7 +859,7 @@ public Form1099RListItem fatcaFilingRequirement(Boolean fatcaFilingRequirement) } /** - * Get fatcaFilingRequirement + * FATCA filing requirement * @return fatcaFilingRequirement */ @javax.annotation.Nullable @@ -878,7 +878,7 @@ public Form1099RListItem dateOfPayment(OffsetDateTime dateOfPayment) { } /** - * Get dateOfPayment + * Date of payment * @return dateOfPayment */ @javax.annotation.Nullable @@ -897,7 +897,7 @@ public Form1099RListItem issuerReferenceId(String issuerReferenceId) { } /** - * Get issuerReferenceId + * Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerReferenceId */ @javax.annotation.Nullable @@ -916,7 +916,7 @@ public Form1099RListItem issuerTin(String issuerTin) { } /** - * Get issuerTin + * Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. * @return issuerTin */ @javax.annotation.Nullable @@ -935,10 +935,10 @@ public Form1099RListItem taxYear(Integer taxYear) { } /** - * Get taxYear + * Tax year * @return taxYear */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Integer getTaxYear() { return taxYear; } @@ -954,7 +954,7 @@ public Form1099RListItem issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -973,7 +973,7 @@ public Form1099RListItem referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -986,41 +986,41 @@ public void setReferenceId(String referenceId) { } - public Form1099RListItem recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099RListItem recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099RListItem recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099RListItem recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -1030,7 +1030,7 @@ public Form1099RListItem tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -1049,7 +1049,7 @@ public Form1099RListItem recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -1068,10 +1068,10 @@ public Form1099RListItem address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -1087,7 +1087,7 @@ public Form1099RListItem address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -1106,10 +1106,10 @@ public Form1099RListItem city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -1125,7 +1125,7 @@ public Form1099RListItem state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -1144,7 +1144,7 @@ public Form1099RListItem zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -1163,7 +1163,7 @@ public Form1099RListItem recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -1182,7 +1182,7 @@ public Form1099RListItem accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -1201,7 +1201,7 @@ public Form1099RListItem officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -1220,7 +1220,7 @@ public Form1099RListItem recipientNonUsProvince(String recipientNonUsProvince) { } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -1239,10 +1239,10 @@ public Form1099RListItem countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -1258,7 +1258,7 @@ public Form1099RListItem federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -1277,7 +1277,7 @@ public Form1099RListItem postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -1296,7 +1296,7 @@ public Form1099RListItem stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -1315,7 +1315,7 @@ public Form1099RListItem tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1334,7 +1334,7 @@ public Form1099RListItem addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1353,7 +1353,7 @@ public Form1099RListItem stateAndLocalWithholding(StateAndLocalWithholdingReques } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -1401,8 +1401,8 @@ public boolean equals(Object o) { Objects.equals(this.taxYear, form1099RListItem.taxYear) && Objects.equals(this.issuerId, form1099RListItem.issuerId) && Objects.equals(this.referenceId, form1099RListItem.referenceId) && - Objects.equals(this.recipientName, form1099RListItem.recipientName) && Objects.equals(this.recipientTin, form1099RListItem.recipientTin) && + Objects.equals(this.recipientName, form1099RListItem.recipientName) && Objects.equals(this.tinType, form1099RListItem.tinType) && Objects.equals(this.recipientSecondName, form1099RListItem.recipientSecondName) && Objects.equals(this.address, form1099RListItem.address) && @@ -1429,7 +1429,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @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, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, fatcaFilingRequirement, dateOfPayment, issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1468,8 +1468,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1515,8 +1515,8 @@ private String toIndentedString(Object o) { openapiFields.add("taxYear"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1538,6 +1538,11 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1560,6 +1565,13 @@ 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 `Form1099RListItem` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099RListItem.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())); @@ -1593,12 +1605,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1609,13 +1621,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1636,7 +1648,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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 new file mode 100644 index 0000000..c928f12 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RListItemResponse.java @@ -0,0 +1,1643 @@ +/* + * 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.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +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; + +/** + * Form1099RListItemResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099RListItemResponse { + public static final String SERIALIZED_NAME_GROSS_DISTRIBUTIONS = "grossDistributions"; + @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTIONS) + private Double grossDistributions; + + 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_INDICATOR = "totalDistributionIndicator"; + @SerializedName(SERIALIZED_NAME_TOTAL_DISTRIBUTION_INDICATOR) + private Boolean totalDistributionIndicator; + + public static final String SERIALIZED_NAME_CAPITAL_GAIN = "capitalGain"; + @SerializedName(SERIALIZED_NAME_CAPITAL_GAIN) + private Double capitalGain; + + public static final String SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD = "fedIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FED_INCOME_TAX_WITHHELD) + private Double fedIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS = "employeeContributions"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_CONTRIBUTIONS) + private Double employeeContributions; + + public static final String SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION = "netUnrealizedAppreciation"; + @SerializedName(SERIALIZED_NAME_NET_UNREALIZED_APPRECIATION) + private Double netUnrealizedAppreciation; + + public static final String SERIALIZED_NAME_DISTRIBUTION_CODE_REQUIRED = "distributionCodeRequired"; + @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE_REQUIRED) + private String distributionCodeRequired; + + public static final String SERIALIZED_NAME_DISTRIBUTION_CODE_OPTIONAL = "distributionCodeOptional"; + @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE_OPTIONAL) + private String distributionCodeOptional; + + public static final String SERIALIZED_NAME_IRA_SEP_SIMPLE_INDICATOR = "iraSepSimpleIndicator"; + @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE_INDICATOR) + private Boolean iraSepSimpleIndicator; + + public static final String SERIALIZED_NAME_TOTAL_IRA_SEP_SIMPLE_DISTRIBUTION = "totalIraSepSimpleDistribution"; + @SerializedName(SERIALIZED_NAME_TOTAL_IRA_SEP_SIMPLE_DISTRIBUTION) + private Double totalIraSepSimpleDistribution; + + public static final String SERIALIZED_NAME_OTHER = "other"; + @SerializedName(SERIALIZED_NAME_OTHER) + private Double other; + + public static final String SERIALIZED_NAME_OTHER_PERCENT = "otherPercent"; + @SerializedName(SERIALIZED_NAME_OTHER_PERCENT) + private String otherPercent; + + public static final String SERIALIZED_NAME_PERCENTAGE_TOTAL_DISTRIBUTION = "percentageTotalDistribution"; + @SerializedName(SERIALIZED_NAME_PERCENTAGE_TOTAL_DISTRIBUTION) + private String percentageTotalDistribution; + + 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 = "amountAllocableToIrr"; + @SerializedName(SERIALIZED_NAME_AMOUNT_ALLOCABLE_TO_IRR) + private Double amountAllocableToIrr; + + public static final String SERIALIZED_NAME_FIRST_YEAR_DESIGNATED_ROTH_CONTRIB = "firstYearDesignatedRothContrib"; + @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; + + 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse 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 Form1099StatusDetailResponse addressVerificationStatus; + + 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_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_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_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 Form1099RListItemResponse() { + } + + public Form1099RListItemResponse( + String id, + Form1099StatusDetailResponse federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetailResponse postalMailStatus, + Form1099StatusDetailResponse tinMatchStatus, + Form1099StatusDetailResponse addressVerificationStatus, + 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.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1099RListItemResponse grossDistributions(Double grossDistributions) { + this.grossDistributions = grossDistributions; + return this; + } + + /** + * Gross distribution + * @return grossDistributions + */ + @javax.annotation.Nullable + public Double getGrossDistributions() { + return grossDistributions; + } + + public void setGrossDistributions(Double grossDistributions) { + this.grossDistributions = grossDistributions; + } + + + public Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse totalDistributionIndicator(Boolean totalDistributionIndicator) { + this.totalDistributionIndicator = totalDistributionIndicator; + return this; + } + + /** + * Total distribution + * @return totalDistributionIndicator + */ + @javax.annotation.Nullable + public Boolean getTotalDistributionIndicator() { + return totalDistributionIndicator; + } + + public void setTotalDistributionIndicator(Boolean totalDistributionIndicator) { + this.totalDistributionIndicator = totalDistributionIndicator; + } + + + public Form1099RListItemResponse 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 Form1099RListItemResponse fedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { + this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld + * @return fedIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFedIncomeTaxWithheld() { + return fedIncomeTaxWithheld; + } + + public void setFedIncomeTaxWithheld(Double fedIncomeTaxWithheld) { + this.fedIncomeTaxWithheld = fedIncomeTaxWithheld; + } + + + public Form1099RListItemResponse employeeContributions(Double employeeContributions) { + this.employeeContributions = employeeContributions; + return this; + } + + /** + * Employee contributions/Designated Roth contributions or insurance premiums + * @return employeeContributions + */ + @javax.annotation.Nullable + public Double getEmployeeContributions() { + return employeeContributions; + } + + public void setEmployeeContributions(Double employeeContributions) { + this.employeeContributions = employeeContributions; + } + + + public Form1099RListItemResponse netUnrealizedAppreciation(Double netUnrealizedAppreciation) { + this.netUnrealizedAppreciation = netUnrealizedAppreciation; + return this; + } + + /** + * Net unrealized appreciation in employer's securities + * @return netUnrealizedAppreciation + */ + @javax.annotation.Nullable + public Double getNetUnrealizedAppreciation() { + return netUnrealizedAppreciation; + } + + public void setNetUnrealizedAppreciation(Double netUnrealizedAppreciation) { + this.netUnrealizedAppreciation = netUnrealizedAppreciation; + } + + + public Form1099RListItemResponse distributionCodeRequired(String distributionCodeRequired) { + this.distributionCodeRequired = distributionCodeRequired; + return this; + } + + /** + * Distribution code + * @return distributionCodeRequired + */ + @javax.annotation.Nullable + public String getDistributionCodeRequired() { + return distributionCodeRequired; + } + + public void setDistributionCodeRequired(String distributionCodeRequired) { + this.distributionCodeRequired = distributionCodeRequired; + } + + + public Form1099RListItemResponse distributionCodeOptional(String distributionCodeOptional) { + this.distributionCodeOptional = distributionCodeOptional; + return this; + } + + /** + * Second distribution code + * @return distributionCodeOptional + */ + @javax.annotation.Nullable + public String getDistributionCodeOptional() { + return distributionCodeOptional; + } + + public void setDistributionCodeOptional(String distributionCodeOptional) { + this.distributionCodeOptional = distributionCodeOptional; + } + + + public Form1099RListItemResponse iraSepSimpleIndicator(Boolean iraSepSimpleIndicator) { + this.iraSepSimpleIndicator = iraSepSimpleIndicator; + return this; + } + + /** + * IRA/SEP/SIMPLE + * @return iraSepSimpleIndicator + */ + @javax.annotation.Nullable + public Boolean getIraSepSimpleIndicator() { + return iraSepSimpleIndicator; + } + + public void setIraSepSimpleIndicator(Boolean iraSepSimpleIndicator) { + this.iraSepSimpleIndicator = iraSepSimpleIndicator; + } + + + public Form1099RListItemResponse totalIraSepSimpleDistribution(Double totalIraSepSimpleDistribution) { + this.totalIraSepSimpleDistribution = totalIraSepSimpleDistribution; + return this; + } + + /** + * Traditional IRA/SEP/SIMPLE or Roth conversion amount + * @return totalIraSepSimpleDistribution + */ + @javax.annotation.Nullable + public Double getTotalIraSepSimpleDistribution() { + return totalIraSepSimpleDistribution; + } + + public void setTotalIraSepSimpleDistribution(Double totalIraSepSimpleDistribution) { + this.totalIraSepSimpleDistribution = totalIraSepSimpleDistribution; + } + + + public Form1099RListItemResponse other(Double other) { + this.other = other; + return this; + } + + /** + * Other amount + * @return other + */ + @javax.annotation.Nullable + public Double getOther() { + return other; + } + + public void setOther(Double other) { + this.other = other; + } + + + public Form1099RListItemResponse otherPercent(String otherPercent) { + this.otherPercent = otherPercent; + return this; + } + + /** + * Other percentage + * @return otherPercent + */ + @javax.annotation.Nullable + public String getOtherPercent() { + return otherPercent; + } + + public void setOtherPercent(String otherPercent) { + this.otherPercent = otherPercent; + } + + + public Form1099RListItemResponse percentageTotalDistribution(String percentageTotalDistribution) { + this.percentageTotalDistribution = percentageTotalDistribution; + return this; + } + + /** + * Total distribution percentage + * @return percentageTotalDistribution + */ + @javax.annotation.Nullable + public String getPercentageTotalDistribution() { + return percentageTotalDistribution; + } + + public void setPercentageTotalDistribution(String percentageTotalDistribution) { + this.percentageTotalDistribution = percentageTotalDistribution; + } + + + public Form1099RListItemResponse 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 Form1099RListItemResponse amountAllocableToIrr(Double amountAllocableToIrr) { + this.amountAllocableToIrr = amountAllocableToIrr; + return this; + } + + /** + * Amount allocable to IRR within 5 years + * @return amountAllocableToIrr + */ + @javax.annotation.Nullable + public Double getAmountAllocableToIrr() { + return amountAllocableToIrr; + } + + public void setAmountAllocableToIrr(Double amountAllocableToIrr) { + this.amountAllocableToIrr = amountAllocableToIrr; + } + + + public Form1099RListItemResponse firstYearDesignatedRothContrib(String firstYearDesignatedRothContrib) { + this.firstYearDesignatedRothContrib = firstYearDesignatedRothContrib; + return this; + } + + /** + * First year of designated Roth contribution + * @return firstYearDesignatedRothContrib + */ + @javax.annotation.Nullable + public String getFirstYearDesignatedRothContrib() { + return firstYearDesignatedRothContrib; + } + + public void setFirstYearDesignatedRothContrib(String firstYearDesignatedRothContrib) { + this.firstYearDesignatedRothContrib = firstYearDesignatedRothContrib; + } + + + 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; + } + + /** + * Date of payment + * @return dateOfPayment + */ + @javax.annotation.Nullable + public String getDateOfPayment() { + return dateOfPayment; + } + + public void setDateOfPayment(String dateOfPayment) { + this.dateOfPayment = dateOfPayment; + } + + + /** + * ID of the form + * @return id + */ + @javax.annotation.Nonnull + public String getId() { + return id; + } + + + + public Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099StatusDetailResponse getFederalEfileStatus() { + return federalEfileStatus; + } + + + + public Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099StatusDetailResponse getPostalMailStatus() { + return postalMailStatus; + } + + + + public Form1099RListItemResponse 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 Form1099StatusDetailResponse getTinMatchStatus() { + return tinMatchStatus; + } + + + + public Form1099RListItemResponse 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 Form1099StatusDetailResponse getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + public Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse 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 Form1099RListItemResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + return this; + } + + /** + * Foreign province + * @return foreignProvince + */ + @javax.annotation.Nullable + public String getForeignProvince() { + return foreignProvince; + } + + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public Form1099RListItemResponse 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; + } + + + /** + * 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 Form1099RListItemResponse 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; + } + Form1099RListItemResponse form1099RListItemResponse = (Form1099RListItemResponse) o; + return Objects.equals(this.grossDistributions, form1099RListItemResponse.grossDistributions) && + Objects.equals(this.taxableAmount, form1099RListItemResponse.taxableAmount) && + Objects.equals(this.taxableAmountNotDetermined, form1099RListItemResponse.taxableAmountNotDetermined) && + Objects.equals(this.totalDistributionIndicator, form1099RListItemResponse.totalDistributionIndicator) && + Objects.equals(this.capitalGain, form1099RListItemResponse.capitalGain) && + Objects.equals(this.fedIncomeTaxWithheld, form1099RListItemResponse.fedIncomeTaxWithheld) && + Objects.equals(this.employeeContributions, form1099RListItemResponse.employeeContributions) && + Objects.equals(this.netUnrealizedAppreciation, form1099RListItemResponse.netUnrealizedAppreciation) && + Objects.equals(this.distributionCodeRequired, form1099RListItemResponse.distributionCodeRequired) && + Objects.equals(this.distributionCodeOptional, form1099RListItemResponse.distributionCodeOptional) && + Objects.equals(this.iraSepSimpleIndicator, form1099RListItemResponse.iraSepSimpleIndicator) && + Objects.equals(this.totalIraSepSimpleDistribution, form1099RListItemResponse.totalIraSepSimpleDistribution) && + Objects.equals(this.other, form1099RListItemResponse.other) && + Objects.equals(this.otherPercent, form1099RListItemResponse.otherPercent) && + Objects.equals(this.percentageTotalDistribution, form1099RListItemResponse.percentageTotalDistribution) && + 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) && + Objects.equals(this.issuerId, form1099RListItemResponse.issuerId) && + Objects.equals(this.issuerReferenceId, form1099RListItemResponse.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099RListItemResponse.issuerTin) && + Objects.equals(this.taxYear, form1099RListItemResponse.taxYear) && + Objects.equals(this.federalEfile, form1099RListItemResponse.federalEfile) && + Objects.equals(this.federalEfileStatus, form1099RListItemResponse.federalEfileStatus) && + Objects.equals(this.stateEfile, form1099RListItemResponse.stateEfile) && + Objects.equals(this.stateEfileStatus, form1099RListItemResponse.stateEfileStatus) && + Objects.equals(this.postalMail, form1099RListItemResponse.postalMail) && + Objects.equals(this.postalMailStatus, form1099RListItemResponse.postalMailStatus) && + Objects.equals(this.tinMatch, form1099RListItemResponse.tinMatch) && + Objects.equals(this.tinMatchStatus, form1099RListItemResponse.tinMatchStatus) && + Objects.equals(this.addressVerification, form1099RListItemResponse.addressVerification) && + Objects.equals(this.addressVerificationStatus, form1099RListItemResponse.addressVerificationStatus) && + Objects.equals(this.referenceId, form1099RListItemResponse.referenceId) && + Objects.equals(this.email, form1099RListItemResponse.email) && + Objects.equals(this.tinType, form1099RListItemResponse.tinType) && + Objects.equals(this.tin, form1099RListItemResponse.tin) && + Objects.equals(this.recipientName, form1099RListItemResponse.recipientName) && + Objects.equals(this.recipientSecondName, form1099RListItemResponse.recipientSecondName) && + Objects.equals(this.address, form1099RListItemResponse.address) && + Objects.equals(this.address2, form1099RListItemResponse.address2) && + Objects.equals(this.city, form1099RListItemResponse.city) && + Objects.equals(this.state, form1099RListItemResponse.state) && + Objects.equals(this.zip, form1099RListItemResponse.zip) && + Objects.equals(this.foreignProvince, form1099RListItemResponse.foreignProvince) && + Objects.equals(this.countryCode, form1099RListItemResponse.countryCode) && + Objects.equals(this.validationErrors, form1099RListItemResponse.validationErrors) && + Objects.equals(this.createdAt, form1099RListItemResponse.createdAt) && + Objects.equals(this.updatedAt, form1099RListItemResponse.updatedAt) && + Objects.equals(this.stateAndLocalWithholding, form1099RListItemResponse.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(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); + } + + 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 Form1099RListItemResponse {\n"); + sb.append(" grossDistributions: ").append(toIndentedString(grossDistributions)).append("\n"); + sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n"); + sb.append(" taxableAmountNotDetermined: ").append(toIndentedString(taxableAmountNotDetermined)).append("\n"); + sb.append(" totalDistributionIndicator: ").append(toIndentedString(totalDistributionIndicator)).append("\n"); + sb.append(" capitalGain: ").append(toIndentedString(capitalGain)).append("\n"); + sb.append(" fedIncomeTaxWithheld: ").append(toIndentedString(fedIncomeTaxWithheld)).append("\n"); + sb.append(" employeeContributions: ").append(toIndentedString(employeeContributions)).append("\n"); + sb.append(" netUnrealizedAppreciation: ").append(toIndentedString(netUnrealizedAppreciation)).append("\n"); + sb.append(" distributionCodeRequired: ").append(toIndentedString(distributionCodeRequired)).append("\n"); + sb.append(" distributionCodeOptional: ").append(toIndentedString(distributionCodeOptional)).append("\n"); + sb.append(" iraSepSimpleIndicator: ").append(toIndentedString(iraSepSimpleIndicator)).append("\n"); + sb.append(" totalIraSepSimpleDistribution: ").append(toIndentedString(totalIraSepSimpleDistribution)).append("\n"); + sb.append(" other: ").append(toIndentedString(other)).append("\n"); + sb.append(" otherPercent: ").append(toIndentedString(otherPercent)).append("\n"); + sb.append(" percentageTotalDistribution: ").append(toIndentedString(percentageTotalDistribution)).append("\n"); + 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"); + 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(" 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(" 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(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).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("referenceId"); + openapiFields.add("email"); + openapiFields.add("tinType"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("foreignProvince"); + openapiFields.add("countryCode"); + 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 Form1099RListItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099RListItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099RListItemResponse is not found in the empty JSON string", Form1099RListItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099RListItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099RListItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099RListItemResponse.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("distributionCodeRequired") != null && !jsonObj.get("distributionCodeRequired").isJsonNull()) && !jsonObj.get("distributionCodeRequired").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `distributionCodeRequired` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCodeRequired").toString())); + } + if ((jsonObj.get("distributionCodeOptional") != null && !jsonObj.get("distributionCodeOptional").isJsonNull()) && !jsonObj.get("distributionCodeOptional").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `distributionCodeOptional` to be a primitive type in the JSON string but got `%s`", jsonObj.get("distributionCodeOptional").toString())); + } + if ((jsonObj.get("otherPercent") != null && !jsonObj.get("otherPercent").isJsonNull()) && !jsonObj.get("otherPercent").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `otherPercent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherPercent").toString())); + } + if ((jsonObj.get("percentageTotalDistribution") != null && !jsonObj.get("percentageTotalDistribution").isJsonNull()) && !jsonObj.get("percentageTotalDistribution").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `percentageTotalDistribution` to be a primitive type in the JSON string but got `%s`", jsonObj.get("percentageTotalDistribution").toString())); + } + if ((jsonObj.get("firstYearDesignatedRothContrib") != null && !jsonObj.get("firstYearDesignatedRothContrib").isJsonNull()) && !jsonObj.get("firstYearDesignatedRothContrib").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstYearDesignatedRothContrib` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstYearDesignatedRothContrib").toString())); + } + if ((jsonObj.get("dateOfPayment") != null && !jsonObj.get("dateOfPayment").isJsonNull()) && !jsonObj.get("dateOfPayment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dateOfPayment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dateOfPayment").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()) { + Form1099StatusDetailResponse.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()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetailResponse.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + 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("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + 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 (!Form1099RListItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099RListItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099RListItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099RListItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099RListItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099RListItemResponse + * @throws IOException if the JSON string is invalid with respect to Form1099RListItemResponse + */ + public static Form1099RListItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099RListItemResponse.class); + } + + /** + * Convert an instance of Form1099RListItemResponse 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/Form1099RRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java index 1229a51..a7bdc93 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099RRequest.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 @@ -145,17 +145,19 @@ public class Form1099RRequest { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -212,16 +214,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -351,20 +353,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public Form1099RRequest() { } - public Form1099RRequest( - TypeEnum type - ) { - this(); - this.type = type; - } - public Form1099RRequest grossDistribution(Double grossDistribution) { this.grossDistribution = grossDistribution; return this; } /** - * Get grossDistribution + * Gross distribution * @return grossDistribution */ @javax.annotation.Nullable @@ -383,7 +378,7 @@ public Form1099RRequest taxableAmount(Double taxableAmount) { } /** - * Get taxableAmount + * Taxable amount * @return taxableAmount */ @javax.annotation.Nullable @@ -402,7 +397,7 @@ public Form1099RRequest taxableAmountNotDetermined(Boolean taxableAmountNotDeter } /** - * Get taxableAmountNotDetermined + * Taxable amount not determined * @return taxableAmountNotDetermined */ @javax.annotation.Nullable @@ -421,7 +416,7 @@ public Form1099RRequest totalDistributionDetermined(Boolean totalDistributionDet } /** - * Get totalDistributionDetermined + * Total distribution * @return totalDistributionDetermined */ @javax.annotation.Nullable @@ -440,7 +435,7 @@ public Form1099RRequest capitalGain(Double capitalGain) { } /** - * Get capitalGain + * Capital gain (included in Box 2a) * @return capitalGain */ @javax.annotation.Nullable @@ -459,7 +454,7 @@ public Form1099RRequest federalIncomeTaxWithheld(Double federalIncomeTaxWithheld } /** - * Get federalIncomeTaxWithheld + * Federal income tax withheld * @return federalIncomeTaxWithheld */ @javax.annotation.Nullable @@ -478,7 +473,7 @@ public Form1099RRequest employeeContributionsOrDesignatedRothOrInsurancePremiums } /** - * Get employeeContributionsOrDesignatedRothOrInsurancePremiums + * Employee contributions/Designated Roth contributions or insurance premiums * @return employeeContributionsOrDesignatedRothOrInsurancePremiums */ @javax.annotation.Nullable @@ -497,7 +492,7 @@ public Form1099RRequest netUnrealizedAppreciationInEmployerSecurities(Double net } /** - * Get netUnrealizedAppreciationInEmployerSecurities + * Net unrealized appreciation in employer's securities * @return netUnrealizedAppreciationInEmployerSecurities */ @javax.annotation.Nullable @@ -516,7 +511,7 @@ public Form1099RRequest distributionCode(String distributionCode) { } /** - * Get distributionCode + * Distribution code * @return distributionCode */ @javax.annotation.Nullable @@ -535,7 +530,7 @@ public Form1099RRequest secondDistributionCode(String secondDistributionCode) { } /** - * Get secondDistributionCode + * Second distribution code * @return secondDistributionCode */ @javax.annotation.Nullable @@ -554,7 +549,7 @@ public Form1099RRequest iraSepSimple(Boolean iraSepSimple) { } /** - * Get iraSepSimple + * IRA/SEP/SIMPLE * @return iraSepSimple */ @javax.annotation.Nullable @@ -573,7 +568,7 @@ public Form1099RRequest traditionalIraSepSimpleOrRothConversionAmount(Double tra } /** - * Get traditionalIraSepSimpleOrRothConversionAmount + * Traditional IRA/SEP/SIMPLE or Roth conversion amount * @return traditionalIraSepSimpleOrRothConversionAmount */ @javax.annotation.Nullable @@ -592,7 +587,7 @@ public Form1099RRequest otherAmount(Double otherAmount) { } /** - * Get otherAmount + * Other amount * @return otherAmount */ @javax.annotation.Nullable @@ -611,7 +606,7 @@ public Form1099RRequest otherPercentage(String otherPercentage) { } /** - * Get otherPercentage + * Other percentage * @return otherPercentage */ @javax.annotation.Nullable @@ -630,7 +625,7 @@ public Form1099RRequest totalDistributionPercentage(String totalDistributionPerc } /** - * Get totalDistributionPercentage + * Total distribution percentage * @return totalDistributionPercentage */ @javax.annotation.Nullable @@ -649,7 +644,7 @@ public Form1099RRequest totalEmployeeContributions(Double totalEmployeeContribut } /** - * Get totalEmployeeContributions + * Total employee contributions * @return totalEmployeeContributions */ @javax.annotation.Nullable @@ -668,7 +663,7 @@ public Form1099RRequest amountAllocableToIrrWithin5Years(Double amountAllocableT } /** - * Get amountAllocableToIrrWithin5Years + * Amount allocable to IRR within 5 years * @return amountAllocableToIrrWithin5Years */ @javax.annotation.Nullable @@ -687,7 +682,7 @@ public Form1099RRequest firstYearOfDesignatedRothContribution(String firstYearOf } /** - * Get firstYearOfDesignatedRothContribution + * First year of designated Roth contribution * @return firstYearOfDesignatedRothContribution */ @javax.annotation.Nullable @@ -706,7 +701,7 @@ public Form1099RRequest fatcaFilingRequirement(Boolean fatcaFilingRequirement) { } /** - * Get fatcaFilingRequirement + * FATCA filing requirement * @return fatcaFilingRequirement */ @javax.annotation.Nullable @@ -725,7 +720,7 @@ public Form1099RRequest dateOfPayment(OffsetDateTime dateOfPayment) { } /** - * Get dateOfPayment + * Date of payment * @return dateOfPayment */ @javax.annotation.Nullable @@ -738,6 +733,11 @@ public void setDateOfPayment(OffsetDateTime dateOfPayment) { } + public Form1099RRequest type(TypeEnum type) { + this.type = type; + return this; + } + /** * Get type * @return type @@ -747,6 +747,9 @@ public TypeEnum getType() { return type; } + public void setType(TypeEnum type) { + this.type = type; + } public Form1099RRequest issuerId(String issuerId) { @@ -755,7 +758,7 @@ public Form1099RRequest issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -774,7 +777,7 @@ public Form1099RRequest referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -787,41 +790,41 @@ public void setReferenceId(String referenceId) { } - public Form1099RRequest recipientName(String recipientName) { - this.recipientName = recipientName; + public Form1099RRequest recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public Form1099RRequest recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public Form1099RRequest recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -831,7 +834,7 @@ public Form1099RRequest tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -850,7 +853,7 @@ public Form1099RRequest recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -869,10 +872,10 @@ public Form1099RRequest address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -888,7 +891,7 @@ public Form1099RRequest address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -907,10 +910,10 @@ public Form1099RRequest city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -926,7 +929,7 @@ public Form1099RRequest state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -945,7 +948,7 @@ public Form1099RRequest zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -964,7 +967,7 @@ public Form1099RRequest recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -983,7 +986,7 @@ public Form1099RRequest accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -1002,7 +1005,7 @@ public Form1099RRequest officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -1021,7 +1024,7 @@ public Form1099RRequest recipientNonUsProvince(String recipientNonUsProvince) { } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -1040,10 +1043,10 @@ public Form1099RRequest countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -1059,7 +1062,7 @@ public Form1099RRequest federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -1078,7 +1081,7 @@ public Form1099RRequest postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -1097,7 +1100,7 @@ public Form1099RRequest stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -1116,7 +1119,7 @@ public Form1099RRequest tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -1135,7 +1138,7 @@ public Form1099RRequest addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -1154,7 +1157,7 @@ public Form1099RRequest stateAndLocalWithholding(StateAndLocalWithholdingRequest } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -1200,8 +1203,8 @@ public boolean equals(Object o) { Objects.equals(this.type, form1099RRequest.type) && Objects.equals(this.issuerId, form1099RRequest.issuerId) && Objects.equals(this.referenceId, form1099RRequest.referenceId) && - Objects.equals(this.recipientName, form1099RRequest.recipientName) && Objects.equals(this.recipientTin, form1099RRequest.recipientTin) && + Objects.equals(this.recipientName, form1099RRequest.recipientName) && Objects.equals(this.tinType, form1099RRequest.tinType) && Objects.equals(this.recipientSecondName, form1099RRequest.recipientSecondName) && Objects.equals(this.address, form1099RRequest.address) && @@ -1228,7 +1231,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @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, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, fatcaFilingRequirement, dateOfPayment, type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -1265,8 +1268,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -1310,8 +1313,8 @@ private String toIndentedString(Object o) { openapiFields.add("type"); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -1333,6 +1336,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -1355,6 +1362,13 @@ 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())); @@ -1384,12 +1398,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -1400,13 +1414,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -1427,7 +1441,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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/Form1099StatusDetailResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetailResponse.java new file mode 100644 index 0000000..e8403d5 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetailResponse.java @@ -0,0 +1,251 @@ +/* + * 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; + +/** + * Form1099StatusDetailResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099StatusDetailResponse { + public static final String SERIALIZED_NAME_TIME = "time"; + @SerializedName(SERIALIZED_NAME_TIME) + private String time; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public Form1099StatusDetailResponse() { + } + + public Form1099StatusDetailResponse time(String time) { + this.time = time; + return this; + } + + /** + * The date the form is scheduled for or the time the status last changed + * @return time + */ + @javax.annotation.Nullable + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + + public Form1099StatusDetailResponse status(String status) { + this.status = status; + return this; + } + + /** + * The status of the form. Will be one of: * unsent * scheduled * sent * corrected_scheduled * accepted * corrected * corrected_accepted * held * pending * delivered * bad_verify * bad_verify_limit * bounced * verified * incomplete * failed * unchanged * unknown + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099StatusDetailResponse form1099StatusDetailResponse = (Form1099StatusDetailResponse) o; + return Objects.equals(this.time, form1099StatusDetailResponse.time) && + Objects.equals(this.status, form1099StatusDetailResponse.status); + } + + 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(time, status); + } + + 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 Form1099StatusDetailResponse {\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(); + + // 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 Form1099StatusDetailResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099StatusDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099StatusDetailResponse is not found in the empty JSON string", Form1099StatusDetailResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Form1099StatusDetailResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Form1099StatusDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099StatusDetailResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099StatusDetailResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099StatusDetailResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099StatusDetailResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Form1099StatusDetailResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099StatusDetailResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099StatusDetailResponse + * @throws IOException if the JSON string is invalid with respect to Form1099StatusDetailResponse + */ + public static Form1099StatusDetailResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099StatusDetailResponse.class); + } + + /** + * Convert an instance of Form1099StatusDetailResponse 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/FormRequestBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java index 7ecc445..f8c1c3c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestBase.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 @@ -67,16 +67,16 @@ public class FormRequestBase { @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -212,7 +212,7 @@ public FormRequestBase issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -231,7 +231,7 @@ public FormRequestBase referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -244,41 +244,41 @@ public void setReferenceId(String referenceId) { } - public FormRequestBase recipientName(String recipientName) { - this.recipientName = recipientName; + public FormRequestBase recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public FormRequestBase recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public FormRequestBase recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -288,7 +288,7 @@ public FormRequestBase tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -307,7 +307,7 @@ public FormRequestBase recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -326,10 +326,10 @@ public FormRequestBase address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -345,7 +345,7 @@ public FormRequestBase address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -364,10 +364,10 @@ public FormRequestBase city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -383,7 +383,7 @@ public FormRequestBase state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -402,7 +402,7 @@ public FormRequestBase zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -421,7 +421,7 @@ public FormRequestBase recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -440,7 +440,7 @@ public FormRequestBase accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -459,7 +459,7 @@ public FormRequestBase officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -478,7 +478,7 @@ public FormRequestBase recipientNonUsProvince(String recipientNonUsProvince) { } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -497,10 +497,10 @@ public FormRequestBase countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -516,7 +516,7 @@ public FormRequestBase federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -535,7 +535,7 @@ public FormRequestBase postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -554,7 +554,7 @@ public FormRequestBase stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -573,7 +573,7 @@ public FormRequestBase tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -592,7 +592,7 @@ public FormRequestBase addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -611,7 +611,7 @@ public FormRequestBase stateAndLocalWithholding(StateAndLocalWithholdingRequest } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -636,8 +636,8 @@ public boolean equals(Object o) { FormRequestBase formRequestBase = (FormRequestBase) o; return Objects.equals(this.issuerId, formRequestBase.issuerId) && Objects.equals(this.referenceId, formRequestBase.referenceId) && - Objects.equals(this.recipientName, formRequestBase.recipientName) && Objects.equals(this.recipientTin, formRequestBase.recipientTin) && + Objects.equals(this.recipientName, formRequestBase.recipientName) && Objects.equals(this.tinType, formRequestBase.tinType) && Objects.equals(this.recipientSecondName, formRequestBase.recipientSecondName) && Objects.equals(this.address, formRequestBase.address) && @@ -664,7 +664,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -680,8 +680,8 @@ public String toString() { sb.append("class FormRequestBase {\n"); sb.append(" issuerId: ").append(toIndentedString(issuerId)).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(" 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"); @@ -724,8 +724,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -747,6 +747,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -769,6 +773,13 @@ 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())); @@ -776,12 +787,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -792,13 +803,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -819,7 +830,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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 new file mode 100644 index 0000000..075223f --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormRequestListItemBase.java @@ -0,0 +1,973 @@ +/* + * 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; + +/** + * FormRequestListItemBase + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class FormRequestListItemBase { + 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_RECIPIENT_EMAIL = "recipientEmail"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EMAIL) + private String recipientEmail; + + 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_RECIPIENT_NON_US_PROVINCE = "recipientNonUsProvince"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NON_US_PROVINCE) + private String recipientNonUsProvince; + + 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_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 FormRequestListItemBase() { + } + + public FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * Recipient name + * @return recipientName + */ + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; + } + + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase address(String address) { + this.address = address; + return this; + } + + /** + * Address + * @return address + */ + @javax.annotation.Nonnull + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public FormRequestListItemBase 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 FormRequestListItemBase city(String city) { + this.city = city; + return this; + } + + /** + * City + * @return city + */ + @javax.annotation.Nonnull + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase recipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + return this; + } + + /** + * Recipient email address + * @return recipientEmail + */ + @javax.annotation.Nullable + public String getRecipientEmail() { + return recipientEmail; + } + + public void setRecipientEmail(String recipientEmail) { + this.recipientEmail = recipientEmail; + } + + + public FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase recipientNonUsProvince(String recipientNonUsProvince) { + this.recipientNonUsProvince = recipientNonUsProvince; + return this; + } + + /** + * Foreign province + * @return recipientNonUsProvince + */ + @javax.annotation.Nullable + public String getRecipientNonUsProvince() { + return recipientNonUsProvince; + } + + public void setRecipientNonUsProvince(String recipientNonUsProvince) { + this.recipientNonUsProvince = recipientNonUsProvince; + } + + + public FormRequestListItemBase 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.Nonnull + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase 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 FormRequestListItemBase 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; + } + FormRequestListItemBase formRequestListItemBase = (FormRequestListItemBase) o; + return Objects.equals(this.issuerReferenceId, formRequestListItemBase.issuerReferenceId) && + Objects.equals(this.issuerTin, formRequestListItemBase.issuerTin) && + Objects.equals(this.taxYear, formRequestListItemBase.taxYear) && + Objects.equals(this.issuerId, formRequestListItemBase.issuerId) && + Objects.equals(this.referenceId, formRequestListItemBase.referenceId) && + Objects.equals(this.recipientTin, formRequestListItemBase.recipientTin) && + Objects.equals(this.recipientName, formRequestListItemBase.recipientName) && + Objects.equals(this.tinType, formRequestListItemBase.tinType) && + Objects.equals(this.recipientSecondName, formRequestListItemBase.recipientSecondName) && + Objects.equals(this.address, formRequestListItemBase.address) && + Objects.equals(this.address2, formRequestListItemBase.address2) && + Objects.equals(this.city, formRequestListItemBase.city) && + Objects.equals(this.state, formRequestListItemBase.state) && + Objects.equals(this.zip, formRequestListItemBase.zip) && + Objects.equals(this.recipientEmail, formRequestListItemBase.recipientEmail) && + Objects.equals(this.accountNumber, formRequestListItemBase.accountNumber) && + Objects.equals(this.officeCode, formRequestListItemBase.officeCode) && + Objects.equals(this.recipientNonUsProvince, formRequestListItemBase.recipientNonUsProvince) && + Objects.equals(this.countryCode, formRequestListItemBase.countryCode) && + Objects.equals(this.federalEFile, formRequestListItemBase.federalEFile) && + Objects.equals(this.postalMail, formRequestListItemBase.postalMail) && + Objects.equals(this.stateEFile, formRequestListItemBase.stateEFile) && + Objects.equals(this.tinMatch, formRequestListItemBase.tinMatch) && + Objects.equals(this.addressVerification, formRequestListItemBase.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, formRequestListItemBase.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(issuerReferenceId, issuerTin, taxYear, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, 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 FormRequestListItemBase {\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(" recipientEmail: ").append(toIndentedString(recipientEmail)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" recipientNonUsProvince: ").append(toIndentedString(recipientNonUsProvince)).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(" 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("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("recipientEmail"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("recipientNonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEFile"); + openapiFields.add("postalMail"); + openapiFields.add("stateEFile"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FormRequestListItemBase + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FormRequestListItemBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FormRequestListItemBase is not found in the empty JSON string", FormRequestListItemBase.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FormRequestListItemBase.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FormRequestListItemBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FormRequestListItemBase.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("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").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").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()) { + 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("recipientEmail") != null && !jsonObj.get("recipientEmail").isJsonNull()) && !jsonObj.get("recipientEmail").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientEmail").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("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); + } + if (!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 (!FormRequestListItemBase.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FormRequestListItemBase' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FormRequestListItemBase.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FormRequestListItemBase value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FormRequestListItemBase read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FormRequestListItemBase given an JSON string + * + * @param jsonString JSON string + * @return An instance of FormRequestListItemBase + * @throws IOException if the JSON string is invalid with respect to FormRequestListItemBase + */ + public static FormRequestListItemBase fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FormRequestListItemBase.class); + } + + /** + * Convert an instance of FormRequestListItemBase 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/FormResponseBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java index be60f54..c07cf4a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormResponseBase.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 @@ -21,9 +21,9 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailApp; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorApp; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -70,17 +70,19 @@ public class FormResponseBase { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -307,7 +309,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) - private List stateEfileStatus; + private List stateEfileStatus; public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) @@ -323,7 +325,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) - private List validationErrors; + private List validationErrors; public FormResponseBase() { } @@ -916,12 +918,12 @@ public void setFederalEfileStatus(StatusDetail federalEfileStatus) { } - public FormResponseBase stateEfileStatus(List stateEfileStatus) { + public FormResponseBase stateEfileStatus(List stateEfileStatus) { this.stateEfileStatus = stateEfileStatus; return this; } - public FormResponseBase addStateEfileStatusItem(StateEfileStatusDetailApp stateEfileStatusItem) { + public FormResponseBase addStateEfileStatusItem(StateEfileStatusDetailResponse stateEfileStatusItem) { if (this.stateEfileStatus == null) { this.stateEfileStatus = new ArrayList<>(); } @@ -934,11 +936,11 @@ public FormResponseBase addStateEfileStatusItem(StateEfileStatusDetailApp stateE * @return stateEfileStatus */ @javax.annotation.Nullable - public List getStateEfileStatus() { + public List getStateEfileStatus() { return stateEfileStatus; } - public void setStateEfileStatus(List stateEfileStatus) { + public void setStateEfileStatus(List stateEfileStatus) { this.stateEfileStatus = stateEfileStatus; } @@ -1000,12 +1002,12 @@ public void setAddressVerificationStatus(StatusDetail addressVerificationStatus) } - public FormResponseBase validationErrors(List validationErrors) { + public FormResponseBase validationErrors(List validationErrors) { this.validationErrors = validationErrors; return this; } - public FormResponseBase addValidationErrorsItem(ValidationErrorApp validationErrorsItem) { + public FormResponseBase addValidationErrorsItem(ValidationErrorResponse validationErrorsItem) { if (this.validationErrors == null) { this.validationErrors = new ArrayList<>(); } @@ -1018,11 +1020,11 @@ public FormResponseBase addValidationErrorsItem(ValidationErrorApp validationErr * @return validationErrors */ @javax.annotation.Nullable - public List getValidationErrors() { + public List getValidationErrors() { return validationErrors; } - public void setValidationErrors(List validationErrors) { + public void setValidationErrors(List validationErrors) { this.validationErrors = validationErrors; } @@ -1304,7 +1306,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `stateEfileStatus` (array) for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { - StateEfileStatusDetailApp.validateJsonElement(jsonArraystateEfileStatus.get(i)); + StateEfileStatusDetailResponse.validateJsonElement(jsonArraystateEfileStatus.get(i)); }; } } @@ -1330,7 +1332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the optional field `validationErrors` (array) for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { - ValidationErrorApp.validateJsonElement(jsonArrayvalidationErrors.get(i)); + ValidationErrorResponse.validateJsonElement(jsonArrayvalidationErrors.get(i)); }; } } 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 3728169..70908f6 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormSingleRequestBase.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 @@ -64,17 +64,19 @@ public class FormSingleRequestBase { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - FORM1099_NEC("Form1099Nec"), + _1099_NEC("1099-NEC"), - FORM1099_MISC("Form1099Misc"), + _1099_MISC("1099-MISC"), - FORM1099_DIV("Form1099Div"), + _1099_DIV("1099-DIV"), - FORM1099_R("Form1099R"), + _1099_R("1099-R"), - FORM1099_K("Form1099K"), + _1099_K("1099-K"), - FORM1095_B("Form1095B"); + _1095_B("1095-B"), + + _1042_S("1042-S"); private String value; @@ -131,16 +133,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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_NAME = "recipientName"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + /** - * Gets or Sets tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN */ @JsonAdapter(TinTypeEnum.Adapter.class) public enum TinTypeEnum { @@ -270,11 +272,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public FormSingleRequestBase() { } - public FormSingleRequestBase( - TypeEnum type - ) { - this(); + public FormSingleRequestBase type(TypeEnum type) { this.type = type; + return this; } /** @@ -286,6 +286,9 @@ public TypeEnum getType() { return type; } + public void setType(TypeEnum type) { + this.type = type; + } public FormSingleRequestBase issuerId(String issuerId) { @@ -294,7 +297,7 @@ public FormSingleRequestBase issuerId(String issuerId) { } /** - * Get issuerId + * Issuer ID * @return issuerId */ @javax.annotation.Nullable @@ -313,7 +316,7 @@ public FormSingleRequestBase referenceId(String referenceId) { } /** - * Get referenceId + * Reference ID * @return referenceId */ @javax.annotation.Nullable @@ -326,41 +329,41 @@ public void setReferenceId(String referenceId) { } - public FormSingleRequestBase recipientName(String recipientName) { - this.recipientName = recipientName; + public FormSingleRequestBase recipientTin(String recipientTin) { + this.recipientTin = recipientTin; return this; } /** - * Get recipientName - * @return recipientName + * Recipient Tax ID Number + * @return recipientTin */ @javax.annotation.Nullable - public String getRecipientName() { - return recipientName; + public String getRecipientTin() { + return recipientTin; } - public void setRecipientName(String recipientName) { - this.recipientName = recipientName; + public void setRecipientTin(String recipientTin) { + this.recipientTin = recipientTin; } - public FormSingleRequestBase recipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public FormSingleRequestBase recipientName(String recipientName) { + this.recipientName = recipientName; return this; } /** - * Get recipientTin - * @return recipientTin + * Recipient name + * @return recipientName */ - @javax.annotation.Nullable - public String getRecipientTin() { - return recipientTin; + @javax.annotation.Nonnull + public String getRecipientName() { + return recipientName; } - public void setRecipientTin(String recipientTin) { - this.recipientTin = recipientTin; + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; } @@ -370,7 +373,7 @@ public FormSingleRequestBase tinType(TinTypeEnum tinType) { } /** - * Get tinType + * Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN * @return tinType */ @javax.annotation.Nullable @@ -389,7 +392,7 @@ public FormSingleRequestBase recipientSecondName(String recipientSecondName) { } /** - * Get recipientSecondName + * Recipient second name * @return recipientSecondName */ @javax.annotation.Nullable @@ -408,10 +411,10 @@ public FormSingleRequestBase address(String address) { } /** - * Get address + * Address * @return address */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getAddress() { return address; } @@ -427,7 +430,7 @@ public FormSingleRequestBase address2(String address2) { } /** - * Get address2 + * Address line 2 * @return address2 */ @javax.annotation.Nullable @@ -446,10 +449,10 @@ public FormSingleRequestBase city(String city) { } /** - * Get city + * City * @return city */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCity() { return city; } @@ -465,7 +468,7 @@ public FormSingleRequestBase state(String state) { } /** - * Get state + * US state. Required if CountryCode is \"US\". * @return state */ @javax.annotation.Nullable @@ -484,7 +487,7 @@ public FormSingleRequestBase zip(String zip) { } /** - * Get zip + * Zip/postal code * @return zip */ @javax.annotation.Nullable @@ -503,7 +506,7 @@ public FormSingleRequestBase recipientEmail(String recipientEmail) { } /** - * Get recipientEmail + * Recipient email address * @return recipientEmail */ @javax.annotation.Nullable @@ -522,7 +525,7 @@ public FormSingleRequestBase accountNumber(String accountNumber) { } /** - * Get accountNumber + * Account number * @return accountNumber */ @javax.annotation.Nullable @@ -541,7 +544,7 @@ public FormSingleRequestBase officeCode(String officeCode) { } /** - * Get officeCode + * Office code * @return officeCode */ @javax.annotation.Nullable @@ -560,7 +563,7 @@ public FormSingleRequestBase recipientNonUsProvince(String recipientNonUsProvinc } /** - * Get recipientNonUsProvince + * Foreign province * @return recipientNonUsProvince */ @javax.annotation.Nullable @@ -579,10 +582,10 @@ public FormSingleRequestBase countryCode(String countryCode) { } /** - * Get countryCode + * Country code, as defined at https://www.irs.gov/e-file-providers/country-codes * @return countryCode */ - @javax.annotation.Nullable + @javax.annotation.Nonnull public String getCountryCode() { return countryCode; } @@ -598,7 +601,7 @@ public FormSingleRequestBase federalEFile(Boolean federalEFile) { } /** - * Get federalEFile + * Boolean indicating that federal e-filing should be scheduled for this form * @return federalEFile */ @javax.annotation.Nullable @@ -617,7 +620,7 @@ public FormSingleRequestBase postalMail(Boolean postalMail) { } /** - * Get postalMail + * Boolean indicating that postal mailing to the recipient should be scheduled for this form * @return postalMail */ @javax.annotation.Nullable @@ -636,7 +639,7 @@ public FormSingleRequestBase stateEFile(Boolean stateEFile) { } /** - * Get stateEFile + * Boolean indicating that state e-filing should be scheduled for this form * @return stateEFile */ @javax.annotation.Nullable @@ -655,7 +658,7 @@ public FormSingleRequestBase tinMatch(Boolean tinMatch) { } /** - * Get tinMatch + * Boolean indicating that TIN Matching should be scheduled for this form * @return tinMatch */ @javax.annotation.Nullable @@ -674,7 +677,7 @@ public FormSingleRequestBase addressVerification(Boolean addressVerification) { } /** - * Get addressVerification + * Boolean indicating that address verification should be scheduled for this form * @return addressVerification */ @javax.annotation.Nullable @@ -693,7 +696,7 @@ public FormSingleRequestBase stateAndLocalWithholding(StateAndLocalWithholdingRe } /** - * Get stateAndLocalWithholding + * State and local withholding information * @return stateAndLocalWithholding */ @javax.annotation.Nullable @@ -719,8 +722,8 @@ public boolean equals(Object o) { return Objects.equals(this.type, formSingleRequestBase.type) && Objects.equals(this.issuerId, formSingleRequestBase.issuerId) && Objects.equals(this.referenceId, formSingleRequestBase.referenceId) && - Objects.equals(this.recipientName, formSingleRequestBase.recipientName) && Objects.equals(this.recipientTin, formSingleRequestBase.recipientTin) && + Objects.equals(this.recipientName, formSingleRequestBase.recipientName) && Objects.equals(this.tinType, formSingleRequestBase.tinType) && Objects.equals(this.recipientSecondName, formSingleRequestBase.recipientSecondName) && Objects.equals(this.address, formSingleRequestBase.address) && @@ -747,7 +750,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, issuerId, referenceId, recipientName, recipientTin, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); + return Objects.hash(type, issuerId, referenceId, recipientTin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, recipientEmail, accountNumber, officeCode, recipientNonUsProvince, countryCode, federalEFile, postalMail, stateEFile, tinMatch, addressVerification, stateAndLocalWithholding); } private static int hashCodeNullable(JsonNullable a) { @@ -764,8 +767,8 @@ public String toString() { 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(" recipientName: ").append(toIndentedString(recipientName)).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"); @@ -808,8 +811,8 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("issuerId"); openapiFields.add("referenceId"); - openapiFields.add("recipientName"); openapiFields.add("recipientTin"); + openapiFields.add("recipientName"); openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); @@ -831,6 +834,10 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("recipientName"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); } /** @@ -853,6 +860,13 @@ 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())); @@ -867,12 +881,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("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())); } @@ -883,13 +897,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") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + if (!jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } if ((jsonObj.get("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()) { + if (!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()) { @@ -910,7 +924,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientNonUsProvince") != null && !jsonObj.get("recipientNonUsProvince").isJsonNull()) && !jsonObj.get("recipientNonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientNonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientNonUsProvince").toString())); } - if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + if (!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 723bbc4..6b93d5e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.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 @@ -20,16 +20,20 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; -import Avalara.SDK.model.A1099.V2.CoveredIndividualReference; -import Avalara.SDK.model.A1099.V2.Form1095B; -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.StateAndLocalWithholding; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationError; +import Avalara.SDK.model.A1099.V2.CoveredIndividualReferenceResponse; +import Avalara.SDK.model.A1099.V2.Form1042SListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1095BListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099BaseResponse; +import Avalara.SDK.model.A1099.V2.Form1099KListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099MiscListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099NecListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099RListItemResponse; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetailResponse; +import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThroughResponse; +import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgentResponse; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -89,11 +93,13 @@ public TypeAdapter create(Gson gson, TypeToken type) { return null; // this class only serializes 'Get1099Form200Response' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterForm1095B = gson.getDelegateAdapter(this, TypeToken.get(Form1095B.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)); + final TypeAdapter adapterForm1099BaseResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099BaseResponse.class)); + final TypeAdapter adapterForm1042SListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1042SListItemResponse.class)); + final TypeAdapter adapterForm1095BListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1095BListItemResponse.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)); + final TypeAdapter adapterForm1099RListItemResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099RListItemResponse.class)); return (TypeAdapter) new TypeAdapter() { @Override @@ -103,37 +109,49 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti return; } - // check if the actual instance is of the type `Form1095B` - if (value.getActualInstance() instanceof Form1095B) { - JsonElement element = adapterForm1095B.toJsonTree((Form1095B)value.getActualInstance()); + // check if the actual instance is of the type `Form1099BaseResponse` + if (value.getActualInstance() instanceof Form1099BaseResponse) { + JsonElement element = adapterForm1099BaseResponse.toJsonTree((Form1099BaseResponse)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()); + // check if the actual instance is of the type `Form1042SListItemResponse` + if (value.getActualInstance() instanceof Form1042SListItemResponse) { + JsonElement element = adapterForm1042SListItemResponse.toJsonTree((Form1042SListItemResponse)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()); + // check if the actual instance is of the type `Form1095BListItemResponse` + if (value.getActualInstance() instanceof Form1095BListItemResponse) { + JsonElement element = adapterForm1095BListItemResponse.toJsonTree((Form1095BListItemResponse)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()); + // check if the actual instance is of the type `Form1099KListItemResponse` + if (value.getActualInstance() instanceof Form1099KListItemResponse) { + JsonElement element = adapterForm1099KListItemResponse.toJsonTree((Form1099KListItemResponse)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()); + // check if the actual instance is of the type `Form1099MiscListItemResponse` + if (value.getActualInstance() instanceof Form1099MiscListItemResponse) { + JsonElement element = adapterForm1099MiscListItemResponse.toJsonTree((Form1099MiscListItemResponse)value.getActualInstance()); elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R"); + // check if the actual instance is of the type `Form1099NecListItemResponse` + if (value.getActualInstance() instanceof Form1099NecListItemResponse) { + JsonElement element = adapterForm1099NecListItemResponse.toJsonTree((Form1099NecListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099RListItemResponse` + if (value.getActualInstance() instanceof Form1099RListItemResponse) { + JsonElement element = adapterForm1099RListItemResponse.toJsonTree((Form1099RListItemResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); } @Override @@ -145,65 +163,89 @@ public Get1099Form200Response read(JsonReader in) throws IOException { ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; - // deserialize Form1095B + // deserialize Form1099BaseResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099BaseResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099BaseResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099BaseResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099BaseResponse'", e); + } + // deserialize Form1042SListItemResponse try { // validate the JSON object to see if any exception is thrown - Form1095B.validateJsonElement(jsonElement); - actualAdapter = adapterForm1095B; + Form1042SListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1042SListItemResponse; match++; - log.log(Level.FINER, "Input data matches schema 'Form1095B'"); + log.log(Level.FINER, "Input data matches schema 'Form1042SListItemResponse'"); } 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); + errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1042SListItemResponse'", e); } - // deserialize Form1099K + // deserialize Form1095BListItemResponse try { // validate the JSON object to see if any exception is thrown - Form1099K.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099K; + Form1095BListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1095BListItemResponse; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099K'"); + log.log(Level.FINER, "Input data matches schema 'Form1095BListItemResponse'"); } 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); + errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1095BListItemResponse'", e); } - // deserialize Form1099Misc + // deserialize Form1099KListItemResponse try { // validate the JSON object to see if any exception is thrown - Form1099Misc.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099Misc; + Form1099KListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099KListItemResponse; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099Misc'"); + log.log(Level.FINER, "Input data matches schema 'Form1099KListItemResponse'"); } 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); + errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099KListItemResponse'", e); } - // deserialize Form1099Nec + // deserialize Form1099MiscListItemResponse try { // validate the JSON object to see if any exception is thrown - Form1099Nec.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099Nec; + Form1099MiscListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099MiscListItemResponse; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099Nec'"); + log.log(Level.FINER, "Input data matches schema 'Form1099MiscListItemResponse'"); } 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); + errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099MiscListItemResponse'", e); } - // deserialize Form1099R + // deserialize Form1099NecListItemResponse try { // validate the JSON object to see if any exception is thrown - Form1099R.validateJsonElement(jsonElement); - actualAdapter = adapterForm1099R; + Form1099NecListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099NecListItemResponse; match++; - log.log(Level.FINER, "Input data matches schema 'Form1099R'"); + log.log(Level.FINER, "Input data matches schema 'Form1099NecListItemResponse'"); } 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); + errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099NecListItemResponse'", e); + } + // deserialize Form1099RListItemResponse + try { + // validate the JSON object to see if any exception is thrown + Form1099RListItemResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099RListItemResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099RListItemResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099RListItemResponse'", e); } if (match == 1) { @@ -231,11 +273,13 @@ public Get1099Form200Response(Object o) { } static { - schemas.put("Form1095B", Form1095B.class); - schemas.put("Form1099K", Form1099K.class); - schemas.put("Form1099Misc", Form1099Misc.class); - schemas.put("Form1099Nec", Form1099Nec.class); - schemas.put("Form1099R", Form1099R.class); + schemas.put("Form1099BaseResponse", Form1099BaseResponse.class); + schemas.put("Form1042SListItemResponse", Form1042SListItemResponse.class); + schemas.put("Form1095BListItemResponse", Form1095BListItemResponse.class); + schemas.put("Form1099KListItemResponse", Form1099KListItemResponse.class); + schemas.put("Form1099MiscListItemResponse", Form1099MiscListItemResponse.class); + schemas.put("Form1099NecListItemResponse", Form1099NecListItemResponse.class); + schemas.put("Form1099RListItemResponse", Form1099RListItemResponse.class); } @Override @@ -246,45 +290,55 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse * * It could be an instance of the 'oneOf' schemas. */ @Override public void setActualInstance(Object instance) { - if (instance instanceof Form1095B) { + if (instance instanceof Form1099BaseResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1042SListItemResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1095BListItemResponse) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099K) { + if (instance instanceof Form1099KListItemResponse) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099Misc) { + if (instance instanceof Form1099MiscListItemResponse) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099Nec) { + if (instance instanceof Form1099NecListItemResponse) { super.setActualInstance(instance); return; } - if (instance instanceof Form1099R) { + if (instance instanceof Form1099RListItemResponse) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R"); + throw new RuntimeException("Invalid instance type. Must be Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse"); } /** * Get the actual instance, which can be the following: - * Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R + * Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse * - * @return The actual instance (Form1095B, Form1099K, Form1099Misc, Form1099Nec, Form1099R) + * @return The actual instance (Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, Form1099KListItemResponse, Form1099MiscListItemResponse, Form1099NecListItemResponse, Form1099RListItemResponse) */ @SuppressWarnings("unchecked") @Override @@ -293,54 +347,74 @@ public Object getActualInstance() { } /** - * Get the actual instance of `Form1095B`. If the actual instance is not `Form1095B`, + * Get the actual instance of `Form1099BaseResponse`. If the actual instance is not `Form1099BaseResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099BaseResponse` + * @throws ClassCastException if the instance is not `Form1099BaseResponse` + */ + public Form1099BaseResponse getForm1099BaseResponse() throws ClassCastException { + return (Form1099BaseResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1042SListItemResponse`. If the actual instance is not `Form1042SListItemResponse`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1095B` - * @throws ClassCastException if the instance is not `Form1095B` + * @return The actual instance of `Form1042SListItemResponse` + * @throws ClassCastException if the instance is not `Form1042SListItemResponse` */ - public Form1095B getForm1095B() throws ClassCastException { - return (Form1095B)super.getActualInstance(); + public Form1042SListItemResponse getForm1042SListItemResponse() throws ClassCastException { + return (Form1042SListItemResponse)super.getActualInstance(); } /** - * Get the actual instance of `Form1099K`. If the actual instance is not `Form1099K`, + * Get the actual instance of `Form1095BListItemResponse`. If the actual instance is not `Form1095BListItemResponse`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099K` - * @throws ClassCastException if the instance is not `Form1099K` + * @return The actual instance of `Form1095BListItemResponse` + * @throws ClassCastException if the instance is not `Form1095BListItemResponse` */ - public Form1099K getForm1099K() throws ClassCastException { - return (Form1099K)super.getActualInstance(); + public Form1095BListItemResponse getForm1095BListItemResponse() throws ClassCastException { + return (Form1095BListItemResponse)super.getActualInstance(); } /** - * Get the actual instance of `Form1099Misc`. If the actual instance is not `Form1099Misc`, + * Get the actual instance of `Form1099KListItemResponse`. If the actual instance is not `Form1099KListItemResponse`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099Misc` - * @throws ClassCastException if the instance is not `Form1099Misc` + * @return The actual instance of `Form1099KListItemResponse` + * @throws ClassCastException if the instance is not `Form1099KListItemResponse` */ - public Form1099Misc getForm1099Misc() throws ClassCastException { - return (Form1099Misc)super.getActualInstance(); + public Form1099KListItemResponse getForm1099KListItemResponse() throws ClassCastException { + return (Form1099KListItemResponse)super.getActualInstance(); } /** - * Get the actual instance of `Form1099Nec`. If the actual instance is not `Form1099Nec`, + * Get the actual instance of `Form1099MiscListItemResponse`. If the actual instance is not `Form1099MiscListItemResponse`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099Nec` - * @throws ClassCastException if the instance is not `Form1099Nec` + * @return The actual instance of `Form1099MiscListItemResponse` + * @throws ClassCastException if the instance is not `Form1099MiscListItemResponse` */ - public Form1099Nec getForm1099Nec() throws ClassCastException { - return (Form1099Nec)super.getActualInstance(); + public Form1099MiscListItemResponse getForm1099MiscListItemResponse() throws ClassCastException { + return (Form1099MiscListItemResponse)super.getActualInstance(); } /** - * Get the actual instance of `Form1099R`. If the actual instance is not `Form1099R`, + * Get the actual instance of `Form1099NecListItemResponse`. If the actual instance is not `Form1099NecListItemResponse`, * the ClassCastException will be thrown. * - * @return The actual instance of `Form1099R` - * @throws ClassCastException if the instance is not `Form1099R` + * @return The actual instance of `Form1099NecListItemResponse` + * @throws ClassCastException if the instance is not `Form1099NecListItemResponse` */ - public Form1099R getForm1099R() throws ClassCastException { - return (Form1099R)super.getActualInstance(); + public Form1099NecListItemResponse getForm1099NecListItemResponse() throws ClassCastException { + return (Form1099NecListItemResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099RListItemResponse`. If the actual instance is not `Form1099RListItemResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099RListItemResponse` + * @throws ClassCastException if the instance is not `Form1099RListItemResponse` + */ + public Form1099RListItemResponse getForm1099RListItemResponse() throws ClassCastException { + return (Form1099RListItemResponse)super.getActualInstance(); } /** @@ -353,48 +427,64 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate oneOf schemas one by one int validCount = 0; ArrayList errorMessages = new ArrayList<>(); - // validate the json string with Form1095B + // validate the json string with Form1099BaseResponse + try { + Form1099BaseResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099BaseResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1042SListItemResponse + try { + Form1042SListItemResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1042SListItemResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1095BListItemResponse try { - Form1095B.validateJsonElement(jsonElement); + Form1095BListItemResponse.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1095B failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1095BListItemResponse failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099K + // validate the json string with Form1099KListItemResponse try { - Form1099K.validateJsonElement(jsonElement); + Form1099KListItemResponse.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099K failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099KListItemResponse failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099Misc + // validate the json string with Form1099MiscListItemResponse try { - Form1099Misc.validateJsonElement(jsonElement); + Form1099MiscListItemResponse.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099Misc failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099MiscListItemResponse failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099Nec + // validate the json string with Form1099NecListItemResponse try { - Form1099Nec.validateJsonElement(jsonElement); + Form1099NecListItemResponse.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099Nec failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099NecListItemResponse failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with Form1099R + // validate the json string with Form1099RListItemResponse try { - Form1099R.validateJsonElement(jsonElement); + Form1099RListItemResponse.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for Form1099RListItemResponse failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1095B, 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())); + throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042SListItemResponse, Form1095BListItemResponse, Form1099BaseResponse, 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/HttpValidationProblemDetails.java b/src/main/java/Avalara/SDK/model/A1099/V2/HttpValidationProblemDetails.java index cb8683d..576305a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/HttpValidationProblemDetails.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/HttpValidationProblemDetails.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 @@ -63,7 +63,7 @@ public class HttpValidationProblemDetails { public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) - private Map> errors = new HashMap<>(); + private Map> errors; public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ICreateForm1099Request.java b/src/main/java/Avalara/SDK/model/A1099/V2/ICreateForm1099Request.java index 80f6e3d..882ecc7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ICreateForm1099Request.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ICreateForm1099Request.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/IUpdateForm1099Request.java b/src/main/java/Avalara/SDK/model/A1099/V2/IUpdateForm1099Request.java index 96a79c7..e52d501 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IUpdateForm1099Request.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IUpdateForm1099Request.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/IW9FormDataModelsOneOf.java b/src/main/java/Avalara/SDK/model/A1099/V2/IW9FormDataModelsOneOf.java index 19de743..bcdbb21 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IW9FormDataModelsOneOf.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IW9FormDataModelsOneOf.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 @@ -32,6 +32,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java new file mode 100644 index 0000000..e4a2045 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java @@ -0,0 +1,514 @@ +/* + * 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; + +/** + * IntermediaryOrFlowThrough + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class IntermediaryOrFlowThrough { + public static final String SERIALIZED_NAME_EIN = "ein"; + @SerializedName(SERIALIZED_NAME_EIN) + private String ein; + + 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_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_GIIN = "giin"; + @SerializedName(SERIALIZED_NAME_GIIN) + private String giin; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FOREIGN_TIN = "foreignTin"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TIN) + private String foreignTin; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public IntermediaryOrFlowThrough() { + } + + public IntermediaryOrFlowThrough ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + */ + @javax.annotation.Nullable + public String getEin() { + return ein; + } + + public void setEin(String ein) { + this.ein = ein; + } + + + public IntermediaryOrFlowThrough 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 IntermediaryOrFlowThrough 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 IntermediaryOrFlowThrough name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public IntermediaryOrFlowThrough giin(String giin) { + this.giin = giin; + return this; + } + + /** + * Get giin + * @return giin + */ + @javax.annotation.Nullable + public String getGiin() { + return giin; + } + + public void setGiin(String giin) { + this.giin = giin; + } + + + public IntermediaryOrFlowThrough 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 IntermediaryOrFlowThrough foreignTin(String foreignTin) { + this.foreignTin = foreignTin; + return this; + } + + /** + * Get foreignTin + * @return foreignTin + */ + @javax.annotation.Nullable + public String getForeignTin() { + return foreignTin; + } + + public void setForeignTin(String foreignTin) { + this.foreignTin = foreignTin; + } + + + public IntermediaryOrFlowThrough 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 IntermediaryOrFlowThrough 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 IntermediaryOrFlowThrough 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 IntermediaryOrFlowThrough 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntermediaryOrFlowThrough intermediaryOrFlowThrough = (IntermediaryOrFlowThrough) o; + return Objects.equals(this.ein, intermediaryOrFlowThrough.ein) && + Objects.equals(this.chap3StatusCode, intermediaryOrFlowThrough.chap3StatusCode) && + Objects.equals(this.chap4StatusCode, intermediaryOrFlowThrough.chap4StatusCode) && + Objects.equals(this.name, intermediaryOrFlowThrough.name) && + Objects.equals(this.giin, intermediaryOrFlowThrough.giin) && + Objects.equals(this.countryCode, intermediaryOrFlowThrough.countryCode) && + Objects.equals(this.foreignTin, intermediaryOrFlowThrough.foreignTin) && + Objects.equals(this.address, intermediaryOrFlowThrough.address) && + Objects.equals(this.city, intermediaryOrFlowThrough.city) && + Objects.equals(this.state, intermediaryOrFlowThrough.state) && + Objects.equals(this.zip, intermediaryOrFlowThrough.zip); + } + + 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(ein, chap3StatusCode, chap4StatusCode, name, giin, countryCode, foreignTin, address, city, state, zip); + } + + 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 IntermediaryOrFlowThrough {\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); + sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" giin: ").append(toIndentedString(giin)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" foreignTin: ").append(toIndentedString(foreignTin)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append("}"); + 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("ein"); + openapiFields.add("chap3StatusCode"); + openapiFields.add("chap4StatusCode"); + openapiFields.add("name"); + openapiFields.add("giin"); + openapiFields.add("countryCode"); + openapiFields.add("foreignTin"); + openapiFields.add("address"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + + // 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 IntermediaryOrFlowThrough + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IntermediaryOrFlowThrough.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in IntermediaryOrFlowThrough is not found in the empty JSON string", IntermediaryOrFlowThrough.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!IntermediaryOrFlowThrough.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IntermediaryOrFlowThrough` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").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())); + } + 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("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("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("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("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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IntermediaryOrFlowThrough.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntermediaryOrFlowThrough' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntermediaryOrFlowThrough.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IntermediaryOrFlowThrough value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IntermediaryOrFlowThrough read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of IntermediaryOrFlowThrough given an JSON string + * + * @param jsonString JSON string + * @return An instance of IntermediaryOrFlowThrough + * @throws IOException if the JSON string is invalid with respect to IntermediaryOrFlowThrough + */ + public static IntermediaryOrFlowThrough fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntermediaryOrFlowThrough.class); + } + + /** + * Convert an instance of IntermediaryOrFlowThrough 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/IntermediaryOrFlowThroughRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughRequest.java new file mode 100644 index 0000000..fedaa9c --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughRequest.java @@ -0,0 +1,514 @@ +/* + * 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; + +/** + * IntermediaryOrFlowThroughRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class IntermediaryOrFlowThroughRequest { + public static final String SERIALIZED_NAME_EIN = "ein"; + @SerializedName(SERIALIZED_NAME_EIN) + private String ein; + + 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_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_GIIN = "giin"; + @SerializedName(SERIALIZED_NAME_GIIN) + private String giin; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FOREIGN_TIN = "foreignTin"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TIN) + private String foreignTin; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public IntermediaryOrFlowThroughRequest() { + } + + public IntermediaryOrFlowThroughRequest ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + */ + @javax.annotation.Nullable + public String getEin() { + return ein; + } + + public void setEin(String ein) { + this.ein = ein; + } + + + public IntermediaryOrFlowThroughRequest 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 IntermediaryOrFlowThroughRequest 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 IntermediaryOrFlowThroughRequest name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public IntermediaryOrFlowThroughRequest giin(String giin) { + this.giin = giin; + return this; + } + + /** + * Get giin + * @return giin + */ + @javax.annotation.Nullable + public String getGiin() { + return giin; + } + + public void setGiin(String giin) { + this.giin = giin; + } + + + public IntermediaryOrFlowThroughRequest 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 IntermediaryOrFlowThroughRequest foreignTin(String foreignTin) { + this.foreignTin = foreignTin; + return this; + } + + /** + * Get foreignTin + * @return foreignTin + */ + @javax.annotation.Nullable + public String getForeignTin() { + return foreignTin; + } + + public void setForeignTin(String foreignTin) { + this.foreignTin = foreignTin; + } + + + public IntermediaryOrFlowThroughRequest 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 IntermediaryOrFlowThroughRequest 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 IntermediaryOrFlowThroughRequest 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 IntermediaryOrFlowThroughRequest 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntermediaryOrFlowThroughRequest intermediaryOrFlowThroughRequest = (IntermediaryOrFlowThroughRequest) o; + return Objects.equals(this.ein, intermediaryOrFlowThroughRequest.ein) && + Objects.equals(this.chap3StatusCode, intermediaryOrFlowThroughRequest.chap3StatusCode) && + Objects.equals(this.chap4StatusCode, intermediaryOrFlowThroughRequest.chap4StatusCode) && + Objects.equals(this.name, intermediaryOrFlowThroughRequest.name) && + Objects.equals(this.giin, intermediaryOrFlowThroughRequest.giin) && + Objects.equals(this.countryCode, intermediaryOrFlowThroughRequest.countryCode) && + Objects.equals(this.foreignTin, intermediaryOrFlowThroughRequest.foreignTin) && + Objects.equals(this.address, intermediaryOrFlowThroughRequest.address) && + Objects.equals(this.city, intermediaryOrFlowThroughRequest.city) && + Objects.equals(this.state, intermediaryOrFlowThroughRequest.state) && + Objects.equals(this.zip, intermediaryOrFlowThroughRequest.zip); + } + + 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(ein, chap3StatusCode, chap4StatusCode, name, giin, countryCode, foreignTin, address, city, state, zip); + } + + 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 IntermediaryOrFlowThroughRequest {\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); + sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" giin: ").append(toIndentedString(giin)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" foreignTin: ").append(toIndentedString(foreignTin)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append("}"); + 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("ein"); + openapiFields.add("chap3StatusCode"); + openapiFields.add("chap4StatusCode"); + openapiFields.add("name"); + openapiFields.add("giin"); + openapiFields.add("countryCode"); + openapiFields.add("foreignTin"); + openapiFields.add("address"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + + // 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 IntermediaryOrFlowThroughRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IntermediaryOrFlowThroughRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in IntermediaryOrFlowThroughRequest is not found in the empty JSON string", IntermediaryOrFlowThroughRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!IntermediaryOrFlowThroughRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IntermediaryOrFlowThroughRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").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())); + } + 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("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("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("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("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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IntermediaryOrFlowThroughRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntermediaryOrFlowThroughRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntermediaryOrFlowThroughRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IntermediaryOrFlowThroughRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IntermediaryOrFlowThroughRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of IntermediaryOrFlowThroughRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of IntermediaryOrFlowThroughRequest + * @throws IOException if the JSON string is invalid with respect to IntermediaryOrFlowThroughRequest + */ + public static IntermediaryOrFlowThroughRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntermediaryOrFlowThroughRequest.class); + } + + /** + * Convert an instance of IntermediaryOrFlowThroughRequest 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/IntermediaryOrFlowThroughResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughResponse.java new file mode 100644 index 0000000..020d809 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThroughResponse.java @@ -0,0 +1,514 @@ +/* + * 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; + +/** + * IntermediaryOrFlowThroughResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class IntermediaryOrFlowThroughResponse { + public static final String SERIALIZED_NAME_EIN = "ein"; + @SerializedName(SERIALIZED_NAME_EIN) + private String ein; + + 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_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_GIIN = "giin"; + @SerializedName(SERIALIZED_NAME_GIIN) + private String giin; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FOREIGN_TIN = "foreignTin"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TIN) + private String foreignTin; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public IntermediaryOrFlowThroughResponse() { + } + + public IntermediaryOrFlowThroughResponse ein(String ein) { + this.ein = ein; + return this; + } + + /** + * Get ein + * @return ein + */ + @javax.annotation.Nullable + public String getEin() { + return ein; + } + + public void setEin(String ein) { + this.ein = ein; + } + + + public IntermediaryOrFlowThroughResponse 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 IntermediaryOrFlowThroughResponse 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 IntermediaryOrFlowThroughResponse name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public IntermediaryOrFlowThroughResponse giin(String giin) { + this.giin = giin; + return this; + } + + /** + * Get giin + * @return giin + */ + @javax.annotation.Nullable + public String getGiin() { + return giin; + } + + public void setGiin(String giin) { + this.giin = giin; + } + + + public IntermediaryOrFlowThroughResponse 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 IntermediaryOrFlowThroughResponse foreignTin(String foreignTin) { + this.foreignTin = foreignTin; + return this; + } + + /** + * Get foreignTin + * @return foreignTin + */ + @javax.annotation.Nullable + public String getForeignTin() { + return foreignTin; + } + + public void setForeignTin(String foreignTin) { + this.foreignTin = foreignTin; + } + + + public IntermediaryOrFlowThroughResponse 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 IntermediaryOrFlowThroughResponse 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 IntermediaryOrFlowThroughResponse 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 IntermediaryOrFlowThroughResponse 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntermediaryOrFlowThroughResponse intermediaryOrFlowThroughResponse = (IntermediaryOrFlowThroughResponse) o; + return Objects.equals(this.ein, intermediaryOrFlowThroughResponse.ein) && + Objects.equals(this.chap3StatusCode, intermediaryOrFlowThroughResponse.chap3StatusCode) && + Objects.equals(this.chap4StatusCode, intermediaryOrFlowThroughResponse.chap4StatusCode) && + Objects.equals(this.name, intermediaryOrFlowThroughResponse.name) && + Objects.equals(this.giin, intermediaryOrFlowThroughResponse.giin) && + Objects.equals(this.countryCode, intermediaryOrFlowThroughResponse.countryCode) && + Objects.equals(this.foreignTin, intermediaryOrFlowThroughResponse.foreignTin) && + Objects.equals(this.address, intermediaryOrFlowThroughResponse.address) && + Objects.equals(this.city, intermediaryOrFlowThroughResponse.city) && + Objects.equals(this.state, intermediaryOrFlowThroughResponse.state) && + Objects.equals(this.zip, intermediaryOrFlowThroughResponse.zip); + } + + 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(ein, chap3StatusCode, chap4StatusCode, name, giin, countryCode, foreignTin, address, city, state, zip); + } + + 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 IntermediaryOrFlowThroughResponse {\n"); + sb.append(" ein: ").append(toIndentedString(ein)).append("\n"); + sb.append(" chap3StatusCode: ").append(toIndentedString(chap3StatusCode)).append("\n"); + sb.append(" chap4StatusCode: ").append(toIndentedString(chap4StatusCode)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" giin: ").append(toIndentedString(giin)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" foreignTin: ").append(toIndentedString(foreignTin)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append("}"); + 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("ein"); + openapiFields.add("chap3StatusCode"); + openapiFields.add("chap4StatusCode"); + openapiFields.add("name"); + openapiFields.add("giin"); + openapiFields.add("countryCode"); + openapiFields.add("foreignTin"); + openapiFields.add("address"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + + // 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 IntermediaryOrFlowThroughResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IntermediaryOrFlowThroughResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in IntermediaryOrFlowThroughResponse is not found in the empty JSON string", IntermediaryOrFlowThroughResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!IntermediaryOrFlowThroughResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IntermediaryOrFlowThroughResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("ein") != null && !jsonObj.get("ein").isJsonNull()) && !jsonObj.get("ein").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ein` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ein").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())); + } + 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("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("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("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("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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IntermediaryOrFlowThroughResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntermediaryOrFlowThroughResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntermediaryOrFlowThroughResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IntermediaryOrFlowThroughResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IntermediaryOrFlowThroughResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of IntermediaryOrFlowThroughResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of IntermediaryOrFlowThroughResponse + * @throws IOException if the JSON string is invalid with respect to IntermediaryOrFlowThroughResponse + */ + public static IntermediaryOrFlowThroughResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IntermediaryOrFlowThroughResponse.class); + } + + /** + * Convert an instance of IntermediaryOrFlowThroughResponse 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/IssuerCommand.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerCommand.java index 1544715..f264092 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerCommand.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerCommand.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/IssuerResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java index 37570cb..fc4ef2f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.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/JobResult.java b/src/main/java/Avalara/SDK/model/A1099/V2/JobResult.java index 3795fe0..d5c129a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/JobResult.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/JobResult.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 @@ -177,7 +177,7 @@ public JobResult dryRun(Boolean dryRun) { } /** - * Get dryRun + * Dry run. If `true`, this job only simulates the changes but doesn't actually persist them. * @return dryRun */ @javax.annotation.Nullable @@ -196,7 +196,7 @@ public JobResult upsert(Boolean upsert) { } /** - * Get upsert + * Upsert. If `true`, this job will first attempt to update existing records if matches can be found. Matches are done in the following order: * Form ID * Form Reference ID and tax year * Form TIN and tax year * @return upsert */ @javax.annotation.Nullable @@ -215,7 +215,7 @@ public JobResult status(String status) { } /** - * Get status + * Status of the job * @return status */ @javax.annotation.Nullable @@ -253,7 +253,7 @@ public JobResult totalProcessed(Integer totalProcessed) { } /** - * Get totalProcessed + * Total number of forms processed * @return totalProcessed */ @javax.annotation.Nullable @@ -272,7 +272,7 @@ public JobResult totalRows(Integer totalRows) { } /** - * Get totalRows + * Total number of forms in the request * @return totalRows */ @javax.annotation.Nullable @@ -291,7 +291,7 @@ public JobResult updatedValid(Integer updatedValid) { } /** - * Get updatedValid + * Number of forms updated and valid for e-filing and e-delivery * @return updatedValid */ @javax.annotation.Nullable @@ -310,7 +310,7 @@ public JobResult updatedNoEmail(Integer updatedNoEmail) { } /** - * Get updatedNoEmail + * Number of forms updated and valid for e-filing but missing email or email is undeliverable * @return updatedNoEmail */ @javax.annotation.Nullable @@ -329,7 +329,7 @@ public JobResult updatedInvalid(Integer updatedInvalid) { } /** - * Get updatedInvalid + * Number of forms updated but invalid for e-filing * @return updatedInvalid */ @javax.annotation.Nullable @@ -348,7 +348,7 @@ public JobResult skippedDuplicate(Integer skippedDuplicate) { } /** - * Get skippedDuplicate + * Number of forms skipped because they would have updated a record already updated once in the request * @return skippedDuplicate */ @javax.annotation.Nullable @@ -367,7 +367,7 @@ public JobResult skippedInvalid(Integer skippedInvalid) { } /** - * Get skippedInvalid + * Number of forms skipped because they would have made a form invalid and the form is already e-filed or scheduled for e-filing * @return skippedInvalid */ @javax.annotation.Nullable @@ -386,7 +386,7 @@ public JobResult skippedMultipleMatches(Integer skippedMultipleMatches) { } /** - * Get skippedMultipleMatches + * Number of forms skipped because they matched multiple forms * @return skippedMultipleMatches */ @javax.annotation.Nullable @@ -405,7 +405,7 @@ public JobResult notFound(Integer notFound) { } /** - * Get notFound + * Number of forms skipped because no matching form or issuer could be found * @return notFound */ @javax.annotation.Nullable @@ -424,7 +424,7 @@ public JobResult createdInvalid(Integer createdInvalid) { } /** - * Get createdInvalid + * Number of new forms created because no matching form could be found (and `upsert` was true) - with errors * @return createdInvalid */ @javax.annotation.Nullable @@ -443,7 +443,7 @@ public JobResult createdNoEmail(Integer createdNoEmail) { } /** - * Get createdNoEmail + * Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing but missing email or email is undeliverable * @return createdNoEmail */ @javax.annotation.Nullable @@ -462,7 +462,7 @@ public JobResult createdValid(Integer createdValid) { } /** - * Get createdValid + * Number of new forms created because no matching form could be found (and `upsert` was true) - valid for e-filing and e-delivery * @return createdValid */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Link.java b/src/main/java/Avalara/SDK/model/A1099/V2/Link.java index 844e161..18116ff 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Link.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Link.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/PaginatedQueryResultModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModel.java index 89bce05..f420be2 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModel.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/PaginatedQueryResultModelCompanyResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java index 9cd9edb..cb99432 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.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/PaginatedQueryResultModelIssuerResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.java index a1e40a9..143b0b8 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.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/PaginatedW9FormsModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedW9FormsModel.java index e83fe15..2c64992 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedW9FormsModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedW9FormsModel.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 @@ -66,7 +66,7 @@ public class PaginatedW9FormsModel { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private List value = new ArrayList<>(); + private List value; public static final String SERIALIZED_NAME_AT_NEXT_LINK = "@nextLink"; @SerializedName(SERIALIZED_NAME_AT_NEXT_LINK) diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java new file mode 100644 index 0000000..a05f4bf --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.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; + +/** + * PrimaryWithholdingAgent + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class PrimaryWithholdingAgent { + public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME = "primaryWithholdingAgentName"; + @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME) + private String primaryWithholdingAgentName; + + public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN = "primaryWithholdingAgentEin"; + @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN) + private String primaryWithholdingAgentEin; + + public PrimaryWithholdingAgent() { + } + + public PrimaryWithholdingAgent primaryWithholdingAgentName(String primaryWithholdingAgentName) { + this.primaryWithholdingAgentName = primaryWithholdingAgentName; + return this; + } + + /** + * Get primaryWithholdingAgentName + * @return primaryWithholdingAgentName + */ + @javax.annotation.Nullable + public String getPrimaryWithholdingAgentName() { + return primaryWithholdingAgentName; + } + + public void setPrimaryWithholdingAgentName(String primaryWithholdingAgentName) { + this.primaryWithholdingAgentName = primaryWithholdingAgentName; + } + + + public PrimaryWithholdingAgent primaryWithholdingAgentEin(String primaryWithholdingAgentEin) { + this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; + return this; + } + + /** + * Get primaryWithholdingAgentEin + * @return primaryWithholdingAgentEin + */ + @javax.annotation.Nullable + public String getPrimaryWithholdingAgentEin() { + return primaryWithholdingAgentEin; + } + + public void setPrimaryWithholdingAgentEin(String primaryWithholdingAgentEin) { + this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrimaryWithholdingAgent primaryWithholdingAgent = (PrimaryWithholdingAgent) o; + return Objects.equals(this.primaryWithholdingAgentName, primaryWithholdingAgent.primaryWithholdingAgentName) && + Objects.equals(this.primaryWithholdingAgentEin, primaryWithholdingAgent.primaryWithholdingAgentEin); + } + + 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(primaryWithholdingAgentName, primaryWithholdingAgentEin); + } + + 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 PrimaryWithholdingAgent {\n"); + sb.append(" primaryWithholdingAgentName: ").append(toIndentedString(primaryWithholdingAgentName)).append("\n"); + sb.append(" primaryWithholdingAgentEin: ").append(toIndentedString(primaryWithholdingAgentEin)).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("primaryWithholdingAgentName"); + openapiFields.add("primaryWithholdingAgentEin"); + + // 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 PrimaryWithholdingAgent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrimaryWithholdingAgent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PrimaryWithholdingAgent is not found in the empty JSON string", PrimaryWithholdingAgent.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrimaryWithholdingAgent.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrimaryWithholdingAgent` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("primaryWithholdingAgentName") != null && !jsonObj.get("primaryWithholdingAgentName").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentName").toString())); + } + if ((jsonObj.get("primaryWithholdingAgentEin") != null && !jsonObj.get("primaryWithholdingAgentEin").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentEin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentEin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentEin").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrimaryWithholdingAgent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrimaryWithholdingAgent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrimaryWithholdingAgent.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrimaryWithholdingAgent value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrimaryWithholdingAgent read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PrimaryWithholdingAgent given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrimaryWithholdingAgent + * @throws IOException if the JSON string is invalid with respect to PrimaryWithholdingAgent + */ + public static PrimaryWithholdingAgent fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrimaryWithholdingAgent.class); + } + + /** + * Convert an instance of PrimaryWithholdingAgent 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/PrimaryWithholdingAgentRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentRequest.java new file mode 100644 index 0000000..c31645e --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentRequest.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; + +/** + * PrimaryWithholdingAgentRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class PrimaryWithholdingAgentRequest { + public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME = "primaryWithholdingAgentName"; + @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME) + private String primaryWithholdingAgentName; + + public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN = "primaryWithholdingAgentEin"; + @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN) + private String primaryWithholdingAgentEin; + + public PrimaryWithholdingAgentRequest() { + } + + public PrimaryWithholdingAgentRequest primaryWithholdingAgentName(String primaryWithholdingAgentName) { + this.primaryWithholdingAgentName = primaryWithholdingAgentName; + return this; + } + + /** + * Get primaryWithholdingAgentName + * @return primaryWithholdingAgentName + */ + @javax.annotation.Nullable + public String getPrimaryWithholdingAgentName() { + return primaryWithholdingAgentName; + } + + public void setPrimaryWithholdingAgentName(String primaryWithholdingAgentName) { + this.primaryWithholdingAgentName = primaryWithholdingAgentName; + } + + + public PrimaryWithholdingAgentRequest primaryWithholdingAgentEin(String primaryWithholdingAgentEin) { + this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; + return this; + } + + /** + * Get primaryWithholdingAgentEin + * @return primaryWithholdingAgentEin + */ + @javax.annotation.Nullable + public String getPrimaryWithholdingAgentEin() { + return primaryWithholdingAgentEin; + } + + public void setPrimaryWithholdingAgentEin(String primaryWithholdingAgentEin) { + this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrimaryWithholdingAgentRequest primaryWithholdingAgentRequest = (PrimaryWithholdingAgentRequest) o; + return Objects.equals(this.primaryWithholdingAgentName, primaryWithholdingAgentRequest.primaryWithholdingAgentName) && + Objects.equals(this.primaryWithholdingAgentEin, primaryWithholdingAgentRequest.primaryWithholdingAgentEin); + } + + 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(primaryWithholdingAgentName, primaryWithholdingAgentEin); + } + + 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 PrimaryWithholdingAgentRequest {\n"); + sb.append(" primaryWithholdingAgentName: ").append(toIndentedString(primaryWithholdingAgentName)).append("\n"); + sb.append(" primaryWithholdingAgentEin: ").append(toIndentedString(primaryWithholdingAgentEin)).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("primaryWithholdingAgentName"); + openapiFields.add("primaryWithholdingAgentEin"); + + // 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 PrimaryWithholdingAgentRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrimaryWithholdingAgentRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PrimaryWithholdingAgentRequest is not found in the empty JSON string", PrimaryWithholdingAgentRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrimaryWithholdingAgentRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrimaryWithholdingAgentRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("primaryWithholdingAgentName") != null && !jsonObj.get("primaryWithholdingAgentName").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentName").toString())); + } + if ((jsonObj.get("primaryWithholdingAgentEin") != null && !jsonObj.get("primaryWithholdingAgentEin").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentEin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentEin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentEin").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrimaryWithholdingAgentRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrimaryWithholdingAgentRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrimaryWithholdingAgentRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrimaryWithholdingAgentRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrimaryWithholdingAgentRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PrimaryWithholdingAgentRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrimaryWithholdingAgentRequest + * @throws IOException if the JSON string is invalid with respect to PrimaryWithholdingAgentRequest + */ + public static PrimaryWithholdingAgentRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrimaryWithholdingAgentRequest.class); + } + + /** + * Convert an instance of PrimaryWithholdingAgentRequest 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/PrimaryWithholdingAgentResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentResponse.java new file mode 100644 index 0000000..949c213 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgentResponse.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; + +/** + * PrimaryWithholdingAgentResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class PrimaryWithholdingAgentResponse { + public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME = "primaryWithholdingAgentName"; + @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_NAME) + private String primaryWithholdingAgentName; + + public static final String SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN = "primaryWithholdingAgentEin"; + @SerializedName(SERIALIZED_NAME_PRIMARY_WITHHOLDING_AGENT_EIN) + private String primaryWithholdingAgentEin; + + public PrimaryWithholdingAgentResponse() { + } + + public PrimaryWithholdingAgentResponse primaryWithholdingAgentName(String primaryWithholdingAgentName) { + this.primaryWithholdingAgentName = primaryWithholdingAgentName; + return this; + } + + /** + * Get primaryWithholdingAgentName + * @return primaryWithholdingAgentName + */ + @javax.annotation.Nullable + public String getPrimaryWithholdingAgentName() { + return primaryWithholdingAgentName; + } + + public void setPrimaryWithholdingAgentName(String primaryWithholdingAgentName) { + this.primaryWithholdingAgentName = primaryWithholdingAgentName; + } + + + public PrimaryWithholdingAgentResponse primaryWithholdingAgentEin(String primaryWithholdingAgentEin) { + this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; + return this; + } + + /** + * Get primaryWithholdingAgentEin + * @return primaryWithholdingAgentEin + */ + @javax.annotation.Nullable + public String getPrimaryWithholdingAgentEin() { + return primaryWithholdingAgentEin; + } + + public void setPrimaryWithholdingAgentEin(String primaryWithholdingAgentEin) { + this.primaryWithholdingAgentEin = primaryWithholdingAgentEin; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrimaryWithholdingAgentResponse primaryWithholdingAgentResponse = (PrimaryWithholdingAgentResponse) o; + return Objects.equals(this.primaryWithholdingAgentName, primaryWithholdingAgentResponse.primaryWithholdingAgentName) && + Objects.equals(this.primaryWithholdingAgentEin, primaryWithholdingAgentResponse.primaryWithholdingAgentEin); + } + + 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(primaryWithholdingAgentName, primaryWithholdingAgentEin); + } + + 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 PrimaryWithholdingAgentResponse {\n"); + sb.append(" primaryWithholdingAgentName: ").append(toIndentedString(primaryWithholdingAgentName)).append("\n"); + sb.append(" primaryWithholdingAgentEin: ").append(toIndentedString(primaryWithholdingAgentEin)).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("primaryWithholdingAgentName"); + openapiFields.add("primaryWithholdingAgentEin"); + + // 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 PrimaryWithholdingAgentResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PrimaryWithholdingAgentResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PrimaryWithholdingAgentResponse is not found in the empty JSON string", PrimaryWithholdingAgentResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PrimaryWithholdingAgentResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PrimaryWithholdingAgentResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("primaryWithholdingAgentName") != null && !jsonObj.get("primaryWithholdingAgentName").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentName").toString())); + } + if ((jsonObj.get("primaryWithholdingAgentEin") != null && !jsonObj.get("primaryWithholdingAgentEin").isJsonNull()) && !jsonObj.get("primaryWithholdingAgentEin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `primaryWithholdingAgentEin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("primaryWithholdingAgentEin").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PrimaryWithholdingAgentResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PrimaryWithholdingAgentResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PrimaryWithholdingAgentResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PrimaryWithholdingAgentResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PrimaryWithholdingAgentResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PrimaryWithholdingAgentResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PrimaryWithholdingAgentResponse + * @throws IOException if the JSON string is invalid with respect to PrimaryWithholdingAgentResponse + */ + public static PrimaryWithholdingAgentResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PrimaryWithholdingAgentResponse.class); + } + + /** + * Convert an instance of PrimaryWithholdingAgentResponse 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/ProblemDetails.java b/src/main/java/Avalara/SDK/model/A1099/V2/ProblemDetails.java index f4947de..f2ab623 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ProblemDetails.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ProblemDetails.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/StateAndLocalWithholdingRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingRequest.java index 8a405c3..3df4724 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingRequest.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/StateAndLocalWithholdingResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingResponse.java index 0a56809..14b07b4 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholdingResponse.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 @@ -99,7 +99,7 @@ public StateAndLocalWithholdingResponse stateTaxWithheld(Double stateTaxWithheld } /** - * Get stateTaxWithheld + * Amount of state tax that was withheld * @return stateTaxWithheld */ @javax.annotation.Nullable @@ -118,7 +118,7 @@ public StateAndLocalWithholdingResponse state(String state) { } /** - * Get state + * US state * @return state */ @javax.annotation.Nullable @@ -137,7 +137,7 @@ public StateAndLocalWithholdingResponse stateIdNumber(String stateIdNumber) { } /** - * Get stateIdNumber + * State ID number of the entity issuing the form * @return stateIdNumber */ @javax.annotation.Nullable @@ -156,7 +156,7 @@ public StateAndLocalWithholdingResponse stateIncome(Double stateIncome) { } /** - * Get stateIncome + * Amount of state income * @return stateIncome */ @javax.annotation.Nullable @@ -175,7 +175,7 @@ public StateAndLocalWithholdingResponse localTaxWithheld(Double localTaxWithheld } /** - * Get localTaxWithheld + * Amount of local tax that was withheld * @return localTaxWithheld */ @javax.annotation.Nullable @@ -194,7 +194,7 @@ public StateAndLocalWithholdingResponse locality(String locality) { } /** - * Get locality + * Locality name * @return locality */ @javax.annotation.Nullable @@ -213,7 +213,7 @@ public StateAndLocalWithholdingResponse localityIdNumber(String localityIdNumber } /** - * Get localityIdNumber + * Locality ID number of the entity issuing the form * @return localityIdNumber */ @javax.annotation.Nullable @@ -232,7 +232,7 @@ public StateAndLocalWithholdingResponse localIncome(Double localIncome) { } /** - * Get localIncome + * Amount of local income * @return localIncome */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailResponse.java new file mode 100644 index 0000000..ee0fe56 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetailResponse.java @@ -0,0 +1,282 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import 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; + +/** + * StateEfileStatusDetailResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class StateEfileStatusDetailResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_TIME = "time"; + @SerializedName(SERIALIZED_NAME_TIME) + private String time; + + public static final String SERIALIZED_NAME_JURISDICTION = "jurisdiction"; + @SerializedName(SERIALIZED_NAME_JURISDICTION) + private String jurisdiction; + + public StateEfileStatusDetailResponse() { + } + + public StateEfileStatusDetailResponse status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public StateEfileStatusDetailResponse time(String time) { + this.time = time; + return this; + } + + /** + * Get time + * @return time + */ + @javax.annotation.Nullable + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + + public StateEfileStatusDetailResponse jurisdiction(String jurisdiction) { + this.jurisdiction = jurisdiction; + return this; + } + + /** + * Get jurisdiction + * @return jurisdiction + */ + @javax.annotation.Nullable + public String getJurisdiction() { + return jurisdiction; + } + + public void setJurisdiction(String jurisdiction) { + this.jurisdiction = jurisdiction; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StateEfileStatusDetailResponse stateEfileStatusDetailResponse = (StateEfileStatusDetailResponse) o; + return Objects.equals(this.status, stateEfileStatusDetailResponse.status) && + Objects.equals(this.time, stateEfileStatusDetailResponse.time) && + Objects.equals(this.jurisdiction, stateEfileStatusDetailResponse.jurisdiction); + } + + 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(status, time, jurisdiction); + } + + 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 StateEfileStatusDetailResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" jurisdiction: ").append(toIndentedString(jurisdiction)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * 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("status"); + openapiFields.add("time"); + openapiFields.add("jurisdiction"); + + // 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 StateEfileStatusDetailResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!StateEfileStatusDetailResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in StateEfileStatusDetailResponse is not found in the empty JSON string", StateEfileStatusDetailResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!StateEfileStatusDetailResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `StateEfileStatusDetailResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString())); + } + if ((jsonObj.get("jurisdiction") != null && !jsonObj.get("jurisdiction").isJsonNull()) && !jsonObj.get("jurisdiction").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `jurisdiction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jurisdiction").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!StateEfileStatusDetailResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'StateEfileStatusDetailResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(StateEfileStatusDetailResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, StateEfileStatusDetailResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public StateEfileStatusDetailResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of StateEfileStatusDetailResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of StateEfileStatusDetailResponse + * @throws IOException if the JSON string is invalid with respect to StateEfileStatusDetailResponse + */ + public static StateEfileStatusDetailResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, StateEfileStatusDetailResponse.class); + } + + /** + * Convert an instance of StateEfileStatusDetailResponse 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/StatusDetail.java b/src/main/java/Avalara/SDK/model/A1099/V2/StatusDetail.java index d05454c..00712c4 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StatusDetail.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StatusDetail.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/SubstantialUsOwnerRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java new file mode 100644 index 0000000..a6acbf6 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java @@ -0,0 +1,282 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import 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; + +/** + * SubstantialUsOwnerRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class SubstantialUsOwnerRequest { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public SubstantialUsOwnerRequest() { + } + + public SubstantialUsOwnerRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the substantial U.S. owner of the NFFE. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public SubstantialUsOwnerRequest address(String address) { + this.address = address; + return this; + } + + /** + * The address of the substantial U.S. owner of the NFFE. + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public SubstantialUsOwnerRequest tin(String tin) { + this.tin = tin; + return this; + } + + /** + * The taxpayer identification number (TIN) of the substantial U.S. owner of the NFFE. + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubstantialUsOwnerRequest substantialUsOwnerRequest = (SubstantialUsOwnerRequest) o; + return Objects.equals(this.name, substantialUsOwnerRequest.name) && + Objects.equals(this.address, substantialUsOwnerRequest.address) && + Objects.equals(this.tin, substantialUsOwnerRequest.tin); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(name, address, tin); + } + + 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 SubstantialUsOwnerRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("address"); + openapiFields.add("tin"); + + // 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 SubstantialUsOwnerRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SubstantialUsOwnerRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SubstantialUsOwnerRequest is not found in the empty JSON string", SubstantialUsOwnerRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SubstantialUsOwnerRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubstantialUsOwnerRequest` 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("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("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SubstantialUsOwnerRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SubstantialUsOwnerRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SubstantialUsOwnerRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SubstantialUsOwnerRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SubstantialUsOwnerRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SubstantialUsOwnerRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SubstantialUsOwnerRequest + * @throws IOException if the JSON string is invalid with respect to SubstantialUsOwnerRequest + */ + public static SubstantialUsOwnerRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SubstantialUsOwnerRequest.class); + } + + /** + * Convert an instance of SubstantialUsOwnerRequest 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/SubstantialUsOwnerResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.java index 46a401e..e69583e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.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 eac85a2..223fe55 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Update1099Form200Response.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 @@ -20,14 +20,15 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Form1042SResponse; import Avalara.SDK.model.A1099.V2.Form1099DivResponse; import Avalara.SDK.model.A1099.V2.Form1099MiscResponse; import Avalara.SDK.model.A1099.V2.Form1099NecResponse; import Avalara.SDK.model.A1099.V2.FormResponseBase; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholdingResponse; -import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailApp; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetailResponse; import Avalara.SDK.model.A1099.V2.StatusDetail; -import Avalara.SDK.model.A1099.V2.ValidationErrorApp; +import Avalara.SDK.model.A1099.V2.ValidationErrorResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -88,6 +89,7 @@ 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 adapterForm1099DivResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099DivResponse.class)); final TypeAdapter adapterForm1099MiscResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099MiscResponse.class)); final TypeAdapter adapterForm1099NecResponse = gson.getDelegateAdapter(this, TypeToken.get(Form1099NecResponse.class)); @@ -106,6 +108,12 @@ public void write(JsonWriter out, Update1099Form200Response value) throws IOExce elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1042SResponse` + if (value.getActualInstance() instanceof Form1042SResponse) { + JsonElement element = adapterForm1042SResponse.toJsonTree((Form1042SResponse)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()); @@ -124,7 +132,7 @@ 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: Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase"); } @Override @@ -148,6 +156,18 @@ public Update1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for FormResponseBase failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'FormResponseBase'", e); } + // deserialize Form1042SResponse + try { + // validate the JSON object to see if any exception is thrown + Form1042SResponse.validateJsonElement(jsonElement); + actualAdapter = adapterForm1042SResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1042SResponse'"); + } catch (Exception e) { + // deserialization failed, continue + 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 Form1099DivResponse try { // validate the JSON object to see if any exception is thrown @@ -211,6 +231,7 @@ public Update1099Form200Response(Object o) { static { schemas.put("FormResponseBase", FormResponseBase.class); + schemas.put("Form1042SResponse", Form1042SResponse.class); schemas.put("Form1099DivResponse", Form1099DivResponse.class); schemas.put("Form1099MiscResponse", Form1099MiscResponse.class); schemas.put("Form1099NecResponse", Form1099NecResponse.class); @@ -224,7 +245,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase + * Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase * * It could be an instance of the 'oneOf' schemas. */ @@ -235,6 +256,11 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1042SResponse) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099DivResponse) { super.setActualInstance(instance); return; @@ -250,14 +276,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase"); + throw new RuntimeException("Invalid instance type. Must be Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase"); } /** * Get the actual instance, which can be the following: - * Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase + * Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase * - * @return The actual instance (Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase) + * @return The actual instance (Form1042SResponse, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, FormResponseBase) */ @SuppressWarnings("unchecked") @Override @@ -275,6 +301,16 @@ public Object getActualInstance() { public FormResponseBase getFormResponseBase() throws ClassCastException { return (FormResponseBase)super.getActualInstance(); } + /** + * Get the actual instance of `Form1042SResponse`. If the actual instance is not `Form1042SResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1042SResponse` + * @throws ClassCastException if the instance is not `Form1042SResponse` + */ + public Form1042SResponse getForm1042SResponse() throws ClassCastException { + return (Form1042SResponse)super.getActualInstance(); + } /** * Get the actual instance of `Form1099DivResponse`. If the actual instance is not `Form1099DivResponse`, * the ClassCastException will be thrown. @@ -324,6 +360,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for FormResponseBase failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1042SResponse + try { + Form1042SResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1042SResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099DivResponse try { Form1099DivResponse.validateJsonElement(jsonElement); @@ -349,7 +393,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 Update1099Form200Response with oneOf schemas: Form1099DivResponse, 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, Form1099DivResponse, Form1099MiscResponse, Form1099NecResponse, 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/ValidationErrorResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorResponse.java new file mode 100644 index 0000000..947cd3d --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationErrorResponse.java @@ -0,0 +1,264 @@ +/* + * 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.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; + +/** + * ValidationErrorResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class ValidationErrorResponse { + public static final String SERIALIZED_NAME_FIELD = "field"; + @SerializedName(SERIALIZED_NAME_FIELD) + private String field; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors; + + public ValidationErrorResponse() { + } + + public ValidationErrorResponse field(String field) { + this.field = field; + return this; + } + + /** + * The field containing the error + * @return field + */ + @javax.annotation.Nullable + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + + public ValidationErrorResponse errors(List errors) { + this.errors = errors; + return this; + } + + public ValidationErrorResponse addErrorsItem(String errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * The list of error messages + * @return errors + */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidationErrorResponse validationErrorResponse = (ValidationErrorResponse) o; + return Objects.equals(this.field, validationErrorResponse.field) && + Objects.equals(this.errors, validationErrorResponse.errors); + } + + 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(field, errors); + } + + 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 ValidationErrorResponse {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).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("field"); + openapiFields.add("errors"); + + // 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 ValidationErrorResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidationErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationErrorResponse is not found in the empty JSON string", ValidationErrorResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValidationErrorResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidationErrorResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidationErrorResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidationErrorResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValidationErrorResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidationErrorResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValidationErrorResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValidationErrorResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidationErrorResponse + * @throws IOException if the JSON string is invalid with respect to ValidationErrorResponse + */ + public static ValidationErrorResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidationErrorResponse.class); + } + + /** + * Convert an instance of ValidationErrorResponse 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/W4FormDataModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormDataModel.java index 95204c3..a5e1a7b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormDataModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormDataModel.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 @@ -27,6 +27,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -586,19 +587,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE = "part19FormationOrResolutionDate"; @SerializedName(SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE) - private OffsetDateTime part19FormationOrResolutionDate; + private LocalDate part19FormationOrResolutionDate; public static final String SERIALIZED_NAME_PART20_FILING_DATE = "part20FilingDate"; @SerializedName(SERIALIZED_NAME_PART20_FILING_DATE) - private OffsetDateTime part20FilingDate; + private LocalDate part20FilingDate; public static final String SERIALIZED_NAME_PART21_DETERMINATION_DATE = "part21DeterminationDate"; @SerializedName(SERIALIZED_NAME_PART21_DETERMINATION_DATE) - private OffsetDateTime part21DeterminationDate; + private LocalDate part21DeterminationDate; public static final String SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS = "substantialUsOwners"; @SerializedName(SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS) - private List substantialUsOwners = new ArrayList<>(); + private List substantialUsOwners; public static final String SERIALIZED_NAME_BIRTHDAY = "birthday"; @SerializedName(SERIALIZED_NAME_BIRTHDAY) @@ -910,11 +911,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_BOX35_FORMED_ON_DATE = "box35FormedOnDate"; @SerializedName(SERIALIZED_NAME_BOX35_FORMED_ON_DATE) - private OffsetDateTime box35FormedOnDate; + private LocalDate box35FormedOnDate; public static final String SERIALIZED_NAME_BOX36_FILED_ON_DATE = "box36FiledOnDate"; @SerializedName(SERIALIZED_NAME_BOX36_FILED_ON_DATE) - private OffsetDateTime box36FiledOnDate; + private LocalDate box36FiledOnDate; public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) @@ -3174,7 +3175,7 @@ public void setCertifyPart29Signature(Boolean certifyPart29Signature) { } - public W4FormDataModel part19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public W4FormDataModel part19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; return this; } @@ -3184,16 +3185,16 @@ public W4FormDataModel part19FormationOrResolutionDate(OffsetDateTime part19Form * @return part19FormationOrResolutionDate */ @javax.annotation.Nullable - public OffsetDateTime getPart19FormationOrResolutionDate() { + public LocalDate getPart19FormationOrResolutionDate() { return part19FormationOrResolutionDate; } - public void setPart19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public void setPart19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; } - public W4FormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { + public W4FormDataModel part20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; return this; } @@ -3203,16 +3204,16 @@ public W4FormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { * @return part20FilingDate */ @javax.annotation.Nullable - public OffsetDateTime getPart20FilingDate() { + public LocalDate getPart20FilingDate() { return part20FilingDate; } - public void setPart20FilingDate(OffsetDateTime part20FilingDate) { + public void setPart20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; } - public W4FormDataModel part21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public W4FormDataModel part21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; return this; } @@ -3222,11 +3223,11 @@ public W4FormDataModel part21DeterminationDate(OffsetDateTime part21Determinatio * @return part21DeterminationDate */ @javax.annotation.Nullable - public OffsetDateTime getPart21DeterminationDate() { + public LocalDate getPart21DeterminationDate() { return part21DeterminationDate; } - public void setPart21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public void setPart21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; } @@ -4721,7 +4722,7 @@ public void setCertifyBox42(Boolean certifyBox42) { } - public W4FormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public W4FormDataModel box35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; return this; } @@ -4731,16 +4732,16 @@ public W4FormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { * @return box35FormedOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox35FormedOnDate() { + public LocalDate getBox35FormedOnDate() { return box35FormedOnDate; } - public void setBox35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public void setBox35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; } - public W4FormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public W4FormDataModel box36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; return this; } @@ -4750,11 +4751,11 @@ public W4FormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { * @return box36FiledOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox36FiledOnDate() { + public LocalDate getBox36FiledOnDate() { return box36FiledOnDate; } - public void setBox36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public void setBox36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java new file mode 100644 index 0000000..837f504 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java @@ -0,0 +1,939 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * W4FormRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W4FormRequest { + /** + * The form type (always \"w4\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; + @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) + private String employeeFirstName; + + 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_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_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_MARITAL_STATUS = "maritalStatus"; + @SerializedName(SERIALIZED_NAME_MARITAL_STATUS) + private String maritalStatus; + + public static final String SERIALIZED_NAME_LAST_NAME_DIFFERS = "lastNameDiffers"; + @SerializedName(SERIALIZED_NAME_LAST_NAME_DIFFERS) + private Boolean lastNameDiffers; + + public static final String SERIALIZED_NAME_NUM_ALLOWANCES = "numAllowances"; + @SerializedName(SERIALIZED_NAME_NUM_ALLOWANCES) + private Integer numAllowances; + + public static final String SERIALIZED_NAME_OTHER_DEPENDENTS = "otherDependents"; + @SerializedName(SERIALIZED_NAME_OTHER_DEPENDENTS) + private Integer otherDependents; + + public static final String SERIALIZED_NAME_NON_JOB_INCOME = "nonJobIncome"; + @SerializedName(SERIALIZED_NAME_NON_JOB_INCOME) + private Float nonJobIncome; + + public static final String SERIALIZED_NAME_DEDUCTIONS = "deductions"; + @SerializedName(SERIALIZED_NAME_DEDUCTIONS) + private Float deductions; + + public static final String SERIALIZED_NAME_ADDITIONAL_WITHHELD = "additionalWithheld"; + @SerializedName(SERIALIZED_NAME_ADDITIONAL_WITHHELD) + private Float additionalWithheld; + + public static final String SERIALIZED_NAME_EXEMPT_FROM_WITHHOLDING = "exemptFromWithholding"; + @SerializedName(SERIALIZED_NAME_EXEMPT_FROM_WITHHOLDING) + private Boolean exemptFromWithholding; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + 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_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + + public W4FormRequest() { + } + + public W4FormRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w4\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W4FormRequest employeeFirstName(String employeeFirstName) { + this.employeeFirstName = employeeFirstName; + return this; + } + + /** + * The first name of the employee. + * @return employeeFirstName + */ + @javax.annotation.Nullable + public String getEmployeeFirstName() { + return employeeFirstName; + } + + public void setEmployeeFirstName(String employeeFirstName) { + this.employeeFirstName = employeeFirstName; + } + + + public W4FormRequest employeeMiddleName(String employeeMiddleName) { + this.employeeMiddleName = employeeMiddleName; + return this; + } + + /** + * The middle name of the employee. + * @return employeeMiddleName + */ + @javax.annotation.Nullable + public String getEmployeeMiddleName() { + return employeeMiddleName; + } + + public void setEmployeeMiddleName(String employeeMiddleName) { + this.employeeMiddleName = employeeMiddleName; + } + + + public W4FormRequest employeeLastName(String employeeLastName) { + this.employeeLastName = employeeLastName; + return this; + } + + /** + * The last name of the employee. + * @return employeeLastName + */ + @javax.annotation.Nullable + public String getEmployeeLastName() { + return employeeLastName; + } + + public void setEmployeeLastName(String employeeLastName) { + this.employeeLastName = employeeLastName; + } + + + public W4FormRequest employeeNameSuffix(String employeeNameSuffix) { + this.employeeNameSuffix = employeeNameSuffix; + return this; + } + + /** + * The name suffix of the employee. + * @return employeeNameSuffix + */ + @javax.annotation.Nullable + public String getEmployeeNameSuffix() { + return employeeNameSuffix; + } + + public void setEmployeeNameSuffix(String employeeNameSuffix) { + this.employeeNameSuffix = employeeNameSuffix; + } + + + public W4FormRequest tinType(String tinType) { + this.tinType = tinType; + return this; + } + + /** + * The type of TIN provided. + * @return tinType + */ + @javax.annotation.Nullable + public String getTinType() { + return tinType; + } + + public void setTinType(String tinType) { + this.tinType = tinType; + } + + + public W4FormRequest tin(String tin) { + this.tin = tin; + return this; + } + + /** + * The taxpayer identification number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public W4FormRequest address(String address) { + this.address = address; + return this; + } + + /** + * The address of the employee. + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public W4FormRequest city(String city) { + this.city = city; + return this; + } + + /** + * The city of residence of the employee. + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public W4FormRequest state(String state) { + this.state = state; + return this; + } + + /** + * The state of residence of the employee. + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public W4FormRequest zip(String zip) { + this.zip = zip; + return this; + } + + /** + * The ZIP code of residence of the employee. + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public W4FormRequest maritalStatus(String maritalStatus) { + this.maritalStatus = maritalStatus; + return this; + } + + /** + * The marital status of the employee. + * @return maritalStatus + */ + @javax.annotation.Nullable + public String getMaritalStatus() { + return maritalStatus; + } + + public void setMaritalStatus(String maritalStatus) { + this.maritalStatus = maritalStatus; + } + + + public W4FormRequest lastNameDiffers(Boolean lastNameDiffers) { + this.lastNameDiffers = lastNameDiffers; + return this; + } + + /** + * Indicates whether the last name differs from prior records. + * @return lastNameDiffers + */ + @javax.annotation.Nullable + public Boolean getLastNameDiffers() { + return lastNameDiffers; + } + + public void setLastNameDiffers(Boolean lastNameDiffers) { + this.lastNameDiffers = lastNameDiffers; + } + + + public W4FormRequest numAllowances(Integer numAllowances) { + this.numAllowances = numAllowances; + return this; + } + + /** + * The number of allowances claimed by the employee. + * @return numAllowances + */ + @javax.annotation.Nullable + public Integer getNumAllowances() { + return numAllowances; + } + + public void setNumAllowances(Integer numAllowances) { + this.numAllowances = numAllowances; + } + + + public W4FormRequest otherDependents(Integer otherDependents) { + this.otherDependents = otherDependents; + return this; + } + + /** + * The number of dependents other than allowances. + * @return otherDependents + */ + @javax.annotation.Nullable + public Integer getOtherDependents() { + return otherDependents; + } + + public void setOtherDependents(Integer otherDependents) { + this.otherDependents = otherDependents; + } + + + public W4FormRequest nonJobIncome(Float nonJobIncome) { + this.nonJobIncome = nonJobIncome; + return this; + } + + /** + * The amount of non-job income. + * @return nonJobIncome + */ + @javax.annotation.Nullable + public Float getNonJobIncome() { + return nonJobIncome; + } + + public void setNonJobIncome(Float nonJobIncome) { + this.nonJobIncome = nonJobIncome; + } + + + public W4FormRequest deductions(Float deductions) { + this.deductions = deductions; + return this; + } + + /** + * The amount of deductions claimed. + * @return deductions + */ + @javax.annotation.Nullable + public Float getDeductions() { + return deductions; + } + + public void setDeductions(Float deductions) { + this.deductions = deductions; + } + + + public W4FormRequest additionalWithheld(Float additionalWithheld) { + this.additionalWithheld = additionalWithheld; + return this; + } + + /** + * The additional amount withheld. + * @return additionalWithheld + */ + @javax.annotation.Nullable + public Float getAdditionalWithheld() { + return additionalWithheld; + } + + public void setAdditionalWithheld(Float additionalWithheld) { + this.additionalWithheld = additionalWithheld; + } + + + public W4FormRequest exemptFromWithholding(Boolean exemptFromWithholding) { + this.exemptFromWithholding = exemptFromWithholding; + return this; + } + + /** + * Indicates whether the employee is exempt from withholding. + * @return exemptFromWithholding + */ + @javax.annotation.Nullable + public Boolean getExemptFromWithholding() { + return exemptFromWithholding; + } + + public void setExemptFromWithholding(Boolean exemptFromWithholding) { + this.exemptFromWithholding = exemptFromWithholding; + } + + + public W4FormRequest officeCode(String officeCode) { + this.officeCode = officeCode; + return this; + } + + /** + * The office code associated with the form. + * @return officeCode + */ + @javax.annotation.Nullable + public String getOfficeCode() { + return officeCode; + } + + public void setOfficeCode(String officeCode) { + this.officeCode = officeCode; + } + + + public W4FormRequest 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 W4FormRequest 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 W4FormRequest 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 W4FormRequest 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 W4FormRequest 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W4FormRequest w4FormRequest = (W4FormRequest) o; + return Objects.equals(this.type, w4FormRequest.type) && + Objects.equals(this.employeeFirstName, w4FormRequest.employeeFirstName) && + Objects.equals(this.employeeMiddleName, w4FormRequest.employeeMiddleName) && + Objects.equals(this.employeeLastName, w4FormRequest.employeeLastName) && + Objects.equals(this.employeeNameSuffix, w4FormRequest.employeeNameSuffix) && + Objects.equals(this.tinType, w4FormRequest.tinType) && + Objects.equals(this.tin, w4FormRequest.tin) && + Objects.equals(this.address, w4FormRequest.address) && + Objects.equals(this.city, w4FormRequest.city) && + Objects.equals(this.state, w4FormRequest.state) && + Objects.equals(this.zip, w4FormRequest.zip) && + Objects.equals(this.maritalStatus, w4FormRequest.maritalStatus) && + Objects.equals(this.lastNameDiffers, w4FormRequest.lastNameDiffers) && + Objects.equals(this.numAllowances, w4FormRequest.numAllowances) && + Objects.equals(this.otherDependents, w4FormRequest.otherDependents) && + Objects.equals(this.nonJobIncome, w4FormRequest.nonJobIncome) && + Objects.equals(this.deductions, w4FormRequest.deductions) && + Objects.equals(this.additionalWithheld, w4FormRequest.additionalWithheld) && + Objects.equals(this.exemptFromWithholding, w4FormRequest.exemptFromWithholding) && + Objects.equals(this.officeCode, w4FormRequest.officeCode) && + Objects.equals(this.companyId, w4FormRequest.companyId) && + Objects.equals(this.referenceId, w4FormRequest.referenceId) && + Objects.equals(this.email, w4FormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w4FormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w4FormRequest.signature); + } + + 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, employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, companyId, referenceId, email, eDeliveryConsentedAt, signature); + } + + 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 W4FormRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" employeeFirstName: ").append(toIndentedString(employeeFirstName)).append("\n"); + sb.append(" employeeMiddleName: ").append(toIndentedString(employeeMiddleName)).append("\n"); + sb.append(" employeeLastName: ").append(toIndentedString(employeeLastName)).append("\n"); + sb.append(" employeeNameSuffix: ").append(toIndentedString(employeeNameSuffix)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" maritalStatus: ").append(toIndentedString(maritalStatus)).append("\n"); + sb.append(" lastNameDiffers: ").append(toIndentedString(lastNameDiffers)).append("\n"); + sb.append(" numAllowances: ").append(toIndentedString(numAllowances)).append("\n"); + sb.append(" otherDependents: ").append(toIndentedString(otherDependents)).append("\n"); + sb.append(" nonJobIncome: ").append(toIndentedString(nonJobIncome)).append("\n"); + sb.append(" deductions: ").append(toIndentedString(deductions)).append("\n"); + 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(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).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("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); + + // 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 W4FormRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W4FormRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W4FormRequest is not found in the empty JSON string", W4FormRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W4FormRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W4FormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("employeeFirstName") != null && !jsonObj.get("employeeFirstName").isJsonNull()) && !jsonObj.get("employeeFirstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeFirstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeFirstName").toString())); + } + if ((jsonObj.get("employeeMiddleName") != null && !jsonObj.get("employeeMiddleName").isJsonNull()) && !jsonObj.get("employeeMiddleName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeMiddleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeMiddleName").toString())); + } + if ((jsonObj.get("employeeLastName") != null && !jsonObj.get("employeeLastName").isJsonNull()) && !jsonObj.get("employeeLastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeLastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeLastName").toString())); + } + if ((jsonObj.get("employeeNameSuffix") != null && !jsonObj.get("employeeNameSuffix").isJsonNull()) && !jsonObj.get("employeeNameSuffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `employeeNameSuffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("employeeNameSuffix").toString())); + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("maritalStatus") != null && !jsonObj.get("maritalStatus").isJsonNull()) && !jsonObj.get("maritalStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `maritalStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("maritalStatus").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + 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("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W4FormRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W4FormRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W4FormRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W4FormRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W4FormRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W4FormRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W4FormRequest + * @throws IOException if the JSON string is invalid with respect to W4FormRequest + */ + public static W4FormRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W4FormRequest.class); + } + + /** + * Convert an instance of W4FormRequest 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/W4FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java index 1d65a10..95ad15c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.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/W8BenEFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java new file mode 100644 index 0000000..e715f42 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java @@ -0,0 +1,2958 @@ +/* + * 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.SubstantialUsOwnerRequest; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.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; + +/** + * W8BenEFormRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W8BenEFormRequest { + /** + * The form type (always \"w8bene\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_CITIZENSHIP_COUNTRY = "citizenshipCountry"; + @SerializedName(SERIALIZED_NAME_CITIZENSHIP_COUNTRY) + private String citizenshipCountry; + + public static final String SERIALIZED_NAME_DISREGARDED_ENTITY = "disregardedEntity"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ENTITY) + private String disregardedEntity; + + public static final String SERIALIZED_NAME_ENTITY_TYPE = "entityType"; + @SerializedName(SERIALIZED_NAME_ENTITY_TYPE) + private String entityType; + + public static final String SERIALIZED_NAME_MAKING_TREATY_CLAIM = "makingTreatyClaim"; + @SerializedName(SERIALIZED_NAME_MAKING_TREATY_CLAIM) + private Boolean makingTreatyClaim; + + public static final String SERIALIZED_NAME_FATCA_STATUS = "fatcaStatus"; + @SerializedName(SERIALIZED_NAME_FATCA_STATUS) + private String fatcaStatus; + + public static final String SERIALIZED_NAME_RESIDENCE_ADDRESS = "residenceAddress"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_ADDRESS) + private String residenceAddress; + + public static final String SERIALIZED_NAME_RESIDENCE_CITY = "residenceCity"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_CITY) + private String residenceCity; + + public static final String SERIALIZED_NAME_RESIDENCE_STATE = "residenceState"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_STATE) + private String residenceState; + + public static final String SERIALIZED_NAME_RESIDENCE_ZIP = "residenceZip"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_ZIP) + private String residenceZip; + + public static final String SERIALIZED_NAME_RESIDENCE_COUNTRY = "residenceCountry"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_COUNTRY) + private String residenceCountry; + + public static final String SERIALIZED_NAME_RESIDENCE_IS_MAILING = "residenceIsMailing"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_IS_MAILING) + private Boolean residenceIsMailing; + + public static final String SERIALIZED_NAME_MAILING_ADDRESS = "mailingAddress"; + @SerializedName(SERIALIZED_NAME_MAILING_ADDRESS) + private String mailingAddress; + + public static final String SERIALIZED_NAME_MAILING_CITY = "mailingCity"; + @SerializedName(SERIALIZED_NAME_MAILING_CITY) + private String mailingCity; + + public static final String SERIALIZED_NAME_MAILING_STATE = "mailingState"; + @SerializedName(SERIALIZED_NAME_MAILING_STATE) + private String mailingState; + + public static final String SERIALIZED_NAME_MAILING_ZIP = "mailingZip"; + @SerializedName(SERIALIZED_NAME_MAILING_ZIP) + private String mailingZip; + + public static final String SERIALIZED_NAME_MAILING_COUNTRY = "mailingCountry"; + @SerializedName(SERIALIZED_NAME_MAILING_COUNTRY) + private String mailingCountry; + + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_GIIN = "giin"; + @SerializedName(SERIALIZED_NAME_GIIN) + private String giin; + + public static final String SERIALIZED_NAME_FOREIGN_TIN_NOT_REQUIRED = "foreignTinNotRequired"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TIN_NOT_REQUIRED) + private Boolean foreignTinNotRequired; + + public static final String SERIALIZED_NAME_FOREIGN_TIN = "foreignTin"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TIN) + private String foreignTin; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_DISREGARDED_ENTITY_FATCA_STATUS = "disregardedEntityFatcaStatus"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ENTITY_FATCA_STATUS) + private String disregardedEntityFatcaStatus; + + public static final String SERIALIZED_NAME_DISREGARDED_ADDRESS = "disregardedAddress"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ADDRESS) + private String disregardedAddress; + + public static final String SERIALIZED_NAME_DISREGARDED_CITY = "disregardedCity"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_CITY) + private String disregardedCity; + + public static final String SERIALIZED_NAME_DISREGARDED_STATE = "disregardedState"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_STATE) + private String disregardedState; + + public static final String SERIALIZED_NAME_DISREGARDED_ZIP = "disregardedZip"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ZIP) + private String disregardedZip; + + public static final String SERIALIZED_NAME_DISREGARDED_COUNTRY = "disregardedCountry"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_COUNTRY) + private String disregardedCountry; + + public static final String SERIALIZED_NAME_DISREGARDED_ENTITY_GIIN = "disregardedEntityGiin"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ENTITY_GIIN) + private String disregardedEntityGiin; + + public static final String SERIALIZED_NAME_TREATY_COUNTRY_CERTIFICATION = "treatyCountryCertification"; + @SerializedName(SERIALIZED_NAME_TREATY_COUNTRY_CERTIFICATION) + private Boolean treatyCountryCertification; + + public static final String SERIALIZED_NAME_TREATY_COUNTRY = "treatyCountry"; + @SerializedName(SERIALIZED_NAME_TREATY_COUNTRY) + private String treatyCountry; + + public static final String SERIALIZED_NAME_BENEFIT_LIMITATION_CERTIFICATION = "benefitLimitationCertification"; + @SerializedName(SERIALIZED_NAME_BENEFIT_LIMITATION_CERTIFICATION) + private Boolean benefitLimitationCertification; + + public static final String SERIALIZED_NAME_BENEFIT_LIMITATION = "benefitLimitation"; + @SerializedName(SERIALIZED_NAME_BENEFIT_LIMITATION) + private String benefitLimitation; + + public static final String SERIALIZED_NAME_QUALIFIED_RESIDENT_STATUS_CERTIFICATION = "qualifiedResidentStatusCertification"; + @SerializedName(SERIALIZED_NAME_QUALIFIED_RESIDENT_STATUS_CERTIFICATION) + private Boolean qualifiedResidentStatusCertification; + + public static final String SERIALIZED_NAME_TREATY_ARTICLE = "treatyArticle"; + @SerializedName(SERIALIZED_NAME_TREATY_ARTICLE) + private String treatyArticle; + + public static final String SERIALIZED_NAME_WITHHOLDING_RATE = "withholdingRate"; + @SerializedName(SERIALIZED_NAME_WITHHOLDING_RATE) + private String withholdingRate; + + public static final String SERIALIZED_NAME_INCOME_TYPE = "incomeType"; + @SerializedName(SERIALIZED_NAME_INCOME_TYPE) + private String incomeType; + + public static final String SERIALIZED_NAME_TREATY_REASONS = "treatyReasons"; + @SerializedName(SERIALIZED_NAME_TREATY_REASONS) + private String treatyReasons; + + public static final String SERIALIZED_NAME_FFI_SPONSORING_ENTITY = "ffiSponsoringEntity"; + @SerializedName(SERIALIZED_NAME_FFI_SPONSORING_ENTITY) + private String ffiSponsoringEntity; + + public static final String SERIALIZED_NAME_INVESTMENT_ENTITY_CERTIFICATION = "investmentEntityCertification"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_ENTITY_CERTIFICATION) + private Boolean investmentEntityCertification; + + public static final String SERIALIZED_NAME_CONTROLLED_FOREIGN_CORPORATION_CERTIFICATION = "controlledForeignCorporationCertification"; + @SerializedName(SERIALIZED_NAME_CONTROLLED_FOREIGN_CORPORATION_CERTIFICATION) + private Boolean controlledForeignCorporationCertification; + + public static final String SERIALIZED_NAME_COMPLIANT_NONREGISTERING_LOCAL_BANK_CERTIFICATION = "compliantNonregisteringLocalBankCertification"; + @SerializedName(SERIALIZED_NAME_COMPLIANT_NONREGISTERING_LOCAL_BANK_CERTIFICATION) + private Boolean compliantNonregisteringLocalBankCertification; + + public static final String SERIALIZED_NAME_COMPLIANT_FFI_LOW_VALUE_ACCOUNTS_CERTIFICATION = "compliantFfiLowValueAccountsCertification"; + @SerializedName(SERIALIZED_NAME_COMPLIANT_FFI_LOW_VALUE_ACCOUNTS_CERTIFICATION) + private Boolean compliantFfiLowValueAccountsCertification; + + public static final String SERIALIZED_NAME_SPONSORED_CLOSELY_HELD_ENTITY_SPONSORING_ENTITY = "sponsoredCloselyHeldEntitySponsoringEntity"; + @SerializedName(SERIALIZED_NAME_SPONSORED_CLOSELY_HELD_ENTITY_SPONSORING_ENTITY) + private String sponsoredCloselyHeldEntitySponsoringEntity; + + public static final String SERIALIZED_NAME_SPONSORED_CLOSELY_HELD_INVESTMENT_VEHICLE_CERTIFICATION = "sponsoredCloselyHeldInvestmentVehicleCertification"; + @SerializedName(SERIALIZED_NAME_SPONSORED_CLOSELY_HELD_INVESTMENT_VEHICLE_CERTIFICATION) + private Boolean sponsoredCloselyHeldInvestmentVehicleCertification; + + public static final String SERIALIZED_NAME_COMPLIANT_LIMITED_LIFE_DEBT_ENTITY_CERTIFICATION = "compliantLimitedLifeDebtEntityCertification"; + @SerializedName(SERIALIZED_NAME_COMPLIANT_LIMITED_LIFE_DEBT_ENTITY_CERTIFICATION) + private Boolean compliantLimitedLifeDebtEntityCertification; + + public static final String SERIALIZED_NAME_INVESTMENT_ENTITY_NO_FINANCIAL_ACCOUNTS_CERTIFICATION = "investmentEntityNoFinancialAccountsCertification"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_ENTITY_NO_FINANCIAL_ACCOUNTS_CERTIFICATION) + private Boolean investmentEntityNoFinancialAccountsCertification; + + public static final String SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_CERTIFICATION = "ownerDocumentedFfiCertification"; + @SerializedName(SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_CERTIFICATION) + private Boolean ownerDocumentedFfiCertification; + + public static final String SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_REPORTING_STATEMENT_CERTIFICATION = "ownerDocumentedFfiReportingStatementCertification"; + @SerializedName(SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_REPORTING_STATEMENT_CERTIFICATION) + private Boolean ownerDocumentedFfiReportingStatementCertification; + + public static final String SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_AUDITOR_LETTER_CERTIFICATION = "ownerDocumentedFfiAuditorLetterCertification"; + @SerializedName(SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_AUDITOR_LETTER_CERTIFICATION) + private Boolean ownerDocumentedFfiAuditorLetterCertification; + + public static final String SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_TRUST_BENEFICIARIES_CERTIFICATION = "ownerDocumentedFfiTrustBeneficiariesCertification"; + @SerializedName(SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_TRUST_BENEFICIARIES_CERTIFICATION) + private Boolean ownerDocumentedFfiTrustBeneficiariesCertification; + + public static final String SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_CERTIFICATION = "restrictedDistributorCertification"; + @SerializedName(SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_CERTIFICATION) + private Boolean restrictedDistributorCertification; + + public static final String SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_AGREEMENT_CERTIFICATION = "restrictedDistributorAgreementCertification"; + @SerializedName(SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_AGREEMENT_CERTIFICATION) + private Boolean restrictedDistributorAgreementCertification; + + public static final String SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_PREEXISTING_SALES_COMPLIANCE_CERTIFICATION = "restrictedDistributorPreexistingSalesComplianceCertification"; + @SerializedName(SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_PREEXISTING_SALES_COMPLIANCE_CERTIFICATION) + private Boolean restrictedDistributorPreexistingSalesComplianceCertification; + + public static final String SERIALIZED_NAME_NONREPORTING_IGA_FFI_CERTIFICATION = "nonreportingIgaFfiCertification"; + @SerializedName(SERIALIZED_NAME_NONREPORTING_IGA_FFI_CERTIFICATION) + private Boolean nonreportingIgaFfiCertification; + + public static final String SERIALIZED_NAME_IGA_COUNTRY = "igaCountry"; + @SerializedName(SERIALIZED_NAME_IGA_COUNTRY) + private String igaCountry; + + public static final String SERIALIZED_NAME_IGA_MODEL = "igaModel"; + @SerializedName(SERIALIZED_NAME_IGA_MODEL) + private String igaModel; + + public static final String SERIALIZED_NAME_IGA_LEGAL_STATUS_TREATMENT = "igaLegalStatusTreatment"; + @SerializedName(SERIALIZED_NAME_IGA_LEGAL_STATUS_TREATMENT) + private String igaLegalStatusTreatment; + + public static final String SERIALIZED_NAME_IGA_FFI_TRUSTEE_OR_SPONSOR = "igaFfiTrusteeOrSponsor"; + @SerializedName(SERIALIZED_NAME_IGA_FFI_TRUSTEE_OR_SPONSOR) + private String igaFfiTrusteeOrSponsor; + + public static final String SERIALIZED_NAME_IGA_FFI_TRUSTEE_IS_FOREIGN = "igaFfiTrusteeIsForeign"; + @SerializedName(SERIALIZED_NAME_IGA_FFI_TRUSTEE_IS_FOREIGN) + private Boolean igaFfiTrusteeIsForeign; + + public static final String SERIALIZED_NAME_NON_COMMERCIAL_FINANCIAL_ACTIVITY_CERTIFICATION = "nonCommercialFinancialActivityCertification"; + @SerializedName(SERIALIZED_NAME_NON_COMMERCIAL_FINANCIAL_ACTIVITY_CERTIFICATION) + private Boolean nonCommercialFinancialActivityCertification; + + public static final String SERIALIZED_NAME_INTERNATION_ORGANIZATION_CERTIFICATION = "internationOrganizationCertification"; + @SerializedName(SERIALIZED_NAME_INTERNATION_ORGANIZATION_CERTIFICATION) + private Boolean internationOrganizationCertification; + + public static final String SERIALIZED_NAME_INTERGOVERNMENTAL_ORGANIZATION_CERTIFICATION = "intergovernmentalOrganizationCertification"; + @SerializedName(SERIALIZED_NAME_INTERGOVERNMENTAL_ORGANIZATION_CERTIFICATION) + private Boolean intergovernmentalOrganizationCertification; + + public static final String SERIALIZED_NAME_TREATY_QUALIFIED_PENSION_FUND_CERTIFICATION = "treatyQualifiedPensionFundCertification"; + @SerializedName(SERIALIZED_NAME_TREATY_QUALIFIED_PENSION_FUND_CERTIFICATION) + private Boolean treatyQualifiedPensionFundCertification; + + public static final String SERIALIZED_NAME_QUALIFIED_RETIREMENT_FUND_CERTIFICATION = "qualifiedRetirementFundCertification"; + @SerializedName(SERIALIZED_NAME_QUALIFIED_RETIREMENT_FUND_CERTIFICATION) + private Boolean qualifiedRetirementFundCertification; + + public static final String SERIALIZED_NAME_NARROW_PARTICIPATION_RETIREMENT_FUND_CERTIFICATION = "narrowParticipationRetirementFundCertification"; + @SerializedName(SERIALIZED_NAME_NARROW_PARTICIPATION_RETIREMENT_FUND_CERTIFICATION) + private Boolean narrowParticipationRetirementFundCertification; + + public static final String SERIALIZED_NAME_SECTION401_A_EQUIVALENT_PENSION_PLAN_CERTIFICATION = "section401AEquivalentPensionPlanCertification"; + @SerializedName(SERIALIZED_NAME_SECTION401_A_EQUIVALENT_PENSION_PLAN_CERTIFICATION) + private Boolean section401AEquivalentPensionPlanCertification; + + public static final String SERIALIZED_NAME_INVESTMENT_ENTITY_FOR_RETIREMENT_FUNDS_CERTIFICATION = "investmentEntityForRetirementFundsCertification"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_ENTITY_FOR_RETIREMENT_FUNDS_CERTIFICATION) + private Boolean investmentEntityForRetirementFundsCertification; + + public static final String SERIALIZED_NAME_EXEMPT_BENEFICIAL_OWNER_SPONSORED_RETIREMENT_FUND_CERTIFICATION = "exemptBeneficialOwnerSponsoredRetirementFundCertification"; + @SerializedName(SERIALIZED_NAME_EXEMPT_BENEFICIAL_OWNER_SPONSORED_RETIREMENT_FUND_CERTIFICATION) + private Boolean exemptBeneficialOwnerSponsoredRetirementFundCertification; + + public static final String SERIALIZED_NAME_EXEMPT_BENEFICIAL_OWNER_OWNED_INVESTMENT_ENTITY_CERTIFICATION = "exemptBeneficialOwnerOwnedInvestmentEntityCertification"; + @SerializedName(SERIALIZED_NAME_EXEMPT_BENEFICIAL_OWNER_OWNED_INVESTMENT_ENTITY_CERTIFICATION) + private Boolean exemptBeneficialOwnerOwnedInvestmentEntityCertification; + + public static final String SERIALIZED_NAME_TERRITORY_FINANCIAL_INSTITUTION_CERTIFICATION = "territoryFinancialInstitutionCertification"; + @SerializedName(SERIALIZED_NAME_TERRITORY_FINANCIAL_INSTITUTION_CERTIFICATION) + private Boolean territoryFinancialInstitutionCertification; + + public static final String SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_GROUP_ENTITY_CERTIFICATION = "exceptedNonfinancialGroupEntityCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_GROUP_ENTITY_CERTIFICATION) + private Boolean exceptedNonfinancialGroupEntityCertification; + + public static final String SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_START_UP_CERTIFICATION = "exceptedNonfinancialStartUpCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_START_UP_CERTIFICATION) + private Boolean exceptedNonfinancialStartUpCertification; + + public static final String SERIALIZED_NAME_STARTUP_FORMATION_OR_RESOLUTION_DATE = "startupFormationOrResolutionDate"; + @SerializedName(SERIALIZED_NAME_STARTUP_FORMATION_OR_RESOLUTION_DATE) + private LocalDate startupFormationOrResolutionDate; + + public static final String SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY_CERTIFICATION = "exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY_CERTIFICATION) + private Boolean exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification; + + public static final String SERIALIZED_NAME_NONFINANCIAL_ENTITY_FILING_DATE = "nonfinancialEntityFilingDate"; + @SerializedName(SERIALIZED_NAME_NONFINANCIAL_ENTITY_FILING_DATE) + private LocalDate nonfinancialEntityFilingDate; + + public static final String SERIALIZED_NAME_SECTION501_C_ORGANIZATION_CERTIFICATION = "section501COrganizationCertification"; + @SerializedName(SERIALIZED_NAME_SECTION501_C_ORGANIZATION_CERTIFICATION) + private Boolean section501COrganizationCertification; + + public static final String SERIALIZED_NAME_DETERMINATION_LETTER_DATE = "determinationLetterDate"; + @SerializedName(SERIALIZED_NAME_DETERMINATION_LETTER_DATE) + private LocalDate determinationLetterDate; + + public static final String SERIALIZED_NAME_NONPROFIT_ORGANIZATION_CERTIFICATION = "nonprofitOrganizationCertification"; + @SerializedName(SERIALIZED_NAME_NONPROFIT_ORGANIZATION_CERTIFICATION) + private Boolean nonprofitOrganizationCertification; + + public static final String SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_CERTIFICATION = "publiclyTradedNffeCertification"; + @SerializedName(SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_CERTIFICATION) + private Boolean publiclyTradedNffeCertification; + + public static final String SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_SECURITIES_MARKET = "publiclyTradedNffeSecuritiesMarket"; + @SerializedName(SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_SECURITIES_MARKET) + private String publiclyTradedNffeSecuritiesMarket; + + public static final String SERIALIZED_NAME_NFFE_AFFILIATE_OF_PUBLICLY_TRADED_ENTITY_CERTIFICATION = "nffeAffiliateOfPubliclyTradedEntityCertification"; + @SerializedName(SERIALIZED_NAME_NFFE_AFFILIATE_OF_PUBLICLY_TRADED_ENTITY_CERTIFICATION) + private Boolean nffeAffiliateOfPubliclyTradedEntityCertification; + + public static final String SERIALIZED_NAME_PUBLICLY_TRADED_ENTITY = "publiclyTradedEntity"; + @SerializedName(SERIALIZED_NAME_PUBLICLY_TRADED_ENTITY) + private String publiclyTradedEntity; + + public static final String SERIALIZED_NAME_NFFE_AFFILIATE_OF_PUBLICLY_TRADED_ENTITY_SECURITIES_MARKET = "nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket"; + @SerializedName(SERIALIZED_NAME_NFFE_AFFILIATE_OF_PUBLICLY_TRADED_ENTITY_SECURITIES_MARKET) + private String nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket; + + public static final String SERIALIZED_NAME_EXCEPTED_TERRITORY_NFFE_CERTIFICATION = "exceptedTerritoryNffeCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_TERRITORY_NFFE_CERTIFICATION) + private Boolean exceptedTerritoryNffeCertification; + + public static final String SERIALIZED_NAME_ACTIVE_NFFE_CERTIFICATION = "activeNffeCertification"; + @SerializedName(SERIALIZED_NAME_ACTIVE_NFFE_CERTIFICATION) + private Boolean activeNffeCertification; + + public static final String SERIALIZED_NAME_PASSIVE_NFFE_CERTIFICATION = "passiveNffeCertification"; + @SerializedName(SERIALIZED_NAME_PASSIVE_NFFE_CERTIFICATION) + private Boolean passiveNffeCertification; + + public static final String SERIALIZED_NAME_PASSIVE_NFFE_NO_SUBSTANTIAL_US_OWNERS_CERTIFICATION = "passiveNffeNoSubstantialUsOwnersCertification"; + @SerializedName(SERIALIZED_NAME_PASSIVE_NFFE_NO_SUBSTANTIAL_US_OWNERS_CERTIFICATION) + private Boolean passiveNffeNoSubstantialUsOwnersCertification; + + public static final String SERIALIZED_NAME_PASSIVE_NFFE_SUBSTANTIAL_US_OWNERS_PROVIDED_CERTIFICATION = "passiveNffeSubstantialUsOwnersProvidedCertification"; + @SerializedName(SERIALIZED_NAME_PASSIVE_NFFE_SUBSTANTIAL_US_OWNERS_PROVIDED_CERTIFICATION) + private Boolean passiveNffeSubstantialUsOwnersProvidedCertification; + + public static final String SERIALIZED_NAME_EXCEPTED_INTER_AFFILIATE_FFI_CERTIFICATION = "exceptedInterAffiliateFfiCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_INTER_AFFILIATE_FFI_CERTIFICATION) + private Boolean exceptedInterAffiliateFfiCertification; + + public static final String SERIALIZED_NAME_SPONSORED_DIRECT_REPORTING_NFFE_CERTIFICATION = "sponsoredDirectReportingNffeCertification"; + @SerializedName(SERIALIZED_NAME_SPONSORED_DIRECT_REPORTING_NFFE_CERTIFICATION) + private Boolean sponsoredDirectReportingNffeCertification; + + public static final String SERIALIZED_NAME_DIRECT_REPORTING_NFFE_SPONSORING_ENTITY = "directReportingNffeSponsoringEntity"; + @SerializedName(SERIALIZED_NAME_DIRECT_REPORTING_NFFE_SPONSORING_ENTITY) + private String directReportingNffeSponsoringEntity; + + public static final String SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS = "substantialUsOwners"; + @SerializedName(SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS) + private List substantialUsOwners; + + public static final String SERIALIZED_NAME_SIGNER_NAME = "signerName"; + @SerializedName(SERIALIZED_NAME_SIGNER_NAME) + private String signerName; + + public static final String SERIALIZED_NAME_CAPACITY_TO_SIGN_CERTIFICATION = "capacityToSignCertification"; + @SerializedName(SERIALIZED_NAME_CAPACITY_TO_SIGN_CERTIFICATION) + private Boolean capacityToSignCertification; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + 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_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + + public W8BenEFormRequest() { + } + + public W8BenEFormRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w8bene\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W8BenEFormRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the individual or entity associated with the form. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public W8BenEFormRequest citizenshipCountry(String citizenshipCountry) { + this.citizenshipCountry = citizenshipCountry; + return this; + } + + /** + * The country of citizenship. + * @return citizenshipCountry + */ + @javax.annotation.Nullable + public String getCitizenshipCountry() { + return citizenshipCountry; + } + + public void setCitizenshipCountry(String citizenshipCountry) { + this.citizenshipCountry = citizenshipCountry; + } + + + public W8BenEFormRequest disregardedEntity(String disregardedEntity) { + this.disregardedEntity = disregardedEntity; + return this; + } + + /** + * The name of the disregarded entity receiving the payment (if applicable). + * @return disregardedEntity + */ + @javax.annotation.Nullable + public String getDisregardedEntity() { + return disregardedEntity; + } + + public void setDisregardedEntity(String disregardedEntity) { + this.disregardedEntity = disregardedEntity; + } + + + public W8BenEFormRequest entityType(String entityType) { + this.entityType = entityType; + return this; + } + + /** + * The entity type. + * @return entityType + */ + @javax.annotation.Nullable + public String getEntityType() { + return entityType; + } + + public void setEntityType(String entityType) { + this.entityType = entityType; + } + + + public W8BenEFormRequest makingTreatyClaim(Boolean makingTreatyClaim) { + this.makingTreatyClaim = makingTreatyClaim; + return this; + } + + /** + * Indicates whether the entity is making a treaty claim. + * @return makingTreatyClaim + */ + @javax.annotation.Nullable + public Boolean getMakingTreatyClaim() { + return makingTreatyClaim; + } + + public void setMakingTreatyClaim(Boolean makingTreatyClaim) { + this.makingTreatyClaim = makingTreatyClaim; + } + + + public W8BenEFormRequest fatcaStatus(String fatcaStatus) { + this.fatcaStatus = fatcaStatus; + return this; + } + + /** + * The FATCA status. + * @return fatcaStatus + */ + @javax.annotation.Nullable + public String getFatcaStatus() { + return fatcaStatus; + } + + public void setFatcaStatus(String fatcaStatus) { + this.fatcaStatus = fatcaStatus; + } + + + public W8BenEFormRequest residenceAddress(String residenceAddress) { + this.residenceAddress = residenceAddress; + return this; + } + + /** + * The residential address of the individual or entity. + * @return residenceAddress + */ + @javax.annotation.Nullable + public String getResidenceAddress() { + return residenceAddress; + } + + public void setResidenceAddress(String residenceAddress) { + this.residenceAddress = residenceAddress; + } + + + public W8BenEFormRequest residenceCity(String residenceCity) { + this.residenceCity = residenceCity; + return this; + } + + /** + * The city of residence. + * @return residenceCity + */ + @javax.annotation.Nullable + public String getResidenceCity() { + return residenceCity; + } + + public void setResidenceCity(String residenceCity) { + this.residenceCity = residenceCity; + } + + + public W8BenEFormRequest residenceState(String residenceState) { + this.residenceState = residenceState; + return this; + } + + /** + * The state of residence. + * @return residenceState + */ + @javax.annotation.Nullable + public String getResidenceState() { + return residenceState; + } + + public void setResidenceState(String residenceState) { + this.residenceState = residenceState; + } + + + public W8BenEFormRequest residenceZip(String residenceZip) { + this.residenceZip = residenceZip; + return this; + } + + /** + * The ZIP code of the residence. + * @return residenceZip + */ + @javax.annotation.Nullable + public String getResidenceZip() { + return residenceZip; + } + + public void setResidenceZip(String residenceZip) { + this.residenceZip = residenceZip; + } + + + public W8BenEFormRequest residenceCountry(String residenceCountry) { + this.residenceCountry = residenceCountry; + return this; + } + + /** + * The country of residence. + * @return residenceCountry + */ + @javax.annotation.Nullable + public String getResidenceCountry() { + return residenceCountry; + } + + public void setResidenceCountry(String residenceCountry) { + this.residenceCountry = residenceCountry; + } + + + public W8BenEFormRequest residenceIsMailing(Boolean residenceIsMailing) { + this.residenceIsMailing = residenceIsMailing; + return this; + } + + /** + * Indicates whether the residence address is also the mailing address. + * @return residenceIsMailing + */ + @javax.annotation.Nullable + public Boolean getResidenceIsMailing() { + return residenceIsMailing; + } + + public void setResidenceIsMailing(Boolean residenceIsMailing) { + this.residenceIsMailing = residenceIsMailing; + } + + + public W8BenEFormRequest mailingAddress(String mailingAddress) { + this.mailingAddress = mailingAddress; + return this; + } + + /** + * The mailing address. + * @return mailingAddress + */ + @javax.annotation.Nullable + public String getMailingAddress() { + return mailingAddress; + } + + public void setMailingAddress(String mailingAddress) { + this.mailingAddress = mailingAddress; + } + + + public W8BenEFormRequest mailingCity(String mailingCity) { + this.mailingCity = mailingCity; + return this; + } + + /** + * The city of the mailing address. + * @return mailingCity + */ + @javax.annotation.Nullable + public String getMailingCity() { + return mailingCity; + } + + public void setMailingCity(String mailingCity) { + this.mailingCity = mailingCity; + } + + + public W8BenEFormRequest mailingState(String mailingState) { + this.mailingState = mailingState; + return this; + } + + /** + * The state of the mailing address. + * @return mailingState + */ + @javax.annotation.Nullable + public String getMailingState() { + return mailingState; + } + + public void setMailingState(String mailingState) { + this.mailingState = mailingState; + } + + + public W8BenEFormRequest mailingZip(String mailingZip) { + this.mailingZip = mailingZip; + return this; + } + + /** + * The ZIP code of the mailing address. + * @return mailingZip + */ + @javax.annotation.Nullable + public String getMailingZip() { + return mailingZip; + } + + public void setMailingZip(String mailingZip) { + this.mailingZip = mailingZip; + } + + + public W8BenEFormRequest mailingCountry(String mailingCountry) { + this.mailingCountry = mailingCountry; + return this; + } + + /** + * The country of the mailing address. + * @return mailingCountry + */ + @javax.annotation.Nullable + public String getMailingCountry() { + return mailingCountry; + } + + public void setMailingCountry(String mailingCountry) { + this.mailingCountry = mailingCountry; + } + + + public W8BenEFormRequest tin(String tin) { + this.tin = tin; + return this; + } + + /** + * The taxpayer identification number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public W8BenEFormRequest giin(String giin) { + this.giin = giin; + return this; + } + + /** + * The global intermediary identification number (GIIN). + * @return giin + */ + @javax.annotation.Nullable + public String getGiin() { + return giin; + } + + public void setGiin(String giin) { + this.giin = giin; + } + + + public W8BenEFormRequest foreignTinNotRequired(Boolean foreignTinNotRequired) { + this.foreignTinNotRequired = foreignTinNotRequired; + return this; + } + + /** + * Indicates whether a foreign TIN is not required. + * @return foreignTinNotRequired + */ + @javax.annotation.Nullable + public Boolean getForeignTinNotRequired() { + return foreignTinNotRequired; + } + + public void setForeignTinNotRequired(Boolean foreignTinNotRequired) { + this.foreignTinNotRequired = foreignTinNotRequired; + } + + + public W8BenEFormRequest foreignTin(String foreignTin) { + this.foreignTin = foreignTin; + return this; + } + + /** + * The foreign taxpayer identification number (TIN). + * @return foreignTin + */ + @javax.annotation.Nullable + public String getForeignTin() { + return foreignTin; + } + + public void setForeignTin(String foreignTin) { + this.foreignTin = foreignTin; + } + + + public W8BenEFormRequest referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * A reference number for the form. + * @return referenceNumber + */ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public W8BenEFormRequest disregardedEntityFatcaStatus(String disregardedEntityFatcaStatus) { + this.disregardedEntityFatcaStatus = disregardedEntityFatcaStatus; + return this; + } + + /** + * The FATCA status of disregarded entity or branch receiving payment. + * @return disregardedEntityFatcaStatus + */ + @javax.annotation.Nullable + public String getDisregardedEntityFatcaStatus() { + return disregardedEntityFatcaStatus; + } + + public void setDisregardedEntityFatcaStatus(String disregardedEntityFatcaStatus) { + this.disregardedEntityFatcaStatus = disregardedEntityFatcaStatus; + } + + + public W8BenEFormRequest disregardedAddress(String disregardedAddress) { + this.disregardedAddress = disregardedAddress; + return this; + } + + /** + * The address for disregarded entities. + * @return disregardedAddress + */ + @javax.annotation.Nullable + public String getDisregardedAddress() { + return disregardedAddress; + } + + public void setDisregardedAddress(String disregardedAddress) { + this.disregardedAddress = disregardedAddress; + } + + + public W8BenEFormRequest disregardedCity(String disregardedCity) { + this.disregardedCity = disregardedCity; + return this; + } + + /** + * The city for disregarded entities. + * @return disregardedCity + */ + @javax.annotation.Nullable + public String getDisregardedCity() { + return disregardedCity; + } + + public void setDisregardedCity(String disregardedCity) { + this.disregardedCity = disregardedCity; + } + + + public W8BenEFormRequest disregardedState(String disregardedState) { + this.disregardedState = disregardedState; + return this; + } + + /** + * The state for disregarded entities. + * @return disregardedState + */ + @javax.annotation.Nullable + public String getDisregardedState() { + return disregardedState; + } + + public void setDisregardedState(String disregardedState) { + this.disregardedState = disregardedState; + } + + + public W8BenEFormRequest disregardedZip(String disregardedZip) { + this.disregardedZip = disregardedZip; + return this; + } + + /** + * The ZIP code for disregarded entities. + * @return disregardedZip + */ + @javax.annotation.Nullable + public String getDisregardedZip() { + return disregardedZip; + } + + public void setDisregardedZip(String disregardedZip) { + this.disregardedZip = disregardedZip; + } + + + public W8BenEFormRequest disregardedCountry(String disregardedCountry) { + this.disregardedCountry = disregardedCountry; + return this; + } + + /** + * The country for disregarded entities. + * @return disregardedCountry + */ + @javax.annotation.Nullable + public String getDisregardedCountry() { + return disregardedCountry; + } + + public void setDisregardedCountry(String disregardedCountry) { + this.disregardedCountry = disregardedCountry; + } + + + public W8BenEFormRequest disregardedEntityGiin(String disregardedEntityGiin) { + this.disregardedEntityGiin = disregardedEntityGiin; + return this; + } + + /** + * The GIIN for disregarded entities. + * @return disregardedEntityGiin + */ + @javax.annotation.Nullable + public String getDisregardedEntityGiin() { + return disregardedEntityGiin; + } + + public void setDisregardedEntityGiin(String disregardedEntityGiin) { + this.disregardedEntityGiin = disregardedEntityGiin; + } + + + public W8BenEFormRequest treatyCountryCertification(Boolean treatyCountryCertification) { + this.treatyCountryCertification = treatyCountryCertification; + return this; + } + + /** + * Certifies the beneficial owner's country under the U.S. tax treaty. + * @return treatyCountryCertification + */ + @javax.annotation.Nullable + public Boolean getTreatyCountryCertification() { + return treatyCountryCertification; + } + + public void setTreatyCountryCertification(Boolean treatyCountryCertification) { + this.treatyCountryCertification = treatyCountryCertification; + } + + + public W8BenEFormRequest treatyCountry(String treatyCountry) { + this.treatyCountry = treatyCountry; + return this; + } + + /** + * The treaty country of the beneficial owner. + * @return treatyCountry + */ + @javax.annotation.Nullable + public String getTreatyCountry() { + return treatyCountry; + } + + public void setTreatyCountry(String treatyCountry) { + this.treatyCountry = treatyCountry; + } + + + public W8BenEFormRequest benefitLimitationCertification(Boolean benefitLimitationCertification) { + this.benefitLimitationCertification = benefitLimitationCertification; + return this; + } + + /** + * Certifies that the beneficial owner is eligible for treaty benefits and meets any limitation on benefits requirements. + * @return benefitLimitationCertification + */ + @javax.annotation.Nullable + public Boolean getBenefitLimitationCertification() { + return benefitLimitationCertification; + } + + public void setBenefitLimitationCertification(Boolean benefitLimitationCertification) { + this.benefitLimitationCertification = benefitLimitationCertification; + } + + + public W8BenEFormRequest benefitLimitation(String benefitLimitation) { + this.benefitLimitation = benefitLimitation; + return this; + } + + /** + * The benefit limitation for tax treaty claims. + * @return benefitLimitation + */ + @javax.annotation.Nullable + public String getBenefitLimitation() { + return benefitLimitation; + } + + public void setBenefitLimitation(String benefitLimitation) { + this.benefitLimitation = benefitLimitation; + } + + + public W8BenEFormRequest qualifiedResidentStatusCertification(Boolean qualifiedResidentStatusCertification) { + this.qualifiedResidentStatusCertification = qualifiedResidentStatusCertification; + return this; + } + + /** + * Certifies that the beneficial owner claims treaty benefits and meets the qualified resident status for specific U.S. source income. + * @return qualifiedResidentStatusCertification + */ + @javax.annotation.Nullable + public Boolean getQualifiedResidentStatusCertification() { + return qualifiedResidentStatusCertification; + } + + public void setQualifiedResidentStatusCertification(Boolean qualifiedResidentStatusCertification) { + this.qualifiedResidentStatusCertification = qualifiedResidentStatusCertification; + } + + + public W8BenEFormRequest treatyArticle(String treatyArticle) { + this.treatyArticle = treatyArticle; + return this; + } + + /** + * Indicates the specific article and paragraph of the tax treaty under which the beneficial owner is claiming benefits. + * @return treatyArticle + */ + @javax.annotation.Nullable + public String getTreatyArticle() { + return treatyArticle; + } + + public void setTreatyArticle(String treatyArticle) { + this.treatyArticle = treatyArticle; + } + + + public W8BenEFormRequest withholdingRate(String withholdingRate) { + this.withholdingRate = withholdingRate; + return this; + } + + /** + * Specifies the reduced withholding rate claimed under the applicable tax treaty. + * @return withholdingRate + */ + @javax.annotation.Nullable + public String getWithholdingRate() { + return withholdingRate; + } + + public void setWithholdingRate(String withholdingRate) { + this.withholdingRate = withholdingRate; + } + + + public W8BenEFormRequest incomeType(String incomeType) { + this.incomeType = incomeType; + return this; + } + + /** + * Specifies the type of income for which the reduced treaty withholding rate is being claimed. + * @return incomeType + */ + @javax.annotation.Nullable + public String getIncomeType() { + return incomeType; + } + + public void setIncomeType(String incomeType) { + this.incomeType = incomeType; + } + + + public W8BenEFormRequest treatyReasons(String treatyReasons) { + this.treatyReasons = treatyReasons; + return this; + } + + /** + * The additional conditions in the article the beneficial owner meets to be eligible for the rate of withholding. + * @return treatyReasons + */ + @javax.annotation.Nullable + public String getTreatyReasons() { + return treatyReasons; + } + + public void setTreatyReasons(String treatyReasons) { + this.treatyReasons = treatyReasons; + } + + + public W8BenEFormRequest ffiSponsoringEntity(String ffiSponsoringEntity) { + this.ffiSponsoringEntity = ffiSponsoringEntity; + return this; + } + + /** + * The name of the entity that sponsors the foreign financial institution (FFI). + * @return ffiSponsoringEntity + */ + @javax.annotation.Nullable + public String getFfiSponsoringEntity() { + return ffiSponsoringEntity; + } + + public void setFfiSponsoringEntity(String ffiSponsoringEntity) { + this.ffiSponsoringEntity = ffiSponsoringEntity; + } + + + public W8BenEFormRequest investmentEntityCertification(Boolean investmentEntityCertification) { + this.investmentEntityCertification = investmentEntityCertification; + return this; + } + + /** + * Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. + * @return investmentEntityCertification + */ + @javax.annotation.Nullable + public Boolean getInvestmentEntityCertification() { + return investmentEntityCertification; + } + + public void setInvestmentEntityCertification(Boolean investmentEntityCertification) { + this.investmentEntityCertification = investmentEntityCertification; + } + + + public W8BenEFormRequest controlledForeignCorporationCertification(Boolean controlledForeignCorporationCertification) { + this.controlledForeignCorporationCertification = controlledForeignCorporationCertification; + return this; + } + + /** + * Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. + * @return controlledForeignCorporationCertification + */ + @javax.annotation.Nullable + public Boolean getControlledForeignCorporationCertification() { + return controlledForeignCorporationCertification; + } + + public void setControlledForeignCorporationCertification(Boolean controlledForeignCorporationCertification) { + this.controlledForeignCorporationCertification = controlledForeignCorporationCertification; + } + + + public W8BenEFormRequest compliantNonregisteringLocalBankCertification(Boolean compliantNonregisteringLocalBankCertification) { + this.compliantNonregisteringLocalBankCertification = compliantNonregisteringLocalBankCertification; + return this; + } + + /** + * Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. + * @return compliantNonregisteringLocalBankCertification + */ + @javax.annotation.Nullable + public Boolean getCompliantNonregisteringLocalBankCertification() { + return compliantNonregisteringLocalBankCertification; + } + + public void setCompliantNonregisteringLocalBankCertification(Boolean compliantNonregisteringLocalBankCertification) { + this.compliantNonregisteringLocalBankCertification = compliantNonregisteringLocalBankCertification; + } + + + public W8BenEFormRequest compliantFfiLowValueAccountsCertification(Boolean compliantFfiLowValueAccountsCertification) { + this.compliantFfiLowValueAccountsCertification = compliantFfiLowValueAccountsCertification; + return this; + } + + /** + * Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. + * @return compliantFfiLowValueAccountsCertification + */ + @javax.annotation.Nullable + public Boolean getCompliantFfiLowValueAccountsCertification() { + return compliantFfiLowValueAccountsCertification; + } + + public void setCompliantFfiLowValueAccountsCertification(Boolean compliantFfiLowValueAccountsCertification) { + this.compliantFfiLowValueAccountsCertification = compliantFfiLowValueAccountsCertification; + } + + + public W8BenEFormRequest sponsoredCloselyHeldEntitySponsoringEntity(String sponsoredCloselyHeldEntitySponsoringEntity) { + this.sponsoredCloselyHeldEntitySponsoringEntity = sponsoredCloselyHeldEntitySponsoringEntity; + return this; + } + + /** + * The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. + * @return sponsoredCloselyHeldEntitySponsoringEntity + */ + @javax.annotation.Nullable + public String getSponsoredCloselyHeldEntitySponsoringEntity() { + return sponsoredCloselyHeldEntitySponsoringEntity; + } + + public void setSponsoredCloselyHeldEntitySponsoringEntity(String sponsoredCloselyHeldEntitySponsoringEntity) { + this.sponsoredCloselyHeldEntitySponsoringEntity = sponsoredCloselyHeldEntitySponsoringEntity; + } + + + public W8BenEFormRequest sponsoredCloselyHeldInvestmentVehicleCertification(Boolean sponsoredCloselyHeldInvestmentVehicleCertification) { + this.sponsoredCloselyHeldInvestmentVehicleCertification = sponsoredCloselyHeldInvestmentVehicleCertification; + return this; + } + + /** + * Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. + * @return sponsoredCloselyHeldInvestmentVehicleCertification + */ + @javax.annotation.Nullable + public Boolean getSponsoredCloselyHeldInvestmentVehicleCertification() { + return sponsoredCloselyHeldInvestmentVehicleCertification; + } + + public void setSponsoredCloselyHeldInvestmentVehicleCertification(Boolean sponsoredCloselyHeldInvestmentVehicleCertification) { + this.sponsoredCloselyHeldInvestmentVehicleCertification = sponsoredCloselyHeldInvestmentVehicleCertification; + } + + + public W8BenEFormRequest compliantLimitedLifeDebtEntityCertification(Boolean compliantLimitedLifeDebtEntityCertification) { + this.compliantLimitedLifeDebtEntityCertification = compliantLimitedLifeDebtEntityCertification; + return this; + } + + /** + * Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. + * @return compliantLimitedLifeDebtEntityCertification + */ + @javax.annotation.Nullable + public Boolean getCompliantLimitedLifeDebtEntityCertification() { + return compliantLimitedLifeDebtEntityCertification; + } + + public void setCompliantLimitedLifeDebtEntityCertification(Boolean compliantLimitedLifeDebtEntityCertification) { + this.compliantLimitedLifeDebtEntityCertification = compliantLimitedLifeDebtEntityCertification; + } + + + public W8BenEFormRequest investmentEntityNoFinancialAccountsCertification(Boolean investmentEntityNoFinancialAccountsCertification) { + this.investmentEntityNoFinancialAccountsCertification = investmentEntityNoFinancialAccountsCertification; + return this; + } + + /** + * Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. + * @return investmentEntityNoFinancialAccountsCertification + */ + @javax.annotation.Nullable + public Boolean getInvestmentEntityNoFinancialAccountsCertification() { + return investmentEntityNoFinancialAccountsCertification; + } + + public void setInvestmentEntityNoFinancialAccountsCertification(Boolean investmentEntityNoFinancialAccountsCertification) { + this.investmentEntityNoFinancialAccountsCertification = investmentEntityNoFinancialAccountsCertification; + } + + + public W8BenEFormRequest ownerDocumentedFfiCertification(Boolean ownerDocumentedFfiCertification) { + this.ownerDocumentedFfiCertification = ownerDocumentedFfiCertification; + return this; + } + + /** + * Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. + * @return ownerDocumentedFfiCertification + */ + @javax.annotation.Nullable + public Boolean getOwnerDocumentedFfiCertification() { + return ownerDocumentedFfiCertification; + } + + public void setOwnerDocumentedFfiCertification(Boolean ownerDocumentedFfiCertification) { + this.ownerDocumentedFfiCertification = ownerDocumentedFfiCertification; + } + + + public W8BenEFormRequest ownerDocumentedFfiReportingStatementCertification(Boolean ownerDocumentedFfiReportingStatementCertification) { + this.ownerDocumentedFfiReportingStatementCertification = ownerDocumentedFfiReportingStatementCertification; + return this; + } + + /** + * Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. + * @return ownerDocumentedFfiReportingStatementCertification + */ + @javax.annotation.Nullable + public Boolean getOwnerDocumentedFfiReportingStatementCertification() { + return ownerDocumentedFfiReportingStatementCertification; + } + + public void setOwnerDocumentedFfiReportingStatementCertification(Boolean ownerDocumentedFfiReportingStatementCertification) { + this.ownerDocumentedFfiReportingStatementCertification = ownerDocumentedFfiReportingStatementCertification; + } + + + public W8BenEFormRequest ownerDocumentedFfiAuditorLetterCertification(Boolean ownerDocumentedFfiAuditorLetterCertification) { + this.ownerDocumentedFfiAuditorLetterCertification = ownerDocumentedFfiAuditorLetterCertification; + return this; + } + + /** + * Certifies that the FFI will provide an auditor’s letter and required owner reporting documentation to confirm its status as an owner-documented FFI. + * @return ownerDocumentedFfiAuditorLetterCertification + */ + @javax.annotation.Nullable + public Boolean getOwnerDocumentedFfiAuditorLetterCertification() { + return ownerDocumentedFfiAuditorLetterCertification; + } + + public void setOwnerDocumentedFfiAuditorLetterCertification(Boolean ownerDocumentedFfiAuditorLetterCertification) { + this.ownerDocumentedFfiAuditorLetterCertification = ownerDocumentedFfiAuditorLetterCertification; + } + + + public W8BenEFormRequest ownerDocumentedFfiTrustBeneficiariesCertification(Boolean ownerDocumentedFfiTrustBeneficiariesCertification) { + this.ownerDocumentedFfiTrustBeneficiariesCertification = ownerDocumentedFfiTrustBeneficiariesCertification; + return this; + } + + /** + * Certifies that the trust has no contingent or unidentified beneficiaries or designated classes of beneficiaries. + * @return ownerDocumentedFfiTrustBeneficiariesCertification + */ + @javax.annotation.Nullable + public Boolean getOwnerDocumentedFfiTrustBeneficiariesCertification() { + return ownerDocumentedFfiTrustBeneficiariesCertification; + } + + public void setOwnerDocumentedFfiTrustBeneficiariesCertification(Boolean ownerDocumentedFfiTrustBeneficiariesCertification) { + this.ownerDocumentedFfiTrustBeneficiariesCertification = ownerDocumentedFfiTrustBeneficiariesCertification; + } + + + public W8BenEFormRequest restrictedDistributorCertification(Boolean restrictedDistributorCertification) { + this.restrictedDistributorCertification = restrictedDistributorCertification; + return this; + } + + /** + * Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. + * @return restrictedDistributorCertification + */ + @javax.annotation.Nullable + public Boolean getRestrictedDistributorCertification() { + return restrictedDistributorCertification; + } + + public void setRestrictedDistributorCertification(Boolean restrictedDistributorCertification) { + this.restrictedDistributorCertification = restrictedDistributorCertification; + } + + + public W8BenEFormRequest restrictedDistributorAgreementCertification(Boolean restrictedDistributorAgreementCertification) { + this.restrictedDistributorAgreementCertification = restrictedDistributorAgreementCertification; + return this; + } + + /** + * Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. + * @return restrictedDistributorAgreementCertification + */ + @javax.annotation.Nullable + public Boolean getRestrictedDistributorAgreementCertification() { + return restrictedDistributorAgreementCertification; + } + + public void setRestrictedDistributorAgreementCertification(Boolean restrictedDistributorAgreementCertification) { + this.restrictedDistributorAgreementCertification = restrictedDistributorAgreementCertification; + } + + + public W8BenEFormRequest restrictedDistributorPreexistingSalesComplianceCertification(Boolean restrictedDistributorPreexistingSalesComplianceCertification) { + this.restrictedDistributorPreexistingSalesComplianceCertification = restrictedDistributorPreexistingSalesComplianceCertification; + return this; + } + + /** + * Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. + * @return restrictedDistributorPreexistingSalesComplianceCertification + */ + @javax.annotation.Nullable + public Boolean getRestrictedDistributorPreexistingSalesComplianceCertification() { + return restrictedDistributorPreexistingSalesComplianceCertification; + } + + public void setRestrictedDistributorPreexistingSalesComplianceCertification(Boolean restrictedDistributorPreexistingSalesComplianceCertification) { + this.restrictedDistributorPreexistingSalesComplianceCertification = restrictedDistributorPreexistingSalesComplianceCertification; + } + + + public W8BenEFormRequest nonreportingIgaFfiCertification(Boolean nonreportingIgaFfiCertification) { + this.nonreportingIgaFfiCertification = nonreportingIgaFfiCertification; + return this; + } + + /** + * Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. + * @return nonreportingIgaFfiCertification + */ + @javax.annotation.Nullable + public Boolean getNonreportingIgaFfiCertification() { + return nonreportingIgaFfiCertification; + } + + public void setNonreportingIgaFfiCertification(Boolean nonreportingIgaFfiCertification) { + this.nonreportingIgaFfiCertification = nonreportingIgaFfiCertification; + } + + + public W8BenEFormRequest igaCountry(String igaCountry) { + this.igaCountry = igaCountry; + return this; + } + + /** + * The country for the applicable IGA with the United States. + * @return igaCountry + */ + @javax.annotation.Nullable + public String getIgaCountry() { + return igaCountry; + } + + public void setIgaCountry(String igaCountry) { + this.igaCountry = igaCountry; + } + + + public W8BenEFormRequest igaModel(String igaModel) { + this.igaModel = igaModel; + return this; + } + + /** + * The applicable IGA model. + * @return igaModel + */ + @javax.annotation.Nullable + public String getIgaModel() { + return igaModel; + } + + public void setIgaModel(String igaModel) { + this.igaModel = igaModel; + } + + + public W8BenEFormRequest igaLegalStatusTreatment(String igaLegalStatusTreatment) { + this.igaLegalStatusTreatment = igaLegalStatusTreatment; + return this; + } + + /** + * Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. + * @return igaLegalStatusTreatment + */ + @javax.annotation.Nullable + public String getIgaLegalStatusTreatment() { + return igaLegalStatusTreatment; + } + + public void setIgaLegalStatusTreatment(String igaLegalStatusTreatment) { + this.igaLegalStatusTreatment = igaLegalStatusTreatment; + } + + + public W8BenEFormRequest igaFfiTrusteeOrSponsor(String igaFfiTrusteeOrSponsor) { + this.igaFfiTrusteeOrSponsor = igaFfiTrusteeOrSponsor; + return this; + } + + /** + * The trustee or sponsor name for the nonreporting IGA FFI. + * @return igaFfiTrusteeOrSponsor + */ + @javax.annotation.Nullable + public String getIgaFfiTrusteeOrSponsor() { + return igaFfiTrusteeOrSponsor; + } + + public void setIgaFfiTrusteeOrSponsor(String igaFfiTrusteeOrSponsor) { + this.igaFfiTrusteeOrSponsor = igaFfiTrusteeOrSponsor; + } + + + public W8BenEFormRequest igaFfiTrusteeIsForeign(Boolean igaFfiTrusteeIsForeign) { + this.igaFfiTrusteeIsForeign = igaFfiTrusteeIsForeign; + return this; + } + + /** + * Indicates whether the trustee for the nonreporting IGA FFI is foreign. + * @return igaFfiTrusteeIsForeign + */ + @javax.annotation.Nullable + public Boolean getIgaFfiTrusteeIsForeign() { + return igaFfiTrusteeIsForeign; + } + + public void setIgaFfiTrusteeIsForeign(Boolean igaFfiTrusteeIsForeign) { + this.igaFfiTrusteeIsForeign = igaFfiTrusteeIsForeign; + } + + + public W8BenEFormRequest nonCommercialFinancialActivityCertification(Boolean nonCommercialFinancialActivityCertification) { + this.nonCommercialFinancialActivityCertification = nonCommercialFinancialActivityCertification; + return this; + } + + /** + * Certifies that the entity is the beneficial owner and is not engaged in commercial financial activities related to the specified payments, accounts or obligations for which this form is submitted. + * @return nonCommercialFinancialActivityCertification + */ + @javax.annotation.Nullable + public Boolean getNonCommercialFinancialActivityCertification() { + return nonCommercialFinancialActivityCertification; + } + + public void setNonCommercialFinancialActivityCertification(Boolean nonCommercialFinancialActivityCertification) { + this.nonCommercialFinancialActivityCertification = nonCommercialFinancialActivityCertification; + } + + + public W8BenEFormRequest internationOrganizationCertification(Boolean internationOrganizationCertification) { + this.internationOrganizationCertification = internationOrganizationCertification; + return this; + } + + /** + * Certifies that the entity is an international organization described in section 7701(a)(18). + * @return internationOrganizationCertification + */ + @javax.annotation.Nullable + public Boolean getInternationOrganizationCertification() { + return internationOrganizationCertification; + } + + public void setInternationOrganizationCertification(Boolean internationOrganizationCertification) { + this.internationOrganizationCertification = internationOrganizationCertification; + } + + + public W8BenEFormRequest intergovernmentalOrganizationCertification(Boolean intergovernmentalOrganizationCertification) { + this.intergovernmentalOrganizationCertification = intergovernmentalOrganizationCertification; + return this; + } + + /** + * Certifies that the entity is an intergovernmental or supranational organization primarily comprised of foreign governments, is the beneficial owner, and is not engaged in commercial financial activities. + * @return intergovernmentalOrganizationCertification + */ + @javax.annotation.Nullable + public Boolean getIntergovernmentalOrganizationCertification() { + return intergovernmentalOrganizationCertification; + } + + public void setIntergovernmentalOrganizationCertification(Boolean intergovernmentalOrganizationCertification) { + this.intergovernmentalOrganizationCertification = intergovernmentalOrganizationCertification; + } + + + public W8BenEFormRequest treatyQualifiedPensionFundCertification(Boolean treatyQualifiedPensionFundCertification) { + this.treatyQualifiedPensionFundCertification = treatyQualifiedPensionFundCertification; + return this; + } + + /** + * Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. + * @return treatyQualifiedPensionFundCertification + */ + @javax.annotation.Nullable + public Boolean getTreatyQualifiedPensionFundCertification() { + return treatyQualifiedPensionFundCertification; + } + + public void setTreatyQualifiedPensionFundCertification(Boolean treatyQualifiedPensionFundCertification) { + this.treatyQualifiedPensionFundCertification = treatyQualifiedPensionFundCertification; + } + + + public W8BenEFormRequest qualifiedRetirementFundCertification(Boolean qualifiedRetirementFundCertification) { + this.qualifiedRetirementFundCertification = qualifiedRetirementFundCertification; + return this; + } + + /** + * Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. + * @return qualifiedRetirementFundCertification + */ + @javax.annotation.Nullable + public Boolean getQualifiedRetirementFundCertification() { + return qualifiedRetirementFundCertification; + } + + public void setQualifiedRetirementFundCertification(Boolean qualifiedRetirementFundCertification) { + this.qualifiedRetirementFundCertification = qualifiedRetirementFundCertification; + } + + + public W8BenEFormRequest narrowParticipationRetirementFundCertification(Boolean narrowParticipationRetirementFundCertification) { + this.narrowParticipationRetirementFundCertification = narrowParticipationRetirementFundCertification; + return this; + } + + /** + * Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. + * @return narrowParticipationRetirementFundCertification + */ + @javax.annotation.Nullable + public Boolean getNarrowParticipationRetirementFundCertification() { + return narrowParticipationRetirementFundCertification; + } + + public void setNarrowParticipationRetirementFundCertification(Boolean narrowParticipationRetirementFundCertification) { + this.narrowParticipationRetirementFundCertification = narrowParticipationRetirementFundCertification; + } + + + public W8BenEFormRequest section401AEquivalentPensionPlanCertification(Boolean section401AEquivalentPensionPlanCertification) { + this.section401AEquivalentPensionPlanCertification = section401AEquivalentPensionPlanCertification; + return this; + } + + /** + * Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. + * @return section401AEquivalentPensionPlanCertification + */ + @javax.annotation.Nullable + public Boolean getSection401AEquivalentPensionPlanCertification() { + return section401AEquivalentPensionPlanCertification; + } + + public void setSection401AEquivalentPensionPlanCertification(Boolean section401AEquivalentPensionPlanCertification) { + this.section401AEquivalentPensionPlanCertification = section401AEquivalentPensionPlanCertification; + } + + + public W8BenEFormRequest investmentEntityForRetirementFundsCertification(Boolean investmentEntityForRetirementFundsCertification) { + this.investmentEntityForRetirementFundsCertification = investmentEntityForRetirementFundsCertification; + return this; + } + + /** + * Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. + * @return investmentEntityForRetirementFundsCertification + */ + @javax.annotation.Nullable + public Boolean getInvestmentEntityForRetirementFundsCertification() { + return investmentEntityForRetirementFundsCertification; + } + + public void setInvestmentEntityForRetirementFundsCertification(Boolean investmentEntityForRetirementFundsCertification) { + this.investmentEntityForRetirementFundsCertification = investmentEntityForRetirementFundsCertification; + } + + + public W8BenEFormRequest exemptBeneficialOwnerSponsoredRetirementFundCertification(Boolean exemptBeneficialOwnerSponsoredRetirementFundCertification) { + this.exemptBeneficialOwnerSponsoredRetirementFundCertification = exemptBeneficialOwnerSponsoredRetirementFundCertification; + return this; + } + + /** + * Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. + * @return exemptBeneficialOwnerSponsoredRetirementFundCertification + */ + @javax.annotation.Nullable + public Boolean getExemptBeneficialOwnerSponsoredRetirementFundCertification() { + return exemptBeneficialOwnerSponsoredRetirementFundCertification; + } + + public void setExemptBeneficialOwnerSponsoredRetirementFundCertification(Boolean exemptBeneficialOwnerSponsoredRetirementFundCertification) { + this.exemptBeneficialOwnerSponsoredRetirementFundCertification = exemptBeneficialOwnerSponsoredRetirementFundCertification; + } + + + public W8BenEFormRequest exemptBeneficialOwnerOwnedInvestmentEntityCertification(Boolean exemptBeneficialOwnerOwnedInvestmentEntityCertification) { + this.exemptBeneficialOwnerOwnedInvestmentEntityCertification = exemptBeneficialOwnerOwnedInvestmentEntityCertification; + return this; + } + + /** + * Certifies that the entity is an investment entity wholly owned by exempt beneficial owners and has provided complete ownership and documentation details as required under FATCA regulations. + * @return exemptBeneficialOwnerOwnedInvestmentEntityCertification + */ + @javax.annotation.Nullable + public Boolean getExemptBeneficialOwnerOwnedInvestmentEntityCertification() { + return exemptBeneficialOwnerOwnedInvestmentEntityCertification; + } + + public void setExemptBeneficialOwnerOwnedInvestmentEntityCertification(Boolean exemptBeneficialOwnerOwnedInvestmentEntityCertification) { + this.exemptBeneficialOwnerOwnedInvestmentEntityCertification = exemptBeneficialOwnerOwnedInvestmentEntityCertification; + } + + + public W8BenEFormRequest territoryFinancialInstitutionCertification(Boolean territoryFinancialInstitutionCertification) { + this.territoryFinancialInstitutionCertification = territoryFinancialInstitutionCertification; + return this; + } + + /** + * Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. + * @return territoryFinancialInstitutionCertification + */ + @javax.annotation.Nullable + public Boolean getTerritoryFinancialInstitutionCertification() { + return territoryFinancialInstitutionCertification; + } + + public void setTerritoryFinancialInstitutionCertification(Boolean territoryFinancialInstitutionCertification) { + this.territoryFinancialInstitutionCertification = territoryFinancialInstitutionCertification; + } + + + public W8BenEFormRequest exceptedNonfinancialGroupEntityCertification(Boolean exceptedNonfinancialGroupEntityCertification) { + this.exceptedNonfinancialGroupEntityCertification = exceptedNonfinancialGroupEntityCertification; + return this; + } + + /** + * Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. + * @return exceptedNonfinancialGroupEntityCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedNonfinancialGroupEntityCertification() { + return exceptedNonfinancialGroupEntityCertification; + } + + public void setExceptedNonfinancialGroupEntityCertification(Boolean exceptedNonfinancialGroupEntityCertification) { + this.exceptedNonfinancialGroupEntityCertification = exceptedNonfinancialGroupEntityCertification; + } + + + public W8BenEFormRequest exceptedNonfinancialStartUpCertification(Boolean exceptedNonfinancialStartUpCertification) { + this.exceptedNonfinancialStartUpCertification = exceptedNonfinancialStartUpCertification; + return this; + } + + /** + * Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. + * @return exceptedNonfinancialStartUpCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedNonfinancialStartUpCertification() { + return exceptedNonfinancialStartUpCertification; + } + + public void setExceptedNonfinancialStartUpCertification(Boolean exceptedNonfinancialStartUpCertification) { + this.exceptedNonfinancialStartUpCertification = exceptedNonfinancialStartUpCertification; + } + + + public W8BenEFormRequest startupFormationOrResolutionDate(LocalDate startupFormationOrResolutionDate) { + this.startupFormationOrResolutionDate = startupFormationOrResolutionDate; + return this; + } + + /** + * The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). + * @return startupFormationOrResolutionDate + */ + @javax.annotation.Nullable + public LocalDate getStartupFormationOrResolutionDate() { + return startupFormationOrResolutionDate; + } + + public void setStartupFormationOrResolutionDate(LocalDate startupFormationOrResolutionDate) { + this.startupFormationOrResolutionDate = startupFormationOrResolutionDate; + } + + + public W8BenEFormRequest exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification(Boolean exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification) { + this.exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification = exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification; + return this; + } + + /** + * Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. + * @return exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification() { + return exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification; + } + + public void setExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification(Boolean exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification) { + this.exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification = exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification; + } + + + public W8BenEFormRequest nonfinancialEntityFilingDate(LocalDate nonfinancialEntityFilingDate) { + this.nonfinancialEntityFilingDate = nonfinancialEntityFilingDate; + return this; + } + + /** + * The filed date for a plan of reorganization, liquidation or bankruptcy. + * @return nonfinancialEntityFilingDate + */ + @javax.annotation.Nullable + public LocalDate getNonfinancialEntityFilingDate() { + return nonfinancialEntityFilingDate; + } + + public void setNonfinancialEntityFilingDate(LocalDate nonfinancialEntityFilingDate) { + this.nonfinancialEntityFilingDate = nonfinancialEntityFilingDate; + } + + + public W8BenEFormRequest section501COrganizationCertification(Boolean section501COrganizationCertification) { + this.section501COrganizationCertification = section501COrganizationCertification; + return this; + } + + /** + * Certifies that the entity is a section 501(c) organization based on a valid IRS determination letter or a legal opinion from U.S. counsel. + * @return section501COrganizationCertification + */ + @javax.annotation.Nullable + public Boolean getSection501COrganizationCertification() { + return section501COrganizationCertification; + } + + public void setSection501COrganizationCertification(Boolean section501COrganizationCertification) { + this.section501COrganizationCertification = section501COrganizationCertification; + } + + + public W8BenEFormRequest determinationLetterDate(LocalDate determinationLetterDate) { + this.determinationLetterDate = determinationLetterDate; + return this; + } + + /** + * The date of the IRS determination letter confirming the entity’s section 501(c) status. + * @return determinationLetterDate + */ + @javax.annotation.Nullable + public LocalDate getDeterminationLetterDate() { + return determinationLetterDate; + } + + public void setDeterminationLetterDate(LocalDate determinationLetterDate) { + this.determinationLetterDate = determinationLetterDate; + } + + + public W8BenEFormRequest nonprofitOrganizationCertification(Boolean nonprofitOrganizationCertification) { + this.nonprofitOrganizationCertification = nonprofitOrganizationCertification; + return this; + } + + /** + * Certifies that the entity is a nonprofit organization established for charitable or similar purposes, exempt from income tax, and restricted in the use and distribution of its assets under applicable law. + * @return nonprofitOrganizationCertification + */ + @javax.annotation.Nullable + public Boolean getNonprofitOrganizationCertification() { + return nonprofitOrganizationCertification; + } + + public void setNonprofitOrganizationCertification(Boolean nonprofitOrganizationCertification) { + this.nonprofitOrganizationCertification = nonprofitOrganizationCertification; + } + + + public W8BenEFormRequest publiclyTradedNffeCertification(Boolean publiclyTradedNffeCertification) { + this.publiclyTradedNffeCertification = publiclyTradedNffeCertification; + return this; + } + + /** + * Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. + * @return publiclyTradedNffeCertification + */ + @javax.annotation.Nullable + public Boolean getPubliclyTradedNffeCertification() { + return publiclyTradedNffeCertification; + } + + public void setPubliclyTradedNffeCertification(Boolean publiclyTradedNffeCertification) { + this.publiclyTradedNffeCertification = publiclyTradedNffeCertification; + } + + + public W8BenEFormRequest publiclyTradedNffeSecuritiesMarket(String publiclyTradedNffeSecuritiesMarket) { + this.publiclyTradedNffeSecuritiesMarket = publiclyTradedNffeSecuritiesMarket; + return this; + } + + /** + * The name of the securities market where the corporation's stock is regularly traded. + * @return publiclyTradedNffeSecuritiesMarket + */ + @javax.annotation.Nullable + public String getPubliclyTradedNffeSecuritiesMarket() { + return publiclyTradedNffeSecuritiesMarket; + } + + public void setPubliclyTradedNffeSecuritiesMarket(String publiclyTradedNffeSecuritiesMarket) { + this.publiclyTradedNffeSecuritiesMarket = publiclyTradedNffeSecuritiesMarket; + } + + + public W8BenEFormRequest nffeAffiliateOfPubliclyTradedEntityCertification(Boolean nffeAffiliateOfPubliclyTradedEntityCertification) { + this.nffeAffiliateOfPubliclyTradedEntityCertification = nffeAffiliateOfPubliclyTradedEntityCertification; + return this; + } + + /** + * Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. + * @return nffeAffiliateOfPubliclyTradedEntityCertification + */ + @javax.annotation.Nullable + public Boolean getNffeAffiliateOfPubliclyTradedEntityCertification() { + return nffeAffiliateOfPubliclyTradedEntityCertification; + } + + public void setNffeAffiliateOfPubliclyTradedEntityCertification(Boolean nffeAffiliateOfPubliclyTradedEntityCertification) { + this.nffeAffiliateOfPubliclyTradedEntityCertification = nffeAffiliateOfPubliclyTradedEntityCertification; + } + + + public W8BenEFormRequest publiclyTradedEntity(String publiclyTradedEntity) { + this.publiclyTradedEntity = publiclyTradedEntity; + return this; + } + + /** + * The name of the affiliated entity whose stock is regularly traded on an established securities market. + * @return publiclyTradedEntity + */ + @javax.annotation.Nullable + public String getPubliclyTradedEntity() { + return publiclyTradedEntity; + } + + public void setPubliclyTradedEntity(String publiclyTradedEntity) { + this.publiclyTradedEntity = publiclyTradedEntity; + } + + + public W8BenEFormRequest nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket(String nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket) { + this.nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket = nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket; + return this; + } + + /** + * The name of the established securities market where the affiliated entity's stock is traded. + * @return nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket + */ + @javax.annotation.Nullable + public String getNffeAffiliateOfPubliclyTradedEntitySecuritiesMarket() { + return nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket; + } + + public void setNffeAffiliateOfPubliclyTradedEntitySecuritiesMarket(String nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket) { + this.nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket = nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket; + } + + + public W8BenEFormRequest exceptedTerritoryNffeCertification(Boolean exceptedTerritoryNffeCertification) { + this.exceptedTerritoryNffeCertification = exceptedTerritoryNffeCertification; + return this; + } + + /** + * Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. + * @return exceptedTerritoryNffeCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedTerritoryNffeCertification() { + return exceptedTerritoryNffeCertification; + } + + public void setExceptedTerritoryNffeCertification(Boolean exceptedTerritoryNffeCertification) { + this.exceptedTerritoryNffeCertification = exceptedTerritoryNffeCertification; + } + + + public W8BenEFormRequest activeNffeCertification(Boolean activeNffeCertification) { + this.activeNffeCertification = activeNffeCertification; + return this; + } + + /** + * Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. + * @return activeNffeCertification + */ + @javax.annotation.Nullable + public Boolean getActiveNffeCertification() { + return activeNffeCertification; + } + + public void setActiveNffeCertification(Boolean activeNffeCertification) { + this.activeNffeCertification = activeNffeCertification; + } + + + public W8BenEFormRequest passiveNffeCertification(Boolean passiveNffeCertification) { + this.passiveNffeCertification = passiveNffeCertification; + return this; + } + + /** + * Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. + * @return passiveNffeCertification + */ + @javax.annotation.Nullable + public Boolean getPassiveNffeCertification() { + return passiveNffeCertification; + } + + public void setPassiveNffeCertification(Boolean passiveNffeCertification) { + this.passiveNffeCertification = passiveNffeCertification; + } + + + public W8BenEFormRequest passiveNffeNoSubstantialUsOwnersCertification(Boolean passiveNffeNoSubstantialUsOwnersCertification) { + this.passiveNffeNoSubstantialUsOwnersCertification = passiveNffeNoSubstantialUsOwnersCertification; + return this; + } + + /** + * Certifies that the passive NFFE has no substantial U.S. owners or controlling U.S. persons. + * @return passiveNffeNoSubstantialUsOwnersCertification + */ + @javax.annotation.Nullable + public Boolean getPassiveNffeNoSubstantialUsOwnersCertification() { + return passiveNffeNoSubstantialUsOwnersCertification; + } + + public void setPassiveNffeNoSubstantialUsOwnersCertification(Boolean passiveNffeNoSubstantialUsOwnersCertification) { + this.passiveNffeNoSubstantialUsOwnersCertification = passiveNffeNoSubstantialUsOwnersCertification; + } + + + public W8BenEFormRequest passiveNffeSubstantialUsOwnersProvidedCertification(Boolean passiveNffeSubstantialUsOwnersProvidedCertification) { + this.passiveNffeSubstantialUsOwnersProvidedCertification = passiveNffeSubstantialUsOwnersProvidedCertification; + return this; + } + + /** + * Certifies that the passive NFFE has provided the name, address, and TIN of each substantial U.S. owner or controlling U.S. person. + * @return passiveNffeSubstantialUsOwnersProvidedCertification + */ + @javax.annotation.Nullable + public Boolean getPassiveNffeSubstantialUsOwnersProvidedCertification() { + return passiveNffeSubstantialUsOwnersProvidedCertification; + } + + public void setPassiveNffeSubstantialUsOwnersProvidedCertification(Boolean passiveNffeSubstantialUsOwnersProvidedCertification) { + this.passiveNffeSubstantialUsOwnersProvidedCertification = passiveNffeSubstantialUsOwnersProvidedCertification; + } + + + public W8BenEFormRequest exceptedInterAffiliateFfiCertification(Boolean exceptedInterAffiliateFfiCertification) { + this.exceptedInterAffiliateFfiCertification = exceptedInterAffiliateFfiCertification; + return this; + } + + /** + * Certifies that the entity is an inter-affiliate FFI meeting all conditions for exemption, including limited account activity and payment interactions within its expanded affiliated group. + * @return exceptedInterAffiliateFfiCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedInterAffiliateFfiCertification() { + return exceptedInterAffiliateFfiCertification; + } + + public void setExceptedInterAffiliateFfiCertification(Boolean exceptedInterAffiliateFfiCertification) { + this.exceptedInterAffiliateFfiCertification = exceptedInterAffiliateFfiCertification; + } + + + public W8BenEFormRequest sponsoredDirectReportingNffeCertification(Boolean sponsoredDirectReportingNffeCertification) { + this.sponsoredDirectReportingNffeCertification = sponsoredDirectReportingNffeCertification; + return this; + } + + /** + * Certifies that the entity is a sponsored direct reporting NFFE. + * @return sponsoredDirectReportingNffeCertification + */ + @javax.annotation.Nullable + public Boolean getSponsoredDirectReportingNffeCertification() { + return sponsoredDirectReportingNffeCertification; + } + + public void setSponsoredDirectReportingNffeCertification(Boolean sponsoredDirectReportingNffeCertification) { + this.sponsoredDirectReportingNffeCertification = sponsoredDirectReportingNffeCertification; + } + + + public W8BenEFormRequest directReportingNffeSponsoringEntity(String directReportingNffeSponsoringEntity) { + this.directReportingNffeSponsoringEntity = directReportingNffeSponsoringEntity; + return this; + } + + /** + * The name of the entity that sponsors the direct reporting NFFE. + * @return directReportingNffeSponsoringEntity + */ + @javax.annotation.Nullable + public String getDirectReportingNffeSponsoringEntity() { + return directReportingNffeSponsoringEntity; + } + + public void setDirectReportingNffeSponsoringEntity(String directReportingNffeSponsoringEntity) { + this.directReportingNffeSponsoringEntity = directReportingNffeSponsoringEntity; + } + + + public W8BenEFormRequest substantialUsOwners(List substantialUsOwners) { + this.substantialUsOwners = substantialUsOwners; + return this; + } + + public W8BenEFormRequest addSubstantialUsOwnersItem(SubstantialUsOwnerRequest substantialUsOwnersItem) { + if (this.substantialUsOwners == null) { + this.substantialUsOwners = new ArrayList<>(); + } + this.substantialUsOwners.add(substantialUsOwnersItem); + return this; + } + + /** + * The list of substantial U.S. owners of passive NFFE. + * @return substantialUsOwners + */ + @javax.annotation.Nullable + public List getSubstantialUsOwners() { + return substantialUsOwners; + } + + public void setSubstantialUsOwners(List substantialUsOwners) { + this.substantialUsOwners = substantialUsOwners; + } + + + public W8BenEFormRequest signerName(String signerName) { + this.signerName = signerName; + return this; + } + + /** + * The name of the signer. + * @return signerName + */ + @javax.annotation.Nullable + public String getSignerName() { + return signerName; + } + + public void setSignerName(String signerName) { + this.signerName = signerName; + } + + + public W8BenEFormRequest capacityToSignCertification(Boolean capacityToSignCertification) { + this.capacityToSignCertification = capacityToSignCertification; + return this; + } + + /** + * Certifies signer has the capacity to sign for the beneficial owner. + * @return capacityToSignCertification + */ + @javax.annotation.Nullable + public Boolean getCapacityToSignCertification() { + return capacityToSignCertification; + } + + public void setCapacityToSignCertification(Boolean capacityToSignCertification) { + this.capacityToSignCertification = capacityToSignCertification; + } + + + public W8BenEFormRequest 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 W8BenEFormRequest 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 W8BenEFormRequest 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 W8BenEFormRequest 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 W8BenEFormRequest 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W8BenEFormRequest w8BenEFormRequest = (W8BenEFormRequest) o; + return Objects.equals(this.type, w8BenEFormRequest.type) && + Objects.equals(this.name, w8BenEFormRequest.name) && + Objects.equals(this.citizenshipCountry, w8BenEFormRequest.citizenshipCountry) && + Objects.equals(this.disregardedEntity, w8BenEFormRequest.disregardedEntity) && + Objects.equals(this.entityType, w8BenEFormRequest.entityType) && + Objects.equals(this.makingTreatyClaim, w8BenEFormRequest.makingTreatyClaim) && + Objects.equals(this.fatcaStatus, w8BenEFormRequest.fatcaStatus) && + Objects.equals(this.residenceAddress, w8BenEFormRequest.residenceAddress) && + Objects.equals(this.residenceCity, w8BenEFormRequest.residenceCity) && + Objects.equals(this.residenceState, w8BenEFormRequest.residenceState) && + Objects.equals(this.residenceZip, w8BenEFormRequest.residenceZip) && + Objects.equals(this.residenceCountry, w8BenEFormRequest.residenceCountry) && + Objects.equals(this.residenceIsMailing, w8BenEFormRequest.residenceIsMailing) && + Objects.equals(this.mailingAddress, w8BenEFormRequest.mailingAddress) && + Objects.equals(this.mailingCity, w8BenEFormRequest.mailingCity) && + Objects.equals(this.mailingState, w8BenEFormRequest.mailingState) && + Objects.equals(this.mailingZip, w8BenEFormRequest.mailingZip) && + Objects.equals(this.mailingCountry, w8BenEFormRequest.mailingCountry) && + Objects.equals(this.tin, w8BenEFormRequest.tin) && + Objects.equals(this.giin, w8BenEFormRequest.giin) && + Objects.equals(this.foreignTinNotRequired, w8BenEFormRequest.foreignTinNotRequired) && + Objects.equals(this.foreignTin, w8BenEFormRequest.foreignTin) && + Objects.equals(this.referenceNumber, w8BenEFormRequest.referenceNumber) && + Objects.equals(this.disregardedEntityFatcaStatus, w8BenEFormRequest.disregardedEntityFatcaStatus) && + Objects.equals(this.disregardedAddress, w8BenEFormRequest.disregardedAddress) && + Objects.equals(this.disregardedCity, w8BenEFormRequest.disregardedCity) && + Objects.equals(this.disregardedState, w8BenEFormRequest.disregardedState) && + Objects.equals(this.disregardedZip, w8BenEFormRequest.disregardedZip) && + Objects.equals(this.disregardedCountry, w8BenEFormRequest.disregardedCountry) && + Objects.equals(this.disregardedEntityGiin, w8BenEFormRequest.disregardedEntityGiin) && + Objects.equals(this.treatyCountryCertification, w8BenEFormRequest.treatyCountryCertification) && + Objects.equals(this.treatyCountry, w8BenEFormRequest.treatyCountry) && + Objects.equals(this.benefitLimitationCertification, w8BenEFormRequest.benefitLimitationCertification) && + Objects.equals(this.benefitLimitation, w8BenEFormRequest.benefitLimitation) && + Objects.equals(this.qualifiedResidentStatusCertification, w8BenEFormRequest.qualifiedResidentStatusCertification) && + Objects.equals(this.treatyArticle, w8BenEFormRequest.treatyArticle) && + Objects.equals(this.withholdingRate, w8BenEFormRequest.withholdingRate) && + Objects.equals(this.incomeType, w8BenEFormRequest.incomeType) && + Objects.equals(this.treatyReasons, w8BenEFormRequest.treatyReasons) && + Objects.equals(this.ffiSponsoringEntity, w8BenEFormRequest.ffiSponsoringEntity) && + Objects.equals(this.investmentEntityCertification, w8BenEFormRequest.investmentEntityCertification) && + Objects.equals(this.controlledForeignCorporationCertification, w8BenEFormRequest.controlledForeignCorporationCertification) && + Objects.equals(this.compliantNonregisteringLocalBankCertification, w8BenEFormRequest.compliantNonregisteringLocalBankCertification) && + Objects.equals(this.compliantFfiLowValueAccountsCertification, w8BenEFormRequest.compliantFfiLowValueAccountsCertification) && + Objects.equals(this.sponsoredCloselyHeldEntitySponsoringEntity, w8BenEFormRequest.sponsoredCloselyHeldEntitySponsoringEntity) && + Objects.equals(this.sponsoredCloselyHeldInvestmentVehicleCertification, w8BenEFormRequest.sponsoredCloselyHeldInvestmentVehicleCertification) && + Objects.equals(this.compliantLimitedLifeDebtEntityCertification, w8BenEFormRequest.compliantLimitedLifeDebtEntityCertification) && + Objects.equals(this.investmentEntityNoFinancialAccountsCertification, w8BenEFormRequest.investmentEntityNoFinancialAccountsCertification) && + Objects.equals(this.ownerDocumentedFfiCertification, w8BenEFormRequest.ownerDocumentedFfiCertification) && + Objects.equals(this.ownerDocumentedFfiReportingStatementCertification, w8BenEFormRequest.ownerDocumentedFfiReportingStatementCertification) && + Objects.equals(this.ownerDocumentedFfiAuditorLetterCertification, w8BenEFormRequest.ownerDocumentedFfiAuditorLetterCertification) && + Objects.equals(this.ownerDocumentedFfiTrustBeneficiariesCertification, w8BenEFormRequest.ownerDocumentedFfiTrustBeneficiariesCertification) && + Objects.equals(this.restrictedDistributorCertification, w8BenEFormRequest.restrictedDistributorCertification) && + Objects.equals(this.restrictedDistributorAgreementCertification, w8BenEFormRequest.restrictedDistributorAgreementCertification) && + Objects.equals(this.restrictedDistributorPreexistingSalesComplianceCertification, w8BenEFormRequest.restrictedDistributorPreexistingSalesComplianceCertification) && + Objects.equals(this.nonreportingIgaFfiCertification, w8BenEFormRequest.nonreportingIgaFfiCertification) && + Objects.equals(this.igaCountry, w8BenEFormRequest.igaCountry) && + Objects.equals(this.igaModel, w8BenEFormRequest.igaModel) && + Objects.equals(this.igaLegalStatusTreatment, w8BenEFormRequest.igaLegalStatusTreatment) && + Objects.equals(this.igaFfiTrusteeOrSponsor, w8BenEFormRequest.igaFfiTrusteeOrSponsor) && + Objects.equals(this.igaFfiTrusteeIsForeign, w8BenEFormRequest.igaFfiTrusteeIsForeign) && + Objects.equals(this.nonCommercialFinancialActivityCertification, w8BenEFormRequest.nonCommercialFinancialActivityCertification) && + Objects.equals(this.internationOrganizationCertification, w8BenEFormRequest.internationOrganizationCertification) && + Objects.equals(this.intergovernmentalOrganizationCertification, w8BenEFormRequest.intergovernmentalOrganizationCertification) && + Objects.equals(this.treatyQualifiedPensionFundCertification, w8BenEFormRequest.treatyQualifiedPensionFundCertification) && + Objects.equals(this.qualifiedRetirementFundCertification, w8BenEFormRequest.qualifiedRetirementFundCertification) && + Objects.equals(this.narrowParticipationRetirementFundCertification, w8BenEFormRequest.narrowParticipationRetirementFundCertification) && + Objects.equals(this.section401AEquivalentPensionPlanCertification, w8BenEFormRequest.section401AEquivalentPensionPlanCertification) && + Objects.equals(this.investmentEntityForRetirementFundsCertification, w8BenEFormRequest.investmentEntityForRetirementFundsCertification) && + Objects.equals(this.exemptBeneficialOwnerSponsoredRetirementFundCertification, w8BenEFormRequest.exemptBeneficialOwnerSponsoredRetirementFundCertification) && + Objects.equals(this.exemptBeneficialOwnerOwnedInvestmentEntityCertification, w8BenEFormRequest.exemptBeneficialOwnerOwnedInvestmentEntityCertification) && + Objects.equals(this.territoryFinancialInstitutionCertification, w8BenEFormRequest.territoryFinancialInstitutionCertification) && + Objects.equals(this.exceptedNonfinancialGroupEntityCertification, w8BenEFormRequest.exceptedNonfinancialGroupEntityCertification) && + Objects.equals(this.exceptedNonfinancialStartUpCertification, w8BenEFormRequest.exceptedNonfinancialStartUpCertification) && + Objects.equals(this.startupFormationOrResolutionDate, w8BenEFormRequest.startupFormationOrResolutionDate) && + Objects.equals(this.exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, w8BenEFormRequest.exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification) && + Objects.equals(this.nonfinancialEntityFilingDate, w8BenEFormRequest.nonfinancialEntityFilingDate) && + Objects.equals(this.section501COrganizationCertification, w8BenEFormRequest.section501COrganizationCertification) && + Objects.equals(this.determinationLetterDate, w8BenEFormRequest.determinationLetterDate) && + Objects.equals(this.nonprofitOrganizationCertification, w8BenEFormRequest.nonprofitOrganizationCertification) && + Objects.equals(this.publiclyTradedNffeCertification, w8BenEFormRequest.publiclyTradedNffeCertification) && + Objects.equals(this.publiclyTradedNffeSecuritiesMarket, w8BenEFormRequest.publiclyTradedNffeSecuritiesMarket) && + Objects.equals(this.nffeAffiliateOfPubliclyTradedEntityCertification, w8BenEFormRequest.nffeAffiliateOfPubliclyTradedEntityCertification) && + Objects.equals(this.publiclyTradedEntity, w8BenEFormRequest.publiclyTradedEntity) && + Objects.equals(this.nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, w8BenEFormRequest.nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket) && + Objects.equals(this.exceptedTerritoryNffeCertification, w8BenEFormRequest.exceptedTerritoryNffeCertification) && + Objects.equals(this.activeNffeCertification, w8BenEFormRequest.activeNffeCertification) && + Objects.equals(this.passiveNffeCertification, w8BenEFormRequest.passiveNffeCertification) && + Objects.equals(this.passiveNffeNoSubstantialUsOwnersCertification, w8BenEFormRequest.passiveNffeNoSubstantialUsOwnersCertification) && + Objects.equals(this.passiveNffeSubstantialUsOwnersProvidedCertification, w8BenEFormRequest.passiveNffeSubstantialUsOwnersProvidedCertification) && + Objects.equals(this.exceptedInterAffiliateFfiCertification, w8BenEFormRequest.exceptedInterAffiliateFfiCertification) && + Objects.equals(this.sponsoredDirectReportingNffeCertification, w8BenEFormRequest.sponsoredDirectReportingNffeCertification) && + Objects.equals(this.directReportingNffeSponsoringEntity, w8BenEFormRequest.directReportingNffeSponsoringEntity) && + Objects.equals(this.substantialUsOwners, w8BenEFormRequest.substantialUsOwners) && + Objects.equals(this.signerName, w8BenEFormRequest.signerName) && + Objects.equals(this.capacityToSignCertification, w8BenEFormRequest.capacityToSignCertification) && + Objects.equals(this.companyId, w8BenEFormRequest.companyId) && + Objects.equals(this.referenceId, w8BenEFormRequest.referenceId) && + Objects.equals(this.email, w8BenEFormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w8BenEFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8BenEFormRequest.signature); + } + + 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, name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, 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, companyId, referenceId, email, eDeliveryConsentedAt, signature); + } + + 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 W8BenEFormRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n"); + sb.append(" disregardedEntity: ").append(toIndentedString(disregardedEntity)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" makingTreatyClaim: ").append(toIndentedString(makingTreatyClaim)).append("\n"); + sb.append(" fatcaStatus: ").append(toIndentedString(fatcaStatus)).append("\n"); + sb.append(" residenceAddress: ").append(toIndentedString(residenceAddress)).append("\n"); + sb.append(" residenceCity: ").append(toIndentedString(residenceCity)).append("\n"); + sb.append(" residenceState: ").append(toIndentedString(residenceState)).append("\n"); + sb.append(" residenceZip: ").append(toIndentedString(residenceZip)).append("\n"); + sb.append(" residenceCountry: ").append(toIndentedString(residenceCountry)).append("\n"); + sb.append(" residenceIsMailing: ").append(toIndentedString(residenceIsMailing)).append("\n"); + sb.append(" mailingAddress: ").append(toIndentedString(mailingAddress)).append("\n"); + sb.append(" mailingCity: ").append(toIndentedString(mailingCity)).append("\n"); + sb.append(" mailingState: ").append(toIndentedString(mailingState)).append("\n"); + sb.append(" mailingZip: ").append(toIndentedString(mailingZip)).append("\n"); + sb.append(" mailingCountry: ").append(toIndentedString(mailingCountry)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" giin: ").append(toIndentedString(giin)).append("\n"); + sb.append(" foreignTinNotRequired: ").append(toIndentedString(foreignTinNotRequired)).append("\n"); + sb.append(" foreignTin: ").append(toIndentedString(foreignTin)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" disregardedEntityFatcaStatus: ").append(toIndentedString(disregardedEntityFatcaStatus)).append("\n"); + sb.append(" disregardedAddress: ").append(toIndentedString(disregardedAddress)).append("\n"); + sb.append(" disregardedCity: ").append(toIndentedString(disregardedCity)).append("\n"); + sb.append(" disregardedState: ").append(toIndentedString(disregardedState)).append("\n"); + sb.append(" disregardedZip: ").append(toIndentedString(disregardedZip)).append("\n"); + sb.append(" disregardedCountry: ").append(toIndentedString(disregardedCountry)).append("\n"); + sb.append(" disregardedEntityGiin: ").append(toIndentedString(disregardedEntityGiin)).append("\n"); + sb.append(" treatyCountryCertification: ").append(toIndentedString(treatyCountryCertification)).append("\n"); + sb.append(" treatyCountry: ").append(toIndentedString(treatyCountry)).append("\n"); + sb.append(" benefitLimitationCertification: ").append(toIndentedString(benefitLimitationCertification)).append("\n"); + sb.append(" benefitLimitation: ").append(toIndentedString(benefitLimitation)).append("\n"); + sb.append(" qualifiedResidentStatusCertification: ").append(toIndentedString(qualifiedResidentStatusCertification)).append("\n"); + sb.append(" treatyArticle: ").append(toIndentedString(treatyArticle)).append("\n"); + sb.append(" withholdingRate: ").append(toIndentedString(withholdingRate)).append("\n"); + sb.append(" incomeType: ").append(toIndentedString(incomeType)).append("\n"); + sb.append(" treatyReasons: ").append(toIndentedString(treatyReasons)).append("\n"); + sb.append(" ffiSponsoringEntity: ").append(toIndentedString(ffiSponsoringEntity)).append("\n"); + sb.append(" investmentEntityCertification: ").append(toIndentedString(investmentEntityCertification)).append("\n"); + sb.append(" controlledForeignCorporationCertification: ").append(toIndentedString(controlledForeignCorporationCertification)).append("\n"); + sb.append(" compliantNonregisteringLocalBankCertification: ").append(toIndentedString(compliantNonregisteringLocalBankCertification)).append("\n"); + sb.append(" compliantFfiLowValueAccountsCertification: ").append(toIndentedString(compliantFfiLowValueAccountsCertification)).append("\n"); + sb.append(" sponsoredCloselyHeldEntitySponsoringEntity: ").append(toIndentedString(sponsoredCloselyHeldEntitySponsoringEntity)).append("\n"); + sb.append(" sponsoredCloselyHeldInvestmentVehicleCertification: ").append(toIndentedString(sponsoredCloselyHeldInvestmentVehicleCertification)).append("\n"); + sb.append(" compliantLimitedLifeDebtEntityCertification: ").append(toIndentedString(compliantLimitedLifeDebtEntityCertification)).append("\n"); + sb.append(" investmentEntityNoFinancialAccountsCertification: ").append(toIndentedString(investmentEntityNoFinancialAccountsCertification)).append("\n"); + sb.append(" ownerDocumentedFfiCertification: ").append(toIndentedString(ownerDocumentedFfiCertification)).append("\n"); + sb.append(" ownerDocumentedFfiReportingStatementCertification: ").append(toIndentedString(ownerDocumentedFfiReportingStatementCertification)).append("\n"); + sb.append(" ownerDocumentedFfiAuditorLetterCertification: ").append(toIndentedString(ownerDocumentedFfiAuditorLetterCertification)).append("\n"); + sb.append(" ownerDocumentedFfiTrustBeneficiariesCertification: ").append(toIndentedString(ownerDocumentedFfiTrustBeneficiariesCertification)).append("\n"); + sb.append(" restrictedDistributorCertification: ").append(toIndentedString(restrictedDistributorCertification)).append("\n"); + sb.append(" restrictedDistributorAgreementCertification: ").append(toIndentedString(restrictedDistributorAgreementCertification)).append("\n"); + sb.append(" restrictedDistributorPreexistingSalesComplianceCertification: ").append(toIndentedString(restrictedDistributorPreexistingSalesComplianceCertification)).append("\n"); + sb.append(" nonreportingIgaFfiCertification: ").append(toIndentedString(nonreportingIgaFfiCertification)).append("\n"); + sb.append(" igaCountry: ").append(toIndentedString(igaCountry)).append("\n"); + sb.append(" igaModel: ").append(toIndentedString(igaModel)).append("\n"); + sb.append(" igaLegalStatusTreatment: ").append(toIndentedString(igaLegalStatusTreatment)).append("\n"); + sb.append(" igaFfiTrusteeOrSponsor: ").append(toIndentedString(igaFfiTrusteeOrSponsor)).append("\n"); + sb.append(" igaFfiTrusteeIsForeign: ").append(toIndentedString(igaFfiTrusteeIsForeign)).append("\n"); + sb.append(" nonCommercialFinancialActivityCertification: ").append(toIndentedString(nonCommercialFinancialActivityCertification)).append("\n"); + sb.append(" internationOrganizationCertification: ").append(toIndentedString(internationOrganizationCertification)).append("\n"); + sb.append(" intergovernmentalOrganizationCertification: ").append(toIndentedString(intergovernmentalOrganizationCertification)).append("\n"); + sb.append(" treatyQualifiedPensionFundCertification: ").append(toIndentedString(treatyQualifiedPensionFundCertification)).append("\n"); + sb.append(" qualifiedRetirementFundCertification: ").append(toIndentedString(qualifiedRetirementFundCertification)).append("\n"); + sb.append(" narrowParticipationRetirementFundCertification: ").append(toIndentedString(narrowParticipationRetirementFundCertification)).append("\n"); + sb.append(" section401AEquivalentPensionPlanCertification: ").append(toIndentedString(section401AEquivalentPensionPlanCertification)).append("\n"); + sb.append(" investmentEntityForRetirementFundsCertification: ").append(toIndentedString(investmentEntityForRetirementFundsCertification)).append("\n"); + sb.append(" exemptBeneficialOwnerSponsoredRetirementFundCertification: ").append(toIndentedString(exemptBeneficialOwnerSponsoredRetirementFundCertification)).append("\n"); + sb.append(" exemptBeneficialOwnerOwnedInvestmentEntityCertification: ").append(toIndentedString(exemptBeneficialOwnerOwnedInvestmentEntityCertification)).append("\n"); + sb.append(" territoryFinancialInstitutionCertification: ").append(toIndentedString(territoryFinancialInstitutionCertification)).append("\n"); + sb.append(" exceptedNonfinancialGroupEntityCertification: ").append(toIndentedString(exceptedNonfinancialGroupEntityCertification)).append("\n"); + sb.append(" exceptedNonfinancialStartUpCertification: ").append(toIndentedString(exceptedNonfinancialStartUpCertification)).append("\n"); + sb.append(" startupFormationOrResolutionDate: ").append(toIndentedString(startupFormationOrResolutionDate)).append("\n"); + sb.append(" exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification: ").append(toIndentedString(exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification)).append("\n"); + sb.append(" nonfinancialEntityFilingDate: ").append(toIndentedString(nonfinancialEntityFilingDate)).append("\n"); + sb.append(" section501COrganizationCertification: ").append(toIndentedString(section501COrganizationCertification)).append("\n"); + sb.append(" determinationLetterDate: ").append(toIndentedString(determinationLetterDate)).append("\n"); + sb.append(" nonprofitOrganizationCertification: ").append(toIndentedString(nonprofitOrganizationCertification)).append("\n"); + sb.append(" publiclyTradedNffeCertification: ").append(toIndentedString(publiclyTradedNffeCertification)).append("\n"); + sb.append(" publiclyTradedNffeSecuritiesMarket: ").append(toIndentedString(publiclyTradedNffeSecuritiesMarket)).append("\n"); + sb.append(" nffeAffiliateOfPubliclyTradedEntityCertification: ").append(toIndentedString(nffeAffiliateOfPubliclyTradedEntityCertification)).append("\n"); + sb.append(" publiclyTradedEntity: ").append(toIndentedString(publiclyTradedEntity)).append("\n"); + sb.append(" nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket: ").append(toIndentedString(nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket)).append("\n"); + sb.append(" exceptedTerritoryNffeCertification: ").append(toIndentedString(exceptedTerritoryNffeCertification)).append("\n"); + sb.append(" activeNffeCertification: ").append(toIndentedString(activeNffeCertification)).append("\n"); + sb.append(" passiveNffeCertification: ").append(toIndentedString(passiveNffeCertification)).append("\n"); + sb.append(" passiveNffeNoSubstantialUsOwnersCertification: ").append(toIndentedString(passiveNffeNoSubstantialUsOwnersCertification)).append("\n"); + sb.append(" passiveNffeSubstantialUsOwnersProvidedCertification: ").append(toIndentedString(passiveNffeSubstantialUsOwnersProvidedCertification)).append("\n"); + sb.append(" exceptedInterAffiliateFfiCertification: ").append(toIndentedString(exceptedInterAffiliateFfiCertification)).append("\n"); + sb.append(" sponsoredDirectReportingNffeCertification: ").append(toIndentedString(sponsoredDirectReportingNffeCertification)).append("\n"); + sb.append(" directReportingNffeSponsoringEntity: ").append(toIndentedString(directReportingNffeSponsoringEntity)).append("\n"); + 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(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).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("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); + + // 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 W8BenEFormRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W8BenEFormRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W8BenEFormRequest is not found in the empty JSON string", W8BenEFormRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W8BenEFormRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenEFormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString())); + } + if ((jsonObj.get("disregardedEntity") != null && !jsonObj.get("disregardedEntity").isJsonNull()) && !jsonObj.get("disregardedEntity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntity").toString())); + } + if ((jsonObj.get("entityType") != null && !jsonObj.get("entityType").isJsonNull()) && !jsonObj.get("entityType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `entityType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entityType").toString())); + } + if ((jsonObj.get("fatcaStatus") != null && !jsonObj.get("fatcaStatus").isJsonNull()) && !jsonObj.get("fatcaStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `fatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fatcaStatus").toString())); + } + if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceAddress").toString())); + } + if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString())); + } + if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString())); + } + if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString())); + } + if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString())); + } + if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString())); + } + if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString())); + } + if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString())); + } + if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString())); + } + if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString())); + } + if ((jsonObj.get("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++) { + SubstantialUsOwnerRequest.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("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + 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("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W8BenEFormRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W8BenEFormRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W8BenEFormRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W8BenEFormRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W8BenEFormRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W8BenEFormRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W8BenEFormRequest + * @throws IOException if the JSON string is invalid with respect to W8BenEFormRequest + */ + public static W8BenEFormRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W8BenEFormRequest.class); + } + + /** + * Convert an instance of W8BenEFormRequest 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/W8BenEFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java index bbea254..95e6413 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.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 @@ -27,6 +27,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -360,7 +361,7 @@ public class W8BenEFormResponse { public static final String SERIALIZED_NAME_STARTUP_FORMATION_OR_RESOLUTION_DATE = "startupFormationOrResolutionDate"; @SerializedName(SERIALIZED_NAME_STARTUP_FORMATION_OR_RESOLUTION_DATE) - private OffsetDateTime startupFormationOrResolutionDate; + private LocalDate startupFormationOrResolutionDate; public static final String SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY_CERTIFICATION = "exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification"; @SerializedName(SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY_CERTIFICATION) @@ -368,7 +369,7 @@ public class W8BenEFormResponse { public static final String SERIALIZED_NAME_NONFINANCIAL_ENTITY_FILING_DATE = "nonfinancialEntityFilingDate"; @SerializedName(SERIALIZED_NAME_NONFINANCIAL_ENTITY_FILING_DATE) - private OffsetDateTime nonfinancialEntityFilingDate; + private LocalDate nonfinancialEntityFilingDate; public static final String SERIALIZED_NAME_SECTION501_C_ORGANIZATION_CERTIFICATION = "section501COrganizationCertification"; @SerializedName(SERIALIZED_NAME_SECTION501_C_ORGANIZATION_CERTIFICATION) @@ -376,7 +377,7 @@ public class W8BenEFormResponse { public static final String SERIALIZED_NAME_DETERMINATION_LETTER_DATE = "determinationLetterDate"; @SerializedName(SERIALIZED_NAME_DETERMINATION_LETTER_DATE) - private OffsetDateTime determinationLetterDate; + private LocalDate determinationLetterDate; public static final String SERIALIZED_NAME_NONPROFIT_ORGANIZATION_CERTIFICATION = "nonprofitOrganizationCertification"; @SerializedName(SERIALIZED_NAME_NONPROFIT_ORGANIZATION_CERTIFICATION) @@ -436,7 +437,7 @@ public class W8BenEFormResponse { public static final String SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS = "substantialUsOwners"; @SerializedName(SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS) - private List substantialUsOwners = new ArrayList<>(); + private List substantialUsOwners; public static final String SERIALIZED_NAME_SIGNER_NAME = "signerName"; @SerializedName(SERIALIZED_NAME_SIGNER_NAME) @@ -1911,7 +1912,7 @@ public void setExceptedNonfinancialStartUpCertification(Boolean exceptedNonfinan } - public W8BenEFormResponse startupFormationOrResolutionDate(OffsetDateTime startupFormationOrResolutionDate) { + public W8BenEFormResponse startupFormationOrResolutionDate(LocalDate startupFormationOrResolutionDate) { this.startupFormationOrResolutionDate = startupFormationOrResolutionDate; return this; } @@ -1921,11 +1922,11 @@ public W8BenEFormResponse startupFormationOrResolutionDate(OffsetDateTime startu * @return startupFormationOrResolutionDate */ @javax.annotation.Nullable - public OffsetDateTime getStartupFormationOrResolutionDate() { + public LocalDate getStartupFormationOrResolutionDate() { return startupFormationOrResolutionDate; } - public void setStartupFormationOrResolutionDate(OffsetDateTime startupFormationOrResolutionDate) { + public void setStartupFormationOrResolutionDate(LocalDate startupFormationOrResolutionDate) { this.startupFormationOrResolutionDate = startupFormationOrResolutionDate; } @@ -1949,7 +1950,7 @@ public void setExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification( } - public W8BenEFormResponse nonfinancialEntityFilingDate(OffsetDateTime nonfinancialEntityFilingDate) { + public W8BenEFormResponse nonfinancialEntityFilingDate(LocalDate nonfinancialEntityFilingDate) { this.nonfinancialEntityFilingDate = nonfinancialEntityFilingDate; return this; } @@ -1959,11 +1960,11 @@ public W8BenEFormResponse nonfinancialEntityFilingDate(OffsetDateTime nonfinanci * @return nonfinancialEntityFilingDate */ @javax.annotation.Nullable - public OffsetDateTime getNonfinancialEntityFilingDate() { + public LocalDate getNonfinancialEntityFilingDate() { return nonfinancialEntityFilingDate; } - public void setNonfinancialEntityFilingDate(OffsetDateTime nonfinancialEntityFilingDate) { + public void setNonfinancialEntityFilingDate(LocalDate nonfinancialEntityFilingDate) { this.nonfinancialEntityFilingDate = nonfinancialEntityFilingDate; } @@ -1987,7 +1988,7 @@ public void setSection501COrganizationCertification(Boolean section501COrganizat } - public W8BenEFormResponse determinationLetterDate(OffsetDateTime determinationLetterDate) { + public W8BenEFormResponse determinationLetterDate(LocalDate determinationLetterDate) { this.determinationLetterDate = determinationLetterDate; return this; } @@ -1997,11 +1998,11 @@ public W8BenEFormResponse determinationLetterDate(OffsetDateTime determinationLe * @return determinationLetterDate */ @javax.annotation.Nullable - public OffsetDateTime getDeterminationLetterDate() { + public LocalDate getDeterminationLetterDate() { return determinationLetterDate; } - public void setDeterminationLetterDate(OffsetDateTime determinationLetterDate) { + public void setDeterminationLetterDate(LocalDate determinationLetterDate) { this.determinationLetterDate = determinationLetterDate; } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenESubstantialUsOwnerDataModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenESubstantialUsOwnerDataModel.java index 08f478b..af368a7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenESubstantialUsOwnerDataModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenESubstantialUsOwnerDataModel.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/W8BenFormDataModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormDataModel.java index 0c96816..2cd82f4 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormDataModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormDataModel.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 @@ -27,6 +27,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -622,19 +623,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE = "part19FormationOrResolutionDate"; @SerializedName(SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE) - private OffsetDateTime part19FormationOrResolutionDate; + private LocalDate part19FormationOrResolutionDate; public static final String SERIALIZED_NAME_PART20_FILING_DATE = "part20FilingDate"; @SerializedName(SERIALIZED_NAME_PART20_FILING_DATE) - private OffsetDateTime part20FilingDate; + private LocalDate part20FilingDate; public static final String SERIALIZED_NAME_PART21_DETERMINATION_DATE = "part21DeterminationDate"; @SerializedName(SERIALIZED_NAME_PART21_DETERMINATION_DATE) - private OffsetDateTime part21DeterminationDate; + private LocalDate part21DeterminationDate; public static final String SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS = "substantialUsOwners"; @SerializedName(SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS) - private List substantialUsOwners = new ArrayList<>(); + private List substantialUsOwners; public static final String SERIALIZED_NAME_EIN = "ein"; @SerializedName(SERIALIZED_NAME_EIN) @@ -910,11 +911,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_BOX35_FORMED_ON_DATE = "box35FormedOnDate"; @SerializedName(SERIALIZED_NAME_BOX35_FORMED_ON_DATE) - private OffsetDateTime box35FormedOnDate; + private LocalDate box35FormedOnDate; public static final String SERIALIZED_NAME_BOX36_FILED_ON_DATE = "box36FiledOnDate"; @SerializedName(SERIALIZED_NAME_BOX36_FILED_ON_DATE) - private OffsetDateTime box36FiledOnDate; + private LocalDate box36FiledOnDate; public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) @@ -3345,7 +3346,7 @@ public void setCertifyPart29Signature(Boolean certifyPart29Signature) { } - public W8BenFormDataModel part19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public W8BenFormDataModel part19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; return this; } @@ -3355,16 +3356,16 @@ public W8BenFormDataModel part19FormationOrResolutionDate(OffsetDateTime part19F * @return part19FormationOrResolutionDate */ @javax.annotation.Nullable - public OffsetDateTime getPart19FormationOrResolutionDate() { + public LocalDate getPart19FormationOrResolutionDate() { return part19FormationOrResolutionDate; } - public void setPart19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public void setPart19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; } - public W8BenFormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { + public W8BenFormDataModel part20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; return this; } @@ -3374,16 +3375,16 @@ public W8BenFormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { * @return part20FilingDate */ @javax.annotation.Nullable - public OffsetDateTime getPart20FilingDate() { + public LocalDate getPart20FilingDate() { return part20FilingDate; } - public void setPart20FilingDate(OffsetDateTime part20FilingDate) { + public void setPart20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; } - public W8BenFormDataModel part21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public W8BenFormDataModel part21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; return this; } @@ -3393,11 +3394,11 @@ public W8BenFormDataModel part21DeterminationDate(OffsetDateTime part21Determina * @return part21DeterminationDate */ @javax.annotation.Nullable - public OffsetDateTime getPart21DeterminationDate() { + public LocalDate getPart21DeterminationDate() { return part21DeterminationDate; } - public void setPart21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public void setPart21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; } @@ -4721,7 +4722,7 @@ public void setCertifyBox42(Boolean certifyBox42) { } - public W8BenFormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public W8BenFormDataModel box35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; return this; } @@ -4731,16 +4732,16 @@ public W8BenFormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { * @return box35FormedOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox35FormedOnDate() { + public LocalDate getBox35FormedOnDate() { return box35FormedOnDate; } - public void setBox35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public void setBox35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; } - public W8BenFormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public W8BenFormDataModel box36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; return this; } @@ -4750,11 +4751,11 @@ public W8BenFormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { * @return box36FiledOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox36FiledOnDate() { + public LocalDate getBox36FiledOnDate() { return box36FiledOnDate; } - public void setBox36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public void setBox36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java new file mode 100644 index 0000000..fed26d9 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java @@ -0,0 +1,1092 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +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; + +/** + * W8BenFormRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W8BenFormRequest { + /** + * The form type (always \"w8ben\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_CITIZENSHIP_COUNTRY = "citizenshipCountry"; + @SerializedName(SERIALIZED_NAME_CITIZENSHIP_COUNTRY) + private String citizenshipCountry; + + public static final String SERIALIZED_NAME_RESIDENCE_ADDRESS = "residenceAddress"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_ADDRESS) + private String residenceAddress; + + public static final String SERIALIZED_NAME_RESIDENCE_CITY = "residenceCity"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_CITY) + private String residenceCity; + + public static final String SERIALIZED_NAME_RESIDENCE_STATE = "residenceState"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_STATE) + private String residenceState; + + public static final String SERIALIZED_NAME_RESIDENCE_ZIP = "residenceZip"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_ZIP) + private String residenceZip; + + public static final String SERIALIZED_NAME_RESIDENCE_COUNTRY = "residenceCountry"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_COUNTRY) + private String residenceCountry; + + public static final String SERIALIZED_NAME_RESIDENCE_IS_MAILING = "residenceIsMailing"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_IS_MAILING) + private Boolean residenceIsMailing; + + public static final String SERIALIZED_NAME_MAILING_ADDRESS = "mailingAddress"; + @SerializedName(SERIALIZED_NAME_MAILING_ADDRESS) + private String mailingAddress; + + public static final String SERIALIZED_NAME_MAILING_CITY = "mailingCity"; + @SerializedName(SERIALIZED_NAME_MAILING_CITY) + private String mailingCity; + + public static final String SERIALIZED_NAME_MAILING_STATE = "mailingState"; + @SerializedName(SERIALIZED_NAME_MAILING_STATE) + private String mailingState; + + public static final String SERIALIZED_NAME_MAILING_ZIP = "mailingZip"; + @SerializedName(SERIALIZED_NAME_MAILING_ZIP) + private String mailingZip; + + public static final String SERIALIZED_NAME_MAILING_COUNTRY = "mailingCountry"; + @SerializedName(SERIALIZED_NAME_MAILING_COUNTRY) + private String mailingCountry; + + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_FOREIGN_TIN_NOT_REQUIRED = "foreignTinNotRequired"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TIN_NOT_REQUIRED) + private Boolean foreignTinNotRequired; + + public static final String SERIALIZED_NAME_FOREIGN_TIN = "foreignTin"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TIN) + private String foreignTin; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_BIRTHDAY = "birthday"; + @SerializedName(SERIALIZED_NAME_BIRTHDAY) + private LocalDate birthday; + + public static final String SERIALIZED_NAME_TREATY_COUNTRY = "treatyCountry"; + @SerializedName(SERIALIZED_NAME_TREATY_COUNTRY) + private String treatyCountry; + + public static final String SERIALIZED_NAME_TREATY_ARTICLE = "treatyArticle"; + @SerializedName(SERIALIZED_NAME_TREATY_ARTICLE) + private String treatyArticle; + + public static final String SERIALIZED_NAME_TREATY_REASONS = "treatyReasons"; + @SerializedName(SERIALIZED_NAME_TREATY_REASONS) + private String treatyReasons; + + public static final String SERIALIZED_NAME_WITHHOLDING_RATE = "withholdingRate"; + @SerializedName(SERIALIZED_NAME_WITHHOLDING_RATE) + private String withholdingRate; + + public static final String SERIALIZED_NAME_INCOME_TYPE = "incomeType"; + @SerializedName(SERIALIZED_NAME_INCOME_TYPE) + private String incomeType; + + public static final String SERIALIZED_NAME_SIGNER_NAME = "signerName"; + @SerializedName(SERIALIZED_NAME_SIGNER_NAME) + private String signerName; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + 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_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + + public W8BenFormRequest() { + } + + public W8BenFormRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w8ben\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W8BenFormRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the individual or entity associated with the form. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public W8BenFormRequest citizenshipCountry(String citizenshipCountry) { + this.citizenshipCountry = citizenshipCountry; + return this; + } + + /** + * The country of citizenship. + * @return citizenshipCountry + */ + @javax.annotation.Nullable + public String getCitizenshipCountry() { + return citizenshipCountry; + } + + public void setCitizenshipCountry(String citizenshipCountry) { + this.citizenshipCountry = citizenshipCountry; + } + + + public W8BenFormRequest residenceAddress(String residenceAddress) { + this.residenceAddress = residenceAddress; + return this; + } + + /** + * The residential address of the individual or entity. + * @return residenceAddress + */ + @javax.annotation.Nullable + public String getResidenceAddress() { + return residenceAddress; + } + + public void setResidenceAddress(String residenceAddress) { + this.residenceAddress = residenceAddress; + } + + + public W8BenFormRequest residenceCity(String residenceCity) { + this.residenceCity = residenceCity; + return this; + } + + /** + * The city of residence. + * @return residenceCity + */ + @javax.annotation.Nullable + public String getResidenceCity() { + return residenceCity; + } + + public void setResidenceCity(String residenceCity) { + this.residenceCity = residenceCity; + } + + + public W8BenFormRequest residenceState(String residenceState) { + this.residenceState = residenceState; + return this; + } + + /** + * The state of residence. + * @return residenceState + */ + @javax.annotation.Nullable + public String getResidenceState() { + return residenceState; + } + + public void setResidenceState(String residenceState) { + this.residenceState = residenceState; + } + + + public W8BenFormRequest residenceZip(String residenceZip) { + this.residenceZip = residenceZip; + return this; + } + + /** + * The ZIP code of the residence. + * @return residenceZip + */ + @javax.annotation.Nullable + public String getResidenceZip() { + return residenceZip; + } + + public void setResidenceZip(String residenceZip) { + this.residenceZip = residenceZip; + } + + + public W8BenFormRequest residenceCountry(String residenceCountry) { + this.residenceCountry = residenceCountry; + return this; + } + + /** + * The country of residence. + * @return residenceCountry + */ + @javax.annotation.Nullable + public String getResidenceCountry() { + return residenceCountry; + } + + public void setResidenceCountry(String residenceCountry) { + this.residenceCountry = residenceCountry; + } + + + public W8BenFormRequest residenceIsMailing(Boolean residenceIsMailing) { + this.residenceIsMailing = residenceIsMailing; + return this; + } + + /** + * Indicates whether the residence address is the mailing address. + * @return residenceIsMailing + */ + @javax.annotation.Nullable + public Boolean getResidenceIsMailing() { + return residenceIsMailing; + } + + public void setResidenceIsMailing(Boolean residenceIsMailing) { + this.residenceIsMailing = residenceIsMailing; + } + + + public W8BenFormRequest mailingAddress(String mailingAddress) { + this.mailingAddress = mailingAddress; + return this; + } + + /** + * The mailing address. + * @return mailingAddress + */ + @javax.annotation.Nullable + public String getMailingAddress() { + return mailingAddress; + } + + public void setMailingAddress(String mailingAddress) { + this.mailingAddress = mailingAddress; + } + + + public W8BenFormRequest mailingCity(String mailingCity) { + this.mailingCity = mailingCity; + return this; + } + + /** + * The city of the mailing address. + * @return mailingCity + */ + @javax.annotation.Nullable + public String getMailingCity() { + return mailingCity; + } + + public void setMailingCity(String mailingCity) { + this.mailingCity = mailingCity; + } + + + public W8BenFormRequest mailingState(String mailingState) { + this.mailingState = mailingState; + return this; + } + + /** + * The state of the mailing address. + * @return mailingState + */ + @javax.annotation.Nullable + public String getMailingState() { + return mailingState; + } + + public void setMailingState(String mailingState) { + this.mailingState = mailingState; + } + + + public W8BenFormRequest mailingZip(String mailingZip) { + this.mailingZip = mailingZip; + return this; + } + + /** + * The ZIP code of the mailing address. + * @return mailingZip + */ + @javax.annotation.Nullable + public String getMailingZip() { + return mailingZip; + } + + public void setMailingZip(String mailingZip) { + this.mailingZip = mailingZip; + } + + + public W8BenFormRequest mailingCountry(String mailingCountry) { + this.mailingCountry = mailingCountry; + return this; + } + + /** + * The country of the mailing address. + * @return mailingCountry + */ + @javax.annotation.Nullable + public String getMailingCountry() { + return mailingCountry; + } + + public void setMailingCountry(String mailingCountry) { + this.mailingCountry = mailingCountry; + } + + + public W8BenFormRequest tin(String tin) { + this.tin = tin; + return this; + } + + /** + * The taxpayer identification number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public W8BenFormRequest foreignTinNotRequired(Boolean foreignTinNotRequired) { + this.foreignTinNotRequired = foreignTinNotRequired; + return this; + } + + /** + * Indicates whether a foreign TIN is not legally required. + * @return foreignTinNotRequired + */ + @javax.annotation.Nullable + public Boolean getForeignTinNotRequired() { + return foreignTinNotRequired; + } + + public void setForeignTinNotRequired(Boolean foreignTinNotRequired) { + this.foreignTinNotRequired = foreignTinNotRequired; + } + + + public W8BenFormRequest foreignTin(String foreignTin) { + this.foreignTin = foreignTin; + return this; + } + + /** + * The foreign taxpayer identification number (TIN). + * @return foreignTin + */ + @javax.annotation.Nullable + public String getForeignTin() { + return foreignTin; + } + + public void setForeignTin(String foreignTin) { + this.foreignTin = foreignTin; + } + + + public W8BenFormRequest referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * A reference number for the form. + * @return referenceNumber + */ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public W8BenFormRequest birthday(LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * The birthday of the individual associated with the form. + * @return birthday + */ + @javax.annotation.Nullable + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + + public W8BenFormRequest treatyCountry(String treatyCountry) { + this.treatyCountry = treatyCountry; + return this; + } + + /** + * The country for which the treaty applies. + * @return treatyCountry + */ + @javax.annotation.Nullable + public String getTreatyCountry() { + return treatyCountry; + } + + public void setTreatyCountry(String treatyCountry) { + this.treatyCountry = treatyCountry; + } + + + public W8BenFormRequest treatyArticle(String treatyArticle) { + this.treatyArticle = treatyArticle; + return this; + } + + /** + * The specific article of the treaty being claimed. + * @return treatyArticle + */ + @javax.annotation.Nullable + public String getTreatyArticle() { + return treatyArticle; + } + + public void setTreatyArticle(String treatyArticle) { + this.treatyArticle = treatyArticle; + } + + + public W8BenFormRequest treatyReasons(String treatyReasons) { + this.treatyReasons = treatyReasons; + return this; + } + + /** + * The reasons for claiming treaty benefits. + * @return treatyReasons + */ + @javax.annotation.Nullable + public String getTreatyReasons() { + return treatyReasons; + } + + public void setTreatyReasons(String treatyReasons) { + this.treatyReasons = treatyReasons; + } + + + public W8BenFormRequest withholdingRate(String withholdingRate) { + this.withholdingRate = withholdingRate; + return this; + } + + /** + * The withholding rate applied as per the treaty. + * @return withholdingRate + */ + @javax.annotation.Nullable + public String getWithholdingRate() { + return withholdingRate; + } + + public void setWithholdingRate(String withholdingRate) { + this.withholdingRate = withholdingRate; + } + + + public W8BenFormRequest incomeType(String incomeType) { + this.incomeType = incomeType; + return this; + } + + /** + * The type of income covered by the treaty. + * @return incomeType + */ + @javax.annotation.Nullable + public String getIncomeType() { + return incomeType; + } + + public void setIncomeType(String incomeType) { + this.incomeType = incomeType; + } + + + public W8BenFormRequest signerName(String signerName) { + this.signerName = signerName; + return this; + } + + /** + * The name of the signer of the form. + * @return signerName + */ + @javax.annotation.Nullable + public String getSignerName() { + return signerName; + } + + public void setSignerName(String signerName) { + this.signerName = signerName; + } + + + public W8BenFormRequest 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 W8BenFormRequest 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 W8BenFormRequest 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 W8BenFormRequest 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 W8BenFormRequest 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W8BenFormRequest w8BenFormRequest = (W8BenFormRequest) o; + return Objects.equals(this.type, w8BenFormRequest.type) && + Objects.equals(this.name, w8BenFormRequest.name) && + Objects.equals(this.citizenshipCountry, w8BenFormRequest.citizenshipCountry) && + Objects.equals(this.residenceAddress, w8BenFormRequest.residenceAddress) && + Objects.equals(this.residenceCity, w8BenFormRequest.residenceCity) && + Objects.equals(this.residenceState, w8BenFormRequest.residenceState) && + Objects.equals(this.residenceZip, w8BenFormRequest.residenceZip) && + Objects.equals(this.residenceCountry, w8BenFormRequest.residenceCountry) && + Objects.equals(this.residenceIsMailing, w8BenFormRequest.residenceIsMailing) && + Objects.equals(this.mailingAddress, w8BenFormRequest.mailingAddress) && + Objects.equals(this.mailingCity, w8BenFormRequest.mailingCity) && + Objects.equals(this.mailingState, w8BenFormRequest.mailingState) && + Objects.equals(this.mailingZip, w8BenFormRequest.mailingZip) && + Objects.equals(this.mailingCountry, w8BenFormRequest.mailingCountry) && + Objects.equals(this.tin, w8BenFormRequest.tin) && + Objects.equals(this.foreignTinNotRequired, w8BenFormRequest.foreignTinNotRequired) && + Objects.equals(this.foreignTin, w8BenFormRequest.foreignTin) && + Objects.equals(this.referenceNumber, w8BenFormRequest.referenceNumber) && + Objects.equals(this.birthday, w8BenFormRequest.birthday) && + Objects.equals(this.treatyCountry, w8BenFormRequest.treatyCountry) && + Objects.equals(this.treatyArticle, w8BenFormRequest.treatyArticle) && + Objects.equals(this.treatyReasons, w8BenFormRequest.treatyReasons) && + Objects.equals(this.withholdingRate, w8BenFormRequest.withholdingRate) && + Objects.equals(this.incomeType, w8BenFormRequest.incomeType) && + Objects.equals(this.signerName, w8BenFormRequest.signerName) && + Objects.equals(this.companyId, w8BenFormRequest.companyId) && + Objects.equals(this.referenceId, w8BenFormRequest.referenceId) && + Objects.equals(this.email, w8BenFormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w8BenFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8BenFormRequest.signature); + } + + 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, name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, companyId, referenceId, email, eDeliveryConsentedAt, signature); + } + + 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 W8BenFormRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n"); + sb.append(" residenceAddress: ").append(toIndentedString(residenceAddress)).append("\n"); + sb.append(" residenceCity: ").append(toIndentedString(residenceCity)).append("\n"); + sb.append(" residenceState: ").append(toIndentedString(residenceState)).append("\n"); + sb.append(" residenceZip: ").append(toIndentedString(residenceZip)).append("\n"); + sb.append(" residenceCountry: ").append(toIndentedString(residenceCountry)).append("\n"); + sb.append(" residenceIsMailing: ").append(toIndentedString(residenceIsMailing)).append("\n"); + sb.append(" mailingAddress: ").append(toIndentedString(mailingAddress)).append("\n"); + sb.append(" mailingCity: ").append(toIndentedString(mailingCity)).append("\n"); + sb.append(" mailingState: ").append(toIndentedString(mailingState)).append("\n"); + sb.append(" mailingZip: ").append(toIndentedString(mailingZip)).append("\n"); + sb.append(" mailingCountry: ").append(toIndentedString(mailingCountry)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" foreignTinNotRequired: ").append(toIndentedString(foreignTinNotRequired)).append("\n"); + sb.append(" foreignTin: ").append(toIndentedString(foreignTin)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" treatyCountry: ").append(toIndentedString(treatyCountry)).append("\n"); + sb.append(" treatyArticle: ").append(toIndentedString(treatyArticle)).append("\n"); + sb.append(" treatyReasons: ").append(toIndentedString(treatyReasons)).append("\n"); + sb.append(" withholdingRate: ").append(toIndentedString(withholdingRate)).append("\n"); + sb.append(" incomeType: ").append(toIndentedString(incomeType)).append("\n"); + sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).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("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); + + // 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 W8BenFormRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W8BenFormRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W8BenFormRequest is not found in the empty JSON string", W8BenFormRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W8BenFormRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8BenFormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString())); + } + if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceAddress").toString())); + } + if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString())); + } + if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString())); + } + if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString())); + } + if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString())); + } + if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString())); + } + if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString())); + } + if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString())); + } + if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString())); + } + if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString())); + } + if ((jsonObj.get("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("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + 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("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W8BenFormRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W8BenFormRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W8BenFormRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W8BenFormRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W8BenFormRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W8BenFormRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W8BenFormRequest + * @throws IOException if the JSON string is invalid with respect to W8BenFormRequest + */ + public static W8BenFormRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W8BenFormRequest.class); + } + + /** + * Convert an instance of W8BenFormRequest 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/W8BenFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java index 83f61f3..daec59e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.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/W8BeneFormDataModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BeneFormDataModel.java index 7fd2da3..6a96ead 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BeneFormDataModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BeneFormDataModel.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 @@ -27,6 +27,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -518,19 +519,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE = "part19FormationOrResolutionDate"; @SerializedName(SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE) - private OffsetDateTime part19FormationOrResolutionDate; + private LocalDate part19FormationOrResolutionDate; public static final String SERIALIZED_NAME_PART20_FILING_DATE = "part20FilingDate"; @SerializedName(SERIALIZED_NAME_PART20_FILING_DATE) - private OffsetDateTime part20FilingDate; + private LocalDate part20FilingDate; public static final String SERIALIZED_NAME_PART21_DETERMINATION_DATE = "part21DeterminationDate"; @SerializedName(SERIALIZED_NAME_PART21_DETERMINATION_DATE) - private OffsetDateTime part21DeterminationDate; + private LocalDate part21DeterminationDate; public static final String SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS = "substantialUsOwners"; @SerializedName(SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS) - private List substantialUsOwners = new ArrayList<>(); + private List substantialUsOwners; public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) @@ -910,11 +911,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_BOX35_FORMED_ON_DATE = "box35FormedOnDate"; @SerializedName(SERIALIZED_NAME_BOX35_FORMED_ON_DATE) - private OffsetDateTime box35FormedOnDate; + private LocalDate box35FormedOnDate; public static final String SERIALIZED_NAME_BOX36_FILED_ON_DATE = "box36FiledOnDate"; @SerializedName(SERIALIZED_NAME_BOX36_FILED_ON_DATE) - private OffsetDateTime box36FiledOnDate; + private LocalDate box36FiledOnDate; public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) @@ -2851,7 +2852,7 @@ public void setCertifyPart29Signature(Boolean certifyPart29Signature) { } - public W8BeneFormDataModel part19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public W8BeneFormDataModel part19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; return this; } @@ -2861,16 +2862,16 @@ public W8BeneFormDataModel part19FormationOrResolutionDate(OffsetDateTime part19 * @return part19FormationOrResolutionDate */ @javax.annotation.Nullable - public OffsetDateTime getPart19FormationOrResolutionDate() { + public LocalDate getPart19FormationOrResolutionDate() { return part19FormationOrResolutionDate; } - public void setPart19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public void setPart19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; } - public W8BeneFormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { + public W8BeneFormDataModel part20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; return this; } @@ -2880,16 +2881,16 @@ public W8BeneFormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { * @return part20FilingDate */ @javax.annotation.Nullable - public OffsetDateTime getPart20FilingDate() { + public LocalDate getPart20FilingDate() { return part20FilingDate; } - public void setPart20FilingDate(OffsetDateTime part20FilingDate) { + public void setPart20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; } - public W8BeneFormDataModel part21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public W8BeneFormDataModel part21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; return this; } @@ -2899,11 +2900,11 @@ public W8BeneFormDataModel part21DeterminationDate(OffsetDateTime part21Determin * @return part21DeterminationDate */ @javax.annotation.Nullable - public OffsetDateTime getPart21DeterminationDate() { + public LocalDate getPart21DeterminationDate() { return part21DeterminationDate; } - public void setPart21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public void setPart21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; } @@ -4721,7 +4722,7 @@ public void setCertifyBox42(Boolean certifyBox42) { } - public W8BeneFormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public W8BeneFormDataModel box35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; return this; } @@ -4731,16 +4732,16 @@ public W8BeneFormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { * @return box35FormedOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox35FormedOnDate() { + public LocalDate getBox35FormedOnDate() { return box35FormedOnDate; } - public void setBox35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public void setBox35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; } - public W8BeneFormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public W8BeneFormDataModel box36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; return this; } @@ -4750,11 +4751,11 @@ public W8BeneFormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { * @return box36FiledOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox36FiledOnDate() { + public LocalDate getBox36FiledOnDate() { return box36FiledOnDate; } - public void setBox36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public void setBox36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormDataModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormDataModel.java index ef21b7f..3b64c61 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormDataModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormDataModel.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 @@ -27,6 +27,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -594,11 +595,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_BOX35_FORMED_ON_DATE = "box35FormedOnDate"; @SerializedName(SERIALIZED_NAME_BOX35_FORMED_ON_DATE) - private OffsetDateTime box35FormedOnDate; + private LocalDate box35FormedOnDate; public static final String SERIALIZED_NAME_BOX36_FILED_ON_DATE = "box36FiledOnDate"; @SerializedName(SERIALIZED_NAME_BOX36_FILED_ON_DATE) - private OffsetDateTime box36FiledOnDate; + private LocalDate box36FiledOnDate; public static final String SERIALIZED_NAME_EMPLOYEE_FIRST_NAME = "employeeFirstName"; @SerializedName(SERIALIZED_NAME_EMPLOYEE_FIRST_NAME) @@ -878,19 +879,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE = "part19FormationOrResolutionDate"; @SerializedName(SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE) - private OffsetDateTime part19FormationOrResolutionDate; + private LocalDate part19FormationOrResolutionDate; public static final String SERIALIZED_NAME_PART20_FILING_DATE = "part20FilingDate"; @SerializedName(SERIALIZED_NAME_PART20_FILING_DATE) - private OffsetDateTime part20FilingDate; + private LocalDate part20FilingDate; public static final String SERIALIZED_NAME_PART21_DETERMINATION_DATE = "part21DeterminationDate"; @SerializedName(SERIALIZED_NAME_PART21_DETERMINATION_DATE) - private OffsetDateTime part21DeterminationDate; + private LocalDate part21DeterminationDate; public static final String SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS = "substantialUsOwners"; @SerializedName(SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS) - private List substantialUsOwners = new ArrayList<>(); + private List substantialUsOwners; public static final String SERIALIZED_NAME_BIRTHDAY = "birthday"; @SerializedName(SERIALIZED_NAME_BIRTHDAY) @@ -3212,7 +3213,7 @@ public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { } - public W8ImyFormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public W8ImyFormDataModel box35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; return this; } @@ -3222,16 +3223,16 @@ public W8ImyFormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { * @return box35FormedOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox35FormedOnDate() { + public LocalDate getBox35FormedOnDate() { return box35FormedOnDate; } - public void setBox35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public void setBox35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; } - public W8ImyFormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public W8ImyFormDataModel box36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; return this; } @@ -3241,11 +3242,11 @@ public W8ImyFormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { * @return box36FiledOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox36FiledOnDate() { + public LocalDate getBox36FiledOnDate() { return box36FiledOnDate; } - public void setBox36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public void setBox36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; } @@ -4561,7 +4562,7 @@ public void setCertifyPart29Signature(Boolean certifyPart29Signature) { } - public W8ImyFormDataModel part19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public W8ImyFormDataModel part19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; return this; } @@ -4571,16 +4572,16 @@ public W8ImyFormDataModel part19FormationOrResolutionDate(OffsetDateTime part19F * @return part19FormationOrResolutionDate */ @javax.annotation.Nullable - public OffsetDateTime getPart19FormationOrResolutionDate() { + public LocalDate getPart19FormationOrResolutionDate() { return part19FormationOrResolutionDate; } - public void setPart19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public void setPart19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; } - public W8ImyFormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { + public W8ImyFormDataModel part20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; return this; } @@ -4590,16 +4591,16 @@ public W8ImyFormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { * @return part20FilingDate */ @javax.annotation.Nullable - public OffsetDateTime getPart20FilingDate() { + public LocalDate getPart20FilingDate() { return part20FilingDate; } - public void setPart20FilingDate(OffsetDateTime part20FilingDate) { + public void setPart20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; } - public W8ImyFormDataModel part21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public W8ImyFormDataModel part21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; return this; } @@ -4609,11 +4610,11 @@ public W8ImyFormDataModel part21DeterminationDate(OffsetDateTime part21Determina * @return part21DeterminationDate */ @javax.annotation.Nullable - public OffsetDateTime getPart21DeterminationDate() { + public LocalDate getPart21DeterminationDate() { return part21DeterminationDate; } - public void setPart21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public void setPart21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java new file mode 100644 index 0000000..d8f3442 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java @@ -0,0 +1,3318 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +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; + +/** + * W8ImyFormRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W8ImyFormRequest { + /** + * The form type (always \"w8imy\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_CITIZENSHIP_COUNTRY = "citizenshipCountry"; + @SerializedName(SERIALIZED_NAME_CITIZENSHIP_COUNTRY) + private String citizenshipCountry; + + public static final String SERIALIZED_NAME_DISREGARDED_ENTITY = "disregardedEntity"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ENTITY) + private String disregardedEntity; + + public static final String SERIALIZED_NAME_ENTITY_TYPE = "entityType"; + @SerializedName(SERIALIZED_NAME_ENTITY_TYPE) + private String entityType; + + public static final String SERIALIZED_NAME_FATCA_STATUS = "fatcaStatus"; + @SerializedName(SERIALIZED_NAME_FATCA_STATUS) + private String fatcaStatus; + + public static final String SERIALIZED_NAME_RESIDENCE_ADDRESS = "residenceAddress"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_ADDRESS) + private String residenceAddress; + + public static final String SERIALIZED_NAME_RESIDENCE_CITY = "residenceCity"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_CITY) + private String residenceCity; + + public static final String SERIALIZED_NAME_RESIDENCE_STATE = "residenceState"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_STATE) + private String residenceState; + + public static final String SERIALIZED_NAME_RESIDENCE_ZIP = "residenceZip"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_ZIP) + private String residenceZip; + + public static final String SERIALIZED_NAME_RESIDENCE_COUNTRY = "residenceCountry"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_COUNTRY) + private String residenceCountry; + + public static final String SERIALIZED_NAME_RESIDENCE_IS_MAILING = "residenceIsMailing"; + @SerializedName(SERIALIZED_NAME_RESIDENCE_IS_MAILING) + private Boolean residenceIsMailing; + + public static final String SERIALIZED_NAME_MAILING_ADDRESS = "mailingAddress"; + @SerializedName(SERIALIZED_NAME_MAILING_ADDRESS) + private String mailingAddress; + + public static final String SERIALIZED_NAME_MAILING_CITY = "mailingCity"; + @SerializedName(SERIALIZED_NAME_MAILING_CITY) + private String mailingCity; + + public static final String SERIALIZED_NAME_MAILING_STATE = "mailingState"; + @SerializedName(SERIALIZED_NAME_MAILING_STATE) + private String mailingState; + + public static final String SERIALIZED_NAME_MAILING_ZIP = "mailingZip"; + @SerializedName(SERIALIZED_NAME_MAILING_ZIP) + private String mailingZip; + + public static final String SERIALIZED_NAME_MAILING_COUNTRY = "mailingCountry"; + @SerializedName(SERIALIZED_NAME_MAILING_COUNTRY) + private String mailingCountry; + + 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_GIIN = "giin"; + @SerializedName(SERIALIZED_NAME_GIIN) + private String giin; + + public static final String SERIALIZED_NAME_FOREIGN_TIN = "foreignTin"; + @SerializedName(SERIALIZED_NAME_FOREIGN_TIN) + private String foreignTin; + + public static final String SERIALIZED_NAME_REFERENCE_NUMBER = "referenceNumber"; + @SerializedName(SERIALIZED_NAME_REFERENCE_NUMBER) + private String referenceNumber; + + public static final String SERIALIZED_NAME_DISREGARDED_ENTITY_FATCA_STATUS = "disregardedEntityFatcaStatus"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ENTITY_FATCA_STATUS) + private String disregardedEntityFatcaStatus; + + public static final String SERIALIZED_NAME_DISREGARDED_ADDRESS = "disregardedAddress"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ADDRESS) + private String disregardedAddress; + + public static final String SERIALIZED_NAME_DISREGARDED_CITY = "disregardedCity"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_CITY) + private String disregardedCity; + + public static final String SERIALIZED_NAME_DISREGARDED_STATE = "disregardedState"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_STATE) + private String disregardedState; + + public static final String SERIALIZED_NAME_DISREGARDED_ZIP = "disregardedZip"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ZIP) + private String disregardedZip; + + public static final String SERIALIZED_NAME_DISREGARDED_COUNTRY = "disregardedCountry"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_COUNTRY) + private String disregardedCountry; + + public static final String SERIALIZED_NAME_DISREGARDED_ENTITY_GIIN = "disregardedEntityGiin"; + @SerializedName(SERIALIZED_NAME_DISREGARDED_ENTITY_GIIN) + private String disregardedEntityGiin; + + public static final String SERIALIZED_NAME_QUALIFIED_INTERMEDIARY_CERTIFICATION = "qualifiedIntermediaryCertification"; + @SerializedName(SERIALIZED_NAME_QUALIFIED_INTERMEDIARY_CERTIFICATION) + private Boolean qualifiedIntermediaryCertification; + + public static final String SERIALIZED_NAME_QI_PRIMARY_WITHHOLDING_RESPONSIBILITY_CERTIFICATION = "qiPrimaryWithholdingResponsibilityCertification"; + @SerializedName(SERIALIZED_NAME_QI_PRIMARY_WITHHOLDING_RESPONSIBILITY_CERTIFICATION) + private Boolean qiPrimaryWithholdingResponsibilityCertification; + + public static final String SERIALIZED_NAME_QI_WITHHOLDING_RESPONSIBILITY_FOR_PTP_SALES_CERTIFICATION = "qiWithholdingResponsibilityForPtpSalesCertification"; + @SerializedName(SERIALIZED_NAME_QI_WITHHOLDING_RESPONSIBILITY_FOR_PTP_SALES_CERTIFICATION) + private Boolean qiWithholdingResponsibilityForPtpSalesCertification; + + public static final String SERIALIZED_NAME_QI_NOMINEE_WITHHOLDING_RESPONSIBILITY_FOR_PTP_DISTRIBUTIONS_CERTIFICATION = "qiNomineeWithholdingResponsibilityForPtpDistributionsCertification"; + @SerializedName(SERIALIZED_NAME_QI_NOMINEE_WITHHOLDING_RESPONSIBILITY_FOR_PTP_DISTRIBUTIONS_CERTIFICATION) + private Boolean qiNomineeWithholdingResponsibilityForPtpDistributionsCertification; + + public static final String SERIALIZED_NAME_QI_SECURITIES_LENDER_SUBSTITUTE_DIVIDEND_WITHHOLDING_CERTIFICATION = "qiSecuritiesLenderSubstituteDividendWithholdingCertification"; + @SerializedName(SERIALIZED_NAME_QI_SECURITIES_LENDER_SUBSTITUTE_DIVIDEND_WITHHOLDING_CERTIFICATION) + private Boolean qiSecuritiesLenderSubstituteDividendWithholdingCertification; + + public static final String SERIALIZED_NAME_QI_WITHHOLDING_AND1099_REPORTING_RESPONSIBILITY_CERTIFICATION = "qiWithholdingAnd1099ReportingResponsibilityCertification"; + @SerializedName(SERIALIZED_NAME_QI_WITHHOLDING_AND1099_REPORTING_RESPONSIBILITY_CERTIFICATION) + private Boolean qiWithholdingAnd1099ReportingResponsibilityCertification; + + public static final String SERIALIZED_NAME_QI_FORM1099_OR_FATCA_REPORTING_RESPONSIBILITY_CERTIFICATION = "qiForm1099OrFatcaReportingResponsibilityCertification"; + @SerializedName(SERIALIZED_NAME_QI_FORM1099_OR_FATCA_REPORTING_RESPONSIBILITY_CERTIFICATION) + private Boolean qiForm1099OrFatcaReportingResponsibilityCertification; + + public static final String SERIALIZED_NAME_QI_OPT_OUT_OF_FORM1099_REPORTING_CERTIFICATION = "qiOptOutOfForm1099ReportingCertification"; + @SerializedName(SERIALIZED_NAME_QI_OPT_OUT_OF_FORM1099_REPORTING_CERTIFICATION) + private Boolean qiOptOutOfForm1099ReportingCertification; + + public static final String SERIALIZED_NAME_QI_WITHHOLDING_RATE_POOL_CERTIFICATION = "qiWithholdingRatePoolCertification"; + @SerializedName(SERIALIZED_NAME_QI_WITHHOLDING_RATE_POOL_CERTIFICATION) + private Boolean qiWithholdingRatePoolCertification; + + public static final String SERIALIZED_NAME_QI_INTERMEDIARY_OR_FLOW_THROUGH_ENTITY_DOCUMENTATION_CERTIFICATION = "qiIntermediaryOrFlowThroughEntityDocumentationCertification"; + @SerializedName(SERIALIZED_NAME_QI_INTERMEDIARY_OR_FLOW_THROUGH_ENTITY_DOCUMENTATION_CERTIFICATION) + private Boolean qiIntermediaryOrFlowThroughEntityDocumentationCertification; + + public static final String SERIALIZED_NAME_QUALIFIED_DERIVATIVES_DEALER_CERTIFICATION = "qualifiedDerivativesDealerCertification"; + @SerializedName(SERIALIZED_NAME_QUALIFIED_DERIVATIVES_DEALER_CERTIFICATION) + private Boolean qualifiedDerivativesDealerCertification; + + public static final String SERIALIZED_NAME_QDD_CORPORATION = "qddCorporation"; + @SerializedName(SERIALIZED_NAME_QDD_CORPORATION) + private Boolean qddCorporation; + + public static final String SERIALIZED_NAME_QDD_PARTNERSHIP = "qddPartnership"; + @SerializedName(SERIALIZED_NAME_QDD_PARTNERSHIP) + private Boolean qddPartnership; + + public static final String SERIALIZED_NAME_QDD_DISREGARDED_ENTITY = "qddDisregardedEntity"; + @SerializedName(SERIALIZED_NAME_QDD_DISREGARDED_ENTITY) + private Boolean qddDisregardedEntity; + + public static final String SERIALIZED_NAME_NONQUALIFIED_INTERMEDIARY_CERTIFICATION = "nonqualifiedIntermediaryCertification"; + @SerializedName(SERIALIZED_NAME_NONQUALIFIED_INTERMEDIARY_CERTIFICATION) + private Boolean nonqualifiedIntermediaryCertification; + + public static final String SERIALIZED_NAME_NQI_WITHHOLDING_STATEMENT_TRANSMISSION_CERTIFICATION = "nqiWithholdingStatementTransmissionCertification"; + @SerializedName(SERIALIZED_NAME_NQI_WITHHOLDING_STATEMENT_TRANSMISSION_CERTIFICATION) + private Boolean nqiWithholdingStatementTransmissionCertification; + + public static final String SERIALIZED_NAME_NQI_WITHHOLDING_RATE_POOL_COMPLIANCE_CERTIFICATION = "nqiWithholdingRatePoolComplianceCertification"; + @SerializedName(SERIALIZED_NAME_NQI_WITHHOLDING_RATE_POOL_COMPLIANCE_CERTIFICATION) + private Boolean nqiWithholdingRatePoolComplianceCertification; + + public static final String SERIALIZED_NAME_NQI_QUALIFIED_SECURITIES_LENDER_CERTIFICATION = "nqiQualifiedSecuritiesLenderCertification"; + @SerializedName(SERIALIZED_NAME_NQI_QUALIFIED_SECURITIES_LENDER_CERTIFICATION) + private Boolean nqiQualifiedSecuritiesLenderCertification; + + public static final String SERIALIZED_NAME_NQI_ALTERNATIVE_WITHHOLDING_STATEMENT_VERIFICATION_CERTIFICATION = "nqiAlternativeWithholdingStatementVerificationCertification"; + @SerializedName(SERIALIZED_NAME_NQI_ALTERNATIVE_WITHHOLDING_STATEMENT_VERIFICATION_CERTIFICATION) + private Boolean nqiAlternativeWithholdingStatementVerificationCertification; + + public static final String SERIALIZED_NAME_TERRITORY_FINANCIAL_INSTITUTION_CERTIFICATION = "territoryFinancialInstitutionCertification"; + @SerializedName(SERIALIZED_NAME_TERRITORY_FINANCIAL_INSTITUTION_CERTIFICATION) + private Boolean territoryFinancialInstitutionCertification; + + public static final String SERIALIZED_NAME_TFI_TREATED_AS_US_PERSON_CERTIFICATION = "tfiTreatedAsUsPersonCertification"; + @SerializedName(SERIALIZED_NAME_TFI_TREATED_AS_US_PERSON_CERTIFICATION) + private Boolean tfiTreatedAsUsPersonCertification; + + public static final String SERIALIZED_NAME_TFI_WITHHOLDING_STATEMENT_TRANSMISSION_CERTIFICATION = "tfiWithholdingStatementTransmissionCertification"; + @SerializedName(SERIALIZED_NAME_TFI_WITHHOLDING_STATEMENT_TRANSMISSION_CERTIFICATION) + private Boolean tfiWithholdingStatementTransmissionCertification; + + public static final String SERIALIZED_NAME_TFI_TREATED_AS_US_PERSON_FOR_PTP_SALES_CERTIFICATION = "tfiTreatedAsUsPersonForPtpSalesCertification"; + @SerializedName(SERIALIZED_NAME_TFI_TREATED_AS_US_PERSON_FOR_PTP_SALES_CERTIFICATION) + private Boolean tfiTreatedAsUsPersonForPtpSalesCertification; + + public static final String SERIALIZED_NAME_TFI_NOMINEE_US_PERSON_FOR_PTP_DISTRIBUTIONS_CERTIFICATION = "tfiNomineeUsPersonForPtpDistributionsCertification"; + @SerializedName(SERIALIZED_NAME_TFI_NOMINEE_US_PERSON_FOR_PTP_DISTRIBUTIONS_CERTIFICATION) + private Boolean tfiNomineeUsPersonForPtpDistributionsCertification; + + public static final String SERIALIZED_NAME_TFI_NOT_NOMINEE_FOR_PTP_DISTRIBUTIONS_CERTIFICATION = "tfiNotNomineeForPtpDistributionsCertification"; + @SerializedName(SERIALIZED_NAME_TFI_NOT_NOMINEE_FOR_PTP_DISTRIBUTIONS_CERTIFICATION) + private Boolean tfiNotNomineeForPtpDistributionsCertification; + + public static final String SERIALIZED_NAME_US_BRANCH_NON_EFFECTIVELY_CONNECTED_INCOME_CERTIFICATION = "usBranchNonEffectivelyConnectedIncomeCertification"; + @SerializedName(SERIALIZED_NAME_US_BRANCH_NON_EFFECTIVELY_CONNECTED_INCOME_CERTIFICATION) + private Boolean usBranchNonEffectivelyConnectedIncomeCertification; + + public static final String SERIALIZED_NAME_US_BRANCH_AGREEMENT_TO_BE_TREATED_AS_US_PERSON_CERTIFICATION = "usBranchAgreementToBeTreatedAsUsPersonCertification"; + @SerializedName(SERIALIZED_NAME_US_BRANCH_AGREEMENT_TO_BE_TREATED_AS_US_PERSON_CERTIFICATION) + private Boolean usBranchAgreementToBeTreatedAsUsPersonCertification; + + public static final String SERIALIZED_NAME_US_BRANCH_WITHHOLDING_STATEMENT_AND_COMPLIANCE_CERTIFICATION = "usBranchWithholdingStatementAndComplianceCertification"; + @SerializedName(SERIALIZED_NAME_US_BRANCH_WITHHOLDING_STATEMENT_AND_COMPLIANCE_CERTIFICATION) + private Boolean usBranchWithholdingStatementAndComplianceCertification; + + public static final String SERIALIZED_NAME_US_BRANCH_ACTING_AS_US_PERSON_FOR_PTP_SALES_CERTIFICATION = "usBranchActingAsUsPersonForPtpSalesCertification"; + @SerializedName(SERIALIZED_NAME_US_BRANCH_ACTING_AS_US_PERSON_FOR_PTP_SALES_CERTIFICATION) + private Boolean usBranchActingAsUsPersonForPtpSalesCertification; + + public static final String SERIALIZED_NAME_US_BRANCH_NOMINEE_FOR_PTP_DISTRIBUTIONS_CERTIFICATION = "usBranchNomineeForPtpDistributionsCertification"; + @SerializedName(SERIALIZED_NAME_US_BRANCH_NOMINEE_FOR_PTP_DISTRIBUTIONS_CERTIFICATION) + private Boolean usBranchNomineeForPtpDistributionsCertification; + + public static final String SERIALIZED_NAME_US_BRANCH_NOT_NOMINEE_FOR_PTP_DISTRIBUTIONS_CERTIFICATION = "usBranchNotNomineeForPtpDistributionsCertification"; + @SerializedName(SERIALIZED_NAME_US_BRANCH_NOT_NOMINEE_FOR_PTP_DISTRIBUTIONS_CERTIFICATION) + private Boolean usBranchNotNomineeForPtpDistributionsCertification; + + public static final String SERIALIZED_NAME_WITHHOLDING_FOREIGN_PARTNERSHIP_OR_TRUST_CERTIFICATION = "withholdingForeignPartnershipOrTrustCertification"; + @SerializedName(SERIALIZED_NAME_WITHHOLDING_FOREIGN_PARTNERSHIP_OR_TRUST_CERTIFICATION) + private Boolean withholdingForeignPartnershipOrTrustCertification; + + public static final String SERIALIZED_NAME_NONWITHHOLDING_FOREIGN_ENTITY_WITHHOLDING_STATEMENT_CERTIFICATION = "nonwithholdingForeignEntityWithholdingStatementCertification"; + @SerializedName(SERIALIZED_NAME_NONWITHHOLDING_FOREIGN_ENTITY_WITHHOLDING_STATEMENT_CERTIFICATION) + private Boolean nonwithholdingForeignEntityWithholdingStatementCertification; + + public static final String SERIALIZED_NAME_FOREIGN_ENTITY_PARTNER_IN_LOWER_TIER_PARTNERSHIP_CERTIFICATION = "foreignEntityPartnerInLowerTierPartnershipCertification"; + @SerializedName(SERIALIZED_NAME_FOREIGN_ENTITY_PARTNER_IN_LOWER_TIER_PARTNERSHIP_CERTIFICATION) + private Boolean foreignEntityPartnerInLowerTierPartnershipCertification; + + public static final String SERIALIZED_NAME_FOREIGN_PARTNERSHIP_AMOUNT_REALIZED_SECTION1446_F_CERTIFICATION = "foreignPartnershipAmountRealizedSection1446FCertification"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PARTNERSHIP_AMOUNT_REALIZED_SECTION1446_F_CERTIFICATION) + private Boolean foreignPartnershipAmountRealizedSection1446FCertification; + + public static final String SERIALIZED_NAME_FOREIGN_PARTNERSHIP_MODIFIED_AMOUNT_REALIZED_CERTIFICATION = "foreignPartnershipModifiedAmountRealizedCertification"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PARTNERSHIP_MODIFIED_AMOUNT_REALIZED_CERTIFICATION) + private Boolean foreignPartnershipModifiedAmountRealizedCertification; + + public static final String SERIALIZED_NAME_FOREIGN_GRANTOR_TRUST_AMOUNT_REALIZED_ALLOCATION_CERTIFICATION = "foreignGrantorTrustAmountRealizedAllocationCertification"; + @SerializedName(SERIALIZED_NAME_FOREIGN_GRANTOR_TRUST_AMOUNT_REALIZED_ALLOCATION_CERTIFICATION) + private Boolean foreignGrantorTrustAmountRealizedAllocationCertification; + + public static final String SERIALIZED_NAME_ALTERNATIVE_WITHHOLDING_STATEMENT_RELIANCE_CERTIFICATION = "alternativeWithholdingStatementRelianceCertification"; + @SerializedName(SERIALIZED_NAME_ALTERNATIVE_WITHHOLDING_STATEMENT_RELIANCE_CERTIFICATION) + private Boolean alternativeWithholdingStatementRelianceCertification; + + public static final String SERIALIZED_NAME_NP_FFI_WITH_EXEMPT_BENEFICIAL_OWNERS_CERTIFICATION = "npFfiWithExemptBeneficialOwnersCertification"; + @SerializedName(SERIALIZED_NAME_NP_FFI_WITH_EXEMPT_BENEFICIAL_OWNERS_CERTIFICATION) + private Boolean npFfiWithExemptBeneficialOwnersCertification; + + public static final String SERIALIZED_NAME_FFI_SPONSORING_ENTITY = "ffiSponsoringEntity"; + @SerializedName(SERIALIZED_NAME_FFI_SPONSORING_ENTITY) + private String ffiSponsoringEntity; + + public static final String SERIALIZED_NAME_INVESTMENT_ENTITY_CERTIFICATION = "investmentEntityCertification"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_ENTITY_CERTIFICATION) + private Boolean investmentEntityCertification; + + public static final String SERIALIZED_NAME_CONTROLLED_FOREIGN_CORPORATION_CERTIFICATION = "controlledForeignCorporationCertification"; + @SerializedName(SERIALIZED_NAME_CONTROLLED_FOREIGN_CORPORATION_CERTIFICATION) + private Boolean controlledForeignCorporationCertification; + + public static final String SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_CERTIFICATION = "ownerDocumentedFfiCertification"; + @SerializedName(SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_CERTIFICATION) + private Boolean ownerDocumentedFfiCertification; + + public static final String SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_REPORTING_STATEMENT_CERTIFICATION = "ownerDocumentedFfiReportingStatementCertification"; + @SerializedName(SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_REPORTING_STATEMENT_CERTIFICATION) + private Boolean ownerDocumentedFfiReportingStatementCertification; + + public static final String SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_AUDITOR_LETTER_CERTIFICATION = "ownerDocumentedFfiAuditorLetterCertification"; + @SerializedName(SERIALIZED_NAME_OWNER_DOCUMENTED_FFI_AUDITOR_LETTER_CERTIFICATION) + private Boolean ownerDocumentedFfiAuditorLetterCertification; + + public static final String SERIALIZED_NAME_COMPLIANT_NONREGISTERING_LOCAL_BANK_CERTIFICATION = "compliantNonregisteringLocalBankCertification"; + @SerializedName(SERIALIZED_NAME_COMPLIANT_NONREGISTERING_LOCAL_BANK_CERTIFICATION) + private Boolean compliantNonregisteringLocalBankCertification; + + public static final String SERIALIZED_NAME_COMPLIANT_FFI_LOW_VALUE_ACCOUNTS_CERTIFICATION = "compliantFfiLowValueAccountsCertification"; + @SerializedName(SERIALIZED_NAME_COMPLIANT_FFI_LOW_VALUE_ACCOUNTS_CERTIFICATION) + private Boolean compliantFfiLowValueAccountsCertification; + + public static final String SERIALIZED_NAME_SPONSORED_CLOSELY_HELD_ENTITY_SPONSORING_ENTITY = "sponsoredCloselyHeldEntitySponsoringEntity"; + @SerializedName(SERIALIZED_NAME_SPONSORED_CLOSELY_HELD_ENTITY_SPONSORING_ENTITY) + private String sponsoredCloselyHeldEntitySponsoringEntity; + + public static final String SERIALIZED_NAME_SPONSORED_CLOSELY_HELD_INVESTMENT_VEHICLE_CERTIFICATION = "sponsoredCloselyHeldInvestmentVehicleCertification"; + @SerializedName(SERIALIZED_NAME_SPONSORED_CLOSELY_HELD_INVESTMENT_VEHICLE_CERTIFICATION) + private Boolean sponsoredCloselyHeldInvestmentVehicleCertification; + + public static final String SERIALIZED_NAME_COMPLIANT_LIMITED_LIFE_DEBT_ENTITY_CERTIFICATION = "compliantLimitedLifeDebtEntityCertification"; + @SerializedName(SERIALIZED_NAME_COMPLIANT_LIMITED_LIFE_DEBT_ENTITY_CERTIFICATION) + private Boolean compliantLimitedLifeDebtEntityCertification; + + public static final String SERIALIZED_NAME_INVESTMENT_ENTITY_NO_FINANCIAL_ACCOUNTS_CERTIFICATION = "investmentEntityNoFinancialAccountsCertification"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_ENTITY_NO_FINANCIAL_ACCOUNTS_CERTIFICATION) + private Boolean investmentEntityNoFinancialAccountsCertification; + + public static final String SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_CERTIFICATION = "restrictedDistributorCertification"; + @SerializedName(SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_CERTIFICATION) + private Boolean restrictedDistributorCertification; + + public static final String SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_AGREEMENT_CERTIFICATION = "restrictedDistributorAgreementCertification"; + @SerializedName(SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_AGREEMENT_CERTIFICATION) + private Boolean restrictedDistributorAgreementCertification; + + public static final String SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_PREEXISTING_SALES_COMPLIANCE_CERTIFICATION = "restrictedDistributorPreexistingSalesComplianceCertification"; + @SerializedName(SERIALIZED_NAME_RESTRICTED_DISTRIBUTOR_PREEXISTING_SALES_COMPLIANCE_CERTIFICATION) + private Boolean restrictedDistributorPreexistingSalesComplianceCertification; + + public static final String SERIALIZED_NAME_FOREIGN_CENTRAL_BANK_OF_ISSUE_CERTIFICATION = "foreignCentralBankOfIssueCertification"; + @SerializedName(SERIALIZED_NAME_FOREIGN_CENTRAL_BANK_OF_ISSUE_CERTIFICATION) + private Boolean foreignCentralBankOfIssueCertification; + + public static final String SERIALIZED_NAME_NONREPORTING_IGA_FFI_CERTIFICATION = "nonreportingIgaFfiCertification"; + @SerializedName(SERIALIZED_NAME_NONREPORTING_IGA_FFI_CERTIFICATION) + private Boolean nonreportingIgaFfiCertification; + + public static final String SERIALIZED_NAME_IGA_COUNTRY = "igaCountry"; + @SerializedName(SERIALIZED_NAME_IGA_COUNTRY) + private String igaCountry; + + public static final String SERIALIZED_NAME_IGA_MODEL = "igaModel"; + @SerializedName(SERIALIZED_NAME_IGA_MODEL) + private String igaModel; + + public static final String SERIALIZED_NAME_IGA_LEGAL_STATUS_TREATMENT = "igaLegalStatusTreatment"; + @SerializedName(SERIALIZED_NAME_IGA_LEGAL_STATUS_TREATMENT) + private String igaLegalStatusTreatment; + + public static final String SERIALIZED_NAME_IGA_FFI_TRUSTEE_OR_SPONSOR = "igaFfiTrusteeOrSponsor"; + @SerializedName(SERIALIZED_NAME_IGA_FFI_TRUSTEE_OR_SPONSOR) + private String igaFfiTrusteeOrSponsor; + + public static final String SERIALIZED_NAME_IGA_FFI_TRUSTEE_IS_FOREIGN = "igaFfiTrusteeIsForeign"; + @SerializedName(SERIALIZED_NAME_IGA_FFI_TRUSTEE_IS_FOREIGN) + private Boolean igaFfiTrusteeIsForeign; + + public static final String SERIALIZED_NAME_TREATY_QUALIFIED_PENSION_FUND_CERTIFICATION = "treatyQualifiedPensionFundCertification"; + @SerializedName(SERIALIZED_NAME_TREATY_QUALIFIED_PENSION_FUND_CERTIFICATION) + private Boolean treatyQualifiedPensionFundCertification; + + public static final String SERIALIZED_NAME_QUALIFIED_RETIREMENT_FUND_CERTIFICATION = "qualifiedRetirementFundCertification"; + @SerializedName(SERIALIZED_NAME_QUALIFIED_RETIREMENT_FUND_CERTIFICATION) + private Boolean qualifiedRetirementFundCertification; + + public static final String SERIALIZED_NAME_NARROW_PARTICIPATION_RETIREMENT_FUND_CERTIFICATION = "narrowParticipationRetirementFundCertification"; + @SerializedName(SERIALIZED_NAME_NARROW_PARTICIPATION_RETIREMENT_FUND_CERTIFICATION) + private Boolean narrowParticipationRetirementFundCertification; + + public static final String SERIALIZED_NAME_SECTION401_A_EQUIVALENT_PENSION_PLAN_CERTIFICATION = "section401AEquivalentPensionPlanCertification"; + @SerializedName(SERIALIZED_NAME_SECTION401_A_EQUIVALENT_PENSION_PLAN_CERTIFICATION) + private Boolean section401AEquivalentPensionPlanCertification; + + public static final String SERIALIZED_NAME_INVESTMENT_ENTITY_FOR_RETIREMENT_FUNDS_CERTIFICATION = "investmentEntityForRetirementFundsCertification"; + @SerializedName(SERIALIZED_NAME_INVESTMENT_ENTITY_FOR_RETIREMENT_FUNDS_CERTIFICATION) + private Boolean investmentEntityForRetirementFundsCertification; + + public static final String SERIALIZED_NAME_EXEMPT_BENEFICIAL_OWNER_SPONSORED_RETIREMENT_FUND_CERTIFICATION = "exemptBeneficialOwnerSponsoredRetirementFundCertification"; + @SerializedName(SERIALIZED_NAME_EXEMPT_BENEFICIAL_OWNER_SPONSORED_RETIREMENT_FUND_CERTIFICATION) + private Boolean exemptBeneficialOwnerSponsoredRetirementFundCertification; + + public static final String SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_GROUP_ENTITY_CERTIFICATION = "exceptedNonfinancialGroupEntityCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_GROUP_ENTITY_CERTIFICATION) + private Boolean exceptedNonfinancialGroupEntityCertification; + + public static final String SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_START_UP_CERTIFICATION = "exceptedNonfinancialStartUpCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_START_UP_CERTIFICATION) + private Boolean exceptedNonfinancialStartUpCertification; + + public static final String SERIALIZED_NAME_STARTUP_FORMATION_OR_RESOLUTION_DATE = "startupFormationOrResolutionDate"; + @SerializedName(SERIALIZED_NAME_STARTUP_FORMATION_OR_RESOLUTION_DATE) + private LocalDate startupFormationOrResolutionDate; + + public static final String SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY_CERTIFICATION = "exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY_CERTIFICATION) + private Boolean exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification; + + public static final String SERIALIZED_NAME_NONFINANCIAL_ENTITY_FILING_DATE = "nonfinancialEntityFilingDate"; + @SerializedName(SERIALIZED_NAME_NONFINANCIAL_ENTITY_FILING_DATE) + private LocalDate nonfinancialEntityFilingDate; + + public static final String SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_CERTIFICATION = "publiclyTradedNffeCertification"; + @SerializedName(SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_CERTIFICATION) + private Boolean publiclyTradedNffeCertification; + + public static final String SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_SECURITIES_MARKET = "publiclyTradedNffeSecuritiesMarket"; + @SerializedName(SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_SECURITIES_MARKET) + private String publiclyTradedNffeSecuritiesMarket; + + public static final String SERIALIZED_NAME_NFFE_AFFILIATE_OF_PUBLICLY_TRADED_ENTITY_CERTIFICATION = "nffeAffiliateOfPubliclyTradedEntityCertification"; + @SerializedName(SERIALIZED_NAME_NFFE_AFFILIATE_OF_PUBLICLY_TRADED_ENTITY_CERTIFICATION) + private Boolean nffeAffiliateOfPubliclyTradedEntityCertification; + + public static final String SERIALIZED_NAME_PUBLICLY_TRADED_ENTITY = "publiclyTradedEntity"; + @SerializedName(SERIALIZED_NAME_PUBLICLY_TRADED_ENTITY) + private String publiclyTradedEntity; + + public static final String SERIALIZED_NAME_NFFE_AFFILIATE_OF_PUBLICLY_TRADED_ENTITY_SECURITIES_MARKET = "nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket"; + @SerializedName(SERIALIZED_NAME_NFFE_AFFILIATE_OF_PUBLICLY_TRADED_ENTITY_SECURITIES_MARKET) + private String nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket; + + public static final String SERIALIZED_NAME_EXCEPTED_TERRITORY_NFFE_CERTIFICATION = "exceptedTerritoryNffeCertification"; + @SerializedName(SERIALIZED_NAME_EXCEPTED_TERRITORY_NFFE_CERTIFICATION) + private Boolean exceptedTerritoryNffeCertification; + + public static final String SERIALIZED_NAME_ACTIVE_NFFE_CERTIFICATION = "activeNffeCertification"; + @SerializedName(SERIALIZED_NAME_ACTIVE_NFFE_CERTIFICATION) + private Boolean activeNffeCertification; + + public static final String SERIALIZED_NAME_PASSIVE_NFFE_CERTIFICATION = "passiveNffeCertification"; + @SerializedName(SERIALIZED_NAME_PASSIVE_NFFE_CERTIFICATION) + private Boolean passiveNffeCertification; + + public static final String SERIALIZED_NAME_SPONSORED_DIRECT_REPORTING_NFFE_CERTIFICATION = "sponsoredDirectReportingNffeCertification"; + @SerializedName(SERIALIZED_NAME_SPONSORED_DIRECT_REPORTING_NFFE_CERTIFICATION) + private Boolean sponsoredDirectReportingNffeCertification; + + public static final String SERIALIZED_NAME_DIRECT_REPORTING_NFFE_SPONSORING_ENTITY = "directReportingNffeSponsoringEntity"; + @SerializedName(SERIALIZED_NAME_DIRECT_REPORTING_NFFE_SPONSORING_ENTITY) + private String directReportingNffeSponsoringEntity; + + public static final String SERIALIZED_NAME_SIGNER_NAME = "signerName"; + @SerializedName(SERIALIZED_NAME_SIGNER_NAME) + private String signerName; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + 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_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + + public W8ImyFormRequest() { + } + + public W8ImyFormRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w8imy\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W8ImyFormRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the individual or entity associated with the form. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public W8ImyFormRequest citizenshipCountry(String citizenshipCountry) { + this.citizenshipCountry = citizenshipCountry; + return this; + } + + /** + * The country of citizenship. + * @return citizenshipCountry + */ + @javax.annotation.Nullable + public String getCitizenshipCountry() { + return citizenshipCountry; + } + + public void setCitizenshipCountry(String citizenshipCountry) { + this.citizenshipCountry = citizenshipCountry; + } + + + public W8ImyFormRequest disregardedEntity(String disregardedEntity) { + this.disregardedEntity = disregardedEntity; + return this; + } + + /** + * The name of the disregarded entity receiving the payment (if applicable). + * @return disregardedEntity + */ + @javax.annotation.Nullable + public String getDisregardedEntity() { + return disregardedEntity; + } + + public void setDisregardedEntity(String disregardedEntity) { + this.disregardedEntity = disregardedEntity; + } + + + public W8ImyFormRequest entityType(String entityType) { + this.entityType = entityType; + return this; + } + + /** + * The entity type. + * @return entityType + */ + @javax.annotation.Nullable + public String getEntityType() { + return entityType; + } + + public void setEntityType(String entityType) { + this.entityType = entityType; + } + + + public W8ImyFormRequest fatcaStatus(String fatcaStatus) { + this.fatcaStatus = fatcaStatus; + return this; + } + + /** + * The FATCA status. + * @return fatcaStatus + */ + @javax.annotation.Nullable + public String getFatcaStatus() { + return fatcaStatus; + } + + public void setFatcaStatus(String fatcaStatus) { + this.fatcaStatus = fatcaStatus; + } + + + public W8ImyFormRequest residenceAddress(String residenceAddress) { + this.residenceAddress = residenceAddress; + return this; + } + + /** + * The residential address of the individual or entity. + * @return residenceAddress + */ + @javax.annotation.Nullable + public String getResidenceAddress() { + return residenceAddress; + } + + public void setResidenceAddress(String residenceAddress) { + this.residenceAddress = residenceAddress; + } + + + public W8ImyFormRequest residenceCity(String residenceCity) { + this.residenceCity = residenceCity; + return this; + } + + /** + * The city of residence. + * @return residenceCity + */ + @javax.annotation.Nullable + public String getResidenceCity() { + return residenceCity; + } + + public void setResidenceCity(String residenceCity) { + this.residenceCity = residenceCity; + } + + + public W8ImyFormRequest residenceState(String residenceState) { + this.residenceState = residenceState; + return this; + } + + /** + * The state of residence. + * @return residenceState + */ + @javax.annotation.Nullable + public String getResidenceState() { + return residenceState; + } + + public void setResidenceState(String residenceState) { + this.residenceState = residenceState; + } + + + public W8ImyFormRequest residenceZip(String residenceZip) { + this.residenceZip = residenceZip; + return this; + } + + /** + * The ZIP code of the residence. + * @return residenceZip + */ + @javax.annotation.Nullable + public String getResidenceZip() { + return residenceZip; + } + + public void setResidenceZip(String residenceZip) { + this.residenceZip = residenceZip; + } + + + public W8ImyFormRequest residenceCountry(String residenceCountry) { + this.residenceCountry = residenceCountry; + return this; + } + + /** + * The country of residence. + * @return residenceCountry + */ + @javax.annotation.Nullable + public String getResidenceCountry() { + return residenceCountry; + } + + public void setResidenceCountry(String residenceCountry) { + this.residenceCountry = residenceCountry; + } + + + public W8ImyFormRequest residenceIsMailing(Boolean residenceIsMailing) { + this.residenceIsMailing = residenceIsMailing; + return this; + } + + /** + * Indicates whether the residence address is also the mailing address. + * @return residenceIsMailing + */ + @javax.annotation.Nullable + public Boolean getResidenceIsMailing() { + return residenceIsMailing; + } + + public void setResidenceIsMailing(Boolean residenceIsMailing) { + this.residenceIsMailing = residenceIsMailing; + } + + + public W8ImyFormRequest mailingAddress(String mailingAddress) { + this.mailingAddress = mailingAddress; + return this; + } + + /** + * The mailing address. + * @return mailingAddress + */ + @javax.annotation.Nullable + public String getMailingAddress() { + return mailingAddress; + } + + public void setMailingAddress(String mailingAddress) { + this.mailingAddress = mailingAddress; + } + + + public W8ImyFormRequest mailingCity(String mailingCity) { + this.mailingCity = mailingCity; + return this; + } + + /** + * The city of the mailing address. + * @return mailingCity + */ + @javax.annotation.Nullable + public String getMailingCity() { + return mailingCity; + } + + public void setMailingCity(String mailingCity) { + this.mailingCity = mailingCity; + } + + + public W8ImyFormRequest mailingState(String mailingState) { + this.mailingState = mailingState; + return this; + } + + /** + * The state of the mailing address. + * @return mailingState + */ + @javax.annotation.Nullable + public String getMailingState() { + return mailingState; + } + + public void setMailingState(String mailingState) { + this.mailingState = mailingState; + } + + + public W8ImyFormRequest mailingZip(String mailingZip) { + this.mailingZip = mailingZip; + return this; + } + + /** + * The ZIP code of the mailing address. + * @return mailingZip + */ + @javax.annotation.Nullable + public String getMailingZip() { + return mailingZip; + } + + public void setMailingZip(String mailingZip) { + this.mailingZip = mailingZip; + } + + + public W8ImyFormRequest mailingCountry(String mailingCountry) { + this.mailingCountry = mailingCountry; + return this; + } + + /** + * The country of the mailing address. + * @return mailingCountry + */ + @javax.annotation.Nullable + public String getMailingCountry() { + return mailingCountry; + } + + public void setMailingCountry(String mailingCountry) { + this.mailingCountry = mailingCountry; + } + + + public W8ImyFormRequest tinType(String tinType) { + this.tinType = tinType; + return this; + } + + /** + * The type of TIN provided. + * @return tinType + */ + @javax.annotation.Nullable + public String getTinType() { + return tinType; + } + + public void setTinType(String tinType) { + this.tinType = tinType; + } + + + public W8ImyFormRequest tin(String tin) { + this.tin = tin; + return this; + } + + /** + * The taxpayer identification number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public W8ImyFormRequest giin(String giin) { + this.giin = giin; + return this; + } + + /** + * The global intermediary identification number (GIIN). + * @return giin + */ + @javax.annotation.Nullable + public String getGiin() { + return giin; + } + + public void setGiin(String giin) { + this.giin = giin; + } + + + public W8ImyFormRequest foreignTin(String foreignTin) { + this.foreignTin = foreignTin; + return this; + } + + /** + * The foreign taxpayer identification number (TIN). + * @return foreignTin + */ + @javax.annotation.Nullable + public String getForeignTin() { + return foreignTin; + } + + public void setForeignTin(String foreignTin) { + this.foreignTin = foreignTin; + } + + + public W8ImyFormRequest referenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + return this; + } + + /** + * A reference number for the form. + * @return referenceNumber + */ + @javax.annotation.Nullable + public String getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(String referenceNumber) { + this.referenceNumber = referenceNumber; + } + + + public W8ImyFormRequest disregardedEntityFatcaStatus(String disregardedEntityFatcaStatus) { + this.disregardedEntityFatcaStatus = disregardedEntityFatcaStatus; + return this; + } + + /** + * The FATCA status of disregarded entity or branch receiving payment. + * @return disregardedEntityFatcaStatus + */ + @javax.annotation.Nullable + public String getDisregardedEntityFatcaStatus() { + return disregardedEntityFatcaStatus; + } + + public void setDisregardedEntityFatcaStatus(String disregardedEntityFatcaStatus) { + this.disregardedEntityFatcaStatus = disregardedEntityFatcaStatus; + } + + + public W8ImyFormRequest disregardedAddress(String disregardedAddress) { + this.disregardedAddress = disregardedAddress; + return this; + } + + /** + * The address for disregarded entities. + * @return disregardedAddress + */ + @javax.annotation.Nullable + public String getDisregardedAddress() { + return disregardedAddress; + } + + public void setDisregardedAddress(String disregardedAddress) { + this.disregardedAddress = disregardedAddress; + } + + + public W8ImyFormRequest disregardedCity(String disregardedCity) { + this.disregardedCity = disregardedCity; + return this; + } + + /** + * The city for disregarded entities. + * @return disregardedCity + */ + @javax.annotation.Nullable + public String getDisregardedCity() { + return disregardedCity; + } + + public void setDisregardedCity(String disregardedCity) { + this.disregardedCity = disregardedCity; + } + + + public W8ImyFormRequest disregardedState(String disregardedState) { + this.disregardedState = disregardedState; + return this; + } + + /** + * The state for disregarded entities. + * @return disregardedState + */ + @javax.annotation.Nullable + public String getDisregardedState() { + return disregardedState; + } + + public void setDisregardedState(String disregardedState) { + this.disregardedState = disregardedState; + } + + + public W8ImyFormRequest disregardedZip(String disregardedZip) { + this.disregardedZip = disregardedZip; + return this; + } + + /** + * The ZIP code for disregarded entities. + * @return disregardedZip + */ + @javax.annotation.Nullable + public String getDisregardedZip() { + return disregardedZip; + } + + public void setDisregardedZip(String disregardedZip) { + this.disregardedZip = disregardedZip; + } + + + public W8ImyFormRequest disregardedCountry(String disregardedCountry) { + this.disregardedCountry = disregardedCountry; + return this; + } + + /** + * The country for disregarded entities. + * @return disregardedCountry + */ + @javax.annotation.Nullable + public String getDisregardedCountry() { + return disregardedCountry; + } + + public void setDisregardedCountry(String disregardedCountry) { + this.disregardedCountry = disregardedCountry; + } + + + public W8ImyFormRequest disregardedEntityGiin(String disregardedEntityGiin) { + this.disregardedEntityGiin = disregardedEntityGiin; + return this; + } + + /** + * The GIIN for disregarded entities. + * @return disregardedEntityGiin + */ + @javax.annotation.Nullable + public String getDisregardedEntityGiin() { + return disregardedEntityGiin; + } + + public void setDisregardedEntityGiin(String disregardedEntityGiin) { + this.disregardedEntityGiin = disregardedEntityGiin; + } + + + public W8ImyFormRequest qualifiedIntermediaryCertification(Boolean qualifiedIntermediaryCertification) { + this.qualifiedIntermediaryCertification = qualifiedIntermediaryCertification; + return this; + } + + /** + * 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. + * @return qualifiedIntermediaryCertification + */ + @javax.annotation.Nullable + public Boolean getQualifiedIntermediaryCertification() { + return qualifiedIntermediaryCertification; + } + + public void setQualifiedIntermediaryCertification(Boolean qualifiedIntermediaryCertification) { + this.qualifiedIntermediaryCertification = qualifiedIntermediaryCertification; + } + + + public W8ImyFormRequest qiPrimaryWithholdingResponsibilityCertification(Boolean qiPrimaryWithholdingResponsibilityCertification) { + this.qiPrimaryWithholdingResponsibilityCertification = qiPrimaryWithholdingResponsibilityCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary assumes primary withholding responsibility under chapters 3 and 4 for the specified accounts. + * @return qiPrimaryWithholdingResponsibilityCertification + */ + @javax.annotation.Nullable + public Boolean getQiPrimaryWithholdingResponsibilityCertification() { + return qiPrimaryWithholdingResponsibilityCertification; + } + + public void setQiPrimaryWithholdingResponsibilityCertification(Boolean qiPrimaryWithholdingResponsibilityCertification) { + this.qiPrimaryWithholdingResponsibilityCertification = qiPrimaryWithholdingResponsibilityCertification; + } + + + public W8ImyFormRequest qiWithholdingResponsibilityForPtpSalesCertification(Boolean qiWithholdingResponsibilityForPtpSalesCertification) { + this.qiWithholdingResponsibilityForPtpSalesCertification = qiWithholdingResponsibilityForPtpSalesCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary assumes primary withholding and reporting responsibility under section 1446(f) for amounts realized from sales of interests in publicly traded partnerships. + * @return qiWithholdingResponsibilityForPtpSalesCertification + */ + @javax.annotation.Nullable + public Boolean getQiWithholdingResponsibilityForPtpSalesCertification() { + return qiWithholdingResponsibilityForPtpSalesCertification; + } + + public void setQiWithholdingResponsibilityForPtpSalesCertification(Boolean qiWithholdingResponsibilityForPtpSalesCertification) { + this.qiWithholdingResponsibilityForPtpSalesCertification = qiWithholdingResponsibilityForPtpSalesCertification; + } + + + public W8ImyFormRequest qiNomineeWithholdingResponsibilityForPtpDistributionsCertification(Boolean qiNomineeWithholdingResponsibilityForPtpDistributionsCertification) { + this.qiNomineeWithholdingResponsibilityForPtpDistributionsCertification = qiNomineeWithholdingResponsibilityForPtpDistributionsCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary assumes primary withholding responsibility as a nominee under Regulations section 1.1446-4(b)(3) for publicly traded partnership distributions. + * @return qiNomineeWithholdingResponsibilityForPtpDistributionsCertification + */ + @javax.annotation.Nullable + public Boolean getQiNomineeWithholdingResponsibilityForPtpDistributionsCertification() { + return qiNomineeWithholdingResponsibilityForPtpDistributionsCertification; + } + + public void setQiNomineeWithholdingResponsibilityForPtpDistributionsCertification(Boolean qiNomineeWithholdingResponsibilityForPtpDistributionsCertification) { + this.qiNomineeWithholdingResponsibilityForPtpDistributionsCertification = qiNomineeWithholdingResponsibilityForPtpDistributionsCertification; + } + + + public W8ImyFormRequest qiSecuritiesLenderSubstituteDividendWithholdingCertification(Boolean qiSecuritiesLenderSubstituteDividendWithholdingCertification) { + this.qiSecuritiesLenderSubstituteDividendWithholdingCertification = qiSecuritiesLenderSubstituteDividendWithholdingCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary is acting as a qualified securities lender and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. + * @return qiSecuritiesLenderSubstituteDividendWithholdingCertification + */ + @javax.annotation.Nullable + public Boolean getQiSecuritiesLenderSubstituteDividendWithholdingCertification() { + return qiSecuritiesLenderSubstituteDividendWithholdingCertification; + } + + public void setQiSecuritiesLenderSubstituteDividendWithholdingCertification(Boolean qiSecuritiesLenderSubstituteDividendWithholdingCertification) { + this.qiSecuritiesLenderSubstituteDividendWithholdingCertification = qiSecuritiesLenderSubstituteDividendWithholdingCertification; + } + + + public W8ImyFormRequest qiWithholdingAnd1099ReportingResponsibilityCertification(Boolean qiWithholdingAnd1099ReportingResponsibilityCertification) { + this.qiWithholdingAnd1099ReportingResponsibilityCertification = qiWithholdingAnd1099ReportingResponsibilityCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary assumes primary withholding under chapters 3 and 4, and primary Form 1099 reporting and backup withholding responsibility for U.S. source interest and substitute interest payments. + * @return qiWithholdingAnd1099ReportingResponsibilityCertification + */ + @javax.annotation.Nullable + public Boolean getQiWithholdingAnd1099ReportingResponsibilityCertification() { + return qiWithholdingAnd1099ReportingResponsibilityCertification; + } + + public void setQiWithholdingAnd1099ReportingResponsibilityCertification(Boolean qiWithholdingAnd1099ReportingResponsibilityCertification) { + this.qiWithholdingAnd1099ReportingResponsibilityCertification = qiWithholdingAnd1099ReportingResponsibilityCertification; + } + + + public W8ImyFormRequest qiForm1099OrFatcaReportingResponsibilityCertification(Boolean qiForm1099OrFatcaReportingResponsibilityCertification) { + this.qiForm1099OrFatcaReportingResponsibilityCertification = qiForm1099OrFatcaReportingResponsibilityCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary assumes Form 1099 reporting and backup withholding responsibility, or FATCA reporting responsibility as a participating or registered deemed-compliant FFI, for accounts held by specified U.S. persons. + * @return qiForm1099OrFatcaReportingResponsibilityCertification + */ + @javax.annotation.Nullable + public Boolean getQiForm1099OrFatcaReportingResponsibilityCertification() { + return qiForm1099OrFatcaReportingResponsibilityCertification; + } + + public void setQiForm1099OrFatcaReportingResponsibilityCertification(Boolean qiForm1099OrFatcaReportingResponsibilityCertification) { + this.qiForm1099OrFatcaReportingResponsibilityCertification = qiForm1099OrFatcaReportingResponsibilityCertification; + } + + + public W8ImyFormRequest qiOptOutOfForm1099ReportingCertification(Boolean qiOptOutOfForm1099ReportingCertification) { + this.qiOptOutOfForm1099ReportingCertification = qiOptOutOfForm1099ReportingCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary does not assume primary Form 1099 reporting and backup withholding responsibility for the accounts associated with this form. + * @return qiOptOutOfForm1099ReportingCertification + */ + @javax.annotation.Nullable + public Boolean getQiOptOutOfForm1099ReportingCertification() { + return qiOptOutOfForm1099ReportingCertification; + } + + public void setQiOptOutOfForm1099ReportingCertification(Boolean qiOptOutOfForm1099ReportingCertification) { + this.qiOptOutOfForm1099ReportingCertification = qiOptOutOfForm1099ReportingCertification; + } + + + public W8ImyFormRequest qiWithholdingRatePoolCertification(Boolean qiWithholdingRatePoolCertification) { + this.qiWithholdingRatePoolCertification = qiWithholdingRatePoolCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary meets the requirements for allocating payments to a chapter 4 withholding rate pool of U.S. payees under Regulations section 1.6049-4(c)(4)(iii). + * @return qiWithholdingRatePoolCertification + */ + @javax.annotation.Nullable + public Boolean getQiWithholdingRatePoolCertification() { + return qiWithholdingRatePoolCertification; + } + + public void setQiWithholdingRatePoolCertification(Boolean qiWithholdingRatePoolCertification) { + this.qiWithholdingRatePoolCertification = qiWithholdingRatePoolCertification; + } + + + public W8ImyFormRequest qiIntermediaryOrFlowThroughEntityDocumentationCertification(Boolean qiIntermediaryOrFlowThroughEntityDocumentationCertification) { + this.qiIntermediaryOrFlowThroughEntityDocumentationCertification = qiIntermediaryOrFlowThroughEntityDocumentationCertification; + return this; + } + + /** + * Certifies that the Qualified Intermediary has obtained or will obtain documentation confirming the status of any intermediary or flow-through entity as a participating FFI, registered deemed-compliant FFI, or QI for U.S. payees in a chapter 4 withholding rate pool. + * @return qiIntermediaryOrFlowThroughEntityDocumentationCertification + */ + @javax.annotation.Nullable + public Boolean getQiIntermediaryOrFlowThroughEntityDocumentationCertification() { + return qiIntermediaryOrFlowThroughEntityDocumentationCertification; + } + + public void setQiIntermediaryOrFlowThroughEntityDocumentationCertification(Boolean qiIntermediaryOrFlowThroughEntityDocumentationCertification) { + this.qiIntermediaryOrFlowThroughEntityDocumentationCertification = qiIntermediaryOrFlowThroughEntityDocumentationCertification; + } + + + public W8ImyFormRequest qualifiedDerivativesDealerCertification(Boolean qualifiedDerivativesDealerCertification) { + this.qualifiedDerivativesDealerCertification = qualifiedDerivativesDealerCertification; + return this; + } + + /** + * Certifies that the Qualified Derivatives Dealer (QDD) is approved by the IRS and assumes primary withholding and reporting responsibilities for payments related to potential section 871(m) transactions. + * @return qualifiedDerivativesDealerCertification + */ + @javax.annotation.Nullable + public Boolean getQualifiedDerivativesDealerCertification() { + return qualifiedDerivativesDealerCertification; + } + + public void setQualifiedDerivativesDealerCertification(Boolean qualifiedDerivativesDealerCertification) { + this.qualifiedDerivativesDealerCertification = qualifiedDerivativesDealerCertification; + } + + + public W8ImyFormRequest qddCorporation(Boolean qddCorporation) { + this.qddCorporation = qddCorporation; + return this; + } + + /** + * Indicates QDD classification is Corporation. + * @return qddCorporation + */ + @javax.annotation.Nullable + public Boolean getQddCorporation() { + return qddCorporation; + } + + public void setQddCorporation(Boolean qddCorporation) { + this.qddCorporation = qddCorporation; + } + + + public W8ImyFormRequest qddPartnership(Boolean qddPartnership) { + this.qddPartnership = qddPartnership; + return this; + } + + /** + * Indicates QDD classification is Partnership. + * @return qddPartnership + */ + @javax.annotation.Nullable + public Boolean getQddPartnership() { + return qddPartnership; + } + + public void setQddPartnership(Boolean qddPartnership) { + this.qddPartnership = qddPartnership; + } + + + public W8ImyFormRequest qddDisregardedEntity(Boolean qddDisregardedEntity) { + this.qddDisregardedEntity = qddDisregardedEntity; + return this; + } + + /** + * Indicates QDD classification is Disregarded Entity. + * @return qddDisregardedEntity + */ + @javax.annotation.Nullable + public Boolean getQddDisregardedEntity() { + return qddDisregardedEntity; + } + + public void setQddDisregardedEntity(Boolean qddDisregardedEntity) { + this.qddDisregardedEntity = qddDisregardedEntity; + } + + + public W8ImyFormRequest nonqualifiedIntermediaryCertification(Boolean nonqualifiedIntermediaryCertification) { + this.nonqualifiedIntermediaryCertification = nonqualifiedIntermediaryCertification; + return this; + } + + /** + * Certifies that the entity is not acting as a Qualified Intermediary and is not acting for its own account for the accounts covered by this form. + * @return nonqualifiedIntermediaryCertification + */ + @javax.annotation.Nullable + public Boolean getNonqualifiedIntermediaryCertification() { + return nonqualifiedIntermediaryCertification; + } + + public void setNonqualifiedIntermediaryCertification(Boolean nonqualifiedIntermediaryCertification) { + this.nonqualifiedIntermediaryCertification = nonqualifiedIntermediaryCertification; + } + + + public W8ImyFormRequest nqiWithholdingStatementTransmissionCertification(Boolean nqiWithholdingStatementTransmissionCertification) { + this.nqiWithholdingStatementTransmissionCertification = nqiWithholdingStatementTransmissionCertification; + return this; + } + + /** + * Certifies that the nonqualified intermediary is submitting this form to transmit withholding certificates and/or other required documentation along with a withholding statement. + * @return nqiWithholdingStatementTransmissionCertification + */ + @javax.annotation.Nullable + public Boolean getNqiWithholdingStatementTransmissionCertification() { + return nqiWithholdingStatementTransmissionCertification; + } + + public void setNqiWithholdingStatementTransmissionCertification(Boolean nqiWithholdingStatementTransmissionCertification) { + this.nqiWithholdingStatementTransmissionCertification = nqiWithholdingStatementTransmissionCertification; + } + + + public W8ImyFormRequest nqiWithholdingRatePoolComplianceCertification(Boolean nqiWithholdingRatePoolComplianceCertification) { + this.nqiWithholdingRatePoolComplianceCertification = nqiWithholdingRatePoolComplianceCertification; + return this; + } + + /** + * Certifies that the nonqualified intermediary meets the requirements of Regulations section 1.6049-4(c)(4)(iii) for U.S. payees included in a withholding rate pool, excluding publicly traded partnership distributions. + * @return nqiWithholdingRatePoolComplianceCertification + */ + @javax.annotation.Nullable + public Boolean getNqiWithholdingRatePoolComplianceCertification() { + return nqiWithholdingRatePoolComplianceCertification; + } + + public void setNqiWithholdingRatePoolComplianceCertification(Boolean nqiWithholdingRatePoolComplianceCertification) { + this.nqiWithholdingRatePoolComplianceCertification = nqiWithholdingRatePoolComplianceCertification; + } + + + public W8ImyFormRequest nqiQualifiedSecuritiesLenderCertification(Boolean nqiQualifiedSecuritiesLenderCertification) { + this.nqiQualifiedSecuritiesLenderCertification = nqiQualifiedSecuritiesLenderCertification; + return this; + } + + /** + * Certifies that the nonqualified intermediary is acting as a qualified securities lender (not as a QI) and assumes primary withholding and reporting responsibilities for U.S. source substitute dividend payments. + * @return nqiQualifiedSecuritiesLenderCertification + */ + @javax.annotation.Nullable + public Boolean getNqiQualifiedSecuritiesLenderCertification() { + return nqiQualifiedSecuritiesLenderCertification; + } + + public void setNqiQualifiedSecuritiesLenderCertification(Boolean nqiQualifiedSecuritiesLenderCertification) { + this.nqiQualifiedSecuritiesLenderCertification = nqiQualifiedSecuritiesLenderCertification; + } + + + public W8ImyFormRequest nqiAlternativeWithholdingStatementVerificationCertification(Boolean nqiAlternativeWithholdingStatementVerificationCertification) { + this.nqiAlternativeWithholdingStatementVerificationCertification = nqiAlternativeWithholdingStatementVerificationCertification; + return this; + } + + /** + * Certifies that the nonqualified intermediary has verified, or will verify, all information on alternative withholding statements for consistency with account data to determine the correct withholding rate, as required under sections 1441 or 1471. + * @return nqiAlternativeWithholdingStatementVerificationCertification + */ + @javax.annotation.Nullable + public Boolean getNqiAlternativeWithholdingStatementVerificationCertification() { + return nqiAlternativeWithholdingStatementVerificationCertification; + } + + public void setNqiAlternativeWithholdingStatementVerificationCertification(Boolean nqiAlternativeWithholdingStatementVerificationCertification) { + this.nqiAlternativeWithholdingStatementVerificationCertification = nqiAlternativeWithholdingStatementVerificationCertification; + } + + + public W8ImyFormRequest territoryFinancialInstitutionCertification(Boolean territoryFinancialInstitutionCertification) { + this.territoryFinancialInstitutionCertification = territoryFinancialInstitutionCertification; + return this; + } + + /** + * Certifies that the entity is a financial institution (other than an investment entity) that is incorporated or organized under the laws of a possession of the United States. + * @return territoryFinancialInstitutionCertification + */ + @javax.annotation.Nullable + public Boolean getTerritoryFinancialInstitutionCertification() { + return territoryFinancialInstitutionCertification; + } + + public void setTerritoryFinancialInstitutionCertification(Boolean territoryFinancialInstitutionCertification) { + this.territoryFinancialInstitutionCertification = territoryFinancialInstitutionCertification; + } + + + public W8ImyFormRequest tfiTreatedAsUsPersonCertification(Boolean tfiTreatedAsUsPersonCertification) { + this.tfiTreatedAsUsPersonCertification = tfiTreatedAsUsPersonCertification; + return this; + } + + /** + * Certifies that the territory financial institution agrees to be treated as a U.S. person for chapters 3 and 4 purposes concerning reportable amounts and withholdable payments. + * @return tfiTreatedAsUsPersonCertification + */ + @javax.annotation.Nullable + public Boolean getTfiTreatedAsUsPersonCertification() { + return tfiTreatedAsUsPersonCertification; + } + + public void setTfiTreatedAsUsPersonCertification(Boolean tfiTreatedAsUsPersonCertification) { + this.tfiTreatedAsUsPersonCertification = tfiTreatedAsUsPersonCertification; + } + + + public W8ImyFormRequest tfiWithholdingStatementTransmissionCertification(Boolean tfiWithholdingStatementTransmissionCertification) { + this.tfiWithholdingStatementTransmissionCertification = tfiWithholdingStatementTransmissionCertification; + return this; + } + + /** + * Certifies that the territory financial institution is transmitting withholding certificates or other required documentation and has provided or will provide a withholding statement for reportable or withholdable payments. + * @return tfiWithholdingStatementTransmissionCertification + */ + @javax.annotation.Nullable + public Boolean getTfiWithholdingStatementTransmissionCertification() { + return tfiWithholdingStatementTransmissionCertification; + } + + public void setTfiWithholdingStatementTransmissionCertification(Boolean tfiWithholdingStatementTransmissionCertification) { + this.tfiWithholdingStatementTransmissionCertification = tfiWithholdingStatementTransmissionCertification; + } + + + public W8ImyFormRequest tfiTreatedAsUsPersonForPtpSalesCertification(Boolean tfiTreatedAsUsPersonForPtpSalesCertification) { + this.tfiTreatedAsUsPersonForPtpSalesCertification = tfiTreatedAsUsPersonForPtpSalesCertification; + return this; + } + + /** + * Certifies that the territory financial institution agrees to be treated as a U.S. person under Regulations section 1.1446(f)-4(a)(2)(i)(B) for amounts realized from sales of publicly traded partnership interests. + * @return tfiTreatedAsUsPersonForPtpSalesCertification + */ + @javax.annotation.Nullable + public Boolean getTfiTreatedAsUsPersonForPtpSalesCertification() { + return tfiTreatedAsUsPersonForPtpSalesCertification; + } + + public void setTfiTreatedAsUsPersonForPtpSalesCertification(Boolean tfiTreatedAsUsPersonForPtpSalesCertification) { + this.tfiTreatedAsUsPersonForPtpSalesCertification = tfiTreatedAsUsPersonForPtpSalesCertification; + } + + + public W8ImyFormRequest tfiNomineeUsPersonForPtpDistributionsCertification(Boolean tfiNomineeUsPersonForPtpDistributionsCertification) { + this.tfiNomineeUsPersonForPtpDistributionsCertification = tfiNomineeUsPersonForPtpDistributionsCertification; + return this; + } + + /** + * Certifies that the territory financial institution agrees to be treated as a U.S. person and as a nominee for purposes of publicly traded partnership distributions under the applicable regulations. + * @return tfiNomineeUsPersonForPtpDistributionsCertification + */ + @javax.annotation.Nullable + public Boolean getTfiNomineeUsPersonForPtpDistributionsCertification() { + return tfiNomineeUsPersonForPtpDistributionsCertification; + } + + public void setTfiNomineeUsPersonForPtpDistributionsCertification(Boolean tfiNomineeUsPersonForPtpDistributionsCertification) { + this.tfiNomineeUsPersonForPtpDistributionsCertification = tfiNomineeUsPersonForPtpDistributionsCertification; + } + + + public W8ImyFormRequest tfiNotNomineeForPtpDistributionsCertification(Boolean tfiNotNomineeForPtpDistributionsCertification) { + this.tfiNotNomineeForPtpDistributionsCertification = tfiNotNomineeForPtpDistributionsCertification; + return this; + } + + /** + * Certifies that the territory financial institution is not acting as a nominee for publicly traded partnership distributions and is providing withholding statements for those distributions. + * @return tfiNotNomineeForPtpDistributionsCertification + */ + @javax.annotation.Nullable + public Boolean getTfiNotNomineeForPtpDistributionsCertification() { + return tfiNotNomineeForPtpDistributionsCertification; + } + + public void setTfiNotNomineeForPtpDistributionsCertification(Boolean tfiNotNomineeForPtpDistributionsCertification) { + this.tfiNotNomineeForPtpDistributionsCertification = tfiNotNomineeForPtpDistributionsCertification; + } + + + public W8ImyFormRequest usBranchNonEffectivelyConnectedIncomeCertification(Boolean usBranchNonEffectivelyConnectedIncomeCertification) { + this.usBranchNonEffectivelyConnectedIncomeCertification = usBranchNonEffectivelyConnectedIncomeCertification; + return this; + } + + /** + * Certifies that the U.S. branch is receiving reportable or withholdable payments that are not effectively connected income, PTP distributions, or proceeds from PTP sales. + * @return usBranchNonEffectivelyConnectedIncomeCertification + */ + @javax.annotation.Nullable + public Boolean getUsBranchNonEffectivelyConnectedIncomeCertification() { + return usBranchNonEffectivelyConnectedIncomeCertification; + } + + public void setUsBranchNonEffectivelyConnectedIncomeCertification(Boolean usBranchNonEffectivelyConnectedIncomeCertification) { + this.usBranchNonEffectivelyConnectedIncomeCertification = usBranchNonEffectivelyConnectedIncomeCertification; + } + + + public W8ImyFormRequest usBranchAgreementToBeTreatedAsUsPersonCertification(Boolean usBranchAgreementToBeTreatedAsUsPersonCertification) { + this.usBranchAgreementToBeTreatedAsUsPersonCertification = usBranchAgreementToBeTreatedAsUsPersonCertification; + return this; + } + + /** + * Certifies that the U.S. branch of a foreign bank or insurance company agrees to be treated as a U.S. person for reportable amounts or withholdable payments under the applicable regulations. + * @return usBranchAgreementToBeTreatedAsUsPersonCertification + */ + @javax.annotation.Nullable + public Boolean getUsBranchAgreementToBeTreatedAsUsPersonCertification() { + return usBranchAgreementToBeTreatedAsUsPersonCertification; + } + + public void setUsBranchAgreementToBeTreatedAsUsPersonCertification(Boolean usBranchAgreementToBeTreatedAsUsPersonCertification) { + this.usBranchAgreementToBeTreatedAsUsPersonCertification = usBranchAgreementToBeTreatedAsUsPersonCertification; + } + + + public W8ImyFormRequest usBranchWithholdingStatementAndComplianceCertification(Boolean usBranchWithholdingStatementAndComplianceCertification) { + this.usBranchWithholdingStatementAndComplianceCertification = usBranchWithholdingStatementAndComplianceCertification; + return this; + } + + /** + * Certifies that the U.S. branch is transmitting required documentation and withholding statements for reportable or withholdable payments and is applying the appropriate FATCA regulations. + * @return usBranchWithholdingStatementAndComplianceCertification + */ + @javax.annotation.Nullable + public Boolean getUsBranchWithholdingStatementAndComplianceCertification() { + return usBranchWithholdingStatementAndComplianceCertification; + } + + public void setUsBranchWithholdingStatementAndComplianceCertification(Boolean usBranchWithholdingStatementAndComplianceCertification) { + this.usBranchWithholdingStatementAndComplianceCertification = usBranchWithholdingStatementAndComplianceCertification; + } + + + public W8ImyFormRequest usBranchActingAsUsPersonForPtpSalesCertification(Boolean usBranchActingAsUsPersonForPtpSalesCertification) { + this.usBranchActingAsUsPersonForPtpSalesCertification = usBranchActingAsUsPersonForPtpSalesCertification; + return this; + } + + /** + * Certifies that the U.S. branch is acting as a U.S. person for purposes of amounts realized from sales of publicly traded partnership interests under the applicable regulations. + * @return usBranchActingAsUsPersonForPtpSalesCertification + */ + @javax.annotation.Nullable + public Boolean getUsBranchActingAsUsPersonForPtpSalesCertification() { + return usBranchActingAsUsPersonForPtpSalesCertification; + } + + public void setUsBranchActingAsUsPersonForPtpSalesCertification(Boolean usBranchActingAsUsPersonForPtpSalesCertification) { + this.usBranchActingAsUsPersonForPtpSalesCertification = usBranchActingAsUsPersonForPtpSalesCertification; + } + + + public W8ImyFormRequest usBranchNomineeForPtpDistributionsCertification(Boolean usBranchNomineeForPtpDistributionsCertification) { + this.usBranchNomineeForPtpDistributionsCertification = usBranchNomineeForPtpDistributionsCertification; + return this; + } + + /** + * Certifies that the U.S. branch is treated as a U.S. person and as a nominee for publicly traded partnership distributions under the applicable regulations. + * @return usBranchNomineeForPtpDistributionsCertification + */ + @javax.annotation.Nullable + public Boolean getUsBranchNomineeForPtpDistributionsCertification() { + return usBranchNomineeForPtpDistributionsCertification; + } + + public void setUsBranchNomineeForPtpDistributionsCertification(Boolean usBranchNomineeForPtpDistributionsCertification) { + this.usBranchNomineeForPtpDistributionsCertification = usBranchNomineeForPtpDistributionsCertification; + } + + + public W8ImyFormRequest usBranchNotNomineeForPtpDistributionsCertification(Boolean usBranchNotNomineeForPtpDistributionsCertification) { + this.usBranchNotNomineeForPtpDistributionsCertification = usBranchNotNomineeForPtpDistributionsCertification; + return this; + } + + /** + * Certifies that the U.S. branch is not acting as a nominee for publicly traded partnership distributions and is providing the required withholding statements. + * @return usBranchNotNomineeForPtpDistributionsCertification + */ + @javax.annotation.Nullable + public Boolean getUsBranchNotNomineeForPtpDistributionsCertification() { + return usBranchNotNomineeForPtpDistributionsCertification; + } + + public void setUsBranchNotNomineeForPtpDistributionsCertification(Boolean usBranchNotNomineeForPtpDistributionsCertification) { + this.usBranchNotNomineeForPtpDistributionsCertification = usBranchNotNomineeForPtpDistributionsCertification; + } + + + public W8ImyFormRequest withholdingForeignPartnershipOrTrustCertification(Boolean withholdingForeignPartnershipOrTrustCertification) { + this.withholdingForeignPartnershipOrTrustCertification = withholdingForeignPartnershipOrTrustCertification; + return this; + } + + /** + * Certifies that the entity is a withholding foreign partnership (WP) or a withholding foreign trust (WT) that is compliant with the terms of its WP or WT agreement. + * @return withholdingForeignPartnershipOrTrustCertification + */ + @javax.annotation.Nullable + public Boolean getWithholdingForeignPartnershipOrTrustCertification() { + return withholdingForeignPartnershipOrTrustCertification; + } + + public void setWithholdingForeignPartnershipOrTrustCertification(Boolean withholdingForeignPartnershipOrTrustCertification) { + this.withholdingForeignPartnershipOrTrustCertification = withholdingForeignPartnershipOrTrustCertification; + } + + + public W8ImyFormRequest nonwithholdingForeignEntityWithholdingStatementCertification(Boolean nonwithholdingForeignEntityWithholdingStatementCertification) { + this.nonwithholdingForeignEntityWithholdingStatementCertification = nonwithholdingForeignEntityWithholdingStatementCertification; + return this; + } + + /** + * Certifies that the entity is a nonwithholding foreign partnership or trust, providing the form for non-effectively connected payments and transmitting required withholding documentation for chapters 3 and 4. + * @return nonwithholdingForeignEntityWithholdingStatementCertification + */ + @javax.annotation.Nullable + public Boolean getNonwithholdingForeignEntityWithholdingStatementCertification() { + return nonwithholdingForeignEntityWithholdingStatementCertification; + } + + public void setNonwithholdingForeignEntityWithholdingStatementCertification(Boolean nonwithholdingForeignEntityWithholdingStatementCertification) { + this.nonwithholdingForeignEntityWithholdingStatementCertification = nonwithholdingForeignEntityWithholdingStatementCertification; + } + + + public W8ImyFormRequest foreignEntityPartnerInLowerTierPartnershipCertification(Boolean foreignEntityPartnerInLowerTierPartnershipCertification) { + this.foreignEntityPartnerInLowerTierPartnershipCertification = foreignEntityPartnerInLowerTierPartnershipCertification; + return this; + } + + /** + * Certifies that the entity is a foreign partnership or grantor trust acting as a partner in a lower-tier partnership and is submitting the form for purposes of section 1446(a). + * @return foreignEntityPartnerInLowerTierPartnershipCertification + */ + @javax.annotation.Nullable + public Boolean getForeignEntityPartnerInLowerTierPartnershipCertification() { + return foreignEntityPartnerInLowerTierPartnershipCertification; + } + + public void setForeignEntityPartnerInLowerTierPartnershipCertification(Boolean foreignEntityPartnerInLowerTierPartnershipCertification) { + this.foreignEntityPartnerInLowerTierPartnershipCertification = foreignEntityPartnerInLowerTierPartnershipCertification; + } + + + public W8ImyFormRequest foreignPartnershipAmountRealizedSection1446FCertification(Boolean foreignPartnershipAmountRealizedSection1446FCertification) { + this.foreignPartnershipAmountRealizedSection1446FCertification = foreignPartnershipAmountRealizedSection1446FCertification; + return this; + } + + /** + * Certifies that the entity is a foreign partnership receiving an amount realized from the transfer of a partnership interest for purposes of section 1446(f). + * @return foreignPartnershipAmountRealizedSection1446FCertification + */ + @javax.annotation.Nullable + public Boolean getForeignPartnershipAmountRealizedSection1446FCertification() { + return foreignPartnershipAmountRealizedSection1446FCertification; + } + + public void setForeignPartnershipAmountRealizedSection1446FCertification(Boolean foreignPartnershipAmountRealizedSection1446FCertification) { + this.foreignPartnershipAmountRealizedSection1446FCertification = foreignPartnershipAmountRealizedSection1446FCertification; + } + + + public W8ImyFormRequest foreignPartnershipModifiedAmountRealizedCertification(Boolean foreignPartnershipModifiedAmountRealizedCertification) { + this.foreignPartnershipModifiedAmountRealizedCertification = foreignPartnershipModifiedAmountRealizedCertification; + return this; + } + + /** + * Certifies that the foreign partnership is providing a withholding statement for a modified amount realized from the transfer of a partnership interest, when applicable. + * @return foreignPartnershipModifiedAmountRealizedCertification + */ + @javax.annotation.Nullable + public Boolean getForeignPartnershipModifiedAmountRealizedCertification() { + return foreignPartnershipModifiedAmountRealizedCertification; + } + + public void setForeignPartnershipModifiedAmountRealizedCertification(Boolean foreignPartnershipModifiedAmountRealizedCertification) { + this.foreignPartnershipModifiedAmountRealizedCertification = foreignPartnershipModifiedAmountRealizedCertification; + } + + + public W8ImyFormRequest foreignGrantorTrustAmountRealizedAllocationCertification(Boolean foreignGrantorTrustAmountRealizedAllocationCertification) { + this.foreignGrantorTrustAmountRealizedAllocationCertification = foreignGrantorTrustAmountRealizedAllocationCertification; + return this; + } + + /** + * Certifies that the foreign grantor trust is submitting the form on behalf of each grantor or owner and providing a withholding statement to allocate the amount realized in accordance with the regulations. + * @return foreignGrantorTrustAmountRealizedAllocationCertification + */ + @javax.annotation.Nullable + public Boolean getForeignGrantorTrustAmountRealizedAllocationCertification() { + return foreignGrantorTrustAmountRealizedAllocationCertification; + } + + public void setForeignGrantorTrustAmountRealizedAllocationCertification(Boolean foreignGrantorTrustAmountRealizedAllocationCertification) { + this.foreignGrantorTrustAmountRealizedAllocationCertification = foreignGrantorTrustAmountRealizedAllocationCertification; + } + + + public W8ImyFormRequest alternativeWithholdingStatementRelianceCertification(Boolean alternativeWithholdingStatementRelianceCertification) { + this.alternativeWithholdingStatementRelianceCertification = alternativeWithholdingStatementRelianceCertification; + return this; + } + + /** + * Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement. + * @return alternativeWithholdingStatementRelianceCertification + */ + @javax.annotation.Nullable + public Boolean getAlternativeWithholdingStatementRelianceCertification() { + return alternativeWithholdingStatementRelianceCertification; + } + + public void setAlternativeWithholdingStatementRelianceCertification(Boolean alternativeWithholdingStatementRelianceCertification) { + this.alternativeWithholdingStatementRelianceCertification = alternativeWithholdingStatementRelianceCertification; + } + + + public W8ImyFormRequest npFfiWithExemptBeneficialOwnersCertification(Boolean npFfiWithExemptBeneficialOwnersCertification) { + this.npFfiWithExemptBeneficialOwnersCertification = npFfiWithExemptBeneficialOwnersCertification; + return this; + } + + /** + * Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners. + * @return npFfiWithExemptBeneficialOwnersCertification + */ + @javax.annotation.Nullable + public Boolean getNpFfiWithExemptBeneficialOwnersCertification() { + return npFfiWithExemptBeneficialOwnersCertification; + } + + public void setNpFfiWithExemptBeneficialOwnersCertification(Boolean npFfiWithExemptBeneficialOwnersCertification) { + this.npFfiWithExemptBeneficialOwnersCertification = npFfiWithExemptBeneficialOwnersCertification; + } + + + public W8ImyFormRequest ffiSponsoringEntity(String ffiSponsoringEntity) { + this.ffiSponsoringEntity = ffiSponsoringEntity; + return this; + } + + /** + * The name of the entity that sponsors the foreign financial institution (FFI). + * @return ffiSponsoringEntity + */ + @javax.annotation.Nullable + public String getFfiSponsoringEntity() { + return ffiSponsoringEntity; + } + + public void setFfiSponsoringEntity(String ffiSponsoringEntity) { + this.ffiSponsoringEntity = ffiSponsoringEntity; + } + + + public W8ImyFormRequest investmentEntityCertification(Boolean investmentEntityCertification) { + this.investmentEntityCertification = investmentEntityCertification; + return this; + } + + /** + * Certifies that the entity is an investment entity, not a QI, WP, or WT, and has an agreement with a sponsoring entity. + * @return investmentEntityCertification + */ + @javax.annotation.Nullable + public Boolean getInvestmentEntityCertification() { + return investmentEntityCertification; + } + + public void setInvestmentEntityCertification(Boolean investmentEntityCertification) { + this.investmentEntityCertification = investmentEntityCertification; + } + + + public W8ImyFormRequest controlledForeignCorporationCertification(Boolean controlledForeignCorporationCertification) { + this.controlledForeignCorporationCertification = controlledForeignCorporationCertification; + return this; + } + + /** + * Certifies that the entity is a controlled foreign corporation sponsored by a U.S. financial institution, not a QI, WP, or WT, and shares a common electronic account system for full transparency. + * @return controlledForeignCorporationCertification + */ + @javax.annotation.Nullable + public Boolean getControlledForeignCorporationCertification() { + return controlledForeignCorporationCertification; + } + + public void setControlledForeignCorporationCertification(Boolean controlledForeignCorporationCertification) { + this.controlledForeignCorporationCertification = controlledForeignCorporationCertification; + } + + + public W8ImyFormRequest ownerDocumentedFfiCertification(Boolean ownerDocumentedFfiCertification) { + this.ownerDocumentedFfiCertification = ownerDocumentedFfiCertification; + return this; + } + + /** + * Certifies that the FFI meets all requirements to qualify as an owner-documented FFI, including restrictions on activities, ownership, and account relationships. + * @return ownerDocumentedFfiCertification + */ + @javax.annotation.Nullable + public Boolean getOwnerDocumentedFfiCertification() { + return ownerDocumentedFfiCertification; + } + + public void setOwnerDocumentedFfiCertification(Boolean ownerDocumentedFfiCertification) { + this.ownerDocumentedFfiCertification = ownerDocumentedFfiCertification; + } + + + public W8ImyFormRequest ownerDocumentedFfiReportingStatementCertification(Boolean ownerDocumentedFfiReportingStatementCertification) { + this.ownerDocumentedFfiReportingStatementCertification = ownerDocumentedFfiReportingStatementCertification; + return this; + } + + /** + * Certifies that the FFI will provide a complete owner reporting statement and required documentation for each relevant owner or debt holder. + * @return ownerDocumentedFfiReportingStatementCertification + */ + @javax.annotation.Nullable + public Boolean getOwnerDocumentedFfiReportingStatementCertification() { + return ownerDocumentedFfiReportingStatementCertification; + } + + public void setOwnerDocumentedFfiReportingStatementCertification(Boolean ownerDocumentedFfiReportingStatementCertification) { + this.ownerDocumentedFfiReportingStatementCertification = ownerDocumentedFfiReportingStatementCertification; + } + + + public W8ImyFormRequest ownerDocumentedFfiAuditorLetterCertification(Boolean ownerDocumentedFfiAuditorLetterCertification) { + this.ownerDocumentedFfiAuditorLetterCertification = ownerDocumentedFfiAuditorLetterCertification; + return this; + } + + /** + * Certifies that the FFI has provided or will provide an auditor’s letter and required owner documentation, including a reporting statement and Form W-9s, to meet owner-documented FFI requirements under the regulations. + * @return ownerDocumentedFfiAuditorLetterCertification + */ + @javax.annotation.Nullable + public Boolean getOwnerDocumentedFfiAuditorLetterCertification() { + return ownerDocumentedFfiAuditorLetterCertification; + } + + public void setOwnerDocumentedFfiAuditorLetterCertification(Boolean ownerDocumentedFfiAuditorLetterCertification) { + this.ownerDocumentedFfiAuditorLetterCertification = ownerDocumentedFfiAuditorLetterCertification; + } + + + public W8ImyFormRequest compliantNonregisteringLocalBankCertification(Boolean compliantNonregisteringLocalBankCertification) { + this.compliantNonregisteringLocalBankCertification = compliantNonregisteringLocalBankCertification; + return this; + } + + /** + * Certifies that the FFI operates solely as a limited bank or credit union within its country, meets asset thresholds, and has no foreign operations or affiliations outside its country of organization. + * @return compliantNonregisteringLocalBankCertification + */ + @javax.annotation.Nullable + public Boolean getCompliantNonregisteringLocalBankCertification() { + return compliantNonregisteringLocalBankCertification; + } + + public void setCompliantNonregisteringLocalBankCertification(Boolean compliantNonregisteringLocalBankCertification) { + this.compliantNonregisteringLocalBankCertification = compliantNonregisteringLocalBankCertification; + } + + + public W8ImyFormRequest compliantFfiLowValueAccountsCertification(Boolean compliantFfiLowValueAccountsCertification) { + this.compliantFfiLowValueAccountsCertification = compliantFfiLowValueAccountsCertification; + return this; + } + + /** + * Certifies that the FFI is not primarily engaged in investment activities, maintains only low-value accounts, and has limited total assets within its group. + * @return compliantFfiLowValueAccountsCertification + */ + @javax.annotation.Nullable + public Boolean getCompliantFfiLowValueAccountsCertification() { + return compliantFfiLowValueAccountsCertification; + } + + public void setCompliantFfiLowValueAccountsCertification(Boolean compliantFfiLowValueAccountsCertification) { + this.compliantFfiLowValueAccountsCertification = compliantFfiLowValueAccountsCertification; + } + + + public W8ImyFormRequest sponsoredCloselyHeldEntitySponsoringEntity(String sponsoredCloselyHeldEntitySponsoringEntity) { + this.sponsoredCloselyHeldEntitySponsoringEntity = sponsoredCloselyHeldEntitySponsoringEntity; + return this; + } + + /** + * The name of sponsoring entity for a certified deemed-compliant, closely held investment vehicle. + * @return sponsoredCloselyHeldEntitySponsoringEntity + */ + @javax.annotation.Nullable + public String getSponsoredCloselyHeldEntitySponsoringEntity() { + return sponsoredCloselyHeldEntitySponsoringEntity; + } + + public void setSponsoredCloselyHeldEntitySponsoringEntity(String sponsoredCloselyHeldEntitySponsoringEntity) { + this.sponsoredCloselyHeldEntitySponsoringEntity = sponsoredCloselyHeldEntitySponsoringEntity; + } + + + public W8ImyFormRequest sponsoredCloselyHeldInvestmentVehicleCertification(Boolean sponsoredCloselyHeldInvestmentVehicleCertification) { + this.sponsoredCloselyHeldInvestmentVehicleCertification = sponsoredCloselyHeldInvestmentVehicleCertification; + return this; + } + + /** + * Certifies that the entity is a sponsored investment entity with 20 or fewer individual owners, and that all compliance obligations are fulfilled by the sponsoring entity. + * @return sponsoredCloselyHeldInvestmentVehicleCertification + */ + @javax.annotation.Nullable + public Boolean getSponsoredCloselyHeldInvestmentVehicleCertification() { + return sponsoredCloselyHeldInvestmentVehicleCertification; + } + + public void setSponsoredCloselyHeldInvestmentVehicleCertification(Boolean sponsoredCloselyHeldInvestmentVehicleCertification) { + this.sponsoredCloselyHeldInvestmentVehicleCertification = sponsoredCloselyHeldInvestmentVehicleCertification; + } + + + public W8ImyFormRequest compliantLimitedLifeDebtEntityCertification(Boolean compliantLimitedLifeDebtEntityCertification) { + this.compliantLimitedLifeDebtEntityCertification = compliantLimitedLifeDebtEntityCertification; + return this; + } + + /** + * Certifies that the entity qualifies as a limited life debt investment entity based on its formation date, issuance terms, and compliance with regulatory requirements. + * @return compliantLimitedLifeDebtEntityCertification + */ + @javax.annotation.Nullable + public Boolean getCompliantLimitedLifeDebtEntityCertification() { + return compliantLimitedLifeDebtEntityCertification; + } + + public void setCompliantLimitedLifeDebtEntityCertification(Boolean compliantLimitedLifeDebtEntityCertification) { + this.compliantLimitedLifeDebtEntityCertification = compliantLimitedLifeDebtEntityCertification; + } + + + public W8ImyFormRequest investmentEntityNoFinancialAccountsCertification(Boolean investmentEntityNoFinancialAccountsCertification) { + this.investmentEntityNoFinancialAccountsCertification = investmentEntityNoFinancialAccountsCertification; + return this; + } + + /** + * Certifies that the entity is a financial institution solely because it is an investment entity under regulations and the entity does not maintain financial accounts. + * @return investmentEntityNoFinancialAccountsCertification + */ + @javax.annotation.Nullable + public Boolean getInvestmentEntityNoFinancialAccountsCertification() { + return investmentEntityNoFinancialAccountsCertification; + } + + public void setInvestmentEntityNoFinancialAccountsCertification(Boolean investmentEntityNoFinancialAccountsCertification) { + this.investmentEntityNoFinancialAccountsCertification = investmentEntityNoFinancialAccountsCertification; + } + + + public W8ImyFormRequest restrictedDistributorCertification(Boolean restrictedDistributorCertification) { + this.restrictedDistributorCertification = restrictedDistributorCertification; + return this; + } + + /** + * Certifies that the entity qualifies as a restricted distributor based on its operations, customer base, regulatory compliance, and financial and geographic limitations. + * @return restrictedDistributorCertification + */ + @javax.annotation.Nullable + public Boolean getRestrictedDistributorCertification() { + return restrictedDistributorCertification; + } + + public void setRestrictedDistributorCertification(Boolean restrictedDistributorCertification) { + this.restrictedDistributorCertification = restrictedDistributorCertification; + } + + + public W8ImyFormRequest restrictedDistributorAgreementCertification(Boolean restrictedDistributorAgreementCertification) { + this.restrictedDistributorAgreementCertification = restrictedDistributorAgreementCertification; + return this; + } + + /** + * Certifies that the entity is, and has been, bound by distribution agreements prohibiting sales of fund interests to specified U.S. persons and certain non-U.S. entities. + * @return restrictedDistributorAgreementCertification + */ + @javax.annotation.Nullable + public Boolean getRestrictedDistributorAgreementCertification() { + return restrictedDistributorAgreementCertification; + } + + public void setRestrictedDistributorAgreementCertification(Boolean restrictedDistributorAgreementCertification) { + this.restrictedDistributorAgreementCertification = restrictedDistributorAgreementCertification; + } + + + public W8ImyFormRequest restrictedDistributorPreexistingSalesComplianceCertification(Boolean restrictedDistributorPreexistingSalesComplianceCertification) { + this.restrictedDistributorPreexistingSalesComplianceCertification = restrictedDistributorPreexistingSalesComplianceCertification; + return this; + } + + /** + * Certifies that the entity complies with distribution restrictions for U.S.-linked investors and has addressed any preexisting sales in accordance with FATCA regulations. + * @return restrictedDistributorPreexistingSalesComplianceCertification + */ + @javax.annotation.Nullable + public Boolean getRestrictedDistributorPreexistingSalesComplianceCertification() { + return restrictedDistributorPreexistingSalesComplianceCertification; + } + + public void setRestrictedDistributorPreexistingSalesComplianceCertification(Boolean restrictedDistributorPreexistingSalesComplianceCertification) { + this.restrictedDistributorPreexistingSalesComplianceCertification = restrictedDistributorPreexistingSalesComplianceCertification; + } + + + public W8ImyFormRequest foreignCentralBankOfIssueCertification(Boolean foreignCentralBankOfIssueCertification) { + this.foreignCentralBankOfIssueCertification = foreignCentralBankOfIssueCertification; + return this; + } + + /** + * Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4). + * @return foreignCentralBankOfIssueCertification + */ + @javax.annotation.Nullable + public Boolean getForeignCentralBankOfIssueCertification() { + return foreignCentralBankOfIssueCertification; + } + + public void setForeignCentralBankOfIssueCertification(Boolean foreignCentralBankOfIssueCertification) { + this.foreignCentralBankOfIssueCertification = foreignCentralBankOfIssueCertification; + } + + + public W8ImyFormRequest nonreportingIgaFfiCertification(Boolean nonreportingIgaFfiCertification) { + this.nonreportingIgaFfiCertification = nonreportingIgaFfiCertification; + return this; + } + + /** + * Certifies that the entity meets the requirements to be considered a nonreporting financial institution to an applicable IGA. + * @return nonreportingIgaFfiCertification + */ + @javax.annotation.Nullable + public Boolean getNonreportingIgaFfiCertification() { + return nonreportingIgaFfiCertification; + } + + public void setNonreportingIgaFfiCertification(Boolean nonreportingIgaFfiCertification) { + this.nonreportingIgaFfiCertification = nonreportingIgaFfiCertification; + } + + + public W8ImyFormRequest igaCountry(String igaCountry) { + this.igaCountry = igaCountry; + return this; + } + + /** + * The country for the applicable IGA with the United States. + * @return igaCountry + */ + @javax.annotation.Nullable + public String getIgaCountry() { + return igaCountry; + } + + public void setIgaCountry(String igaCountry) { + this.igaCountry = igaCountry; + } + + + public W8ImyFormRequest igaModel(String igaModel) { + this.igaModel = igaModel; + return this; + } + + /** + * The applicable IGA model. + * @return igaModel + */ + @javax.annotation.Nullable + public String getIgaModel() { + return igaModel; + } + + public void setIgaModel(String igaModel) { + this.igaModel = igaModel; + } + + + public W8ImyFormRequest igaLegalStatusTreatment(String igaLegalStatusTreatment) { + this.igaLegalStatusTreatment = igaLegalStatusTreatment; + return this; + } + + /** + * Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations. + * @return igaLegalStatusTreatment + */ + @javax.annotation.Nullable + public String getIgaLegalStatusTreatment() { + return igaLegalStatusTreatment; + } + + public void setIgaLegalStatusTreatment(String igaLegalStatusTreatment) { + this.igaLegalStatusTreatment = igaLegalStatusTreatment; + } + + + public W8ImyFormRequest igaFfiTrusteeOrSponsor(String igaFfiTrusteeOrSponsor) { + this.igaFfiTrusteeOrSponsor = igaFfiTrusteeOrSponsor; + return this; + } + + /** + * The trustee or sponsor name for the nonreporting IGA FFI. + * @return igaFfiTrusteeOrSponsor + */ + @javax.annotation.Nullable + public String getIgaFfiTrusteeOrSponsor() { + return igaFfiTrusteeOrSponsor; + } + + public void setIgaFfiTrusteeOrSponsor(String igaFfiTrusteeOrSponsor) { + this.igaFfiTrusteeOrSponsor = igaFfiTrusteeOrSponsor; + } + + + public W8ImyFormRequest igaFfiTrusteeIsForeign(Boolean igaFfiTrusteeIsForeign) { + this.igaFfiTrusteeIsForeign = igaFfiTrusteeIsForeign; + return this; + } + + /** + * Indicates whether the trustee for the nonreporting IGA FFI is foreign. + * @return igaFfiTrusteeIsForeign + */ + @javax.annotation.Nullable + public Boolean getIgaFfiTrusteeIsForeign() { + return igaFfiTrusteeIsForeign; + } + + public void setIgaFfiTrusteeIsForeign(Boolean igaFfiTrusteeIsForeign) { + this.igaFfiTrusteeIsForeign = igaFfiTrusteeIsForeign; + } + + + public W8ImyFormRequest treatyQualifiedPensionFundCertification(Boolean treatyQualifiedPensionFundCertification) { + this.treatyQualifiedPensionFundCertification = treatyQualifiedPensionFundCertification; + return this; + } + + /** + * Certifies that the entity is a pension or retirement fund established in a treaty country and is entitled to treaty benefits on U.S. source income. + * @return treatyQualifiedPensionFundCertification + */ + @javax.annotation.Nullable + public Boolean getTreatyQualifiedPensionFundCertification() { + return treatyQualifiedPensionFundCertification; + } + + public void setTreatyQualifiedPensionFundCertification(Boolean treatyQualifiedPensionFundCertification) { + this.treatyQualifiedPensionFundCertification = treatyQualifiedPensionFundCertification; + } + + + public W8ImyFormRequest qualifiedRetirementFundCertification(Boolean qualifiedRetirementFundCertification) { + this.qualifiedRetirementFundCertification = qualifiedRetirementFundCertification; + return this; + } + + /** + * Certifies that the entity is a government-regulated retirement fund meeting specific requirements for contributions, tax exemption, beneficiary limits, and distribution restrictions. + * @return qualifiedRetirementFundCertification + */ + @javax.annotation.Nullable + public Boolean getQualifiedRetirementFundCertification() { + return qualifiedRetirementFundCertification; + } + + public void setQualifiedRetirementFundCertification(Boolean qualifiedRetirementFundCertification) { + this.qualifiedRetirementFundCertification = qualifiedRetirementFundCertification; + } + + + public W8ImyFormRequest narrowParticipationRetirementFundCertification(Boolean narrowParticipationRetirementFundCertification) { + this.narrowParticipationRetirementFundCertification = narrowParticipationRetirementFundCertification; + return this; + } + + /** + * Certifies that the entity is a government-regulated retirement fund with fewer than 50 participants, limited foreign ownership, and employer sponsorship that is not from investment entities or passive NFFEs. + * @return narrowParticipationRetirementFundCertification + */ + @javax.annotation.Nullable + public Boolean getNarrowParticipationRetirementFundCertification() { + return narrowParticipationRetirementFundCertification; + } + + public void setNarrowParticipationRetirementFundCertification(Boolean narrowParticipationRetirementFundCertification) { + this.narrowParticipationRetirementFundCertification = narrowParticipationRetirementFundCertification; + } + + + public W8ImyFormRequest section401AEquivalentPensionPlanCertification(Boolean section401AEquivalentPensionPlanCertification) { + this.section401AEquivalentPensionPlanCertification = section401AEquivalentPensionPlanCertification; + return this; + } + + /** + * Certifies that the entity is formed under a pension plan meeting section 401(a) requirements, except for being U.S.-trust funded. + * @return section401AEquivalentPensionPlanCertification + */ + @javax.annotation.Nullable + public Boolean getSection401AEquivalentPensionPlanCertification() { + return section401AEquivalentPensionPlanCertification; + } + + public void setSection401AEquivalentPensionPlanCertification(Boolean section401AEquivalentPensionPlanCertification) { + this.section401AEquivalentPensionPlanCertification = section401AEquivalentPensionPlanCertification; + } + + + public W8ImyFormRequest investmentEntityForRetirementFundsCertification(Boolean investmentEntityForRetirementFundsCertification) { + this.investmentEntityForRetirementFundsCertification = investmentEntityForRetirementFundsCertification; + return this; + } + + /** + * Certifies that the entity is established solely to earn income for the benefit of qualifying retirement funds or accounts under applicable FATCA regulations or IGAs. + * @return investmentEntityForRetirementFundsCertification + */ + @javax.annotation.Nullable + public Boolean getInvestmentEntityForRetirementFundsCertification() { + return investmentEntityForRetirementFundsCertification; + } + + public void setInvestmentEntityForRetirementFundsCertification(Boolean investmentEntityForRetirementFundsCertification) { + this.investmentEntityForRetirementFundsCertification = investmentEntityForRetirementFundsCertification; + } + + + public W8ImyFormRequest exemptBeneficialOwnerSponsoredRetirementFundCertification(Boolean exemptBeneficialOwnerSponsoredRetirementFundCertification) { + this.exemptBeneficialOwnerSponsoredRetirementFundCertification = exemptBeneficialOwnerSponsoredRetirementFundCertification; + return this; + } + + /** + * Certifies that the entity is established and sponsored by a qualifying exempt beneficial owner to provide retirement, disability, or death benefits to individuals based on services performed for the sponsor. + * @return exemptBeneficialOwnerSponsoredRetirementFundCertification + */ + @javax.annotation.Nullable + public Boolean getExemptBeneficialOwnerSponsoredRetirementFundCertification() { + return exemptBeneficialOwnerSponsoredRetirementFundCertification; + } + + public void setExemptBeneficialOwnerSponsoredRetirementFundCertification(Boolean exemptBeneficialOwnerSponsoredRetirementFundCertification) { + this.exemptBeneficialOwnerSponsoredRetirementFundCertification = exemptBeneficialOwnerSponsoredRetirementFundCertification; + } + + + public W8ImyFormRequest exceptedNonfinancialGroupEntityCertification(Boolean exceptedNonfinancialGroupEntityCertification) { + this.exceptedNonfinancialGroupEntityCertification = exceptedNonfinancialGroupEntityCertification; + return this; + } + + /** + * Certifies that the entity is a holding company, treasury center, or captive finance company operating within a nonfinancial group and not functioning as an investment or financial institution. + * @return exceptedNonfinancialGroupEntityCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedNonfinancialGroupEntityCertification() { + return exceptedNonfinancialGroupEntityCertification; + } + + public void setExceptedNonfinancialGroupEntityCertification(Boolean exceptedNonfinancialGroupEntityCertification) { + this.exceptedNonfinancialGroupEntityCertification = exceptedNonfinancialGroupEntityCertification; + } + + + public W8ImyFormRequest exceptedNonfinancialStartUpCertification(Boolean exceptedNonfinancialStartUpCertification) { + this.exceptedNonfinancialStartUpCertification = exceptedNonfinancialStartUpCertification; + return this; + } + + /** + * Certifies that the entity is a recently formed startup NFFE investing in a non-financial business and is not operating as or presenting itself as an investment fund. + * @return exceptedNonfinancialStartUpCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedNonfinancialStartUpCertification() { + return exceptedNonfinancialStartUpCertification; + } + + public void setExceptedNonfinancialStartUpCertification(Boolean exceptedNonfinancialStartUpCertification) { + this.exceptedNonfinancialStartUpCertification = exceptedNonfinancialStartUpCertification; + } + + + public W8ImyFormRequest startupFormationOrResolutionDate(LocalDate startupFormationOrResolutionDate) { + this.startupFormationOrResolutionDate = startupFormationOrResolutionDate; + return this; + } + + /** + * The date the start-up company was formed on (or, in case of new line of business, the date of board resolution approving the new line of business). + * @return startupFormationOrResolutionDate + */ + @javax.annotation.Nullable + public LocalDate getStartupFormationOrResolutionDate() { + return startupFormationOrResolutionDate; + } + + public void setStartupFormationOrResolutionDate(LocalDate startupFormationOrResolutionDate) { + this.startupFormationOrResolutionDate = startupFormationOrResolutionDate; + } + + + public W8ImyFormRequest exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification(Boolean exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification) { + this.exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification = exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification; + return this; + } + + /** + * Certifies that the entity is in liquidation, reorganization, or bankruptcy and intends to operate as a nonfinancial entity, with supporting documentation available if the process exceeds three years. + * @return exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification() { + return exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification; + } + + public void setExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification(Boolean exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification) { + this.exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification = exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification; + } + + + public W8ImyFormRequest nonfinancialEntityFilingDate(LocalDate nonfinancialEntityFilingDate) { + this.nonfinancialEntityFilingDate = nonfinancialEntityFilingDate; + return this; + } + + /** + * The filed date for a plan of reorganization, liquidation or bankruptcy. + * @return nonfinancialEntityFilingDate + */ + @javax.annotation.Nullable + public LocalDate getNonfinancialEntityFilingDate() { + return nonfinancialEntityFilingDate; + } + + public void setNonfinancialEntityFilingDate(LocalDate nonfinancialEntityFilingDate) { + this.nonfinancialEntityFilingDate = nonfinancialEntityFilingDate; + } + + + public W8ImyFormRequest publiclyTradedNffeCertification(Boolean publiclyTradedNffeCertification) { + this.publiclyTradedNffeCertification = publiclyTradedNffeCertification; + return this; + } + + /** + * Certifies that the entity is a foreign corporation that is not a financial institution and whose stock is regularly traded on an established securities market. + * @return publiclyTradedNffeCertification + */ + @javax.annotation.Nullable + public Boolean getPubliclyTradedNffeCertification() { + return publiclyTradedNffeCertification; + } + + public void setPubliclyTradedNffeCertification(Boolean publiclyTradedNffeCertification) { + this.publiclyTradedNffeCertification = publiclyTradedNffeCertification; + } + + + public W8ImyFormRequest publiclyTradedNffeSecuritiesMarket(String publiclyTradedNffeSecuritiesMarket) { + this.publiclyTradedNffeSecuritiesMarket = publiclyTradedNffeSecuritiesMarket; + return this; + } + + /** + * The name of the securities market where the corporation's stock is regularly traded. + * @return publiclyTradedNffeSecuritiesMarket + */ + @javax.annotation.Nullable + public String getPubliclyTradedNffeSecuritiesMarket() { + return publiclyTradedNffeSecuritiesMarket; + } + + public void setPubliclyTradedNffeSecuritiesMarket(String publiclyTradedNffeSecuritiesMarket) { + this.publiclyTradedNffeSecuritiesMarket = publiclyTradedNffeSecuritiesMarket; + } + + + public W8ImyFormRequest nffeAffiliateOfPubliclyTradedEntityCertification(Boolean nffeAffiliateOfPubliclyTradedEntityCertification) { + this.nffeAffiliateOfPubliclyTradedEntityCertification = nffeAffiliateOfPubliclyTradedEntityCertification; + return this; + } + + /** + * Certifies that the entity is a foreign corporation that is not a financial institution and is affiliated with a publicly traded entity within the same expanded affiliated group. + * @return nffeAffiliateOfPubliclyTradedEntityCertification + */ + @javax.annotation.Nullable + public Boolean getNffeAffiliateOfPubliclyTradedEntityCertification() { + return nffeAffiliateOfPubliclyTradedEntityCertification; + } + + public void setNffeAffiliateOfPubliclyTradedEntityCertification(Boolean nffeAffiliateOfPubliclyTradedEntityCertification) { + this.nffeAffiliateOfPubliclyTradedEntityCertification = nffeAffiliateOfPubliclyTradedEntityCertification; + } + + + public W8ImyFormRequest publiclyTradedEntity(String publiclyTradedEntity) { + this.publiclyTradedEntity = publiclyTradedEntity; + return this; + } + + /** + * The name of the affiliated entity whose stock is regularly traded on an established securities market. + * @return publiclyTradedEntity + */ + @javax.annotation.Nullable + public String getPubliclyTradedEntity() { + return publiclyTradedEntity; + } + + public void setPubliclyTradedEntity(String publiclyTradedEntity) { + this.publiclyTradedEntity = publiclyTradedEntity; + } + + + public W8ImyFormRequest nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket(String nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket) { + this.nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket = nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket; + return this; + } + + /** + * The name of the established securities market where the affiliated entity's stock is traded. + * @return nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket + */ + @javax.annotation.Nullable + public String getNffeAffiliateOfPubliclyTradedEntitySecuritiesMarket() { + return nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket; + } + + public void setNffeAffiliateOfPubliclyTradedEntitySecuritiesMarket(String nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket) { + this.nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket = nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket; + } + + + public W8ImyFormRequest exceptedTerritoryNffeCertification(Boolean exceptedTerritoryNffeCertification) { + this.exceptedTerritoryNffeCertification = exceptedTerritoryNffeCertification; + return this; + } + + /** + * Certifies that the entity is organized in a U.S. possession, is not engaged in financial activities, and is entirely owned by bona fide residents of that possession. + * @return exceptedTerritoryNffeCertification + */ + @javax.annotation.Nullable + public Boolean getExceptedTerritoryNffeCertification() { + return exceptedTerritoryNffeCertification; + } + + public void setExceptedTerritoryNffeCertification(Boolean exceptedTerritoryNffeCertification) { + this.exceptedTerritoryNffeCertification = exceptedTerritoryNffeCertification; + } + + + public W8ImyFormRequest activeNffeCertification(Boolean activeNffeCertification) { + this.activeNffeCertification = activeNffeCertification; + return this; + } + + /** + * Certifies that the entity is a foreign non-financial institution with less than 50% passive income and less than 50% of its assets producing or held to produce passive income. + * @return activeNffeCertification + */ + @javax.annotation.Nullable + public Boolean getActiveNffeCertification() { + return activeNffeCertification; + } + + public void setActiveNffeCertification(Boolean activeNffeCertification) { + this.activeNffeCertification = activeNffeCertification; + } + + + public W8ImyFormRequest passiveNffeCertification(Boolean passiveNffeCertification) { + this.passiveNffeCertification = passiveNffeCertification; + return this; + } + + /** + * Certifies that the entity is a foreign non-financial entity that does not qualify for any other NFFE category and is not a financial institution. + * @return passiveNffeCertification + */ + @javax.annotation.Nullable + public Boolean getPassiveNffeCertification() { + return passiveNffeCertification; + } + + public void setPassiveNffeCertification(Boolean passiveNffeCertification) { + this.passiveNffeCertification = passiveNffeCertification; + } + + + public W8ImyFormRequest sponsoredDirectReportingNffeCertification(Boolean sponsoredDirectReportingNffeCertification) { + this.sponsoredDirectReportingNffeCertification = sponsoredDirectReportingNffeCertification; + return this; + } + + /** + * Certifies that the entity is a sponsored direct reporting NFFE. + * @return sponsoredDirectReportingNffeCertification + */ + @javax.annotation.Nullable + public Boolean getSponsoredDirectReportingNffeCertification() { + return sponsoredDirectReportingNffeCertification; + } + + public void setSponsoredDirectReportingNffeCertification(Boolean sponsoredDirectReportingNffeCertification) { + this.sponsoredDirectReportingNffeCertification = sponsoredDirectReportingNffeCertification; + } + + + public W8ImyFormRequest directReportingNffeSponsoringEntity(String directReportingNffeSponsoringEntity) { + this.directReportingNffeSponsoringEntity = directReportingNffeSponsoringEntity; + return this; + } + + /** + * The name of the entity that sponsors the direct reporting NFFE. + * @return directReportingNffeSponsoringEntity + */ + @javax.annotation.Nullable + public String getDirectReportingNffeSponsoringEntity() { + return directReportingNffeSponsoringEntity; + } + + public void setDirectReportingNffeSponsoringEntity(String directReportingNffeSponsoringEntity) { + this.directReportingNffeSponsoringEntity = directReportingNffeSponsoringEntity; + } + + + public W8ImyFormRequest signerName(String signerName) { + this.signerName = signerName; + return this; + } + + /** + * The name of the signer. + * @return signerName + */ + @javax.annotation.Nullable + public String getSignerName() { + return signerName; + } + + public void setSignerName(String signerName) { + this.signerName = signerName; + } + + + public W8ImyFormRequest 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 W8ImyFormRequest 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 W8ImyFormRequest 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 W8ImyFormRequest 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 W8ImyFormRequest 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W8ImyFormRequest w8ImyFormRequest = (W8ImyFormRequest) o; + return Objects.equals(this.type, w8ImyFormRequest.type) && + Objects.equals(this.name, w8ImyFormRequest.name) && + Objects.equals(this.citizenshipCountry, w8ImyFormRequest.citizenshipCountry) && + Objects.equals(this.disregardedEntity, w8ImyFormRequest.disregardedEntity) && + Objects.equals(this.entityType, w8ImyFormRequest.entityType) && + Objects.equals(this.fatcaStatus, w8ImyFormRequest.fatcaStatus) && + Objects.equals(this.residenceAddress, w8ImyFormRequest.residenceAddress) && + Objects.equals(this.residenceCity, w8ImyFormRequest.residenceCity) && + Objects.equals(this.residenceState, w8ImyFormRequest.residenceState) && + Objects.equals(this.residenceZip, w8ImyFormRequest.residenceZip) && + Objects.equals(this.residenceCountry, w8ImyFormRequest.residenceCountry) && + Objects.equals(this.residenceIsMailing, w8ImyFormRequest.residenceIsMailing) && + Objects.equals(this.mailingAddress, w8ImyFormRequest.mailingAddress) && + Objects.equals(this.mailingCity, w8ImyFormRequest.mailingCity) && + Objects.equals(this.mailingState, w8ImyFormRequest.mailingState) && + Objects.equals(this.mailingZip, w8ImyFormRequest.mailingZip) && + Objects.equals(this.mailingCountry, w8ImyFormRequest.mailingCountry) && + Objects.equals(this.tinType, w8ImyFormRequest.tinType) && + Objects.equals(this.tin, w8ImyFormRequest.tin) && + Objects.equals(this.giin, w8ImyFormRequest.giin) && + Objects.equals(this.foreignTin, w8ImyFormRequest.foreignTin) && + Objects.equals(this.referenceNumber, w8ImyFormRequest.referenceNumber) && + Objects.equals(this.disregardedEntityFatcaStatus, w8ImyFormRequest.disregardedEntityFatcaStatus) && + Objects.equals(this.disregardedAddress, w8ImyFormRequest.disregardedAddress) && + Objects.equals(this.disregardedCity, w8ImyFormRequest.disregardedCity) && + Objects.equals(this.disregardedState, w8ImyFormRequest.disregardedState) && + Objects.equals(this.disregardedZip, w8ImyFormRequest.disregardedZip) && + Objects.equals(this.disregardedCountry, w8ImyFormRequest.disregardedCountry) && + Objects.equals(this.disregardedEntityGiin, w8ImyFormRequest.disregardedEntityGiin) && + Objects.equals(this.qualifiedIntermediaryCertification, w8ImyFormRequest.qualifiedIntermediaryCertification) && + Objects.equals(this.qiPrimaryWithholdingResponsibilityCertification, w8ImyFormRequest.qiPrimaryWithholdingResponsibilityCertification) && + Objects.equals(this.qiWithholdingResponsibilityForPtpSalesCertification, w8ImyFormRequest.qiWithholdingResponsibilityForPtpSalesCertification) && + Objects.equals(this.qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, w8ImyFormRequest.qiNomineeWithholdingResponsibilityForPtpDistributionsCertification) && + Objects.equals(this.qiSecuritiesLenderSubstituteDividendWithholdingCertification, w8ImyFormRequest.qiSecuritiesLenderSubstituteDividendWithholdingCertification) && + Objects.equals(this.qiWithholdingAnd1099ReportingResponsibilityCertification, w8ImyFormRequest.qiWithholdingAnd1099ReportingResponsibilityCertification) && + Objects.equals(this.qiForm1099OrFatcaReportingResponsibilityCertification, w8ImyFormRequest.qiForm1099OrFatcaReportingResponsibilityCertification) && + Objects.equals(this.qiOptOutOfForm1099ReportingCertification, w8ImyFormRequest.qiOptOutOfForm1099ReportingCertification) && + Objects.equals(this.qiWithholdingRatePoolCertification, w8ImyFormRequest.qiWithholdingRatePoolCertification) && + Objects.equals(this.qiIntermediaryOrFlowThroughEntityDocumentationCertification, w8ImyFormRequest.qiIntermediaryOrFlowThroughEntityDocumentationCertification) && + Objects.equals(this.qualifiedDerivativesDealerCertification, w8ImyFormRequest.qualifiedDerivativesDealerCertification) && + Objects.equals(this.qddCorporation, w8ImyFormRequest.qddCorporation) && + Objects.equals(this.qddPartnership, w8ImyFormRequest.qddPartnership) && + Objects.equals(this.qddDisregardedEntity, w8ImyFormRequest.qddDisregardedEntity) && + Objects.equals(this.nonqualifiedIntermediaryCertification, w8ImyFormRequest.nonqualifiedIntermediaryCertification) && + Objects.equals(this.nqiWithholdingStatementTransmissionCertification, w8ImyFormRequest.nqiWithholdingStatementTransmissionCertification) && + Objects.equals(this.nqiWithholdingRatePoolComplianceCertification, w8ImyFormRequest.nqiWithholdingRatePoolComplianceCertification) && + Objects.equals(this.nqiQualifiedSecuritiesLenderCertification, w8ImyFormRequest.nqiQualifiedSecuritiesLenderCertification) && + Objects.equals(this.nqiAlternativeWithholdingStatementVerificationCertification, w8ImyFormRequest.nqiAlternativeWithholdingStatementVerificationCertification) && + Objects.equals(this.territoryFinancialInstitutionCertification, w8ImyFormRequest.territoryFinancialInstitutionCertification) && + Objects.equals(this.tfiTreatedAsUsPersonCertification, w8ImyFormRequest.tfiTreatedAsUsPersonCertification) && + Objects.equals(this.tfiWithholdingStatementTransmissionCertification, w8ImyFormRequest.tfiWithholdingStatementTransmissionCertification) && + Objects.equals(this.tfiTreatedAsUsPersonForPtpSalesCertification, w8ImyFormRequest.tfiTreatedAsUsPersonForPtpSalesCertification) && + Objects.equals(this.tfiNomineeUsPersonForPtpDistributionsCertification, w8ImyFormRequest.tfiNomineeUsPersonForPtpDistributionsCertification) && + Objects.equals(this.tfiNotNomineeForPtpDistributionsCertification, w8ImyFormRequest.tfiNotNomineeForPtpDistributionsCertification) && + Objects.equals(this.usBranchNonEffectivelyConnectedIncomeCertification, w8ImyFormRequest.usBranchNonEffectivelyConnectedIncomeCertification) && + Objects.equals(this.usBranchAgreementToBeTreatedAsUsPersonCertification, w8ImyFormRequest.usBranchAgreementToBeTreatedAsUsPersonCertification) && + Objects.equals(this.usBranchWithholdingStatementAndComplianceCertification, w8ImyFormRequest.usBranchWithholdingStatementAndComplianceCertification) && + Objects.equals(this.usBranchActingAsUsPersonForPtpSalesCertification, w8ImyFormRequest.usBranchActingAsUsPersonForPtpSalesCertification) && + Objects.equals(this.usBranchNomineeForPtpDistributionsCertification, w8ImyFormRequest.usBranchNomineeForPtpDistributionsCertification) && + Objects.equals(this.usBranchNotNomineeForPtpDistributionsCertification, w8ImyFormRequest.usBranchNotNomineeForPtpDistributionsCertification) && + Objects.equals(this.withholdingForeignPartnershipOrTrustCertification, w8ImyFormRequest.withholdingForeignPartnershipOrTrustCertification) && + Objects.equals(this.nonwithholdingForeignEntityWithholdingStatementCertification, w8ImyFormRequest.nonwithholdingForeignEntityWithholdingStatementCertification) && + Objects.equals(this.foreignEntityPartnerInLowerTierPartnershipCertification, w8ImyFormRequest.foreignEntityPartnerInLowerTierPartnershipCertification) && + Objects.equals(this.foreignPartnershipAmountRealizedSection1446FCertification, w8ImyFormRequest.foreignPartnershipAmountRealizedSection1446FCertification) && + Objects.equals(this.foreignPartnershipModifiedAmountRealizedCertification, w8ImyFormRequest.foreignPartnershipModifiedAmountRealizedCertification) && + Objects.equals(this.foreignGrantorTrustAmountRealizedAllocationCertification, w8ImyFormRequest.foreignGrantorTrustAmountRealizedAllocationCertification) && + Objects.equals(this.alternativeWithholdingStatementRelianceCertification, w8ImyFormRequest.alternativeWithholdingStatementRelianceCertification) && + Objects.equals(this.npFfiWithExemptBeneficialOwnersCertification, w8ImyFormRequest.npFfiWithExemptBeneficialOwnersCertification) && + Objects.equals(this.ffiSponsoringEntity, w8ImyFormRequest.ffiSponsoringEntity) && + Objects.equals(this.investmentEntityCertification, w8ImyFormRequest.investmentEntityCertification) && + Objects.equals(this.controlledForeignCorporationCertification, w8ImyFormRequest.controlledForeignCorporationCertification) && + Objects.equals(this.ownerDocumentedFfiCertification, w8ImyFormRequest.ownerDocumentedFfiCertification) && + Objects.equals(this.ownerDocumentedFfiReportingStatementCertification, w8ImyFormRequest.ownerDocumentedFfiReportingStatementCertification) && + Objects.equals(this.ownerDocumentedFfiAuditorLetterCertification, w8ImyFormRequest.ownerDocumentedFfiAuditorLetterCertification) && + Objects.equals(this.compliantNonregisteringLocalBankCertification, w8ImyFormRequest.compliantNonregisteringLocalBankCertification) && + Objects.equals(this.compliantFfiLowValueAccountsCertification, w8ImyFormRequest.compliantFfiLowValueAccountsCertification) && + Objects.equals(this.sponsoredCloselyHeldEntitySponsoringEntity, w8ImyFormRequest.sponsoredCloselyHeldEntitySponsoringEntity) && + Objects.equals(this.sponsoredCloselyHeldInvestmentVehicleCertification, w8ImyFormRequest.sponsoredCloselyHeldInvestmentVehicleCertification) && + Objects.equals(this.compliantLimitedLifeDebtEntityCertification, w8ImyFormRequest.compliantLimitedLifeDebtEntityCertification) && + Objects.equals(this.investmentEntityNoFinancialAccountsCertification, w8ImyFormRequest.investmentEntityNoFinancialAccountsCertification) && + Objects.equals(this.restrictedDistributorCertification, w8ImyFormRequest.restrictedDistributorCertification) && + Objects.equals(this.restrictedDistributorAgreementCertification, w8ImyFormRequest.restrictedDistributorAgreementCertification) && + Objects.equals(this.restrictedDistributorPreexistingSalesComplianceCertification, w8ImyFormRequest.restrictedDistributorPreexistingSalesComplianceCertification) && + Objects.equals(this.foreignCentralBankOfIssueCertification, w8ImyFormRequest.foreignCentralBankOfIssueCertification) && + Objects.equals(this.nonreportingIgaFfiCertification, w8ImyFormRequest.nonreportingIgaFfiCertification) && + Objects.equals(this.igaCountry, w8ImyFormRequest.igaCountry) && + Objects.equals(this.igaModel, w8ImyFormRequest.igaModel) && + Objects.equals(this.igaLegalStatusTreatment, w8ImyFormRequest.igaLegalStatusTreatment) && + Objects.equals(this.igaFfiTrusteeOrSponsor, w8ImyFormRequest.igaFfiTrusteeOrSponsor) && + Objects.equals(this.igaFfiTrusteeIsForeign, w8ImyFormRequest.igaFfiTrusteeIsForeign) && + Objects.equals(this.treatyQualifiedPensionFundCertification, w8ImyFormRequest.treatyQualifiedPensionFundCertification) && + Objects.equals(this.qualifiedRetirementFundCertification, w8ImyFormRequest.qualifiedRetirementFundCertification) && + Objects.equals(this.narrowParticipationRetirementFundCertification, w8ImyFormRequest.narrowParticipationRetirementFundCertification) && + Objects.equals(this.section401AEquivalentPensionPlanCertification, w8ImyFormRequest.section401AEquivalentPensionPlanCertification) && + Objects.equals(this.investmentEntityForRetirementFundsCertification, w8ImyFormRequest.investmentEntityForRetirementFundsCertification) && + Objects.equals(this.exemptBeneficialOwnerSponsoredRetirementFundCertification, w8ImyFormRequest.exemptBeneficialOwnerSponsoredRetirementFundCertification) && + Objects.equals(this.exceptedNonfinancialGroupEntityCertification, w8ImyFormRequest.exceptedNonfinancialGroupEntityCertification) && + Objects.equals(this.exceptedNonfinancialStartUpCertification, w8ImyFormRequest.exceptedNonfinancialStartUpCertification) && + Objects.equals(this.startupFormationOrResolutionDate, w8ImyFormRequest.startupFormationOrResolutionDate) && + Objects.equals(this.exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, w8ImyFormRequest.exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification) && + Objects.equals(this.nonfinancialEntityFilingDate, w8ImyFormRequest.nonfinancialEntityFilingDate) && + Objects.equals(this.publiclyTradedNffeCertification, w8ImyFormRequest.publiclyTradedNffeCertification) && + Objects.equals(this.publiclyTradedNffeSecuritiesMarket, w8ImyFormRequest.publiclyTradedNffeSecuritiesMarket) && + Objects.equals(this.nffeAffiliateOfPubliclyTradedEntityCertification, w8ImyFormRequest.nffeAffiliateOfPubliclyTradedEntityCertification) && + Objects.equals(this.publiclyTradedEntity, w8ImyFormRequest.publiclyTradedEntity) && + Objects.equals(this.nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, w8ImyFormRequest.nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket) && + Objects.equals(this.exceptedTerritoryNffeCertification, w8ImyFormRequest.exceptedTerritoryNffeCertification) && + Objects.equals(this.activeNffeCertification, w8ImyFormRequest.activeNffeCertification) && + Objects.equals(this.passiveNffeCertification, w8ImyFormRequest.passiveNffeCertification) && + Objects.equals(this.sponsoredDirectReportingNffeCertification, w8ImyFormRequest.sponsoredDirectReportingNffeCertification) && + Objects.equals(this.directReportingNffeSponsoringEntity, w8ImyFormRequest.directReportingNffeSponsoringEntity) && + Objects.equals(this.signerName, w8ImyFormRequest.signerName) && + Objects.equals(this.companyId, w8ImyFormRequest.companyId) && + Objects.equals(this.referenceId, w8ImyFormRequest.referenceId) && + Objects.equals(this.email, w8ImyFormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w8ImyFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8ImyFormRequest.signature); + } + + 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, 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, companyId, referenceId, email, eDeliveryConsentedAt, signature); + } + + 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 W8ImyFormRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" citizenshipCountry: ").append(toIndentedString(citizenshipCountry)).append("\n"); + sb.append(" disregardedEntity: ").append(toIndentedString(disregardedEntity)).append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" fatcaStatus: ").append(toIndentedString(fatcaStatus)).append("\n"); + sb.append(" residenceAddress: ").append(toIndentedString(residenceAddress)).append("\n"); + sb.append(" residenceCity: ").append(toIndentedString(residenceCity)).append("\n"); + sb.append(" residenceState: ").append(toIndentedString(residenceState)).append("\n"); + sb.append(" residenceZip: ").append(toIndentedString(residenceZip)).append("\n"); + sb.append(" residenceCountry: ").append(toIndentedString(residenceCountry)).append("\n"); + sb.append(" residenceIsMailing: ").append(toIndentedString(residenceIsMailing)).append("\n"); + sb.append(" mailingAddress: ").append(toIndentedString(mailingAddress)).append("\n"); + sb.append(" mailingCity: ").append(toIndentedString(mailingCity)).append("\n"); + sb.append(" mailingState: ").append(toIndentedString(mailingState)).append("\n"); + sb.append(" mailingZip: ").append(toIndentedString(mailingZip)).append("\n"); + sb.append(" mailingCountry: ").append(toIndentedString(mailingCountry)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" giin: ").append(toIndentedString(giin)).append("\n"); + sb.append(" foreignTin: ").append(toIndentedString(foreignTin)).append("\n"); + sb.append(" referenceNumber: ").append(toIndentedString(referenceNumber)).append("\n"); + sb.append(" disregardedEntityFatcaStatus: ").append(toIndentedString(disregardedEntityFatcaStatus)).append("\n"); + sb.append(" disregardedAddress: ").append(toIndentedString(disregardedAddress)).append("\n"); + sb.append(" disregardedCity: ").append(toIndentedString(disregardedCity)).append("\n"); + sb.append(" disregardedState: ").append(toIndentedString(disregardedState)).append("\n"); + sb.append(" disregardedZip: ").append(toIndentedString(disregardedZip)).append("\n"); + sb.append(" disregardedCountry: ").append(toIndentedString(disregardedCountry)).append("\n"); + sb.append(" disregardedEntityGiin: ").append(toIndentedString(disregardedEntityGiin)).append("\n"); + sb.append(" qualifiedIntermediaryCertification: ").append(toIndentedString(qualifiedIntermediaryCertification)).append("\n"); + sb.append(" qiPrimaryWithholdingResponsibilityCertification: ").append(toIndentedString(qiPrimaryWithholdingResponsibilityCertification)).append("\n"); + sb.append(" qiWithholdingResponsibilityForPtpSalesCertification: ").append(toIndentedString(qiWithholdingResponsibilityForPtpSalesCertification)).append("\n"); + sb.append(" qiNomineeWithholdingResponsibilityForPtpDistributionsCertification: ").append(toIndentedString(qiNomineeWithholdingResponsibilityForPtpDistributionsCertification)).append("\n"); + sb.append(" qiSecuritiesLenderSubstituteDividendWithholdingCertification: ").append(toIndentedString(qiSecuritiesLenderSubstituteDividendWithholdingCertification)).append("\n"); + sb.append(" qiWithholdingAnd1099ReportingResponsibilityCertification: ").append(toIndentedString(qiWithholdingAnd1099ReportingResponsibilityCertification)).append("\n"); + sb.append(" qiForm1099OrFatcaReportingResponsibilityCertification: ").append(toIndentedString(qiForm1099OrFatcaReportingResponsibilityCertification)).append("\n"); + sb.append(" qiOptOutOfForm1099ReportingCertification: ").append(toIndentedString(qiOptOutOfForm1099ReportingCertification)).append("\n"); + sb.append(" qiWithholdingRatePoolCertification: ").append(toIndentedString(qiWithholdingRatePoolCertification)).append("\n"); + sb.append(" qiIntermediaryOrFlowThroughEntityDocumentationCertification: ").append(toIndentedString(qiIntermediaryOrFlowThroughEntityDocumentationCertification)).append("\n"); + sb.append(" qualifiedDerivativesDealerCertification: ").append(toIndentedString(qualifiedDerivativesDealerCertification)).append("\n"); + sb.append(" qddCorporation: ").append(toIndentedString(qddCorporation)).append("\n"); + sb.append(" qddPartnership: ").append(toIndentedString(qddPartnership)).append("\n"); + sb.append(" qddDisregardedEntity: ").append(toIndentedString(qddDisregardedEntity)).append("\n"); + sb.append(" nonqualifiedIntermediaryCertification: ").append(toIndentedString(nonqualifiedIntermediaryCertification)).append("\n"); + sb.append(" nqiWithholdingStatementTransmissionCertification: ").append(toIndentedString(nqiWithholdingStatementTransmissionCertification)).append("\n"); + sb.append(" nqiWithholdingRatePoolComplianceCertification: ").append(toIndentedString(nqiWithholdingRatePoolComplianceCertification)).append("\n"); + sb.append(" nqiQualifiedSecuritiesLenderCertification: ").append(toIndentedString(nqiQualifiedSecuritiesLenderCertification)).append("\n"); + sb.append(" nqiAlternativeWithholdingStatementVerificationCertification: ").append(toIndentedString(nqiAlternativeWithholdingStatementVerificationCertification)).append("\n"); + sb.append(" territoryFinancialInstitutionCertification: ").append(toIndentedString(territoryFinancialInstitutionCertification)).append("\n"); + sb.append(" tfiTreatedAsUsPersonCertification: ").append(toIndentedString(tfiTreatedAsUsPersonCertification)).append("\n"); + sb.append(" tfiWithholdingStatementTransmissionCertification: ").append(toIndentedString(tfiWithholdingStatementTransmissionCertification)).append("\n"); + sb.append(" tfiTreatedAsUsPersonForPtpSalesCertification: ").append(toIndentedString(tfiTreatedAsUsPersonForPtpSalesCertification)).append("\n"); + sb.append(" tfiNomineeUsPersonForPtpDistributionsCertification: ").append(toIndentedString(tfiNomineeUsPersonForPtpDistributionsCertification)).append("\n"); + sb.append(" tfiNotNomineeForPtpDistributionsCertification: ").append(toIndentedString(tfiNotNomineeForPtpDistributionsCertification)).append("\n"); + sb.append(" usBranchNonEffectivelyConnectedIncomeCertification: ").append(toIndentedString(usBranchNonEffectivelyConnectedIncomeCertification)).append("\n"); + sb.append(" usBranchAgreementToBeTreatedAsUsPersonCertification: ").append(toIndentedString(usBranchAgreementToBeTreatedAsUsPersonCertification)).append("\n"); + sb.append(" usBranchWithholdingStatementAndComplianceCertification: ").append(toIndentedString(usBranchWithholdingStatementAndComplianceCertification)).append("\n"); + sb.append(" usBranchActingAsUsPersonForPtpSalesCertification: ").append(toIndentedString(usBranchActingAsUsPersonForPtpSalesCertification)).append("\n"); + sb.append(" usBranchNomineeForPtpDistributionsCertification: ").append(toIndentedString(usBranchNomineeForPtpDistributionsCertification)).append("\n"); + sb.append(" usBranchNotNomineeForPtpDistributionsCertification: ").append(toIndentedString(usBranchNotNomineeForPtpDistributionsCertification)).append("\n"); + sb.append(" withholdingForeignPartnershipOrTrustCertification: ").append(toIndentedString(withholdingForeignPartnershipOrTrustCertification)).append("\n"); + sb.append(" nonwithholdingForeignEntityWithholdingStatementCertification: ").append(toIndentedString(nonwithholdingForeignEntityWithholdingStatementCertification)).append("\n"); + sb.append(" foreignEntityPartnerInLowerTierPartnershipCertification: ").append(toIndentedString(foreignEntityPartnerInLowerTierPartnershipCertification)).append("\n"); + sb.append(" foreignPartnershipAmountRealizedSection1446FCertification: ").append(toIndentedString(foreignPartnershipAmountRealizedSection1446FCertification)).append("\n"); + sb.append(" foreignPartnershipModifiedAmountRealizedCertification: ").append(toIndentedString(foreignPartnershipModifiedAmountRealizedCertification)).append("\n"); + sb.append(" foreignGrantorTrustAmountRealizedAllocationCertification: ").append(toIndentedString(foreignGrantorTrustAmountRealizedAllocationCertification)).append("\n"); + sb.append(" alternativeWithholdingStatementRelianceCertification: ").append(toIndentedString(alternativeWithholdingStatementRelianceCertification)).append("\n"); + sb.append(" npFfiWithExemptBeneficialOwnersCertification: ").append(toIndentedString(npFfiWithExemptBeneficialOwnersCertification)).append("\n"); + sb.append(" ffiSponsoringEntity: ").append(toIndentedString(ffiSponsoringEntity)).append("\n"); + sb.append(" investmentEntityCertification: ").append(toIndentedString(investmentEntityCertification)).append("\n"); + sb.append(" controlledForeignCorporationCertification: ").append(toIndentedString(controlledForeignCorporationCertification)).append("\n"); + sb.append(" ownerDocumentedFfiCertification: ").append(toIndentedString(ownerDocumentedFfiCertification)).append("\n"); + sb.append(" ownerDocumentedFfiReportingStatementCertification: ").append(toIndentedString(ownerDocumentedFfiReportingStatementCertification)).append("\n"); + sb.append(" ownerDocumentedFfiAuditorLetterCertification: ").append(toIndentedString(ownerDocumentedFfiAuditorLetterCertification)).append("\n"); + sb.append(" compliantNonregisteringLocalBankCertification: ").append(toIndentedString(compliantNonregisteringLocalBankCertification)).append("\n"); + sb.append(" compliantFfiLowValueAccountsCertification: ").append(toIndentedString(compliantFfiLowValueAccountsCertification)).append("\n"); + sb.append(" sponsoredCloselyHeldEntitySponsoringEntity: ").append(toIndentedString(sponsoredCloselyHeldEntitySponsoringEntity)).append("\n"); + sb.append(" sponsoredCloselyHeldInvestmentVehicleCertification: ").append(toIndentedString(sponsoredCloselyHeldInvestmentVehicleCertification)).append("\n"); + sb.append(" compliantLimitedLifeDebtEntityCertification: ").append(toIndentedString(compliantLimitedLifeDebtEntityCertification)).append("\n"); + sb.append(" investmentEntityNoFinancialAccountsCertification: ").append(toIndentedString(investmentEntityNoFinancialAccountsCertification)).append("\n"); + sb.append(" restrictedDistributorCertification: ").append(toIndentedString(restrictedDistributorCertification)).append("\n"); + sb.append(" restrictedDistributorAgreementCertification: ").append(toIndentedString(restrictedDistributorAgreementCertification)).append("\n"); + sb.append(" restrictedDistributorPreexistingSalesComplianceCertification: ").append(toIndentedString(restrictedDistributorPreexistingSalesComplianceCertification)).append("\n"); + sb.append(" foreignCentralBankOfIssueCertification: ").append(toIndentedString(foreignCentralBankOfIssueCertification)).append("\n"); + sb.append(" nonreportingIgaFfiCertification: ").append(toIndentedString(nonreportingIgaFfiCertification)).append("\n"); + sb.append(" igaCountry: ").append(toIndentedString(igaCountry)).append("\n"); + sb.append(" igaModel: ").append(toIndentedString(igaModel)).append("\n"); + sb.append(" igaLegalStatusTreatment: ").append(toIndentedString(igaLegalStatusTreatment)).append("\n"); + sb.append(" igaFfiTrusteeOrSponsor: ").append(toIndentedString(igaFfiTrusteeOrSponsor)).append("\n"); + sb.append(" igaFfiTrusteeIsForeign: ").append(toIndentedString(igaFfiTrusteeIsForeign)).append("\n"); + sb.append(" treatyQualifiedPensionFundCertification: ").append(toIndentedString(treatyQualifiedPensionFundCertification)).append("\n"); + sb.append(" qualifiedRetirementFundCertification: ").append(toIndentedString(qualifiedRetirementFundCertification)).append("\n"); + sb.append(" narrowParticipationRetirementFundCertification: ").append(toIndentedString(narrowParticipationRetirementFundCertification)).append("\n"); + sb.append(" section401AEquivalentPensionPlanCertification: ").append(toIndentedString(section401AEquivalentPensionPlanCertification)).append("\n"); + sb.append(" investmentEntityForRetirementFundsCertification: ").append(toIndentedString(investmentEntityForRetirementFundsCertification)).append("\n"); + sb.append(" exemptBeneficialOwnerSponsoredRetirementFundCertification: ").append(toIndentedString(exemptBeneficialOwnerSponsoredRetirementFundCertification)).append("\n"); + sb.append(" exceptedNonfinancialGroupEntityCertification: ").append(toIndentedString(exceptedNonfinancialGroupEntityCertification)).append("\n"); + sb.append(" exceptedNonfinancialStartUpCertification: ").append(toIndentedString(exceptedNonfinancialStartUpCertification)).append("\n"); + sb.append(" startupFormationOrResolutionDate: ").append(toIndentedString(startupFormationOrResolutionDate)).append("\n"); + sb.append(" exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification: ").append(toIndentedString(exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification)).append("\n"); + sb.append(" nonfinancialEntityFilingDate: ").append(toIndentedString(nonfinancialEntityFilingDate)).append("\n"); + sb.append(" publiclyTradedNffeCertification: ").append(toIndentedString(publiclyTradedNffeCertification)).append("\n"); + sb.append(" publiclyTradedNffeSecuritiesMarket: ").append(toIndentedString(publiclyTradedNffeSecuritiesMarket)).append("\n"); + sb.append(" nffeAffiliateOfPubliclyTradedEntityCertification: ").append(toIndentedString(nffeAffiliateOfPubliclyTradedEntityCertification)).append("\n"); + sb.append(" publiclyTradedEntity: ").append(toIndentedString(publiclyTradedEntity)).append("\n"); + sb.append(" nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket: ").append(toIndentedString(nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket)).append("\n"); + sb.append(" exceptedTerritoryNffeCertification: ").append(toIndentedString(exceptedTerritoryNffeCertification)).append("\n"); + sb.append(" activeNffeCertification: ").append(toIndentedString(activeNffeCertification)).append("\n"); + sb.append(" passiveNffeCertification: ").append(toIndentedString(passiveNffeCertification)).append("\n"); + 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(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).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("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); + + // 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 W8ImyFormRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W8ImyFormRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W8ImyFormRequest is not found in the empty JSON string", W8ImyFormRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W8ImyFormRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W8ImyFormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("citizenshipCountry") != null && !jsonObj.get("citizenshipCountry").isJsonNull()) && !jsonObj.get("citizenshipCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `citizenshipCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("citizenshipCountry").toString())); + } + if ((jsonObj.get("disregardedEntity") != null && !jsonObj.get("disregardedEntity").isJsonNull()) && !jsonObj.get("disregardedEntity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntity").toString())); + } + if ((jsonObj.get("entityType") != null && !jsonObj.get("entityType").isJsonNull()) && !jsonObj.get("entityType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `entityType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("entityType").toString())); + } + if ((jsonObj.get("fatcaStatus") != null && !jsonObj.get("fatcaStatus").isJsonNull()) && !jsonObj.get("fatcaStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `fatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fatcaStatus").toString())); + } + if ((jsonObj.get("residenceAddress") != null && !jsonObj.get("residenceAddress").isJsonNull()) && !jsonObj.get("residenceAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceAddress").toString())); + } + if ((jsonObj.get("residenceCity") != null && !jsonObj.get("residenceCity").isJsonNull()) && !jsonObj.get("residenceCity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCity").toString())); + } + if ((jsonObj.get("residenceState") != null && !jsonObj.get("residenceState").isJsonNull()) && !jsonObj.get("residenceState").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceState").toString())); + } + if ((jsonObj.get("residenceZip") != null && !jsonObj.get("residenceZip").isJsonNull()) && !jsonObj.get("residenceZip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceZip").toString())); + } + if ((jsonObj.get("residenceCountry") != null && !jsonObj.get("residenceCountry").isJsonNull()) && !jsonObj.get("residenceCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `residenceCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("residenceCountry").toString())); + } + if ((jsonObj.get("mailingAddress") != null && !jsonObj.get("mailingAddress").isJsonNull()) && !jsonObj.get("mailingAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingAddress").toString())); + } + if ((jsonObj.get("mailingCity") != null && !jsonObj.get("mailingCity").isJsonNull()) && !jsonObj.get("mailingCity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCity").toString())); + } + if ((jsonObj.get("mailingState") != null && !jsonObj.get("mailingState").isJsonNull()) && !jsonObj.get("mailingState").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingState").toString())); + } + if ((jsonObj.get("mailingZip") != null && !jsonObj.get("mailingZip").isJsonNull()) && !jsonObj.get("mailingZip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingZip").toString())); + } + if ((jsonObj.get("mailingCountry") != null && !jsonObj.get("mailingCountry").isJsonNull()) && !jsonObj.get("mailingCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `mailingCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mailingCountry").toString())); + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("giin") != null && !jsonObj.get("giin").isJsonNull()) && !jsonObj.get("giin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `giin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("giin").toString())); + } + if ((jsonObj.get("foreignTin") != null && !jsonObj.get("foreignTin").isJsonNull()) && !jsonObj.get("foreignTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignTin").toString())); + } + if ((jsonObj.get("referenceNumber") != null && !jsonObj.get("referenceNumber").isJsonNull()) && !jsonObj.get("referenceNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceNumber").toString())); + } + if ((jsonObj.get("disregardedEntityFatcaStatus") != null && !jsonObj.get("disregardedEntityFatcaStatus").isJsonNull()) && !jsonObj.get("disregardedEntityFatcaStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityFatcaStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityFatcaStatus").toString())); + } + if ((jsonObj.get("disregardedAddress") != null && !jsonObj.get("disregardedAddress").isJsonNull()) && !jsonObj.get("disregardedAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedAddress").toString())); + } + if ((jsonObj.get("disregardedCity") != null && !jsonObj.get("disregardedCity").isJsonNull()) && !jsonObj.get("disregardedCity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedCity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCity").toString())); + } + if ((jsonObj.get("disregardedState") != null && !jsonObj.get("disregardedState").isJsonNull()) && !jsonObj.get("disregardedState").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedState` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedState").toString())); + } + if ((jsonObj.get("disregardedZip") != null && !jsonObj.get("disregardedZip").isJsonNull()) && !jsonObj.get("disregardedZip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedZip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedZip").toString())); + } + if ((jsonObj.get("disregardedCountry") != null && !jsonObj.get("disregardedCountry").isJsonNull()) && !jsonObj.get("disregardedCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedCountry").toString())); + } + if ((jsonObj.get("disregardedEntityGiin") != null && !jsonObj.get("disregardedEntityGiin").isJsonNull()) && !jsonObj.get("disregardedEntityGiin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `disregardedEntityGiin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disregardedEntityGiin").toString())); + } + if ((jsonObj.get("ffiSponsoringEntity") != null && !jsonObj.get("ffiSponsoringEntity").isJsonNull()) && !jsonObj.get("ffiSponsoringEntity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ffiSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ffiSponsoringEntity").toString())); + } + if ((jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity") != null && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonNull()) && !jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sponsoredCloselyHeldEntitySponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sponsoredCloselyHeldEntitySponsoringEntity").toString())); + } + if ((jsonObj.get("igaCountry") != null && !jsonObj.get("igaCountry").isJsonNull()) && !jsonObj.get("igaCountry").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `igaCountry` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaCountry").toString())); + } + if ((jsonObj.get("igaModel") != null && !jsonObj.get("igaModel").isJsonNull()) && !jsonObj.get("igaModel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `igaModel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaModel").toString())); + } + if ((jsonObj.get("igaLegalStatusTreatment") != null && !jsonObj.get("igaLegalStatusTreatment").isJsonNull()) && !jsonObj.get("igaLegalStatusTreatment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `igaLegalStatusTreatment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaLegalStatusTreatment").toString())); + } + if ((jsonObj.get("igaFfiTrusteeOrSponsor") != null && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonNull()) && !jsonObj.get("igaFfiTrusteeOrSponsor").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `igaFfiTrusteeOrSponsor` to be a primitive type in the JSON string but got `%s`", jsonObj.get("igaFfiTrusteeOrSponsor").toString())); + } + if ((jsonObj.get("publiclyTradedNffeSecuritiesMarket") != null && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonNull()) && !jsonObj.get("publiclyTradedNffeSecuritiesMarket").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedNffeSecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedNffeSecuritiesMarket").toString())); + } + if ((jsonObj.get("publiclyTradedEntity") != null && !jsonObj.get("publiclyTradedEntity").isJsonNull()) && !jsonObj.get("publiclyTradedEntity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `publiclyTradedEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publiclyTradedEntity").toString())); + } + if ((jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket") != null && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonNull()) && !jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket").toString())); + } + if ((jsonObj.get("directReportingNffeSponsoringEntity") != null && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonNull()) && !jsonObj.get("directReportingNffeSponsoringEntity").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `directReportingNffeSponsoringEntity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("directReportingNffeSponsoringEntity").toString())); + } + if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); + } + if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + 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("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W8ImyFormRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W8ImyFormRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W8ImyFormRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W8ImyFormRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W8ImyFormRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W8ImyFormRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W8ImyFormRequest + * @throws IOException if the JSON string is invalid with respect to W8ImyFormRequest + */ + public static W8ImyFormRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W8ImyFormRequest.class); + } + + /** + * Convert an instance of W8ImyFormRequest 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/W8ImyFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java index 5ab9609..727e5f6 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) * * @author Sachin Baijal * @author Jonathan Wenger @@ -26,6 +26,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.Arrays; import org.openapitools.jackson.nullable.JsonNullable; @@ -449,7 +450,7 @@ public class W8ImyFormResponse { public static final String SERIALIZED_NAME_STARTUP_FORMATION_OR_RESOLUTION_DATE = "startupFormationOrResolutionDate"; @SerializedName(SERIALIZED_NAME_STARTUP_FORMATION_OR_RESOLUTION_DATE) - private OffsetDateTime startupFormationOrResolutionDate; + private LocalDate startupFormationOrResolutionDate; public static final String SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY_CERTIFICATION = "exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification"; @SerializedName(SERIALIZED_NAME_EXCEPTED_NONFINANCIAL_ENTITY_IN_LIQUIDATION_OR_BANKRUPTCY_CERTIFICATION) @@ -457,7 +458,7 @@ public class W8ImyFormResponse { public static final String SERIALIZED_NAME_NONFINANCIAL_ENTITY_FILING_DATE = "nonfinancialEntityFilingDate"; @SerializedName(SERIALIZED_NAME_NONFINANCIAL_ENTITY_FILING_DATE) - private OffsetDateTime nonfinancialEntityFilingDate; + private LocalDate nonfinancialEntityFilingDate; public static final String SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_CERTIFICATION = "publiclyTradedNffeCertification"; @SerializedName(SERIALIZED_NAME_PUBLICLY_TRADED_NFFE_CERTIFICATION) @@ -2405,7 +2406,7 @@ public void setExceptedNonfinancialStartUpCertification(Boolean exceptedNonfinan } - public W8ImyFormResponse startupFormationOrResolutionDate(OffsetDateTime startupFormationOrResolutionDate) { + public W8ImyFormResponse startupFormationOrResolutionDate(LocalDate startupFormationOrResolutionDate) { this.startupFormationOrResolutionDate = startupFormationOrResolutionDate; return this; } @@ -2415,11 +2416,11 @@ public W8ImyFormResponse startupFormationOrResolutionDate(OffsetDateTime startup * @return startupFormationOrResolutionDate */ @javax.annotation.Nullable - public OffsetDateTime getStartupFormationOrResolutionDate() { + public LocalDate getStartupFormationOrResolutionDate() { return startupFormationOrResolutionDate; } - public void setStartupFormationOrResolutionDate(OffsetDateTime startupFormationOrResolutionDate) { + public void setStartupFormationOrResolutionDate(LocalDate startupFormationOrResolutionDate) { this.startupFormationOrResolutionDate = startupFormationOrResolutionDate; } @@ -2443,7 +2444,7 @@ public void setExceptedNonfinancialEntityInLiquidationOrBankruptcyCertification( } - public W8ImyFormResponse nonfinancialEntityFilingDate(OffsetDateTime nonfinancialEntityFilingDate) { + public W8ImyFormResponse nonfinancialEntityFilingDate(LocalDate nonfinancialEntityFilingDate) { this.nonfinancialEntityFilingDate = nonfinancialEntityFilingDate; return this; } @@ -2453,11 +2454,11 @@ public W8ImyFormResponse nonfinancialEntityFilingDate(OffsetDateTime nonfinancia * @return nonfinancialEntityFilingDate */ @javax.annotation.Nullable - public OffsetDateTime getNonfinancialEntityFilingDate() { + public LocalDate getNonfinancialEntityFilingDate() { return nonfinancialEntityFilingDate; } - public void setNonfinancialEntityFilingDate(OffsetDateTime nonfinancialEntityFilingDate) { + public void setNonfinancialEntityFilingDate(LocalDate nonfinancialEntityFilingDate) { this.nonfinancialEntityFilingDate = nonfinancialEntityFilingDate; } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java new file mode 100644 index 0000000..ec8d476 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java @@ -0,0 +1,428 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * W9FormBaseRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W9FormBaseRequest { + /** + * The form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + 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_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + + public W9FormBaseRequest() { + } + + public W9FormBaseRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type. + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W9FormBaseRequest 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 W9FormBaseRequest 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 W9FormBaseRequest 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 W9FormBaseRequest 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 W9FormBaseRequest 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W9FormBaseRequest w9FormBaseRequest = (W9FormBaseRequest) o; + return Objects.equals(this.type, w9FormBaseRequest.type) && + Objects.equals(this.companyId, w9FormBaseRequest.companyId) && + Objects.equals(this.referenceId, w9FormBaseRequest.referenceId) && + Objects.equals(this.email, w9FormBaseRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w9FormBaseRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w9FormBaseRequest.signature); + } + + 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, companyId, referenceId, email, eDeliveryConsentedAt, signature); + } + + 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 W9FormBaseRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).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("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); + + // 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 W9FormBaseRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W9FormBaseRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W9FormBaseRequest is not found in the empty JSON string", W9FormBaseRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W9FormBaseRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormBaseRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + 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("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W9FormBaseRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W9FormBaseRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W9FormBaseRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W9FormBaseRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W9FormBaseRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W9FormBaseRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W9FormBaseRequest + * @throws IOException if the JSON string is invalid with respect to W9FormBaseRequest + */ + public static W9FormBaseRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W9FormBaseRequest.class); + } + + /** + * Convert an instance of W9FormBaseRequest 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/W9FormBaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java index 2dd7ac4..22f32f2 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.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/W9FormDataModel.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormDataModel.java index cbcea8c..65c60aa 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormDataModel.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormDataModel.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 @@ -27,6 +27,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -638,19 +639,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE = "part19FormationOrResolutionDate"; @SerializedName(SERIALIZED_NAME_PART19_FORMATION_OR_RESOLUTION_DATE) - private OffsetDateTime part19FormationOrResolutionDate; + private LocalDate part19FormationOrResolutionDate; public static final String SERIALIZED_NAME_PART20_FILING_DATE = "part20FilingDate"; @SerializedName(SERIALIZED_NAME_PART20_FILING_DATE) - private OffsetDateTime part20FilingDate; + private LocalDate part20FilingDate; public static final String SERIALIZED_NAME_PART21_DETERMINATION_DATE = "part21DeterminationDate"; @SerializedName(SERIALIZED_NAME_PART21_DETERMINATION_DATE) - private OffsetDateTime part21DeterminationDate; + private LocalDate part21DeterminationDate; public static final String SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS = "substantialUsOwners"; @SerializedName(SERIALIZED_NAME_SUBSTANTIAL_US_OWNERS) - private List substantialUsOwners = new ArrayList<>(); + private List substantialUsOwners; public static final String SERIALIZED_NAME_BIRTHDAY = "birthday"; @SerializedName(SERIALIZED_NAME_BIRTHDAY) @@ -962,11 +963,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_BOX35_FORMED_ON_DATE = "box35FormedOnDate"; @SerializedName(SERIALIZED_NAME_BOX35_FORMED_ON_DATE) - private OffsetDateTime box35FormedOnDate; + private LocalDate box35FormedOnDate; public static final String SERIALIZED_NAME_BOX36_FILED_ON_DATE = "box36FiledOnDate"; @SerializedName(SERIALIZED_NAME_BOX36_FILED_ON_DATE) - private OffsetDateTime box36FiledOnDate; + private LocalDate box36FiledOnDate; public W9FormDataModel() { } @@ -3421,7 +3422,7 @@ public void setCertifyPart29Signature(Boolean certifyPart29Signature) { } - public W9FormDataModel part19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public W9FormDataModel part19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; return this; } @@ -3431,16 +3432,16 @@ public W9FormDataModel part19FormationOrResolutionDate(OffsetDateTime part19Form * @return part19FormationOrResolutionDate */ @javax.annotation.Nullable - public OffsetDateTime getPart19FormationOrResolutionDate() { + public LocalDate getPart19FormationOrResolutionDate() { return part19FormationOrResolutionDate; } - public void setPart19FormationOrResolutionDate(OffsetDateTime part19FormationOrResolutionDate) { + public void setPart19FormationOrResolutionDate(LocalDate part19FormationOrResolutionDate) { this.part19FormationOrResolutionDate = part19FormationOrResolutionDate; } - public W9FormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { + public W9FormDataModel part20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; return this; } @@ -3450,16 +3451,16 @@ public W9FormDataModel part20FilingDate(OffsetDateTime part20FilingDate) { * @return part20FilingDate */ @javax.annotation.Nullable - public OffsetDateTime getPart20FilingDate() { + public LocalDate getPart20FilingDate() { return part20FilingDate; } - public void setPart20FilingDate(OffsetDateTime part20FilingDate) { + public void setPart20FilingDate(LocalDate part20FilingDate) { this.part20FilingDate = part20FilingDate; } - public W9FormDataModel part21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public W9FormDataModel part21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; return this; } @@ -3469,11 +3470,11 @@ public W9FormDataModel part21DeterminationDate(OffsetDateTime part21Determinatio * @return part21DeterminationDate */ @javax.annotation.Nullable - public OffsetDateTime getPart21DeterminationDate() { + public LocalDate getPart21DeterminationDate() { return part21DeterminationDate; } - public void setPart21DeterminationDate(OffsetDateTime part21DeterminationDate) { + public void setPart21DeterminationDate(LocalDate part21DeterminationDate) { this.part21DeterminationDate = part21DeterminationDate; } @@ -4968,7 +4969,7 @@ public void setCertifyBox42(Boolean certifyBox42) { } - public W9FormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public W9FormDataModel box35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; return this; } @@ -4978,16 +4979,16 @@ public W9FormDataModel box35FormedOnDate(OffsetDateTime box35FormedOnDate) { * @return box35FormedOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox35FormedOnDate() { + public LocalDate getBox35FormedOnDate() { return box35FormedOnDate; } - public void setBox35FormedOnDate(OffsetDateTime box35FormedOnDate) { + public void setBox35FormedOnDate(LocalDate box35FormedOnDate) { this.box35FormedOnDate = box35FormedOnDate; } - public W9FormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public W9FormDataModel box36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; return this; } @@ -4997,11 +4998,11 @@ public W9FormDataModel box36FiledOnDate(OffsetDateTime box36FiledOnDate) { * @return box36FiledOnDate */ @javax.annotation.Nullable - public OffsetDateTime getBox36FiledOnDate() { + public LocalDate getBox36FiledOnDate() { return box36FiledOnDate; } - public void setBox36FiledOnDate(OffsetDateTime box36FiledOnDate) { + public void setBox36FiledOnDate(LocalDate box36FiledOnDate) { this.box36FiledOnDate = box36FiledOnDate; } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java new file mode 100644 index 0000000..a065787 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java @@ -0,0 +1,920 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * ## 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +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; + +/** + * W9FormRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class W9FormRequest { + /** + * The form type (always \"w9\" for this model). + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + W4("W4"), + + W8_BEN("W8Ben"), + + W8_BEN_E("W8BenE"), + + W8_IMY("W8Imy"), + + W9("W9"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_BUSINESS_NAME = "businessName"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME) + private String businessName; + + public static final String SERIALIZED_NAME_BUSINESS_CLASSIFICATION = "businessClassification"; + @SerializedName(SERIALIZED_NAME_BUSINESS_CLASSIFICATION) + private String businessClassification; + + public static final String SERIALIZED_NAME_BUSINESS_OTHER = "businessOther"; + @SerializedName(SERIALIZED_NAME_BUSINESS_OTHER) + private String businessOther; + + public static final String SERIALIZED_NAME_FOREIGN_PARTNER_OWNER_OR_BENEFICIARY = "foreignPartnerOwnerOrBeneficiary"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PARTNER_OWNER_OR_BENEFICIARY) + private Boolean foreignPartnerOwnerOrBeneficiary; + + public static final String SERIALIZED_NAME_EXEMPT_PAYEE_CODE = "exemptPayeeCode"; + @SerializedName(SERIALIZED_NAME_EXEMPT_PAYEE_CODE) + private String exemptPayeeCode; + + public static final String SERIALIZED_NAME_EXEMPT_FATCA_CODE = "exemptFatcaCode"; + @SerializedName(SERIALIZED_NAME_EXEMPT_FATCA_CODE) + private String exemptFatcaCode; + + public static final String SERIALIZED_NAME_FOREIGN_COUNTRY_INDICATOR = "foreignCountryIndicator"; + @SerializedName(SERIALIZED_NAME_FOREIGN_COUNTRY_INDICATOR) + private Boolean foreignCountryIndicator; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_FOREIGN_ADDRESS = "foreignAddress"; + @SerializedName(SERIALIZED_NAME_FOREIGN_ADDRESS) + private String foreignAddress; + + 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_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + 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_BACKUP_WITHHOLDING = "backupWithholding"; + @SerializedName(SERIALIZED_NAME_BACKUP_WITHHOLDING) + private Boolean backupWithholding; + + public static final String SERIALIZED_NAME_IS1099ABLE = "is1099able"; + @SerializedName(SERIALIZED_NAME_IS1099ABLE) + private Boolean is1099able; + + public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; + @SerializedName(SERIALIZED_NAME_COMPANY_ID) + private String companyId; + + 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_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + + public W9FormRequest() { + } + + public W9FormRequest( + TypeEnum type + ) { + this(); + this.type = type; + } + + /** + * The form type (always \"w9\" for this model). + * @return type + */ + @javax.annotation.Nullable + public TypeEnum getType() { + return type; + } + + + + public W9FormRequest name(String name) { + this.name = name; + return this; + } + + /** + * The name of the individual or entity associated with the form. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public W9FormRequest businessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** + * The name of the business associated with the form. + * @return businessName + */ + @javax.annotation.Nullable + public String getBusinessName() { + return businessName; + } + + public void setBusinessName(String businessName) { + this.businessName = businessName; + } + + + public W9FormRequest businessClassification(String businessClassification) { + this.businessClassification = businessClassification; + return this; + } + + /** + * The classification of the business. + * @return businessClassification + */ + @javax.annotation.Nullable + public String getBusinessClassification() { + return businessClassification; + } + + public void setBusinessClassification(String businessClassification) { + this.businessClassification = businessClassification; + } + + + public W9FormRequest businessOther(String businessOther) { + this.businessOther = businessOther; + return this; + } + + /** + * The classification description when \"businessClassification\" is \"Other\". + * @return businessOther + */ + @javax.annotation.Nullable + public String getBusinessOther() { + return businessOther; + } + + public void setBusinessOther(String businessOther) { + this.businessOther = businessOther; + } + + + public W9FormRequest foreignPartnerOwnerOrBeneficiary(Boolean foreignPartnerOwnerOrBeneficiary) { + this.foreignPartnerOwnerOrBeneficiary = foreignPartnerOwnerOrBeneficiary; + return this; + } + + /** + * Indicates whether the individual is a foreign partner, owner, or beneficiary. + * @return foreignPartnerOwnerOrBeneficiary + */ + @javax.annotation.Nullable + public Boolean getForeignPartnerOwnerOrBeneficiary() { + return foreignPartnerOwnerOrBeneficiary; + } + + public void setForeignPartnerOwnerOrBeneficiary(Boolean foreignPartnerOwnerOrBeneficiary) { + this.foreignPartnerOwnerOrBeneficiary = foreignPartnerOwnerOrBeneficiary; + } + + + public W9FormRequest exemptPayeeCode(String exemptPayeeCode) { + this.exemptPayeeCode = exemptPayeeCode; + return this; + } + + /** + * The exempt payee code. + * @return exemptPayeeCode + */ + @javax.annotation.Nullable + public String getExemptPayeeCode() { + return exemptPayeeCode; + } + + public void setExemptPayeeCode(String exemptPayeeCode) { + this.exemptPayeeCode = exemptPayeeCode; + } + + + public W9FormRequest exemptFatcaCode(String exemptFatcaCode) { + this.exemptFatcaCode = exemptFatcaCode; + return this; + } + + /** + * The exemption from FATCA reporting code. + * @return exemptFatcaCode + */ + @javax.annotation.Nullable + public String getExemptFatcaCode() { + return exemptFatcaCode; + } + + public void setExemptFatcaCode(String exemptFatcaCode) { + this.exemptFatcaCode = exemptFatcaCode; + } + + + public W9FormRequest foreignCountryIndicator(Boolean foreignCountryIndicator) { + this.foreignCountryIndicator = foreignCountryIndicator; + return this; + } + + /** + * Indicates whether the individual or entity is in a foreign country. + * @return foreignCountryIndicator + */ + @javax.annotation.Nullable + public Boolean getForeignCountryIndicator() { + return foreignCountryIndicator; + } + + public void setForeignCountryIndicator(Boolean foreignCountryIndicator) { + this.foreignCountryIndicator = foreignCountryIndicator; + } + + + public W9FormRequest address(String address) { + this.address = address; + return this; + } + + /** + * The address of the individual or entity. + * @return address + */ + @javax.annotation.Nullable + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + + public W9FormRequest foreignAddress(String foreignAddress) { + this.foreignAddress = foreignAddress; + return this; + } + + /** + * The foreign address of the individual or entity. + * @return foreignAddress + */ + @javax.annotation.Nullable + public String getForeignAddress() { + return foreignAddress; + } + + public void setForeignAddress(String foreignAddress) { + this.foreignAddress = foreignAddress; + } + + + public W9FormRequest city(String city) { + this.city = city; + return this; + } + + /** + * The city of the address. + * @return city + */ + @javax.annotation.Nullable + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + + public W9FormRequest state(String state) { + this.state = state; + return this; + } + + /** + * The state of the address. + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public W9FormRequest zip(String zip) { + this.zip = zip; + return this; + } + + /** + * The ZIP code of the address. + * @return zip + */ + @javax.annotation.Nullable + public String getZip() { + return zip; + } + + public void setZip(String zip) { + this.zip = zip; + } + + + public W9FormRequest accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * The account number associated with the form. + * @return accountNumber + */ + @javax.annotation.Nullable + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + + public W9FormRequest tinType(String tinType) { + this.tinType = tinType; + return this; + } + + /** + * The type of TIN provided. + * @return tinType + */ + @javax.annotation.Nullable + public String getTinType() { + return tinType; + } + + public void setTinType(String tinType) { + this.tinType = tinType; + } + + + public W9FormRequest tin(String tin) { + this.tin = tin; + return this; + } + + /** + * The taxpayer identification number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public W9FormRequest backupWithholding(Boolean backupWithholding) { + this.backupWithholding = backupWithholding; + return this; + } + + /** + * Indicates whether backup withholding applies. + * @return backupWithholding + */ + @javax.annotation.Nullable + public Boolean getBackupWithholding() { + return backupWithholding; + } + + public void setBackupWithholding(Boolean backupWithholding) { + this.backupWithholding = backupWithholding; + } + + + public W9FormRequest is1099able(Boolean is1099able) { + this.is1099able = is1099able; + return this; + } + + /** + * Indicates whether the individual or entity should be issued a 1099 form. + * @return is1099able + */ + @javax.annotation.Nullable + public Boolean getIs1099able() { + return is1099able; + } + + public void setIs1099able(Boolean is1099able) { + this.is1099able = is1099able; + } + + + public W9FormRequest 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 W9FormRequest 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 W9FormRequest 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 W9FormRequest 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 W9FormRequest 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + W9FormRequest w9FormRequest = (W9FormRequest) o; + return Objects.equals(this.type, w9FormRequest.type) && + Objects.equals(this.name, w9FormRequest.name) && + Objects.equals(this.businessName, w9FormRequest.businessName) && + Objects.equals(this.businessClassification, w9FormRequest.businessClassification) && + Objects.equals(this.businessOther, w9FormRequest.businessOther) && + Objects.equals(this.foreignPartnerOwnerOrBeneficiary, w9FormRequest.foreignPartnerOwnerOrBeneficiary) && + Objects.equals(this.exemptPayeeCode, w9FormRequest.exemptPayeeCode) && + Objects.equals(this.exemptFatcaCode, w9FormRequest.exemptFatcaCode) && + Objects.equals(this.foreignCountryIndicator, w9FormRequest.foreignCountryIndicator) && + Objects.equals(this.address, w9FormRequest.address) && + Objects.equals(this.foreignAddress, w9FormRequest.foreignAddress) && + Objects.equals(this.city, w9FormRequest.city) && + Objects.equals(this.state, w9FormRequest.state) && + Objects.equals(this.zip, w9FormRequest.zip) && + Objects.equals(this.accountNumber, w9FormRequest.accountNumber) && + Objects.equals(this.tinType, w9FormRequest.tinType) && + Objects.equals(this.tin, w9FormRequest.tin) && + Objects.equals(this.backupWithholding, w9FormRequest.backupWithholding) && + Objects.equals(this.is1099able, w9FormRequest.is1099able) && + Objects.equals(this.companyId, w9FormRequest.companyId) && + Objects.equals(this.referenceId, w9FormRequest.referenceId) && + Objects.equals(this.email, w9FormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w9FormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w9FormRequest.signature); + } + + 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, name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, companyId, referenceId, email, eDeliveryConsentedAt, signature); + } + + 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 W9FormRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessClassification: ").append(toIndentedString(businessClassification)).append("\n"); + sb.append(" businessOther: ").append(toIndentedString(businessOther)).append("\n"); + sb.append(" foreignPartnerOwnerOrBeneficiary: ").append(toIndentedString(foreignPartnerOwnerOrBeneficiary)).append("\n"); + sb.append(" exemptPayeeCode: ").append(toIndentedString(exemptPayeeCode)).append("\n"); + sb.append(" exemptFatcaCode: ").append(toIndentedString(exemptFatcaCode)).append("\n"); + sb.append(" foreignCountryIndicator: ").append(toIndentedString(foreignCountryIndicator)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" foreignAddress: ").append(toIndentedString(foreignAddress)).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(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" backupWithholding: ").append(toIndentedString(backupWithholding)).append("\n"); + sb.append(" is1099able: ").append(toIndentedString(is1099able)).append("\n"); + sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).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("companyId"); + openapiFields.add("referenceId"); + openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); + + // 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 W9FormRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!W9FormRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in W9FormRequest is not found in the empty JSON string", W9FormRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!W9FormRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `W9FormRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the optional field `type` + if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { + TypeEnum.validateJsonElement(jsonObj.get("type")); + } + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("businessName") != null && !jsonObj.get("businessName").isJsonNull()) && !jsonObj.get("businessName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessName").toString())); + } + if ((jsonObj.get("businessClassification") != null && !jsonObj.get("businessClassification").isJsonNull()) && !jsonObj.get("businessClassification").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessClassification` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessClassification").toString())); + } + if ((jsonObj.get("businessOther") != null && !jsonObj.get("businessOther").isJsonNull()) && !jsonObj.get("businessOther").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessOther` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessOther").toString())); + } + if ((jsonObj.get("exemptPayeeCode") != null && !jsonObj.get("exemptPayeeCode").isJsonNull()) && !jsonObj.get("exemptPayeeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `exemptPayeeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptPayeeCode").toString())); + } + if ((jsonObj.get("exemptFatcaCode") != null && !jsonObj.get("exemptFatcaCode").isJsonNull()) && !jsonObj.get("exemptFatcaCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `exemptFatcaCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exemptFatcaCode").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("foreignAddress") != null && !jsonObj.get("foreignAddress").isJsonNull()) && !jsonObj.get("foreignAddress").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignAddress` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignAddress").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + 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("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!W9FormRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'W9FormRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(W9FormRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, W9FormRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public W9FormRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of W9FormRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of W9FormRequest + * @throws IOException if the JSON string is invalid with respect to W9FormRequest + */ + public static W9FormRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, W9FormRequest.class); + } + + /** + * Convert an instance of W9FormRequest 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/W9FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java index c1543ac..edf3e41 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.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/EInvoicing/V1/Address.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Address.java new file mode 100644 index 0000000..45009db --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Address.java @@ -0,0 +1,365 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * Address + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Address { + public static final String SERIALIZED_NAME_LINE1 = "line1"; + @SerializedName(SERIALIZED_NAME_LINE1) + private String line1; + + public static final String SERIALIZED_NAME_LINE2 = "line2"; + @SerializedName(SERIALIZED_NAME_LINE2) + private String line2; + + 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_COUNTRY = "country"; + @SerializedName(SERIALIZED_NAME_COUNTRY) + private String country; + + public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode"; + @SerializedName(SERIALIZED_NAME_POSTAL_CODE) + private String postalCode; + + public Address() { + } + + public Address line1(String line1) { + this.line1 = line1; + return this; + } + + /** + * Address line 1 + * @return line1 + */ + @javax.annotation.Nullable + public String getLine1() { + return line1; + } + + public void setLine1(String line1) { + this.line1 = line1; + } + + + public Address line2(String line2) { + this.line2 = line2; + return this; + } + + /** + * Address line 2 + * @return line2 + */ + @javax.annotation.Nullable + public String getLine2() { + return line2; + } + + public void setLine2(String line2) { + this.line2 = line2; + } + + + public Address 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 Address state(String state) { + this.state = state; + return this; + } + + /** + * State + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Address country(String country) { + this.country = country; + return this; + } + + /** + * Country (ISO 3166) + * @return country + */ + @javax.annotation.Nonnull + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + + public Address postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Postal code + * @return postalCode + */ + @javax.annotation.Nullable + public String getPostalCode() { + return postalCode; + } + + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Address address = (Address) o; + return Objects.equals(this.line1, address.line1) && + Objects.equals(this.line2, address.line2) && + Objects.equals(this.city, address.city) && + Objects.equals(this.state, address.state) && + Objects.equals(this.country, address.country) && + Objects.equals(this.postalCode, address.postalCode); + } + + @Override + public int hashCode() { + return Objects.hash(line1, line2, city, state, country, postalCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Address {\n"); + sb.append(" line1: ").append(toIndentedString(line1)).append("\n"); + sb.append(" line2: ").append(toIndentedString(line2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).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("line1"); + openapiFields.add("line2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("country"); + openapiFields.add("postalCode"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("country"); + } + + /** + * 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 Address + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Address.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Address.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Address` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Address.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("line1") != null && !jsonObj.get("line1").isJsonNull()) && !jsonObj.get("line1").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `line1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("line1").toString())); + } + if ((jsonObj.get("line2") != null && !jsonObj.get("line2").isJsonNull()) && !jsonObj.get("line2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `line2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("line2").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("country").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("country").toString())); + } + if ((jsonObj.get("postalCode") != null && !jsonObj.get("postalCode").isJsonNull()) && !jsonObj.get("postalCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postalCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postalCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Address.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Address' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter
thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Address.class)); + + return (TypeAdapter) new TypeAdapter
() { + @Override + public void write(JsonWriter out, Address value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Address read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Address given an JSON string + * + * @param jsonString JSON string + * @return An instance of Address + * @throws IOException if the JSON string is invalid with respect to Address + */ + public static Address fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Address.class); + } + + /** + * Convert an instance of Address to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchErrorDetail.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchErrorDetail.java new file mode 100644 index 0000000..35676fa --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchErrorDetail.java @@ -0,0 +1,260 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +import java.util.Objects; +import Avalara.SDK.model.EInvoicing.V1.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.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; + +/** + * Represents detailed error information for an individual entry in a batch request. Includes the index of the failed item and associated validation errors. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class BatchErrorDetail { + public static final String SERIALIZED_NAME_INDEX = "index"; + @SerializedName(SERIALIZED_NAME_INDEX) + private Integer index; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + public BatchErrorDetail() { + } + + public BatchErrorDetail index(Integer index) { + this.index = index; + return this; + } + + /** + * The index of the request that caused the error in the batch. + * @return index + */ + @javax.annotation.Nullable + public Integer getIndex() { + return index; + } + + public void setIndex(Integer index) { + this.index = index; + } + + + public BatchErrorDetail validationErrors(List validationErrors) { + this.validationErrors = validationErrors; + return this; + } + + public BatchErrorDetail 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BatchErrorDetail batchErrorDetail = (BatchErrorDetail) o; + return Objects.equals(this.index, batchErrorDetail.index) && + Objects.equals(this.validationErrors, batchErrorDetail.validationErrors); + } + + @Override + public int hashCode() { + return Objects.hash(index, validationErrors); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BatchErrorDetail {\n"); + sb.append(" index: ").append(toIndentedString(index)).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("index"); + 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 BatchErrorDetail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BatchErrorDetail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BatchErrorDetail is not found in the empty JSON string", BatchErrorDetail.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BatchErrorDetail.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BatchErrorDetail` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + 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)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BatchErrorDetail.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BatchErrorDetail' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BatchErrorDetail.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BatchErrorDetail value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BatchErrorDetail read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BatchErrorDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of BatchErrorDetail + * @throws IOException if the JSON string is invalid with respect to BatchErrorDetail + */ + public static BatchErrorDetail fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BatchErrorDetail.class); + } + + /** + * Convert an instance of BatchErrorDetail to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearch.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearch.java index 592ffd1..6bc916d 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearch.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearch.java @@ -55,7 +55,7 @@ import Avalara.SDK.JSON; /** - * Provides details about a batch search operation, including status, timestamps, and potential errors. + * Represents a single batch search operation */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class BatchSearch { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearchListResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearchListResponse.java index 9813299..3043492 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearchListResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearchListResponse.java @@ -56,7 +56,7 @@ import Avalara.SDK.JSON; /** - * Schema for batch search list + * Response schema for listing batch search details. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class BatchSearchListResponse { @@ -70,7 +70,7 @@ public class BatchSearchListResponse { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private List value = new ArrayList<>(); + private List value; public BatchSearchListResponse() { } @@ -81,7 +81,7 @@ public BatchSearchListResponse atRecordSetCount(Integer atRecordSetCount) { } /** - * The count of records in the result set + * The count of records in the result set. * @return atRecordSetCount */ @javax.annotation.Nullable @@ -127,7 +127,7 @@ public BatchSearchListResponse addValueItem(BatchSearch valueItem) { } /** - * Get value + * List of batch search records. * @return value */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ConditionalForField.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ConditionalForField.java index 91b8bcf..8b905f8 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ConditionalForField.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ConditionalForField.java @@ -66,7 +66,7 @@ public class ConditionalForField { public static final String SERIALIZED_NAME_REQUIRED_WHEN = "requiredWhen"; @SerializedName(SERIALIZED_NAME_REQUIRED_WHEN) - private List requiredWhen = new ArrayList<>(); + private List requiredWhen; public ConditionalForField() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Consents.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Consents.java new file mode 100644 index 0000000..5b73386 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Consents.java @@ -0,0 +1,209 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * Consents + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Consents { + public static final String SERIALIZED_NAME_LIST_IN_AVALARA_DIRECTORY = "listInAvalaraDirectory"; + @SerializedName(SERIALIZED_NAME_LIST_IN_AVALARA_DIRECTORY) + private Boolean listInAvalaraDirectory = true; + + public Consents() { + } + + public Consents listInAvalaraDirectory(Boolean listInAvalaraDirectory) { + this.listInAvalaraDirectory = listInAvalaraDirectory; + return this; + } + + /** + * Indicates whether the trading partner consents to being listed in the directory. If not provided in the payload, its value will default to true. + * @return listInAvalaraDirectory + */ + @javax.annotation.Nullable + public Boolean getListInAvalaraDirectory() { + return listInAvalaraDirectory; + } + + public void setListInAvalaraDirectory(Boolean listInAvalaraDirectory) { + this.listInAvalaraDirectory = listInAvalaraDirectory; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Consents consents = (Consents) o; + return Objects.equals(this.listInAvalaraDirectory, consents.listInAvalaraDirectory); + } + + @Override + public int hashCode() { + return Objects.hash(listInAvalaraDirectory); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Consents {\n"); + sb.append(" listInAvalaraDirectory: ").append(toIndentedString(listInAvalaraDirectory)).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("listInAvalaraDirectory"); + + // 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 Consents + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Consents.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Consents is not found in the empty JSON string", Consents.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Consents.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Consents` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Consents.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Consents' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Consents.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Consents value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Consents read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Consents given an JSON string + * + * @param jsonString JSON string + * @return An instance of Consents + * @throws IOException if the JSON string is invalid with respect to Consents + */ + public static Consents fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Consents.class); + } + + /** + * Convert an instance of Consents to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartner201Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartner201Response.java new file mode 100644 index 0000000..a8adc74 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartner201Response.java @@ -0,0 +1,270 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * CreateTradingPartner201Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class CreateTradingPartner201Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public CreateTradingPartner201Response() { + } + + public CreateTradingPartner201Response id(String id) { + this.id = id; + return this; + } + + /** + * Avalara unique ID of the participant in the directory. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public CreateTradingPartner201Response status(String status) { + this.status = status; + return this; + } + + /** + * The status of the create operation. + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public CreateTradingPartner201Response message(String message) { + this.message = message; + return this; + } + + /** + * A human-readable message providing additional context or feedback about the outcome of the operation. + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTradingPartner201Response createTradingPartner201Response = (CreateTradingPartner201Response) o; + return Objects.equals(this.id, createTradingPartner201Response.id) && + Objects.equals(this.status, createTradingPartner201Response.status) && + Objects.equals(this.message, createTradingPartner201Response.message); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTradingPartner201Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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("status"); + openapiFields.add("message"); + + // 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 CreateTradingPartner201Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateTradingPartner201Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTradingPartner201Response is not found in the empty JSON string", CreateTradingPartner201Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateTradingPartner201Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTradingPartner201Response` 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("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateTradingPartner201Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateTradingPartner201Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateTradingPartner201Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateTradingPartner201Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateTradingPartner201Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateTradingPartner201Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateTradingPartner201Response + * @throws IOException if the JSON string is invalid with respect to CreateTradingPartner201Response + */ + public static CreateTradingPartner201Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateTradingPartner201Response.class); + } + + /** + * Convert an instance of CreateTradingPartner201Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200Response.java new file mode 100644 index 0000000..9ced9d8 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200Response.java @@ -0,0 +1,292 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +import java.util.Objects; +import Avalara.SDK.model.EInvoicing.V1.CreateTradingPartnersBatch200ResponseValueInner; +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; + +/** + * CreateTradingPartnersBatch200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class CreateTradingPartnersBatch200Response { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private List value; + + public CreateTradingPartnersBatch200Response() { + } + + public CreateTradingPartnersBatch200Response status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public CreateTradingPartnersBatch200Response message(String message) { + this.message = message; + return this; + } + + /** + * A message indicating the result of the batch operation. + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public CreateTradingPartnersBatch200Response value(List value) { + this.value = value; + return this; + } + + public CreateTradingPartnersBatch200Response addValueItem(CreateTradingPartnersBatch200ResponseValueInner valueItem) { + if (this.value == null) { + this.value = new ArrayList<>(); + } + this.value.add(valueItem); + return this; + } + + /** + * A list of trading partners successfully created. + * @return value + */ + @javax.annotation.Nullable + public List getValue() { + return value; + } + + public void setValue(List value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTradingPartnersBatch200Response createTradingPartnersBatch200Response = (CreateTradingPartnersBatch200Response) o; + return Objects.equals(this.status, createTradingPartnersBatch200Response.status) && + Objects.equals(this.message, createTradingPartnersBatch200Response.message) && + Objects.equals(this.value, createTradingPartnersBatch200Response.value); + } + + @Override + public int hashCode() { + return Objects.hash(status, message, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTradingPartnersBatch200Response {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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("status"); + openapiFields.add("message"); + openapiFields.add("value"); + + // 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 CreateTradingPartnersBatch200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateTradingPartnersBatch200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTradingPartnersBatch200Response is not found in the empty JSON string", CreateTradingPartnersBatch200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateTradingPartnersBatch200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTradingPartnersBatch200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + 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++) { + CreateTradingPartnersBatch200ResponseValueInner.validateJsonElement(jsonArrayvalue.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateTradingPartnersBatch200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateTradingPartnersBatch200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateTradingPartnersBatch200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateTradingPartnersBatch200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateTradingPartnersBatch200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateTradingPartnersBatch200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateTradingPartnersBatch200Response + * @throws IOException if the JSON string is invalid with respect to CreateTradingPartnersBatch200Response + */ + public static CreateTradingPartnersBatch200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateTradingPartnersBatch200Response.class); + } + + /** + * Convert an instance of CreateTradingPartnersBatch200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.java new file mode 100644 index 0000000..1b10eb9 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.java @@ -0,0 +1,267 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * CreateTradingPartnersBatch200ResponseValueInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class CreateTradingPartnersBatch200ResponseValueInner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_INDEX = "index"; + @SerializedName(SERIALIZED_NAME_INDEX) + private Integer index; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public CreateTradingPartnersBatch200ResponseValueInner() { + } + + public CreateTradingPartnersBatch200ResponseValueInner id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the created trading partner. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public CreateTradingPartnersBatch200ResponseValueInner index(Integer index) { + this.index = index; + return this; + } + + /** + * Index number of the trading partner. + * @return index + */ + @javax.annotation.Nullable + public Integer getIndex() { + return index; + } + + public void setIndex(Integer index) { + this.index = index; + } + + + public CreateTradingPartnersBatch200ResponseValueInner message(String message) { + this.message = message; + return this; + } + + /** + * A success message for the specific created record. + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTradingPartnersBatch200ResponseValueInner createTradingPartnersBatch200ResponseValueInner = (CreateTradingPartnersBatch200ResponseValueInner) o; + return Objects.equals(this.id, createTradingPartnersBatch200ResponseValueInner.id) && + Objects.equals(this.index, createTradingPartnersBatch200ResponseValueInner.index) && + Objects.equals(this.message, createTradingPartnersBatch200ResponseValueInner.message); + } + + @Override + public int hashCode() { + return Objects.hash(id, index, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTradingPartnersBatch200ResponseValueInner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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("index"); + openapiFields.add("message"); + + // 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 CreateTradingPartnersBatch200ResponseValueInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateTradingPartnersBatch200ResponseValueInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTradingPartnersBatch200ResponseValueInner is not found in the empty JSON string", CreateTradingPartnersBatch200ResponseValueInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateTradingPartnersBatch200ResponseValueInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTradingPartnersBatch200ResponseValueInner` 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("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateTradingPartnersBatch200ResponseValueInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateTradingPartnersBatch200ResponseValueInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateTradingPartnersBatch200ResponseValueInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateTradingPartnersBatch200ResponseValueInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateTradingPartnersBatch200ResponseValueInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateTradingPartnersBatch200ResponseValueInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateTradingPartnersBatch200ResponseValueInner + * @throws IOException if the JSON string is invalid with respect to CreateTradingPartnersBatch200ResponseValueInner + */ + public static CreateTradingPartnersBatch200ResponseValueInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateTradingPartnersBatch200ResponseValueInner.class); + } + + /** + * Convert an instance of CreateTradingPartnersBatch200ResponseValueInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatchRequest.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatchRequest.java new file mode 100644 index 0000000..99f936d --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatchRequest.java @@ -0,0 +1,234 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +import java.util.Objects; +import Avalara.SDK.model.EInvoicing.V1.TradingPartner; +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; + +/** + * CreateTradingPartnersBatchRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class CreateTradingPartnersBatchRequest { + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private List value; + + public CreateTradingPartnersBatchRequest() { + } + + public CreateTradingPartnersBatchRequest value(List value) { + this.value = value; + return this; + } + + public CreateTradingPartnersBatchRequest addValueItem(TradingPartner 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateTradingPartnersBatchRequest createTradingPartnersBatchRequest = (CreateTradingPartnersBatchRequest) o; + return Objects.equals(this.value, createTradingPartnersBatchRequest.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateTradingPartnersBatchRequest {\n"); + sb.append(" value: ").append(toIndentedString(value)).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("value"); + + // 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 CreateTradingPartnersBatchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateTradingPartnersBatchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateTradingPartnersBatchRequest is not found in the empty JSON string", CreateTradingPartnersBatchRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!CreateTradingPartnersBatchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateTradingPartnersBatchRequest` 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++) { + TradingPartner.validateJsonElement(jsonArrayvalue.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateTradingPartnersBatchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateTradingPartnersBatchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateTradingPartnersBatchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateTradingPartnersBatchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateTradingPartnersBatchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateTradingPartnersBatchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateTradingPartnersBatchRequest + * @throws IOException if the JSON string is invalid with respect to CreateTradingPartnersBatchRequest + */ + public static CreateTradingPartnersBatchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateTradingPartnersBatchRequest.class); + } + + /** + * Convert an instance of CreateTradingPartnersBatchRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DataInputField.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DataInputField.java index 2d2b6b5..683a504 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DataInputField.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DataInputField.java @@ -73,7 +73,7 @@ public class DataInputField { public static final String SERIALIZED_NAME_APPLICABLE_DOCUMENT_ROOTS = "applicableDocumentRoots"; @SerializedName(SERIALIZED_NAME_APPLICABLE_DOCUMENT_ROOTS) - private List applicableDocumentRoots = new ArrayList<>(); + private List applicableDocumentRoots; public static final String SERIALIZED_NAME_PATH = "path"; @SerializedName(SERIALIZED_NAME_PATH) @@ -113,7 +113,7 @@ public class DataInputField { public static final String SERIALIZED_NAME_CONDITIONAL_FOR = "conditionalFor"; @SerializedName(SERIALIZED_NAME_CONDITIONAL_FOR) - private List conditionalFor = new ArrayList<>(); + private List conditionalFor; public static final String SERIALIZED_NAME_NOT_USED_FOR = "notUsedFor"; @SerializedName(SERIALIZED_NAME_NOT_USED_FOR) diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DataInputFieldsResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DataInputFieldsResponse.java index b91f09a..6e95b24 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DataInputFieldsResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DataInputFieldsResponse.java @@ -58,7 +58,7 @@ import Avalara.SDK.JSON; /** - * Response model providing a list of input fields required, optional, or conditional for different country mandates. + * DataInputFieldsResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class DataInputFieldsResponse { @@ -72,7 +72,7 @@ public class DataInputFieldsResponse { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private List value = new ArrayList<>(); + private List value; public DataInputFieldsResponse() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetch.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetch.java index c254b46..0369cfa 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetch.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentFetch.java @@ -53,7 +53,7 @@ import Avalara.SDK.JSON; /** - * An object of the inbound document + * DocumentFetch */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class DocumentFetch { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentListResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentListResponse.java index 551d8b6..0322353 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentListResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentListResponse.java @@ -71,7 +71,7 @@ public class DocumentListResponse { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private List value = new ArrayList<>(); + private List value; public DocumentListResponse() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentStatusResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentStatusResponse.java index 4b36e6f..31f2098 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentStatusResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/DocumentStatusResponse.java @@ -70,7 +70,7 @@ public class DocumentStatusResponse { public static final String SERIALIZED_NAME_EVENTS = "events"; @SerializedName(SERIALIZED_NAME_EVENTS) - private List events = new ArrayList<>(); + private List events; public DocumentStatusResponse() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ErrorResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ErrorResponse.java index 65717f5..de3b7f4 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ErrorResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ErrorResponse.java @@ -53,7 +53,7 @@ import Avalara.SDK.JSON; /** - * Structure for reporting errors encountered during API operations, including title, status, and detailed message. + * Standard format for API error responses. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class ErrorResponse { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Extension.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Extension.java new file mode 100644 index 0000000..73b7548 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Extension.java @@ -0,0 +1,263 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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.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; + +/** + * Extension + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Extension { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values; + + public Extension() { + } + + public Extension key(String key) { + this.key = key; + return this; + } + + /** + * Name of the custom attribute. + * @return key + */ + @javax.annotation.Nonnull + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + + public Extension values(List values) { + this.values = values; + return this; + } + + public Extension addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Array of string values associated with the custom attribute. + * @return values + */ + @javax.annotation.Nonnull + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Extension extension = (Extension) o; + return Objects.equals(this.key, extension.key) && + Objects.equals(this.values, extension.values); + } + + @Override + public int hashCode() { + return Objects.hash(key, values); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Extension {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).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("key"); + openapiFields.add("values"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("key"); + openapiRequiredFields.add("values"); + } + + /** + * 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 Extension + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Extension.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Extension is not found in the empty JSON string", Extension.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Extension.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Extension` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Extension.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("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + // ensure the required json array is present + if (jsonObj.get("values") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("values").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `values` to be an array in the JSON string but got `%s`", jsonObj.get("values").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Extension.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Extension' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Extension.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Extension value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Extension read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Extension given an JSON string + * + * @param jsonString JSON string + * @return An instance of Extension + * @throws IOException if the JSON string is invalid with respect to Extension + */ + public static Extension fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Extension.class); + } + + /** + * Convert an instance of Extension to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/FetchDocumentsRequest.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/FetchDocumentsRequest.java index 7d23478..b70d886 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/FetchDocumentsRequest.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/FetchDocumentsRequest.java @@ -63,7 +63,7 @@ public class FetchDocumentsRequest { public static final String SERIALIZED_NAME_DATA = "data"; @SerializedName(SERIALIZED_NAME_DATA) - private List data = new ArrayList<>(); + private List data; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignatureValue.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignatureValue.java index 1c92975..5df8bb2 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignatureValue.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignatureValue.java @@ -53,7 +53,7 @@ import Avalara.SDK.JSON; /** - * Contains the HMAC algorithm and the resulting signature value used for verifying message integrity. + * HmacSignatureValue */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class HmacSignatureValue { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Identifier.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Identifier.java new file mode 100644 index 0000000..e09f086 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Identifier.java @@ -0,0 +1,279 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * Identifier + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Identifier { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; + @SerializedName(SERIALIZED_NAME_DISPLAY_NAME) + private String displayName; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public Identifier() { + } + + public Identifier name(String name) { + this.name = name; + return this; + } + + /** + * Identifier name (e.g., Peppol Participant ID). + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public Identifier displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Display name of the identifier. + * @return displayName + */ + @javax.annotation.Nullable + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + + public Identifier value(String value) { + this.value = value; + return this; + } + + /** + * Value of the identifier. + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Identifier identifier = (Identifier) o; + return Objects.equals(this.name, identifier.name) && + Objects.equals(this.displayName, identifier.displayName) && + Objects.equals(this.value, identifier.value); + } + + @Override + public int hashCode() { + return Objects.hash(name, displayName, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Identifier {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("displayName"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("value"); + } + + /** + * 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 Identifier + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Identifier.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Identifier is not found in the empty JSON string", Identifier.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!Identifier.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Identifier` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Identifier.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").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("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("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Identifier.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Identifier' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Identifier.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Identifier value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Identifier read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Identifier given an JSON string + * + * @param jsonString JSON string + * @return An instance of Identifier + * @throws IOException if the JSON string is invalid with respect to Identifier + */ + public static Identifier fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Identifier.class); + } + + /** + * Convert an instance of Identifier to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/InputDataFormats.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/InputDataFormats.java index d89596f..a3e6382 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/InputDataFormats.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/InputDataFormats.java @@ -65,7 +65,7 @@ public class InputDataFormats { public static final String SERIALIZED_NAME_VERSIONS = "versions"; @SerializedName(SERIALIZED_NAME_VERSIONS) - private List versions = new ArrayList<>(); + private List versions; public InputDataFormats() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Mandate.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Mandate.java index ef333eb..a71404b 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Mandate.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Mandate.java @@ -58,7 +58,7 @@ import Avalara.SDK.JSON; /** - * An object representing the country mandate + * Mandate */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Mandate { @@ -96,7 +96,7 @@ public class Mandate { public static final String SERIALIZED_NAME_GET_INVOICE_AVAILABLE_MEDIA_TYPE = "getInvoiceAvailableMediaType"; @SerializedName(SERIALIZED_NAME_GET_INVOICE_AVAILABLE_MEDIA_TYPE) - private List getInvoiceAvailableMediaType = new ArrayList<>(); + private List getInvoiceAvailableMediaType; public static final String SERIALIZED_NAME_SUPPORTS_INBOUND_DIGITAL_DOCUMENT = "supportsInboundDigitalDocument"; @SerializedName(SERIALIZED_NAME_SUPPORTS_INBOUND_DIGITAL_DOCUMENT) @@ -104,15 +104,15 @@ public class Mandate { public static final String SERIALIZED_NAME_INPUT_DATA_FORMATS = "inputDataFormats"; @SerializedName(SERIALIZED_NAME_INPUT_DATA_FORMATS) - private List inputDataFormats = new ArrayList<>(); + private List inputDataFormats; public static final String SERIALIZED_NAME_OUTPUT_DATA_FORMATS = "outputDataFormats"; @SerializedName(SERIALIZED_NAME_OUTPUT_DATA_FORMATS) - private List outputDataFormats = new ArrayList<>(); + private List outputDataFormats; public static final String SERIALIZED_NAME_WORKFLOW_IDS = "workflowIds"; @SerializedName(SERIALIZED_NAME_WORKFLOW_IDS) - private List workflowIds = new ArrayList<>(); + private List workflowIds; public Mandate() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/MandateDataInputField.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/MandateDataInputField.java index db49bb4..1166a55 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/MandateDataInputField.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/MandateDataInputField.java @@ -94,7 +94,7 @@ public class MandateDataInputField { public static final String SERIALIZED_NAME_ACCEPTED_VALUES = "acceptedValues"; @SerializedName(SERIALIZED_NAME_ACCEPTED_VALUES) - private List acceptedValues = new ArrayList<>(); + private List acceptedValues; public static final String SERIALIZED_NAME_DOCUMENTATION_LINK = "documentationLink"; @SerializedName(SERIALIZED_NAME_DOCUMENTATION_LINK) diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/MandatesResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/MandatesResponse.java index c7e4d5e..95f24a5 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/MandatesResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/MandatesResponse.java @@ -72,7 +72,7 @@ public class MandatesResponse { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private List value = new ArrayList<>(); + private List value; public MandatesResponse() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/OutputDataFormats.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/OutputDataFormats.java index 553dfc5..e5e1367 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/OutputDataFormats.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/OutputDataFormats.java @@ -65,7 +65,7 @@ public class OutputDataFormats { public static final String SERIALIZED_NAME_VERSIONS = "versions"; @SerializedName(SERIALIZED_NAME_VERSIONS) - private List versions = new ArrayList<>(); + private List versions; public OutputDataFormats() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Pagination.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Pagination.java index 2902115..6a1838f 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Pagination.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Pagination.java @@ -53,7 +53,7 @@ import Avalara.SDK.JSON; /** - * Pagination information for the dataset. + * Pagination */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Pagination { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/RequiredWhenField.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/RequiredWhenField.java index f5d531e..f9d645d 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/RequiredWhenField.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/RequiredWhenField.java @@ -53,7 +53,7 @@ import Avalara.SDK.JSON; /** - * Mandates for which this field is required + * RequiredWhenField */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class RequiredWhenField { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SearchParticipants200Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SearchParticipants200Response.java new file mode 100644 index 0000000..f0b028d --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SearchParticipants200Response.java @@ -0,0 +1,289 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +import java.util.Objects; +import Avalara.SDK.model.EInvoicing.V1.TradingPartner; +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; + +/** + * SearchParticipants200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class SearchParticipants200Response { + public static final String SERIALIZED_NAME_AT_RECORD_SET_COUNT = "@recordSetCount"; + @SerializedName(SERIALIZED_NAME_AT_RECORD_SET_COUNT) + private Integer atRecordSetCount; + + public static final String SERIALIZED_NAME_AT_NEXT_LINK = "@nextLink"; + @SerializedName(SERIALIZED_NAME_AT_NEXT_LINK) + private String atNextLink; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private List value; + + public SearchParticipants200Response() { + } + + public SearchParticipants200Response atRecordSetCount(Integer atRecordSetCount) { + this.atRecordSetCount = atRecordSetCount; + return this; + } + + /** + * The count of records in the result set. + * @return atRecordSetCount + */ + @javax.annotation.Nullable + public Integer getAtRecordSetCount() { + return atRecordSetCount; + } + + public void setAtRecordSetCount(Integer atRecordSetCount) { + this.atRecordSetCount = atRecordSetCount; + } + + + public SearchParticipants200Response atNextLink(String atNextLink) { + this.atNextLink = atNextLink; + return this; + } + + /** + * The next page link to get the next set of results. + * @return atNextLink + */ + @javax.annotation.Nullable + public String getAtNextLink() { + return atNextLink; + } + + public void setAtNextLink(String atNextLink) { + this.atNextLink = atNextLink; + } + + + public SearchParticipants200Response value(List value) { + this.value = value; + return this; + } + + public SearchParticipants200Response addValueItem(TradingPartner 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SearchParticipants200Response searchParticipants200Response = (SearchParticipants200Response) o; + return Objects.equals(this.atRecordSetCount, searchParticipants200Response.atRecordSetCount) && + Objects.equals(this.atNextLink, searchParticipants200Response.atNextLink) && + Objects.equals(this.value, searchParticipants200Response.value); + } + + @Override + public int hashCode() { + return Objects.hash(atRecordSetCount, atNextLink, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SearchParticipants200Response {\n"); + sb.append(" atRecordSetCount: ").append(toIndentedString(atRecordSetCount)).append("\n"); + sb.append(" atNextLink: ").append(toIndentedString(atNextLink)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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("@nextLink"); + openapiFields.add("value"); + + // 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 SearchParticipants200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SearchParticipants200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SearchParticipants200Response is not found in the empty JSON string", SearchParticipants200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SearchParticipants200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SearchParticipants200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + 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())); + } + 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++) { + TradingPartner.validateJsonElement(jsonArrayvalue.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SearchParticipants200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SearchParticipants200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SearchParticipants200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SearchParticipants200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SearchParticipants200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SearchParticipants200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of SearchParticipants200Response + * @throws IOException if the JSON string is invalid with respect to SearchParticipants200Response + */ + public static SearchParticipants200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SearchParticipants200Response.class); + } + + /** + * Convert an instance of SearchParticipants200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Signature.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Signature.java index b237a4d..46134df 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Signature.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Signature.java @@ -54,7 +54,7 @@ import Avalara.SDK.JSON; /** - * Defines the signature configuration, specifying whether and how messages are signed for webhook delivery. + * Signature */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Signature { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValue.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValue.java index cf52626..82a008d 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValue.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValue.java @@ -54,7 +54,7 @@ import Avalara.SDK.JSON; /** - * Includes the actual signature applied to a webhook message along with the algorithm used. + * SignatureValue */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class SignatureValue { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionCommon.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionCommon.java index 0c30c6b..3a0595e 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionCommon.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionCommon.java @@ -53,7 +53,7 @@ import Avalara.SDK.JSON; /** - * Basic configuration for a webhook subscription, including description and target notification URL. + * SubscriptionCommon */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class SubscriptionCommon { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionDetail.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionDetail.java index 678c7fd..f548abf 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionDetail.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionDetail.java @@ -80,7 +80,7 @@ public class SubscriptionDetail { public static final String SERIALIZED_NAME_EVENTS = "events"; @SerializedName(SERIALIZED_NAME_EVENTS) - private List events = new ArrayList<>(); + private List events; public SubscriptionDetail() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionListResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionListResponse.java index 0c21f31..adfbf15 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionListResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionListResponse.java @@ -70,7 +70,7 @@ public class SubscriptionListResponse { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) - private List value = new ArrayList<>(); + private List value; public SubscriptionListResponse() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionRegistration.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionRegistration.java index 625edb9..7b00cc5 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionRegistration.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionRegistration.java @@ -75,7 +75,7 @@ public class SubscriptionRegistration { public static final String SERIALIZED_NAME_EVENTS = "events"; @SerializedName(SERIALIZED_NAME_EVENTS) - private List events = new ArrayList<>(); + private List events; public SubscriptionRegistration() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SuccessResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SuccessResponse.java index c7e984f..ff1b1bb 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SuccessResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SuccessResponse.java @@ -53,7 +53,7 @@ import Avalara.SDK.JSON; /** - * Indicates a successful outcome of an API operation, including a generated ID and success message. + * SuccessResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class SuccessResponse { diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentTypes.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentTypes.java new file mode 100644 index 0000000..27334ba --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentTypes.java @@ -0,0 +1,353 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +import java.util.Objects; +import Avalara.SDK.model.EInvoicing.V1.Extension; +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; + +/** + * SupportedDocumentTypes + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class SupportedDocumentTypes { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public static final String SERIALIZED_NAME_SUPPORTED_BY_TRADING_PARTNER = "supportedByTradingPartner"; + @SerializedName(SERIALIZED_NAME_SUPPORTED_BY_TRADING_PARTNER) + private Boolean supportedByTradingPartner; + + public static final String SERIALIZED_NAME_SUPPORTED_BY_AVALARA = "supportedByAvalara"; + @SerializedName(SERIALIZED_NAME_SUPPORTED_BY_AVALARA) + private Boolean supportedByAvalara; + + public static final String SERIALIZED_NAME_EXTENSIONS = "extensions"; + @SerializedName(SERIALIZED_NAME_EXTENSIONS) + private List extensions; + + public SupportedDocumentTypes() { + } + + public SupportedDocumentTypes name(String name) { + this.name = name; + return this; + } + + /** + * Document type name. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public SupportedDocumentTypes value(String value) { + this.value = value; + return this; + } + + /** + * Document type value. + * @return value + */ + @javax.annotation.Nonnull + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + public SupportedDocumentTypes supportedByTradingPartner(Boolean supportedByTradingPartner) { + this.supportedByTradingPartner = supportedByTradingPartner; + return this; + } + + /** + * Does trading partner support receiving this document type. + * @return supportedByTradingPartner + */ + @javax.annotation.Nonnull + public Boolean getSupportedByTradingPartner() { + return supportedByTradingPartner; + } + + public void setSupportedByTradingPartner(Boolean supportedByTradingPartner) { + this.supportedByTradingPartner = supportedByTradingPartner; + } + + + public SupportedDocumentTypes supportedByAvalara(Boolean supportedByAvalara) { + this.supportedByAvalara = supportedByAvalara; + return this; + } + + /** + * Does avalara support exchanging this document type. + * @return supportedByAvalara + */ + @javax.annotation.Nullable + public Boolean getSupportedByAvalara() { + return supportedByAvalara; + } + + public void setSupportedByAvalara(Boolean supportedByAvalara) { + this.supportedByAvalara = supportedByAvalara; + } + + + public SupportedDocumentTypes extensions(List extensions) { + this.extensions = extensions; + return this; + } + + public SupportedDocumentTypes addExtensionsItem(Extension extensionsItem) { + if (this.extensions == null) { + this.extensions = new ArrayList<>(); + } + this.extensions.add(extensionsItem); + return this; + } + + /** + * Optional array used to carry additional metadata or configuration values that may be required by specific document types. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. + * @return extensions + */ + @javax.annotation.Nullable + public List getExtensions() { + return extensions; + } + + public void setExtensions(List extensions) { + this.extensions = extensions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SupportedDocumentTypes supportedDocumentTypes = (SupportedDocumentTypes) o; + return Objects.equals(this.name, supportedDocumentTypes.name) && + Objects.equals(this.value, supportedDocumentTypes.value) && + Objects.equals(this.supportedByTradingPartner, supportedDocumentTypes.supportedByTradingPartner) && + Objects.equals(this.supportedByAvalara, supportedDocumentTypes.supportedByAvalara) && + Objects.equals(this.extensions, supportedDocumentTypes.extensions); + } + + @Override + public int hashCode() { + return Objects.hash(name, value, supportedByTradingPartner, supportedByAvalara, extensions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SupportedDocumentTypes {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" supportedByTradingPartner: ").append(toIndentedString(supportedByTradingPartner)).append("\n"); + sb.append(" supportedByAvalara: ").append(toIndentedString(supportedByAvalara)).append("\n"); + sb.append(" extensions: ").append(toIndentedString(extensions)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("value"); + openapiFields.add("supportedByTradingPartner"); + openapiFields.add("supportedByAvalara"); + openapiFields.add("extensions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("value"); + openapiRequiredFields.add("supportedByTradingPartner"); + } + + /** + * 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 SupportedDocumentTypes + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SupportedDocumentTypes.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SupportedDocumentTypes is not found in the empty JSON string", SupportedDocumentTypes.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SupportedDocumentTypes.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SupportedDocumentTypes` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : SupportedDocumentTypes.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + if (jsonObj.get("extensions") != null && !jsonObj.get("extensions").isJsonNull()) { + JsonArray jsonArrayextensions = jsonObj.getAsJsonArray("extensions"); + if (jsonArrayextensions != null) { + // ensure the json data is an array + if (!jsonObj.get("extensions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `extensions` to be an array in the JSON string but got `%s`", jsonObj.get("extensions").toString())); + } + + // validate the optional field `extensions` (array) + for (int i = 0; i < jsonArrayextensions.size(); i++) { + Extension.validateJsonElement(jsonArrayextensions.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SupportedDocumentTypes.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SupportedDocumentTypes' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SupportedDocumentTypes.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SupportedDocumentTypes value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SupportedDocumentTypes read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SupportedDocumentTypes given an JSON string + * + * @param jsonString JSON string + * @return An instance of SupportedDocumentTypes + * @throws IOException if the JSON string is invalid with respect to SupportedDocumentTypes + */ + public static SupportedDocumentTypes fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SupportedDocumentTypes.class); + } + + /** + * Convert an instance of SupportedDocumentTypes to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierRequest.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierRequest.java new file mode 100644 index 0000000..eb4e050 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierRequest.java @@ -0,0 +1,306 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * Represents a request to validate company’s tax identifier. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class TaxIdentifierRequest { + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_IDENTIFIER_TYPE = "identifierType"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER_TYPE) + private String identifierType; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + private String identifier; + + public static final String SERIALIZED_NAME_EXTENSIONS = "extensions"; + @SerializedName(SERIALIZED_NAME_EXTENSIONS) + private Object extensions; + + public TaxIdentifierRequest() { + } + + public TaxIdentifierRequest countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-letter ISO-3166 country code of the tax identifier. + * @return countryCode + */ + @javax.annotation.Nonnull + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public TaxIdentifierRequest identifierType(String identifierType) { + this.identifierType = identifierType; + return this; + } + + /** + * Type of the identifier. + * @return identifierType + */ + @javax.annotation.Nonnull + public String getIdentifierType() { + return identifierType; + } + + public void setIdentifierType(String identifierType) { + this.identifierType = identifierType; + } + + + public TaxIdentifierRequest identifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * The tax identifier of the company. + * @return identifier + */ + @javax.annotation.Nonnull + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + + public TaxIdentifierRequest extensions(Object extensions) { + this.extensions = extensions; + return this; + } + + /** + * Optional field for adding additional details required by specific tax authorities. Refer to the GET /tax-identifiers/schema API endpoint for the full request structure for a given country. + * @return extensions + */ + @javax.annotation.Nullable + public Object getExtensions() { + return extensions; + } + + public void setExtensions(Object extensions) { + this.extensions = extensions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaxIdentifierRequest taxIdentifierRequest = (TaxIdentifierRequest) o; + return Objects.equals(this.countryCode, taxIdentifierRequest.countryCode) && + Objects.equals(this.identifierType, taxIdentifierRequest.identifierType) && + Objects.equals(this.identifier, taxIdentifierRequest.identifier) && + Objects.equals(this.extensions, taxIdentifierRequest.extensions); + } + + @Override + public int hashCode() { + return Objects.hash(countryCode, identifierType, identifier, extensions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaxIdentifierRequest {\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" identifierType: ").append(toIndentedString(identifierType)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" extensions: ").append(toIndentedString(extensions)).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("countryCode"); + openapiFields.add("identifierType"); + openapiFields.add("identifier"); + openapiFields.add("extensions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("countryCode"); + openapiRequiredFields.add("identifierType"); + openapiRequiredFields.add("identifier"); + } + + /** + * 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 TaxIdentifierRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaxIdentifierRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TaxIdentifierRequest is not found in the empty JSON string", TaxIdentifierRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaxIdentifierRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaxIdentifierRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TaxIdentifierRequest.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("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("identifierType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifierType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifierType").toString())); + } + if (!jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TaxIdentifierRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TaxIdentifierRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TaxIdentifierRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TaxIdentifierRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TaxIdentifierRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TaxIdentifierRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaxIdentifierRequest + * @throws IOException if the JSON string is invalid with respect to TaxIdentifierRequest + */ + public static TaxIdentifierRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TaxIdentifierRequest.class); + } + + /** + * Convert an instance of TaxIdentifierRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponse.java new file mode 100644 index 0000000..0150bb4 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponse.java @@ -0,0 +1,251 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +import java.util.Objects; +import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierResponseValue; +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 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; + +/** + * Represents the response for a tax identifier validation request. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class TaxIdentifierResponse { + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private TaxIdentifierResponseValue value; + + public TaxIdentifierResponse() { + } + + public TaxIdentifierResponse countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-letter ISO-3166 country code of the tax identifier. + * @return countryCode + */ + @javax.annotation.Nonnull + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public TaxIdentifierResponse value(TaxIdentifierResponseValue value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + public TaxIdentifierResponseValue getValue() { + return value; + } + + public void setValue(TaxIdentifierResponseValue value) { + this.value = value; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaxIdentifierResponse taxIdentifierResponse = (TaxIdentifierResponse) o; + return Objects.equals(this.countryCode, taxIdentifierResponse.countryCode) && + Objects.equals(this.value, taxIdentifierResponse.value); + } + + @Override + public int hashCode() { + return Objects.hash(countryCode, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaxIdentifierResponse {\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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("countryCode"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("countryCode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TaxIdentifierResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaxIdentifierResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TaxIdentifierResponse is not found in the empty JSON string", TaxIdentifierResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaxIdentifierResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaxIdentifierResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TaxIdentifierResponse.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("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 `value` + if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) { + TaxIdentifierResponseValue.validateJsonElement(jsonObj.get("value")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TaxIdentifierResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TaxIdentifierResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TaxIdentifierResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TaxIdentifierResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TaxIdentifierResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TaxIdentifierResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaxIdentifierResponse + * @throws IOException if the JSON string is invalid with respect to TaxIdentifierResponse + */ + public static TaxIdentifierResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TaxIdentifierResponse.class); + } + + /** + * Convert an instance of TaxIdentifierResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponseValue.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponseValue.java new file mode 100644 index 0000000..821d84f --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponseValue.java @@ -0,0 +1,267 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * TaxIdentifierResponseValue + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class TaxIdentifierResponseValue { + public static final String SERIALIZED_NAME_IDENTIFIER_TYPE = "identifierType"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER_TYPE) + private String identifierType; + + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; + @SerializedName(SERIALIZED_NAME_IDENTIFIER) + private String identifier; + + public static final String SERIALIZED_NAME_EXTENSIONS = "extensions"; + @SerializedName(SERIALIZED_NAME_EXTENSIONS) + private Object extensions; + + public TaxIdentifierResponseValue() { + } + + public TaxIdentifierResponseValue identifierType(String identifierType) { + this.identifierType = identifierType; + return this; + } + + /** + * Type of the identifier. + * @return identifierType + */ + @javax.annotation.Nullable + public String getIdentifierType() { + return identifierType; + } + + public void setIdentifierType(String identifierType) { + this.identifierType = identifierType; + } + + + public TaxIdentifierResponseValue identifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * The tax identifier of the company. + * @return identifier + */ + @javax.annotation.Nullable + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + + public TaxIdentifierResponseValue extensions(Object extensions) { + this.extensions = extensions; + return this; + } + + /** + * Optional field containing additional company-related information such as companyName, companyAddress, blockListed, tradeName, and taxPayerType. It may also include other details specific to the given tax authority. Refer to the GET /tax-identifiers/schema API endpoint for the full response structure for a given country. + * @return extensions + */ + @javax.annotation.Nullable + public Object getExtensions() { + return extensions; + } + + public void setExtensions(Object extensions) { + this.extensions = extensions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaxIdentifierResponseValue taxIdentifierResponseValue = (TaxIdentifierResponseValue) o; + return Objects.equals(this.identifierType, taxIdentifierResponseValue.identifierType) && + Objects.equals(this.identifier, taxIdentifierResponseValue.identifier) && + Objects.equals(this.extensions, taxIdentifierResponseValue.extensions); + } + + @Override + public int hashCode() { + return Objects.hash(identifierType, identifier, extensions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaxIdentifierResponseValue {\n"); + sb.append(" identifierType: ").append(toIndentedString(identifierType)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" extensions: ").append(toIndentedString(extensions)).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("identifierType"); + openapiFields.add("identifier"); + openapiFields.add("extensions"); + + // 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 TaxIdentifierResponseValue + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaxIdentifierResponseValue.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TaxIdentifierResponseValue is not found in the empty JSON string", TaxIdentifierResponseValue.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaxIdentifierResponseValue.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaxIdentifierResponseValue` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("identifierType") != null && !jsonObj.get("identifierType").isJsonNull()) && !jsonObj.get("identifierType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifierType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifierType").toString())); + } + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) && !jsonObj.get("identifier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifier").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TaxIdentifierResponseValue.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TaxIdentifierResponseValue' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TaxIdentifierResponseValue.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TaxIdentifierResponseValue value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TaxIdentifierResponseValue read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TaxIdentifierResponseValue given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaxIdentifierResponseValue + * @throws IOException if the JSON string is invalid with respect to TaxIdentifierResponseValue + */ + public static TaxIdentifierResponseValue fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TaxIdentifierResponseValue.class); + } + + /** + * Convert an instance of TaxIdentifierResponseValue to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.java new file mode 100644 index 0000000..ed39c60 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.java @@ -0,0 +1,247 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * TaxIdentifierSchemaByCountry200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class TaxIdentifierSchemaByCountry200Response { + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_SCHEMA = "schema"; + @SerializedName(SERIALIZED_NAME_SCHEMA) + private Object schema; + + public TaxIdentifierSchemaByCountry200Response() { + } + + public TaxIdentifierSchemaByCountry200Response countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * The two-letter ISO-3166 country code of the tax identifier. + * @return countryCode + */ + @javax.annotation.Nonnull + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public TaxIdentifierSchemaByCountry200Response schema(Object schema) { + this.schema = schema; + return this; + } + + /** + * The JSON Schema definition, following Draft-07 specification, used to validate tax identifier data. + * @return schema + */ + @javax.annotation.Nonnull + public Object getSchema() { + return schema; + } + + public void setSchema(Object schema) { + this.schema = schema; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TaxIdentifierSchemaByCountry200Response taxIdentifierSchemaByCountry200Response = (TaxIdentifierSchemaByCountry200Response) o; + return Objects.equals(this.countryCode, taxIdentifierSchemaByCountry200Response.countryCode) && + Objects.equals(this.schema, taxIdentifierSchemaByCountry200Response.schema); + } + + @Override + public int hashCode() { + return Objects.hash(countryCode, schema); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TaxIdentifierSchemaByCountry200Response {\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" schema: ").append(toIndentedString(schema)).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("countryCode"); + openapiFields.add("schema"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("countryCode"); + openapiRequiredFields.add("schema"); + } + + /** + * 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 TaxIdentifierSchemaByCountry200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TaxIdentifierSchemaByCountry200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TaxIdentifierSchemaByCountry200Response is not found in the empty JSON string", TaxIdentifierSchemaByCountry200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TaxIdentifierSchemaByCountry200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TaxIdentifierSchemaByCountry200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TaxIdentifierSchemaByCountry200Response.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("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TaxIdentifierSchemaByCountry200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TaxIdentifierSchemaByCountry200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TaxIdentifierSchemaByCountry200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TaxIdentifierSchemaByCountry200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TaxIdentifierSchemaByCountry200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TaxIdentifierSchemaByCountry200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of TaxIdentifierSchemaByCountry200Response + * @throws IOException if the JSON string is invalid with respect to TaxIdentifierSchemaByCountry200Response + */ + public static TaxIdentifierSchemaByCountry200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TaxIdentifierSchemaByCountry200Response.class); + } + + /** + * Convert an instance of TaxIdentifierSchemaByCountry200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TradingPartner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TradingPartner.java new file mode 100644 index 0000000..0fdd91b --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TradingPartner.java @@ -0,0 +1,520 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +import java.util.Objects; +import Avalara.SDK.model.EInvoicing.V1.Address; +import Avalara.SDK.model.EInvoicing.V1.Consents; +import Avalara.SDK.model.EInvoicing.V1.Extension; +import Avalara.SDK.model.EInvoicing.V1.Identifier; +import Avalara.SDK.model.EInvoicing.V1.SupportedDocumentTypes; +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; + +/** + * Represents a participant in the Avalara directory. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class TradingPartner { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_NETWORK = "network"; + @SerializedName(SERIALIZED_NAME_NETWORK) + private String network; + + public static final String SERIALIZED_NAME_REGISTRATION_DATE = "registrationDate"; + @SerializedName(SERIALIZED_NAME_REGISTRATION_DATE) + private String registrationDate; + + public static final String SERIALIZED_NAME_IDENTIFIERS = "identifiers"; + @SerializedName(SERIALIZED_NAME_IDENTIFIERS) + private List identifiers; + + public static final String SERIALIZED_NAME_ADDRESSES = "addresses"; + @SerializedName(SERIALIZED_NAME_ADDRESSES) + private List
addresses; + + public static final String SERIALIZED_NAME_SUPPORTED_DOCUMENT_TYPES = "supportedDocumentTypes"; + @SerializedName(SERIALIZED_NAME_SUPPORTED_DOCUMENT_TYPES) + private List supportedDocumentTypes; + + public static final String SERIALIZED_NAME_CONSENTS = "consents"; + @SerializedName(SERIALIZED_NAME_CONSENTS) + private Consents consents; + + public static final String SERIALIZED_NAME_EXTENSIONS = "extensions"; + @SerializedName(SERIALIZED_NAME_EXTENSIONS) + private List extensions; + + public TradingPartner() { + } + + public TradingPartner( + String id, + String network + ) { + this(); + this.id = id; + this.network = network; + } + + /** + * Avalara unique ID of the participant in the directory. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + + public TradingPartner name(String name) { + this.name = name; + return this; + } + + /** + * Name of the participant (typically, the name of the business entity). + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + /** + * The network where the participant is present. When creating or updating a trading partner, the value provided for the attribute 'network' will be ignored. + * @return network + */ + @javax.annotation.Nullable + public String getNetwork() { + return network; + } + + + + public TradingPartner registrationDate(String registrationDate) { + this.registrationDate = registrationDate; + return this; + } + + /** + * Registration date of the participant if available. + * @return registrationDate + */ + @javax.annotation.Nullable + public String getRegistrationDate() { + return registrationDate; + } + + public void setRegistrationDate(String registrationDate) { + this.registrationDate = registrationDate; + } + + + public TradingPartner identifiers(List identifiers) { + this.identifiers = identifiers; + return this; + } + + public TradingPartner addIdentifiersItem(Identifier identifiersItem) { + if (this.identifiers == null) { + this.identifiers = new ArrayList<>(); + } + this.identifiers.add(identifiersItem); + return this; + } + + /** + * A list of identifiers associated with the trading partner. Each identifier should consistently include the fields name, and value to maintain clarity and ensure consistent structure across entries. When creating or updating a trading partner, the attribute 'name' must be agreed upon with Avalara to ensure consistency. Failing to adhere to the agreed values will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attribute 'displayName' will be ignored and instead retrieved from the standard set of display names maintained. + * @return identifiers + */ + @javax.annotation.Nonnull + public List getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(List identifiers) { + this.identifiers = identifiers; + } + + + public TradingPartner addresses(List
addresses) { + this.addresses = addresses; + return this; + } + + public TradingPartner addAddressesItem(Address addressesItem) { + if (this.addresses == null) { + this.addresses = new ArrayList<>(); + } + this.addresses.add(addressesItem); + return this; + } + + /** + * Get addresses + * @return addresses + */ + @javax.annotation.Nonnull + public List
getAddresses() { + return addresses; + } + + public void setAddresses(List
addresses) { + this.addresses = addresses; + } + + + public TradingPartner supportedDocumentTypes(List supportedDocumentTypes) { + this.supportedDocumentTypes = supportedDocumentTypes; + return this; + } + + public TradingPartner addSupportedDocumentTypesItem(SupportedDocumentTypes supportedDocumentTypesItem) { + if (this.supportedDocumentTypes == null) { + this.supportedDocumentTypes = new ArrayList<>(); + } + this.supportedDocumentTypes.add(supportedDocumentTypesItem); + return this; + } + + /** + * A list of document types supported by the trading partner for exchange. Each document type identifier value must match the standard list maintained by Avalara, which includes Peppol and other public network document type identifier schemes and values, as well as any approved partner-specific identifiers. The 'value' field must exactly match an entry from the provided document identifier list. Any attempt to submit unsupported document types will result in a validation error. Further, when creating or updating a trading partner, the value provided for the attributes 'name' and 'supportedByAvalara' will be ignored. + * @return supportedDocumentTypes + */ + @javax.annotation.Nonnull + public List getSupportedDocumentTypes() { + return supportedDocumentTypes; + } + + public void setSupportedDocumentTypes(List supportedDocumentTypes) { + this.supportedDocumentTypes = supportedDocumentTypes; + } + + + public TradingPartner consents(Consents consents) { + this.consents = consents; + return this; + } + + /** + * Get consents + * @return consents + */ + @javax.annotation.Nullable + public Consents getConsents() { + return consents; + } + + public void setConsents(Consents consents) { + this.consents = consents; + } + + + public TradingPartner extensions(List extensions) { + this.extensions = extensions; + return this; + } + + public TradingPartner addExtensionsItem(Extension extensionsItem) { + if (this.extensions == null) { + this.extensions = new ArrayList<>(); + } + this.extensions.add(extensionsItem); + return this; + } + + /** + * Optional array used to carry additional metadata or configuration values that may be required by specific networks. When creating or updating a trading partner, the keys provided in the 'extensions' attribute must be selected from a predefined list of supported extensions. Using any unsupported keys will result in a validation error. + * @return extensions + */ + @javax.annotation.Nullable + public List getExtensions() { + return extensions; + } + + public void setExtensions(List extensions) { + this.extensions = extensions; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingPartner tradingPartner = (TradingPartner) o; + return Objects.equals(this.id, tradingPartner.id) && + Objects.equals(this.name, tradingPartner.name) && + Objects.equals(this.network, tradingPartner.network) && + Objects.equals(this.registrationDate, tradingPartner.registrationDate) && + Objects.equals(this.identifiers, tradingPartner.identifiers) && + Objects.equals(this.addresses, tradingPartner.addresses) && + Objects.equals(this.supportedDocumentTypes, tradingPartner.supportedDocumentTypes) && + Objects.equals(this.consents, tradingPartner.consents) && + Objects.equals(this.extensions, tradingPartner.extensions); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, network, registrationDate, identifiers, addresses, supportedDocumentTypes, consents, extensions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingPartner {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" network: ").append(toIndentedString(network)).append("\n"); + sb.append(" registrationDate: ").append(toIndentedString(registrationDate)).append("\n"); + sb.append(" identifiers: ").append(toIndentedString(identifiers)).append("\n"); + sb.append(" addresses: ").append(toIndentedString(addresses)).append("\n"); + sb.append(" supportedDocumentTypes: ").append(toIndentedString(supportedDocumentTypes)).append("\n"); + sb.append(" consents: ").append(toIndentedString(consents)).append("\n"); + sb.append(" extensions: ").append(toIndentedString(extensions)).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("name"); + openapiFields.add("network"); + openapiFields.add("registrationDate"); + openapiFields.add("identifiers"); + openapiFields.add("addresses"); + openapiFields.add("supportedDocumentTypes"); + openapiFields.add("consents"); + openapiFields.add("extensions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("identifiers"); + openapiRequiredFields.add("addresses"); + openapiRequiredFields.add("supportedDocumentTypes"); + } + + /** + * 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 TradingPartner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TradingPartner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TradingPartner is not found in the empty JSON string", TradingPartner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TradingPartner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TradingPartner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TradingPartner.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (!jsonObj.get("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("network") != null && !jsonObj.get("network").isJsonNull()) && !jsonObj.get("network").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `network` to be a primitive type in the JSON string but got `%s`", jsonObj.get("network").toString())); + } + if ((jsonObj.get("registrationDate") != null && !jsonObj.get("registrationDate").isJsonNull()) && !jsonObj.get("registrationDate").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `registrationDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("registrationDate").toString())); + } + // ensure the json data is an array + if (!jsonObj.get("identifiers").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `identifiers` to be an array in the JSON string but got `%s`", jsonObj.get("identifiers").toString())); + } + + JsonArray jsonArrayidentifiers = jsonObj.getAsJsonArray("identifiers"); + // validate the required field `identifiers` (array) + for (int i = 0; i < jsonArrayidentifiers.size(); i++) { + Identifier.validateJsonElement(jsonArrayidentifiers.get(i)); + }; + // ensure the json data is an array + if (!jsonObj.get("addresses").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `addresses` to be an array in the JSON string but got `%s`", jsonObj.get("addresses").toString())); + } + + JsonArray jsonArrayaddresses = jsonObj.getAsJsonArray("addresses"); + // validate the required field `addresses` (array) + for (int i = 0; i < jsonArrayaddresses.size(); i++) { + Address.validateJsonElement(jsonArrayaddresses.get(i)); + }; + // ensure the json data is an array + if (!jsonObj.get("supportedDocumentTypes").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `supportedDocumentTypes` to be an array in the JSON string but got `%s`", jsonObj.get("supportedDocumentTypes").toString())); + } + + JsonArray jsonArraysupportedDocumentTypes = jsonObj.getAsJsonArray("supportedDocumentTypes"); + // validate the required field `supportedDocumentTypes` (array) + for (int i = 0; i < jsonArraysupportedDocumentTypes.size(); i++) { + SupportedDocumentTypes.validateJsonElement(jsonArraysupportedDocumentTypes.get(i)); + }; + // validate the optional field `consents` + if (jsonObj.get("consents") != null && !jsonObj.get("consents").isJsonNull()) { + Consents.validateJsonElement(jsonObj.get("consents")); + } + if (jsonObj.get("extensions") != null && !jsonObj.get("extensions").isJsonNull()) { + JsonArray jsonArrayextensions = jsonObj.getAsJsonArray("extensions"); + if (jsonArrayextensions != null) { + // ensure the json data is an array + if (!jsonObj.get("extensions").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `extensions` to be an array in the JSON string but got `%s`", jsonObj.get("extensions").toString())); + } + + // validate the optional field `extensions` (array) + for (int i = 0; i < jsonArrayextensions.size(); i++) { + Extension.validateJsonElement(jsonArrayextensions.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TradingPartner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TradingPartner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TradingPartner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TradingPartner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TradingPartner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TradingPartner given an JSON string + * + * @param jsonString JSON string + * @return An instance of TradingPartner + * @throws IOException if the JSON string is invalid with respect to TradingPartner + */ + public static TradingPartner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TradingPartner.class); + } + + /** + * Convert an instance of TradingPartner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/UpdateTradingPartner200Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/UpdateTradingPartner200Response.java new file mode 100644 index 0000000..0aa6b05 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/UpdateTradingPartner200Response.java @@ -0,0 +1,270 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * UpdateTradingPartner200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class UpdateTradingPartner200Response { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public UpdateTradingPartner200Response() { + } + + public UpdateTradingPartner200Response id(String id) { + this.id = id; + return this; + } + + /** + * Avalara unique ID of the participant in the directory. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public UpdateTradingPartner200Response status(String status) { + this.status = status; + return this; + } + + /** + * The status of the create operation. + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public UpdateTradingPartner200Response message(String message) { + this.message = message; + return this; + } + + /** + * A human-readable message providing additional context or feedback about the outcome of the operation. + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateTradingPartner200Response updateTradingPartner200Response = (UpdateTradingPartner200Response) o; + return Objects.equals(this.id, updateTradingPartner200Response.id) && + Objects.equals(this.status, updateTradingPartner200Response.status) && + Objects.equals(this.message, updateTradingPartner200Response.message); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateTradingPartner200Response {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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("status"); + openapiFields.add("message"); + + // 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 UpdateTradingPartner200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateTradingPartner200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateTradingPartner200Response is not found in the empty JSON string", UpdateTradingPartner200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateTradingPartner200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateTradingPartner200Response` 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("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateTradingPartner200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateTradingPartner200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateTradingPartner200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateTradingPartner200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateTradingPartner200Response read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateTradingPartner200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateTradingPartner200Response + * @throws IOException if the JSON string is invalid with respect to UpdateTradingPartner200Response + */ + public static UpdateTradingPartner200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateTradingPartner200Response.class); + } + + /** + * Convert an instance of UpdateTradingPartner200Response to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ValidationError.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ValidationError.java new file mode 100644 index 0000000..412e891 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ValidationError.java @@ -0,0 +1,241 @@ +/* + * 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 E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @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.EInvoicing.V1; + +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 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; + +/** + * Represents a specific validation failure within a request. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class ValidationError { + public static final String SERIALIZED_NAME_FIELD = "field"; + @SerializedName(SERIALIZED_NAME_FIELD) + private String field; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public ValidationError() { + } + + public ValidationError field(String field) { + this.field = field; + return this; + } + + /** + * The name of the field that failed validation. + * @return field + */ + @javax.annotation.Nullable + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + + public ValidationError message(String message) { + this.message = message; + return this; + } + + /** + * A human-readable explanation of the error for the specific field. + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ValidationError validationError = (ValidationError) o; + return Objects.equals(this.field, validationError.field) && + Objects.equals(this.message, validationError.message); + } + + @Override + public int hashCode() { + return Objects.hash(field, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ValidationError {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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("field"); + openapiFields.add("message"); + + // 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 ValidationError + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ValidationError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ValidationError is not found in the empty JSON string", ValidationError.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ValidationError.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ValidationError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ValidationError.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ValidationError' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ValidationError.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ValidationError value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ValidationError read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ValidationError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ValidationError + * @throws IOException if the JSON string is invalid with respect to ValidationError + */ + public static ValidationError fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ValidationError.class); + } + + /** + * Convert an instance of ValidationError to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhookInvocation.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhookInvocation.java index 4be5815..25eb07d 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhookInvocation.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhookInvocation.java @@ -84,7 +84,7 @@ public class WebhookInvocation { public static final String SERIALIZED_NAME_ITEMS = "items"; @SerializedName(SERIALIZED_NAME_ITEMS) - private List items = new ArrayList<>(); + private List items; public WebhookInvocation() { } diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorResponse.java index 85d267d..b08a96a 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorResponse.java @@ -54,7 +54,7 @@ import Avalara.SDK.JSON; /** - * Wrapper for errors occurring during webhook subscription or delivery processing. + * WebhooksErrorResponse */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class WebhooksErrorResponse {