diff --git a/README.md b/README.md index 964f155..8499915 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,7 @@ Class | Method | HTTP request | Description *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} | Retrieve an issuer *Issuers1099Api* | [**getIssuers**](docs/A1099/V2/Issuers1099Api.md#getissuers) | **GET** /1099/issuers | List issuers +*Issuers1099Api* | [**resubmitRejectedForms**](docs/A1099/V2/Issuers1099Api.md#resubmitrejectedforms) | **POST** /1099/issuers/{issuerId}/$resubmit-rejected-forms | Request a replacement submission for an issuer's rejected forms *Issuers1099Api* | [**updateIssuer**](docs/A1099/V2/Issuers1099Api.md#updateissuer) | **PUT** /1099/issuers/{id} | Update an issuer *JobsApi* | [**getJob**](docs/A1099/V2/JobsApi.md#getjob) | **GET** /jobs/{id} | Retrieves information about the job *TinMatchesApi* | [**getBulkTinMatch**](docs/A1099/V2/TinMatchesApi.md#getbulktinmatch) | **GET** /tin-matches/$bulk/{id} | Get bulk TIN match details @@ -289,6 +290,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.Form1095B](docs/A1099/V2/Form1095B.md) - [Avalara.SDK.model.A1099.V2.Form1095C](docs/A1099/V2/Form1095C.md) - [Avalara.SDK.model.A1099.V2.Form1098](docs/A1099/V2/Form1098.md) + - [Avalara.SDK.model.A1099.V2.Form1098T](docs/A1099/V2/Form1098T.md) - [Avalara.SDK.model.A1099.V2.Form1099Base](docs/A1099/V2/Form1099Base.md) - [Avalara.SDK.model.A1099.V2.Form1099C](docs/A1099/V2/Form1099C.md) - [Avalara.SDK.model.A1099.V2.Form1099Div](docs/A1099/V2/Form1099Div.md) @@ -300,6 +302,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.Form1099Patr](docs/A1099/V2/Form1099Patr.md) - [Avalara.SDK.model.A1099.V2.Form1099R](docs/A1099/V2/Form1099R.md) - [Avalara.SDK.model.A1099.V2.Form1099S](docs/A1099/V2/Form1099S.md) + - [Avalara.SDK.model.A1099.V2.Form1099Sa](docs/A1099/V2/Form1099Sa.md) - [Avalara.SDK.model.A1099.V2.Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) - [Avalara.SDK.model.A1099.V2.Form1099W2](docs/A1099/V2/Form1099W2.md) - [Avalara.SDK.model.A1099.V2.Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) @@ -320,6 +323,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.RealTimeTinMatchIrsResponse](docs/A1099/V2/RealTimeTinMatchIrsResponse.md) - [Avalara.SDK.model.A1099.V2.RealTimeTinMatchRequest](docs/A1099/V2/RealTimeTinMatchRequest.md) - [Avalara.SDK.model.A1099.V2.RealTimeTinMatchResponse](docs/A1099/V2/RealTimeTinMatchResponse.md) + - [Avalara.SDK.model.A1099.V2.ResubmitRejectedFormsResponse](docs/A1099/V2/ResubmitRejectedFormsResponse.md) - [Avalara.SDK.model.A1099.V2.StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) - [Avalara.SDK.model.A1099.V2.StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) - [Avalara.SDK.model.A1099.V2.SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index ed14842..9307f9d 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -49,7 +49,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "1c77f22b-8eec-4a7f-ba13-3598178037e4"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "6178f38d-9576-40f3-9d81-81923b745635"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CompanyRequest companyRequest = new CompanyRequest(); // CompanyRequest | The company to create try { @@ -136,7 +136,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The company to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "e3c39765-db00-449a-b3b4-9110dbe6b231"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "319f54f2-5b38-4c4f-909b-12fb99a51b62"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -228,7 +228,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "22ad4154-895e-4047-b394-665a56c4af95"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "ddaab1c5-a4e7-44d0-992a-8d2477ae1709"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelCompanyResponse result = apiInstance.getCompanies(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -321,7 +321,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | Id of the company String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "80446dbd-be15-490e-b9e5-6a24f4dc6467"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "79462281-b63b-40e6-bac7-e9e975607cde"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CompanyResponse result = apiInstance.getCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -409,7 +409,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The ID of the company to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "55adbfc0-219c-4c8f-b5df-e4cf25fe5e35"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "a04b27f3-eb0f-4ec0-943c-d0902b668fa5"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CompanyRequest companyRequest = new CompanyRequest(); // CompanyRequest | The updated company data try { diff --git a/docs/A1099/V2/Form1042S.md b/docs/A1099/V2/Form1042S.md index 952402d..ac7e50e 100644 --- a/docs/A1099/V2/Form1042S.md +++ b/docs/A1099/V2/Form1042S.md @@ -351,6 +351,7 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -360,6 +361,7 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1095B.md b/docs/A1099/V2/Form1095B.md index ef009b5..a6ae84e 100644 --- a/docs/A1099/V2/Form1095B.md +++ b/docs/A1099/V2/Form1095B.md @@ -74,6 +74,7 @@ Form 1095-B: Health Coverage | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -83,6 +84,7 @@ Form 1095-B: Health Coverage | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1095C.md b/docs/A1099/V2/Form1095C.md index c738c4c..f87776f 100644 --- a/docs/A1099/V2/Form1095C.md +++ b/docs/A1099/V2/Form1095C.md @@ -82,6 +82,7 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -91,6 +92,7 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1098.md b/docs/A1099/V2/Form1098.md index 3ccf6ce..cec0512 100644 --- a/docs/A1099/V2/Form1098.md +++ b/docs/A1099/V2/Form1098.md @@ -75,6 +75,7 @@ Form 1098: Mortgage Interest Statement The recipient is the borro | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -84,6 +85,7 @@ Form 1098: Mortgage Interest Statement The recipient is the borro | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1098T.md b/docs/A1099/V2/Form1098T.md new file mode 100644 index 0000000..ed56f6a --- /dev/null +++ b/docs/A1099/V2/Form1098T.md @@ -0,0 +1,103 @@ + + +# Form1098T + +Form 1098-T: Tuition Statement The recipient is the student and the issuer is the filer (eligible educational institution or insurer). *Required:* at least one amount above zero (Boxes 1, 4, 5, 6 or 10). Amounts can't be negative; Boxes 4 and 6 are reductions of prior-year amounts, entered as positive numbers. Boxes 2 and 3 are reserved by the IRS. Form 1098-T has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**paymentsReceivedForQualifiedTuitionAndRelatedExpenses** | **Double** | Payments received for qualified tuition and related expenses | [optional] | +|**adjustmentsMadeForPriorYear** | **Double** | Adjustments made for a prior year | [optional] | +|**scholarshipsOrGrants** | **Double** | Scholarships or grants | [optional] | +|**adjustmentsToScholarshipsOrGrantsForPriorYear** | **Double** | Adjustments to scholarships or grants for a prior year | [optional] | +|**includesAmountsForAcademicPeriodBeginningNextYearIndicator** | **Boolean** | If checked, the amount in Box 1 includes amounts for an academic period beginning January through March of the next year | [optional] | +|**atLeastHalfTimeStudentIndicator** | **Boolean** | If checked, the student was at least a half-time student during any academic period that began in the tax year | [optional] | +|**graduateStudentIndicator** | **Boolean** | If checked, the student was enrolled in a program leading to a graduate degree, certificate or credential | [optional] | +|**insuranceContractReimbursementsOrRefunds** | **Double** | Insurance contract reimbursements or refunds (insurers only) | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type. | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms via $bulk-upsert | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms via $bulk-upsert | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [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** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. | [optional] | +|**firstName** | **String** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**middleName** | **String** | Middle name. Should only be used for individuals. | [optional] | +|**lastName** | **String** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**suffixName** | **String** | Suffix name. Should only be used for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1098 | "1098" | +| _1098_T | "1098-T" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_INT | "1099-INT" | +| _1099_K | "1099-K" | +| _1099_MISC | "1099-MISC" | +| _1099_NEC | "1099-NEC" | +| _1099_PATR | "1099-PATR" | +| _1099_R | "1099-R" | +| _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | +| W_2 | "W-2" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/Form1099Base.md b/docs/A1099/V2/Form1099Base.md index 3fc009e..4851bf3 100644 --- a/docs/A1099/V2/Form1099Base.md +++ b/docs/A1099/V2/Form1099Base.md @@ -52,6 +52,7 @@ | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -61,6 +62,7 @@ | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099C.md b/docs/A1099/V2/Form1099C.md index 0ed8178..1f7f57b 100644 --- a/docs/A1099/V2/Form1099C.md +++ b/docs/A1099/V2/Form1099C.md @@ -87,6 +87,7 @@ Form 1099-C: Cancellation of Debt *Required:* Date of Identifiabl | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -96,6 +97,7 @@ Form 1099-C: Cancellation of Debt *Required:* Date of Identifiabl | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Div.md b/docs/A1099/V2/Form1099Div.md index 7c9fce6..cff02a9 100644 --- a/docs/A1099/V2/Form1099Div.md +++ b/docs/A1099/V2/Form1099Div.md @@ -83,6 +83,7 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -92,6 +93,7 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Int.md b/docs/A1099/V2/Form1099Int.md index bea183a..f5904b6 100644 --- a/docs/A1099/V2/Form1099Int.md +++ b/docs/A1099/V2/Form1099Int.md @@ -79,6 +79,7 @@ Form 1099-INT: Interest Imcome *At least one of the following amo | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -88,6 +89,7 @@ Form 1099-INT: Interest Imcome *At least one of the following amo | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099K.md b/docs/A1099/V2/Form1099K.md index d9501bd..324b79d 100644 --- a/docs/A1099/V2/Form1099K.md +++ b/docs/A1099/V2/Form1099K.md @@ -102,6 +102,7 @@ Form 1099-K: Payment Card and Third Party Network Transactions | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -111,6 +112,7 @@ Form 1099-K: Payment Card and Third Party Network Transactions | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099ListRequest.md b/docs/A1099/V2/Form1099ListRequest.md index 878695c..3011860 100644 --- a/docs/A1099/V2/Form1099ListRequest.md +++ b/docs/A1099/V2/Form1099ListRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `W-2` | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1098-T` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `1099-SA` * `W-2` | [optional] | |**forms** | [**List<Get1099Form200Response>**](Get1099Form200Response.md) | | [optional] | @@ -20,6 +20,7 @@ | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -29,6 +30,7 @@ | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Misc.md b/docs/A1099/V2/Form1099Misc.md index caa341f..c4dfea7 100644 --- a/docs/A1099/V2/Form1099Misc.md +++ b/docs/A1099/V2/Form1099Misc.md @@ -79,6 +79,7 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -88,6 +89,7 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Nec.md b/docs/A1099/V2/Form1099Nec.md index 64a0400..60b79e2 100644 --- a/docs/A1099/V2/Form1099Nec.md +++ b/docs/A1099/V2/Form1099Nec.md @@ -68,6 +68,7 @@ Form 1099-NEC: Nonemployee Compensation | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -77,6 +78,7 @@ Form 1099-NEC: Nonemployee Compensation | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Patr.md b/docs/A1099/V2/Form1099Patr.md index 92376ce..3f1736c 100644 --- a/docs/A1099/V2/Form1099Patr.md +++ b/docs/A1099/V2/Form1099Patr.md @@ -77,6 +77,7 @@ Form 1099-PATR: Taxable Distributions Received From Cooperatives | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -86,6 +87,7 @@ Form 1099-PATR: Taxable Distributions Received From Cooperatives | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099R.md b/docs/A1099/V2/Form1099R.md index 619dcab..7b5268b 100644 --- a/docs/A1099/V2/Form1099R.md +++ b/docs/A1099/V2/Form1099R.md @@ -157,6 +157,7 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -166,6 +167,7 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099S.md b/docs/A1099/V2/Form1099S.md index 3afc625..4ef7ccc 100644 --- a/docs/A1099/V2/Form1099S.md +++ b/docs/A1099/V2/Form1099S.md @@ -70,6 +70,7 @@ Form 1099-S: Proceeds From Real Estate Transactions The recipient | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -79,6 +80,7 @@ Form 1099-S: Proceeds From Real Estate Transactions The recipient | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Sa.md b/docs/A1099/V2/Form1099Sa.md new file mode 100644 index 0000000..4c2d58c --- /dev/null +++ b/docs/A1099/V2/Form1099Sa.md @@ -0,0 +1,115 @@ + + +# Form1099Sa + +Form 1099-SA: Distributions From an HSA, Archer MSA, or Medicare Advantage MSA The recipient is the account holder and the issuer is the trustee (payer). *Required:* Gross Distribution, Distribution Code, and exactly one of the three account type indicators (HSA, Archer MSA, Medicare Advantage MSA). Form 1099-SA has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**grossDistribution** | **Double** | Gross distribution | | +|**earningsOnExcessContributions** | **Double** | Earnings on excess contributions | [optional] | +|**distributionCode** | [**DistributionCodeEnum**](#DistributionCodeEnum) | Distribution code. * `1` - Normal distributions * `2` - Excess contributions * `3` - Disability * `4` - Death distribution other than code 6 * `5` - Prohibited transaction * `6` - Death distribution after year of death to a nonspouse beneficiary | | +|**fairMarketValueOnDateOfDeath** | **Double** | Fair market value (FMV) of the account on the date of death | [optional] | +|**hsaIndicator** | **Boolean** | If checked, the account is a health savings account (HSA). Exactly one account type indicator must be checked. | [optional] | +|**archerMsaIndicator** | **Boolean** | If checked, the account is an Archer medical savings account (MSA). Exactly one account type indicator must be checked. | [optional] | +|**medicareAdvantageMsaIndicator** | **Boolean** | If checked, the account is a Medicare Advantage MSA. Exactly one account type indicator must be checked. | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type. | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms via $bulk-upsert | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms via $bulk-upsert | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [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** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. | [optional] | +|**firstName** | **String** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**middleName** | **String** | Middle name. Should only be used for individuals. | [optional] | +|**lastName** | **String** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**suffixName** | **String** | Suffix name. Should only be used for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | + + + +## Enum: DistributionCodeEnum + +| Name | Value | +|---- | -----| +| _1 | "1" | +| _2 | "2" | +| _3 | "3" | +| _4 | "4" | +| _5 | "5" | +| _6 | "6" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1098 | "1098" | +| _1098_T | "1098-T" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_INT | "1099-INT" | +| _1099_K | "1099-K" | +| _1099_MISC | "1099-MISC" | +| _1099_NEC | "1099-NEC" | +| _1099_PATR | "1099-PATR" | +| _1099_R | "1099-R" | +| _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | +| W_2 | "W-2" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/Form1099W2.md b/docs/A1099/V2/Form1099W2.md index c35f45c..677fc96 100644 --- a/docs/A1099/V2/Form1099W2.md +++ b/docs/A1099/V2/Form1099W2.md @@ -95,6 +95,7 @@ Form W-2: Wage and Tax Statement. | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -104,6 +105,7 @@ Form W-2: Wage and Tax Statement. | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index 231526e..d6f1c1c 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -52,7 +52,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version Boolean dryRun = false; // Boolean | defaults to false. If true, it will NOT change the DB. It will just return a report of what would've have been changed in the DB - String xCorrelationId = "b2de6e01-aadd-47fd-8444-2b3e2e1d5364"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "6ebfbe2e-4ee0-4a66-bd1a-b85f7a231d9f"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . Form1099ListRequest form1099ListRequest = new Form1099ListRequest(); // Form1099ListRequest | try { @@ -141,7 +141,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d83705fa-e06e-473d-a99b-18e1c24e1ade"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b5b67ba5-a605-40a6-81ba-e67011f5e0e5"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . Get1099Form200Response get1099Form200Response = new Get1099Form200Response(); // Get1099Form200Response | try { @@ -229,7 +229,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | The unique identifier of the desired form to delete. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "3b67737d-1e33-4b9c-b91a-a346ef3ff731"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f41e7d08-4d01-48e7-8517-e69e88dfeab8"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.delete1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -317,7 +317,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "59489a73-7ddd-4b4c-aa87-e18e1042713f"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "45a8d1d6-6749-49c6-aba7-af26e12032be"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { Get1099Form200Response result = apiInstance.get1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -406,7 +406,7 @@ public class Example { String id = "id_example"; // String | The ID of the form String avalaraVersion = "2.0.0"; // String | API version Boolean markEdelivered = true; // Boolean | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered - String xCorrelationId = "85a9b19b-0ed5-476c-bb11-e365b8b14794"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "937e70b0-33c3-4f2e-966a-2be03048e06e"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { File result = apiInstance.get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient); @@ -500,7 +500,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "13e97284-a7a9-4e94-92e4-cd3e69c6b967"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "9473fcfd-36c1-4d60-8edf-b8faf6f4765f"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelForm1099Base result = apiInstance.list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -593,7 +593,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d5ff1333-2e20-4ba6-b169-c1bac004c84d"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "e4808387-f980-456b-bb19-49c90ce005c9"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . Get1099Form200Response get1099Form200Response = new Get1099Form200Response(); // Get1099Form200Response | try { diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index c1ae13f..655da09 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -53,7 +53,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "5cf8f8de-3979-4627-a7c4-5b8d8c6d7a49"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "61709e9c-df43-4ce6-b7cf-977e76461170"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest = new CreateAndSendW9FormEmailRequest(); // CreateAndSendW9FormEmailRequest | Form to be created try { @@ -139,7 +139,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "1476e915-dd01-4011-8afd-ccc6415b1e52"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "cccaf71c-00e3-4c9b-89b0-a26e835fefe0"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be created try { @@ -226,7 +226,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "59f9ef43-cd2f-4894-8d01-94f56745f69d"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "61f5819f-dc87-4d2d-89d7-04a06081d8e7"; // 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); @@ -311,7 +311,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "7a8bb9d5-649c-4116-8271-9cfa594e8d5b"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "06be2fec-b1fb-43ee-a540-6902ef7a1418"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CreateW9Form201Response result = apiInstance.getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -397,7 +397,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | Id of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "0e6d22cd-02e3-45c0-8e6e-f62c30551679"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f7097e4c-cf87-4d02-b80d-6df6999d89bc"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { File result = apiInstance.getW9FormPdf(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -452,7 +452,7 @@ Name | Type | Description | Notes List W9/W4/W8 forms -List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". +List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\", \"referenceId\", \"createdAt\" and \"updatedAt\". \"createdAt\" and \"updatedAt\" accept ISO 8601 values and are stored in UTC. Values without an offset are treated as UTC, and a date-only value means midnight (00:00:00) of that day. Examples: <ul><li>Forms updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Forms updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Forms updated within an interval, with a time zone offset: updatedAt ge '2026-09-03T08:00:00-05:00' and updatedAt le '2026-09-03T18:00:00-05:00'</li></ul> ### Example @@ -489,7 +489,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "6c3ae581-579d-430f-aa93-ee73aaee98d4"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "a91bb261-b009-42e0-a22c-adb74d576ac8"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelW9FormBaseResponse result = apiInstance.listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -580,7 +580,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | The ID of the W9/W4/W8 form. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "4e134168-0dcc-4032-bcde-3fbe7416e054"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "647fc300-170e-49d9-8103-0a96d91bb0ba"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CreateW9Form201Response result = apiInstance.sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -668,7 +668,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "daa7e447-c721-4de0-8cb4-d4f22795c550"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "6f7f15f5-d0a5-4739-bcd9-2f18e5cb817e"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be updated try { @@ -757,7 +757,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | Id of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d4069119-7297-4cb1-9671-6667d031f729"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "c42f5622-8d65-4351-9ff3-4e0442edeb97"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . File _file = new File("/path/to/file"); // File | try { diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index 43e0f10..c9b13cc 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -97,6 +97,14 @@ |**numberOfPropertiesSecuringMortgage** | **Integer** | Number of properties securing the mortgage, if more than one | [optional] | |**otherInformation** | **String** | Other (up to 39 characters), such as real estate taxes or insurance paid from escrow | [optional] | |**mortgageAcquisitionDate** | **LocalDate** | Mortgage acquisition date, if the mortgage was acquired during the tax year | [optional] | +|**paymentsReceivedForQualifiedTuitionAndRelatedExpenses** | **Double** | Payments received for qualified tuition and related expenses | [optional] | +|**adjustmentsMadeForPriorYear** | **Double** | Adjustments made for a prior year | [optional] | +|**scholarshipsOrGrants** | **Double** | Scholarships or grants | [optional] | +|**adjustmentsToScholarshipsOrGrantsForPriorYear** | **Double** | Adjustments to scholarships or grants for a prior year | [optional] | +|**includesAmountsForAcademicPeriodBeginningNextYearIndicator** | **Boolean** | If checked, the amount in Box 1 includes amounts for an academic period beginning January through March of the next year | [optional] | +|**atLeastHalfTimeStudentIndicator** | **Boolean** | If checked, the student was at least a half-time student during any academic period that began in the tax year | [optional] | +|**graduateStudentIndicator** | **Boolean** | If checked, the student was enrolled in a program leading to a graduate degree, certificate or credential | [optional] | +|**insuranceContractReimbursementsOrRefunds** | **Double** | Insurance contract reimbursements or refunds (insurers only) | [optional] | |**dateOfIdentifiableEvent** | **LocalDate** | Date of identifiable event | | |**amountOfDebtDischarged** | **Double** | Amount of debt discharged | | |**interestIncludedInDebtDischarged** | **Double** | Interest, if included in the amount of debt discharged | [optional] | @@ -179,14 +187,14 @@ |**workOpportunityCredit** | **Double** | Work opportunity credit | [optional] | |**otherCreditsAndDeductions** | **Double** | Other credits and deductions | [optional] | |**specifiedCooperativeIndicator** | **Boolean** | Indicates the payer is a specified agricultural or horticultural cooperative | [optional] | -|**grossDistribution** | **Double** | Gross distribution | [optional] | +|**grossDistribution** | **Double** | Gross distribution | | |**taxableAmount** | **Double** | Taxable amount | [optional] | |**taxableAmountNotDetermined** | **Boolean** | Taxable amount not determined | [optional] | |**totalDistributionDetermined** | **Boolean** | Total distribution | [optional] | |**capitalGain** | **Double** | Capital gain (included in Box 2a) | [optional] | |**employeeContributionsOrDesignatedRothOrInsurancePremiums** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | |**netUnrealizedAppreciationInEmployerSecurities** | **Double** | Net unrealized appreciation in employer's securities | [optional] | -|**distributionCode** | [**DistributionCodeEnum**](#DistributionCodeEnum) | Distribution code. Available values: - 1: Early distribution, no known exception (in most cases, under age 59½) - 2: Early distribution, exception applies (under age 59½) - 3: Disability - 4: Death - 5: Prohibited transaction - 6: Section 1035 exchange (a tax-free exchange of life insurance, annuity, qualified long-term care insurance, or endowment contracts) - 7: Normal distribution - 8: Excess contributions plus earnings/excess deferrals (and/or earnings) taxable in payment year - 9: Cost of current life insurance protection (premiums paid by a trustee or custodian for current insurance protection) - A: May be eligible for 10-year tax option - B: Designated Roth account distribution - C: Reportable Death Benefits Under Section 6050Y(c) - D: Annuity payments from nonqualified annuity payments and distributions from life insurance contracts that may be subject to tax under section 1411 - E: Distribution under Employee Plans Compliance Resolution System (EPCRS) - F: Charitable gift annuity - G: Direct rollover and rollover contribution - H: Direct rollover of distribution from a designated Roth account to a Roth IRA - J: Early distribution from a Roth IRA (This code may be used with a Code 8 or P) - K: Distribution of IRA Assets Not Having A Readily Available FMV - L: Loans treated as deemed distributions under section 72(p) - M: Qualified Plan Loan Offsets - N: Recharacterized IRA contribution made for year following payment year - P: Excess contributions plus earnings/excess deferrals taxable for year prior to payment year - Q: Qualified distribution from a Roth IRA (Distribution from a Roth IRA when the 5-year holding period has been met, and the recipient has reached 59½, has died, or is disabled) - R: Recharacterized IRA contribution made for year prior to payment year - S: Early distribution from a SIMPLE IRA in first 2 years no known exceptions - T: Roth IRA distribution exception applies because participant has reached 59½, died or is disabled, but it is unknown if the 5-year period has been met - U: Distribution from ESOP under Section 404(k) - W: Charges or payments for purchasing qualified long-term care insurance contracts under combined arrangements - Y: Qualified charitable distribution (QCD) claimed under section 408(d)(8) (Available for 2025 on) | | +|**distributionCode** | [**DistributionCodeEnum**](#DistributionCodeEnum) | Distribution code. * `1` - Normal distributions * `2` - Excess contributions * `3` - Disability * `4` - Death distribution other than code 6 * `5` - Prohibited transaction * `6` - Death distribution after year of death to a nonspouse beneficiary | | |**secondDistributionCode** | [**SecondDistributionCodeEnum**](#SecondDistributionCodeEnum) | Second distribution code. Must be a valid combination with the first distribution code. See DistributionCode property documentation for code descriptions. Valid combinations based on first distribution code: - 1: _, 8, B, D, K, L, M, P - 2: _, 8, B, D, K, L, M, P - 3: _, D - 4: _, 8, A, B, D, G, H, K, L, M, P - 5: _ - 6: _, W - 7: _, A, B, D, K, L, M - 8: _, 1, 2, 4, B, J, K - 9: _ - A: 4, 7 - B: _, 1, 2, 4, 7, 8, G, L, M, P, U - C: _, D - D: 1, 2, 3, 4, 7, C - E: _ - F: _ - G: _, 4, B, K - H: _, 4 - J: _, 8, P - K: 1, 2, 4, 7, 8, G - L: _, 1, 2, 4, 7, B - M: _, 1, 2, 4, 7, B - N: _ - P: _, 1, 2, 4, B, J - Q: _ - R: _ - S: _ - T: _ - U: _, B - W: _, 6 - Y: 4, 7, K (_ indicates no second distribution code) (format: firstDistributionCode: availableSecondDistributionCodes) | [optional] | |**iraSepSimple** | **Boolean** | IRA/SEP/SIMPLE | [optional] | |**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | @@ -203,6 +211,11 @@ |**transferorReceivedPropertyOrServicesIndicator** | **Boolean** | If checked, the transferor received or will receive property or services as part of the consideration | [optional] | |**transferorIsForeignPersonIndicator** | **Boolean** | If checked, the transferor is a foreign person (nonresident alien, foreign partnership, foreign estate or foreign trust) | [optional] | |**buyersPartOfRealEstateTax** | **Double** | Buyer's part of real estate tax | [optional] | +|**earningsOnExcessContributions** | **Double** | Earnings on excess contributions | [optional] | +|**fairMarketValueOnDateOfDeath** | **Double** | Fair market value (FMV) of the account on the date of death | [optional] | +|**hsaIndicator** | **Boolean** | If checked, the account is a health savings account (HSA). Exactly one account type indicator must be checked. | [optional] | +|**archerMsaIndicator** | **Boolean** | If checked, the account is an Archer medical savings account (MSA). Exactly one account type indicator must be checked. | [optional] | +|**medicareAdvantageMsaIndicator** | **Boolean** | If checked, the account is a Medicare Advantage MSA. Exactly one account type indicator must be checked. | [optional] | |**wages** | **Double** | Wages, tips, other compensation. | [optional] | |**socialSecurityWages** | **Double** | Social security wages. | [optional] | |**socialSecurityTaxWithheld** | **Double** | Social security tax withheld. | [optional] | @@ -503,6 +516,7 @@ | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -512,6 +526,7 @@ | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | @@ -608,30 +623,6 @@ | _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" | -| Y | "Y" | diff --git a/docs/A1099/V2/IrisFormBase.md b/docs/A1099/V2/IrisFormBase.md index b8e2328..37acff3 100644 --- a/docs/A1099/V2/IrisFormBase.md +++ b/docs/A1099/V2/IrisFormBase.md @@ -63,6 +63,7 @@ | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_T | "1098-T" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | @@ -72,6 +73,7 @@ | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | | _1099_S | "1099-S" | +| _1099_SA | "1099-SA" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index ecc9773..c2315f0 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**deleteIssuer**](Issuers1099Api.md#deleteIssuer) | **DELETE** /1099/issuers/{id} | Delete an issuer [**getIssuer**](Issuers1099Api.md#getIssuer) | **GET** /1099/issuers/{id} | Retrieve an issuer [**getIssuers**](Issuers1099Api.md#getIssuers) | **GET** /1099/issuers | List issuers +[**resubmitRejectedForms**](Issuers1099Api.md#resubmitRejectedForms) | **POST** /1099/issuers/{issuerId}/$resubmit-rejected-forms | Request a replacement submission for an issuer's rejected forms [**updateIssuer**](Issuers1099Api.md#updateIssuer) | **PUT** /1099/issuers/{id} | Update an issuer @@ -49,7 +50,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "020085b2-ced8-4d4e-8d8e-aac8901ba664"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "5ae71043-1efc-47f3-931c-194f239999b9"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IssuerRequest issuerRequest = new IssuerRequest(); // IssuerRequest | The issuer to create try { @@ -136,7 +137,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "eeca9729-5b2f-4ba1-a3c7-bf49c3705b52"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f7a15738-d958-4708-aad8-eac25b686d81"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -221,7 +222,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to retrieve String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "1ba68926-014a-4e57-ac33-5120f7d67ad5"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "27ab9711-3475-41e4-b82a-2b7ce52ca884"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { IssuerResponse result = apiInstance.getIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -312,7 +313,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "0b7d8a8b-c34a-48e3-bf9e-86c475547496"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1dbcdaf4-7ea0-46e9-b83c-b663e6178568"; // 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); @@ -367,6 +368,93 @@ Name | Type | Description | Notes | **401** | Authentication failed | - | +## resubmitRejectedForms + +> ResubmitRejectedFormsResponse resubmitRejectedForms(issuerId, avalaraVersion, xCorrelationId, xAvalaraClient) + +Request a replacement submission for an issuer's rejected forms + +Mirrors the UI's \"Resubmit Rejected Forms\" action: schedules a replacement submission for every one of the issuer's forms currently in Rejected or RejectedWithErrors status, in a single action. There is no per-form or per-submission selection. This call only schedules the resubmission — actual transmission to the IRS remains asynchronous and batch-driven. + +### 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.A1099.V2.Issuers1099Api; + +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); + + Issuers1099Api apiInstance = new Issuers1099Api(apiClient); + Long issuerId = 56L; // Long | Id of the issuer whose rejected forms should be resubmitted + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "0520f85b-11b0-4246-953f-e06f87029486"; // 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 { + ResubmitRejectedFormsResponse result = apiInstance.resubmitRejectedForms(issuerId, avalaraVersion, xCorrelationId, xAvalaraClient); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling Issuers1099Api#resubmitRejectedForms"); + 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 +------------- | ------------- | ------------- | ------------- + **issuerId** | **Long**| Id of the issuer whose rejected forms should be resubmitted | + **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 + +[**ResubmitRejectedFormsResponse**](ResubmitRejectedFormsResponse.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** | Rejected forms scheduled for replacement submission | - | +| **401** | Authentication failed | - | +| **403** | Caller does not have access to this issuer | - | +| **404** | Issuer has no forms in Rejected or RejectedWithErrors status | - | + + ## updateIssuer > IssuerWriteResponse updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest) @@ -405,7 +493,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "5dcb2f2c-e12d-4e11-aeaa-dfbd23bbe954"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "542fb8dd-e4ec-49c2-aef5-f9159dd46aaf"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IssuerRequest issuerRequest = new IssuerRequest(); // IssuerRequest | The issuer to update try { diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md index bc361b7..bd95372 100644 --- a/docs/A1099/V2/JobsApi.md +++ b/docs/A1099/V2/JobsApi.md @@ -46,7 +46,7 @@ public class Example { JobsApi apiInstance = new JobsApi(apiClient); String id = "id_example"; // String | Job id obtained from other API responses, like `/1099/bulk-upsert`. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "b87aeebf-8db8-476b-b885-0e27d598bbfa"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d583aa2b-23ac-46c3-8aa0-9b331b73ca3e"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { JobResponse result = apiInstance.getJob(id, avalaraVersion, xCorrelationId, xAvalaraClient); diff --git a/docs/A1099/V2/ResubmitRejectedFormsResponse.md b/docs/A1099/V2/ResubmitRejectedFormsResponse.md new file mode 100644 index 0000000..41565ca --- /dev/null +++ b/docs/A1099/V2/ResubmitRejectedFormsResponse.md @@ -0,0 +1,13 @@ + + +# ResubmitRejectedFormsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**resubmittedFormsCount** | **Integer** | Number of forms scheduled for replacement submission. | [optional] | + + + diff --git a/docs/A1099/V2/TinMatchesApi.md b/docs/A1099/V2/TinMatchesApi.md index 53fff37..a98f2c4 100644 --- a/docs/A1099/V2/TinMatchesApi.md +++ b/docs/A1099/V2/TinMatchesApi.md @@ -47,7 +47,7 @@ public class Example { TinMatchesApi apiInstance = new TinMatchesApi(apiClient); String id = "id_example"; // String | The bulk ID String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "df30781a-da37-45b3-be01-d835e5d0ad8b"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "77d79db6-e884-4ef0-a76d-0c10c41f5993"; // 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 { BulkTinMatchResponse result = apiInstance.getBulkTinMatch(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -137,7 +137,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "98367ed4-44bb-4254-a388-ec2e63ac293e"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "8bd78a31-95dc-4091-9f0e-fd0647ecc6f5"; // 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 { PaginatedQueryResultModelBulkTinMatchResultItemResponse result = apiInstance.getBulkTinMatchResults(id, avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -229,7 +229,7 @@ public class Example { TinMatchesApi apiInstance = new TinMatchesApi(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "7d625954-787a-4153-8365-45cef8288be1"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "7f2a23f6-59ed-4fb9-95fd-7937e99952f5"; // 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/) . RealTimeTinMatchRequest realTimeTinMatchRequest = new RealTimeTinMatchRequest(); // RealTimeTinMatchRequest | Required data to perform TIN match try { @@ -316,7 +316,7 @@ public class Example { TinMatchesApi apiInstance = new TinMatchesApi(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "3f051c64-117a-46f1-b9b5-324064394c6a"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "88b0e4e3-1fd9-437c-9744-753f89dfef9f"; // 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/) . BulkTinMatchRequest bulkTinMatchRequest = new BulkTinMatchRequest(); // BulkTinMatchRequest | Required TIN collection to perform bulk TIN match try { diff --git a/pom.xml b/pom.xml index 0748d01..a3a1e7c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ avalara-sdk jar avalara-sdk - 26.9.1 + 26.10.0 https://github.com/avadev/Avalara-SDK-Java OpenAPI Java diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java index 016a1a3..8e6ca33 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java @@ -1089,7 +1089,7 @@ public UpdateCompanyRequest getUpdateCompanyRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java index 851d189..89a9d3a 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java @@ -1509,7 +1509,7 @@ public Update1099FormRequest getUpdate1099FormRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java index 8b478e3..37292e6 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java @@ -1131,7 +1131,7 @@ private okhttp3.Call listW9FormsValidateBeforeCall(ListW9FormsRequest requestPar /** * List W9/W4/W8 forms - * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\", \"referenceId\", \"createdAt\" and \"updatedAt\". \"createdAt\" and \"updatedAt\" accept ISO 8601 values and are stored in UTC. Values without an offset are treated as UTC, and a date-only value means midnight (00:00:00) of that day. Examples: <ul><li>Forms updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Forms updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Forms updated within an interval, with a time zone offset: updatedAt ge '2026-09-03T08:00:00-05:00' and updatedAt le '2026-09-03T18:00:00-05:00'</li></ul> * @param requestOptions Object which represents the options available for a given API/request * @return PaginatedQueryResultModelW9FormBaseResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1150,7 +1150,7 @@ public PaginatedQueryResultModelW9FormBaseResponse listW9Forms(ListW9FormsReques /** * List W9/W4/W8 forms - * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\", \"referenceId\", \"createdAt\" and \"updatedAt\". \"createdAt\" and \"updatedAt\" accept ISO 8601 values and are stored in UTC. Values without an offset are treated as UTC, and a date-only value means midnight (00:00:00) of that day. Examples: <ul><li>Forms updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Forms updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Forms updated within an interval, with a time zone offset: updatedAt ge '2026-09-03T08:00:00-05:00' and updatedAt le '2026-09-03T18:00:00-05:00'</li></ul> * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<PaginatedQueryResultModelW9FormBaseResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1170,7 +1170,7 @@ public ApiResponse listW9FormsWithH /** * List W9/W4/W8 forms (asynchronously) - * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\", \"referenceId\", \"createdAt\" and \"updatedAt\". \"createdAt\" and \"updatedAt\" accept ISO 8601 values and are stored in UTC. Values without an offset are treated as UTC, and a date-only value means midnight (00:00:00) of that day. Examples: <ul><li>Forms updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Forms updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Forms updated within an interval, with a time zone offset: updatedAt ge '2026-09-03T08:00:00-05:00' and updatedAt le '2026-09-03T18:00:00-05:00'</li></ul> * @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 @@ -1841,7 +1841,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java index 8ef9cb8..e14ea9e 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java @@ -41,6 +41,7 @@ import Avalara.SDK.model.A1099.V2.IssuerResponse; import Avalara.SDK.model.A1099.V2.IssuerWriteResponse; import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse; +import Avalara.SDK.model.A1099.V2.ResubmitRejectedFormsResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -874,6 +875,200 @@ public GetIssuersRequest getGetIssuersRequest() { return this.new GetIssuersRequest(); } + /** + * Build call for resubmitRejectedForms + * @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 Rejected forms scheduled for replacement submission -
401 Authentication failed -
403 Caller does not have access to this issuer -
404 Issuer has no forms in Rejected or RejectedWithErrors status -
+ */ + public okhttp3.Call resubmitRejectedFormsCall(ResubmitRejectedFormsRequest 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 = "/1099/issuers/{issuerId}/$resubmit-rejected-forms" + .replaceAll("\\{" + "issuerId" + "\\}", localVarApiClient.escapeString(requestParameters.issuerId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call resubmitRejectedFormsValidateBeforeCall(ResubmitRejectedFormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.issuerId' is set + if (requestParameters.getIssuerId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.issuerId' when calling resubmitRejectedForms(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling resubmitRejectedForms(Async)"); + } + + + okhttp3.Call localVarCall = resubmitRejectedFormsCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Request a replacement submission for an issuer's rejected forms + * Mirrors the UI's \"Resubmit Rejected Forms\" action: schedules a replacement submission for every one of the issuer's forms currently in Rejected or RejectedWithErrors status, in a single action. There is no per-form or per-submission selection. This call only schedules the resubmission — actual transmission to the IRS remains asynchronous and batch-driven. + * @param requestOptions Object which represents the options available for a given API/request + * @return ResubmitRejectedFormsResponse + * @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 Rejected forms scheduled for replacement submission -
401 Authentication failed -
403 Caller does not have access to this issuer -
404 Issuer has no forms in Rejected or RejectedWithErrors status -
+ */ + public ResubmitRejectedFormsResponse resubmitRejectedForms(ResubmitRejectedFormsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = resubmitRejectedFormsWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Request a replacement submission for an issuer's rejected forms + * Mirrors the UI's \"Resubmit Rejected Forms\" action: schedules a replacement submission for every one of the issuer's forms currently in Rejected or RejectedWithErrors status, in a single action. There is no per-form or per-submission selection. This call only schedules the resubmission — actual transmission to the IRS remains asynchronous and batch-driven. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<ResubmitRejectedFormsResponse> + * @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 Rejected forms scheduled for replacement submission -
401 Authentication failed -
403 Caller does not have access to this issuer -
404 Issuer has no forms in Rejected or RejectedWithErrors status -
+ */ + public ApiResponse resubmitRejectedFormsWithHttpInfo(ResubmitRejectedFormsRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = resubmitRejectedFormsValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Request a replacement submission for an issuer's rejected forms (asynchronously) + * Mirrors the UI's \"Resubmit Rejected Forms\" action: schedules a replacement submission for every one of the issuer's forms currently in Rejected or RejectedWithErrors status, in a single action. There is no per-form or per-submission selection. This call only schedules the resubmission — actual transmission to the IRS remains asynchronous and batch-driven. + * @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 Rejected forms scheduled for replacement submission -
401 Authentication failed -
403 Caller does not have access to this issuer -
404 Issuer has no forms in Rejected or RejectedWithErrors status -
+ */ + public okhttp3.Call resubmitRejectedFormsAsync(ResubmitRejectedFormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = resubmitRejectedFormsValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the ResubmitRejectedForms API + * + * @param issuerId Id of the issuer whose rejected forms should be resubmitted + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class ResubmitRejectedFormsRequest { + private Long issuerId; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public ResubmitRejectedFormsRequest () { + } + + public Long getIssuerId() { return issuerId; } + public void setIssuerId(Long issuerId) { this.issuerId = issuerId; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns ResubmitRejectedFormsRequest + */ + public ResubmitRejectedFormsRequest getResubmitRejectedFormsRequest() { + return this.new ResubmitRejectedFormsRequest(); + } + /** * Build call for updateIssuer * @param requestOptions Object which represents the options available for a given API/request @@ -1078,7 +1273,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java index e604dbb..78d1fb9 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java @@ -275,7 +275,7 @@ public GetJobRequest getGetJobRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java b/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java index e0a525b..1dc9fac 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java @@ -894,7 +894,7 @@ public SubmitBulkTinMatchRequest getSubmitBulkTinMatchRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/CodeListsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/CodeListsApi.java index 8373898..6943b33 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/CodeListsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/CodeListsApi.java @@ -537,7 +537,7 @@ public GetCodeListListRequest getGetCodeListListRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java index ab1bf16..6b4d0f1 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java @@ -294,7 +294,7 @@ public GetDataInputFieldsRequest getGetDataInputFieldsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java index e5ce1b4..f0d1027 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java @@ -1113,7 +1113,7 @@ public SubmitDocumentRequest getSubmitDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java index 044e623..52a88a9 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java @@ -300,7 +300,7 @@ public SubmitInteropDocumentRequest getSubmitInteropDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java index 7773861..e7ba009 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java @@ -521,7 +521,7 @@ public GetMandatesRequest getGetMandatesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/ReportsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/ReportsApi.java index 426aa84..9cf2918 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/ReportsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/ReportsApi.java @@ -705,7 +705,7 @@ public GetReportsRequest getGetReportsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java index 59f582e..11c3462 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java @@ -873,7 +873,7 @@ public ListWebhookSubscriptionsRequest getListWebhookSubscriptionsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java index 975c9d8..9311a51 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java @@ -489,7 +489,7 @@ public ValidateTaxIdentifierRequest getValidateTaxIdentifierRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java index a48595a..2756905 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java @@ -1993,7 +1993,7 @@ public UpdateTradingPartnerRequest getUpdateTradingPartnerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.1"); + this.localVarApiClient.setSdkVersion("26.10.0"); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java index 5d3d132..fa64d23 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java @@ -975,6 +975,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -993,6 +995,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java index 883ddc9..9d839ea 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java @@ -170,6 +170,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -188,6 +190,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java index 3b7c483..3d58999 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java @@ -191,6 +191,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -209,6 +211,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java index d3d6e27..8bd6739 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java @@ -123,6 +123,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -141,6 +143,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1098T.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098T.java new file mode 100644 index 0000000..2d8864e --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098T.java @@ -0,0 +1,1898 @@ +/* + * 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 + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.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; + +/** + * Form 1098-T: Tuition Statement The recipient is the student and the issuer is the filer (eligible educational institution or insurer). *Required:* at least one amount above zero (Boxes 1, 4, 5, 6 or 10). Amounts can't be negative; Boxes 4 and 6 are reductions of prior-year amounts, entered as positive numbers. Boxes 2 and 3 are reserved by the IRS. Form 1098-T has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1098T { + public static final String SERIALIZED_NAME_PAYMENTS_RECEIVED_FOR_QUALIFIED_TUITION_AND_RELATED_EXPENSES = "paymentsReceivedForQualifiedTuitionAndRelatedExpenses"; + @SerializedName(SERIALIZED_NAME_PAYMENTS_RECEIVED_FOR_QUALIFIED_TUITION_AND_RELATED_EXPENSES) + private Double paymentsReceivedForQualifiedTuitionAndRelatedExpenses; + + public static final String SERIALIZED_NAME_ADJUSTMENTS_MADE_FOR_PRIOR_YEAR = "adjustmentsMadeForPriorYear"; + @SerializedName(SERIALIZED_NAME_ADJUSTMENTS_MADE_FOR_PRIOR_YEAR) + private Double adjustmentsMadeForPriorYear; + + public static final String SERIALIZED_NAME_SCHOLARSHIPS_OR_GRANTS = "scholarshipsOrGrants"; + @SerializedName(SERIALIZED_NAME_SCHOLARSHIPS_OR_GRANTS) + private Double scholarshipsOrGrants; + + public static final String SERIALIZED_NAME_ADJUSTMENTS_TO_SCHOLARSHIPS_OR_GRANTS_FOR_PRIOR_YEAR = "adjustmentsToScholarshipsOrGrantsForPriorYear"; + @SerializedName(SERIALIZED_NAME_ADJUSTMENTS_TO_SCHOLARSHIPS_OR_GRANTS_FOR_PRIOR_YEAR) + private Double adjustmentsToScholarshipsOrGrantsForPriorYear; + + public static final String SERIALIZED_NAME_INCLUDES_AMOUNTS_FOR_ACADEMIC_PERIOD_BEGINNING_NEXT_YEAR_INDICATOR = "includesAmountsForAcademicPeriodBeginningNextYearIndicator"; + @SerializedName(SERIALIZED_NAME_INCLUDES_AMOUNTS_FOR_ACADEMIC_PERIOD_BEGINNING_NEXT_YEAR_INDICATOR) + private Boolean includesAmountsForAcademicPeriodBeginningNextYearIndicator; + + public static final String SERIALIZED_NAME_AT_LEAST_HALF_TIME_STUDENT_INDICATOR = "atLeastHalfTimeStudentIndicator"; + @SerializedName(SERIALIZED_NAME_AT_LEAST_HALF_TIME_STUDENT_INDICATOR) + private Boolean atLeastHalfTimeStudentIndicator; + + public static final String SERIALIZED_NAME_GRADUATE_STUDENT_INDICATOR = "graduateStudentIndicator"; + @SerializedName(SERIALIZED_NAME_GRADUATE_STUDENT_INDICATOR) + private Boolean graduateStudentIndicator; + + public static final String SERIALIZED_NAME_INSURANCE_CONTRACT_REIMBURSEMENTS_OR_REFUNDS = "insuranceContractReimbursementsOrRefunds"; + @SerializedName(SERIALIZED_NAME_INSURANCE_CONTRACT_REIMBURSEMENTS_OR_REFUNDS) + private Double insuranceContractReimbursementsOrRefunds; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1098_T("1098-T"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_INT("1099-INT"), + + _1099_K("1099-K"), + + _1099_MISC("1099-MISC"), + + _1099_NEC("1099-NEC"), + + _1099_PATR("1099-PATR"), + + _1099_R("1099-R"), + + _1099_S("1099-S"), + + _1099_SA("1099-SA"), + + W_2("W-2"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + 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_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; + + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + 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; + + /** + * Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"), + + INDIVIDUAL("INDIVIDUAL"), + + BUSINESS("BUSINESS"), + + UNKNOWN("UNKNOWN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; + @SerializedName(SERIALIZED_NAME_TIN_TYPE) + private TinTypeEnum tinType; + + public static final String SERIALIZED_NAME_BUSINESS_NAME = "businessName"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME) + private String businessName; + + public static final String SERIALIZED_NAME_BUSINESS_NAME2 = "businessName2"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME2) + private String businessName2; + + 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_SUFFIX_NAME = "suffixName"; + @SerializedName(SERIALIZED_NAME_SUFFIX_NAME) + private String suffixName; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @Deprecated + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + 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_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public Form1098T() { + } + + public Form1098T( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1098T paymentsReceivedForQualifiedTuitionAndRelatedExpenses(Double paymentsReceivedForQualifiedTuitionAndRelatedExpenses) { + this.paymentsReceivedForQualifiedTuitionAndRelatedExpenses = paymentsReceivedForQualifiedTuitionAndRelatedExpenses; + return this; + } + + /** + * Payments received for qualified tuition and related expenses + * @return paymentsReceivedForQualifiedTuitionAndRelatedExpenses + */ + @javax.annotation.Nullable + public Double getPaymentsReceivedForQualifiedTuitionAndRelatedExpenses() { + return paymentsReceivedForQualifiedTuitionAndRelatedExpenses; + } + + public void setPaymentsReceivedForQualifiedTuitionAndRelatedExpenses(Double paymentsReceivedForQualifiedTuitionAndRelatedExpenses) { + this.paymentsReceivedForQualifiedTuitionAndRelatedExpenses = paymentsReceivedForQualifiedTuitionAndRelatedExpenses; + } + + + public Form1098T adjustmentsMadeForPriorYear(Double adjustmentsMadeForPriorYear) { + this.adjustmentsMadeForPriorYear = adjustmentsMadeForPriorYear; + return this; + } + + /** + * Adjustments made for a prior year + * @return adjustmentsMadeForPriorYear + */ + @javax.annotation.Nullable + public Double getAdjustmentsMadeForPriorYear() { + return adjustmentsMadeForPriorYear; + } + + public void setAdjustmentsMadeForPriorYear(Double adjustmentsMadeForPriorYear) { + this.adjustmentsMadeForPriorYear = adjustmentsMadeForPriorYear; + } + + + public Form1098T scholarshipsOrGrants(Double scholarshipsOrGrants) { + this.scholarshipsOrGrants = scholarshipsOrGrants; + return this; + } + + /** + * Scholarships or grants + * @return scholarshipsOrGrants + */ + @javax.annotation.Nullable + public Double getScholarshipsOrGrants() { + return scholarshipsOrGrants; + } + + public void setScholarshipsOrGrants(Double scholarshipsOrGrants) { + this.scholarshipsOrGrants = scholarshipsOrGrants; + } + + + public Form1098T adjustmentsToScholarshipsOrGrantsForPriorYear(Double adjustmentsToScholarshipsOrGrantsForPriorYear) { + this.adjustmentsToScholarshipsOrGrantsForPriorYear = adjustmentsToScholarshipsOrGrantsForPriorYear; + return this; + } + + /** + * Adjustments to scholarships or grants for a prior year + * @return adjustmentsToScholarshipsOrGrantsForPriorYear + */ + @javax.annotation.Nullable + public Double getAdjustmentsToScholarshipsOrGrantsForPriorYear() { + return adjustmentsToScholarshipsOrGrantsForPriorYear; + } + + public void setAdjustmentsToScholarshipsOrGrantsForPriorYear(Double adjustmentsToScholarshipsOrGrantsForPriorYear) { + this.adjustmentsToScholarshipsOrGrantsForPriorYear = adjustmentsToScholarshipsOrGrantsForPriorYear; + } + + + public Form1098T includesAmountsForAcademicPeriodBeginningNextYearIndicator(Boolean includesAmountsForAcademicPeriodBeginningNextYearIndicator) { + this.includesAmountsForAcademicPeriodBeginningNextYearIndicator = includesAmountsForAcademicPeriodBeginningNextYearIndicator; + return this; + } + + /** + * If checked, the amount in Box 1 includes amounts for an academic period beginning January through March of the next year + * @return includesAmountsForAcademicPeriodBeginningNextYearIndicator + */ + @javax.annotation.Nullable + public Boolean getIncludesAmountsForAcademicPeriodBeginningNextYearIndicator() { + return includesAmountsForAcademicPeriodBeginningNextYearIndicator; + } + + public void setIncludesAmountsForAcademicPeriodBeginningNextYearIndicator(Boolean includesAmountsForAcademicPeriodBeginningNextYearIndicator) { + this.includesAmountsForAcademicPeriodBeginningNextYearIndicator = includesAmountsForAcademicPeriodBeginningNextYearIndicator; + } + + + public Form1098T atLeastHalfTimeStudentIndicator(Boolean atLeastHalfTimeStudentIndicator) { + this.atLeastHalfTimeStudentIndicator = atLeastHalfTimeStudentIndicator; + return this; + } + + /** + * If checked, the student was at least a half-time student during any academic period that began in the tax year + * @return atLeastHalfTimeStudentIndicator + */ + @javax.annotation.Nullable + public Boolean getAtLeastHalfTimeStudentIndicator() { + return atLeastHalfTimeStudentIndicator; + } + + public void setAtLeastHalfTimeStudentIndicator(Boolean atLeastHalfTimeStudentIndicator) { + this.atLeastHalfTimeStudentIndicator = atLeastHalfTimeStudentIndicator; + } + + + public Form1098T graduateStudentIndicator(Boolean graduateStudentIndicator) { + this.graduateStudentIndicator = graduateStudentIndicator; + return this; + } + + /** + * If checked, the student was enrolled in a program leading to a graduate degree, certificate or credential + * @return graduateStudentIndicator + */ + @javax.annotation.Nullable + public Boolean getGraduateStudentIndicator() { + return graduateStudentIndicator; + } + + public void setGraduateStudentIndicator(Boolean graduateStudentIndicator) { + this.graduateStudentIndicator = graduateStudentIndicator; + } + + + public Form1098T insuranceContractReimbursementsOrRefunds(Double insuranceContractReimbursementsOrRefunds) { + this.insuranceContractReimbursementsOrRefunds = insuranceContractReimbursementsOrRefunds; + return this; + } + + /** + * Insurance contract reimbursements or refunds (insurers only) + * @return insuranceContractReimbursementsOrRefunds + */ + @javax.annotation.Nullable + public Double getInsuranceContractReimbursementsOrRefunds() { + return insuranceContractReimbursementsOrRefunds; + } + + public void setInsuranceContractReimbursementsOrRefunds(Double insuranceContractReimbursementsOrRefunds) { + this.insuranceContractReimbursementsOrRefunds = insuranceContractReimbursementsOrRefunds; + } + + + public Form1098T type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Form type. + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Form ID. Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + + public Form1098T issuerId(String issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Issuer ID - only required when creating forms + * @return issuerId + */ + @javax.annotation.Nullable + public String getIssuerId() { + return issuerId; + } + + public void setIssuerId(String issuerId) { + this.issuerId = issuerId; + } + + + public Form1098T issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Issuer Reference ID - only required when creating forms via $bulk-upsert + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1098T issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Issuer TIN - readonly + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1098T taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Tax Year - only required when creating forms via $bulk-upsert + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1098T referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1098T tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Recipient's Federal Tax Identification Number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + @Deprecated + public Form1098T recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. + * @return recipientName + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + @Deprecated + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1098T 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 Form1098T 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 Form1098T 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 Form1098T state(String state) { + this.state = state; + return this; + } + + /** + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1098T 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 Form1098T email(String email) { + this.email = email; + return this; + } + + /** + * Recipient's Contact email address. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1098T nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Province or region for non-US/CA addresses. + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1098T countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1098T federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; + return this; + } + + /** + * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. + * @return federalEfileDate + */ + @javax.annotation.Nullable + public LocalDate getFederalEfileDate() { + return federalEfileDate; + } + + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; + } + + + public Form1098T 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 Form1098T stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; + return this; + } + + /** + * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. + * @return stateEfileDate + */ + @javax.annotation.Nullable + public LocalDate getStateEfileDate() { + return stateEfileDate; + } + + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; + } + + + public Form1098T recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; + return this; + } + + /** + * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. + * @return recipientEdeliveryDate + */ + @javax.annotation.Nullable + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; + } + + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; + } + + + public Form1098T 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 Form1098T 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 Form1098T stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * State and local withholding information + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + /** + * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; + } + + + + /** + * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + + + /** + * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered + * @return postalMailStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + + + /** + * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + + + /** + * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + /** + * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + + + /** + * Validation errors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + + + /** + * Date time when the record was created. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + /** + * Date time when the record was last updated. + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + public Form1098T tinType(TinTypeEnum tinType) { + this.tinType = tinType; + return this; + } + + /** + * Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; + } + + + public Form1098T businessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** + * Business name. Required when the recipient of the form is a business; should only be used for businesses. + * @return businessName + */ + @javax.annotation.Nullable + public String getBusinessName() { + return businessName; + } + + public void setBusinessName(String businessName) { + this.businessName = businessName; + } + + + public Form1098T businessName2(String businessName2) { + this.businessName2 = businessName2; + return this; + } + + /** + * Business name line 2. Should only be used for businesses. + * @return businessName2 + */ + @javax.annotation.Nullable + public String getBusinessName2() { + return businessName2; + } + + public void setBusinessName2(String businessName2) { + this.businessName2 = businessName2; + } + + + public Form1098T firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * First name. Required when the recipient of the form is an individual; should only be used for individuals. + * @return firstName + */ + @javax.annotation.Nullable + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + public Form1098T middleName(String middleName) { + this.middleName = middleName; + return this; + } + + /** + * Middle name. Should only be used for individuals. + * @return middleName + */ + @javax.annotation.Nullable + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + + public Form1098T lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Last name. Required when the recipient of the form is an individual; should only be used for individuals. + * @return lastName + */ + @javax.annotation.Nullable + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + + public Form1098T suffixName(String suffixName) { + this.suffixName = suffixName; + return this; + } + + /** + * Suffix name. Should only be used for individuals. + * @return suffixName + */ + @javax.annotation.Nullable + public String getSuffixName() { + return suffixName; + } + + public void setSuffixName(String suffixName) { + this.suffixName = suffixName; + } + + + @Deprecated + public Form1098T recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * DEPRECATED: Use `businessName2` instead. + * @return recipientSecondName + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + @Deprecated + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1098T 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 Form1098T 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 Form1098T 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 Form1098T secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Second TIN notice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Form1098T instance itself + */ + public Form1098T putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1098T form1098T = (Form1098T) o; + return Objects.equals(this.paymentsReceivedForQualifiedTuitionAndRelatedExpenses, form1098T.paymentsReceivedForQualifiedTuitionAndRelatedExpenses) && + Objects.equals(this.adjustmentsMadeForPriorYear, form1098T.adjustmentsMadeForPriorYear) && + Objects.equals(this.scholarshipsOrGrants, form1098T.scholarshipsOrGrants) && + Objects.equals(this.adjustmentsToScholarshipsOrGrantsForPriorYear, form1098T.adjustmentsToScholarshipsOrGrantsForPriorYear) && + Objects.equals(this.includesAmountsForAcademicPeriodBeginningNextYearIndicator, form1098T.includesAmountsForAcademicPeriodBeginningNextYearIndicator) && + Objects.equals(this.atLeastHalfTimeStudentIndicator, form1098T.atLeastHalfTimeStudentIndicator) && + Objects.equals(this.graduateStudentIndicator, form1098T.graduateStudentIndicator) && + Objects.equals(this.insuranceContractReimbursementsOrRefunds, form1098T.insuranceContractReimbursementsOrRefunds) && + Objects.equals(this.type, form1098T.type) && + Objects.equals(this.id, form1098T.id) && + Objects.equals(this.issuerId, form1098T.issuerId) && + Objects.equals(this.issuerReferenceId, form1098T.issuerReferenceId) && + Objects.equals(this.issuerTin, form1098T.issuerTin) && + Objects.equals(this.taxYear, form1098T.taxYear) && + Objects.equals(this.referenceId, form1098T.referenceId) && + Objects.equals(this.tin, form1098T.tin) && + Objects.equals(this.recipientName, form1098T.recipientName) && + Objects.equals(this.address, form1098T.address) && + Objects.equals(this.address2, form1098T.address2) && + Objects.equals(this.city, form1098T.city) && + Objects.equals(this.state, form1098T.state) && + Objects.equals(this.zip, form1098T.zip) && + Objects.equals(this.email, form1098T.email) && + Objects.equals(this.nonUsProvince, form1098T.nonUsProvince) && + Objects.equals(this.countryCode, form1098T.countryCode) && + Objects.equals(this.federalEfileDate, form1098T.federalEfileDate) && + Objects.equals(this.postalMail, form1098T.postalMail) && + Objects.equals(this.stateEfileDate, form1098T.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1098T.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1098T.tinMatch) && + Objects.equals(this.addressVerification, form1098T.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1098T.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form1098T.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1098T.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1098T.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1098T.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1098T.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1098T.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1098T.validationErrors) && + Objects.equals(this.createdAt, form1098T.createdAt) && + Objects.equals(this.updatedAt, form1098T.updatedAt) && + Objects.equals(this.tinType, form1098T.tinType) && + Objects.equals(this.businessName, form1098T.businessName) && + Objects.equals(this.businessName2, form1098T.businessName2) && + Objects.equals(this.firstName, form1098T.firstName) && + Objects.equals(this.middleName, form1098T.middleName) && + Objects.equals(this.lastName, form1098T.lastName) && + Objects.equals(this.suffixName, form1098T.suffixName) && + Objects.equals(this.recipientSecondName, form1098T.recipientSecondName) && + Objects.equals(this.accountNumber, form1098T.accountNumber) && + Objects.equals(this.officeCode, form1098T.officeCode) && + Objects.equals(this.noTin, form1098T.noTin) && + Objects.equals(this.secondTinNotice, form1098T.secondTinNotice)&& + Objects.equals(this.additionalProperties, form1098T.additionalProperties); + } + + 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(paymentsReceivedForQualifiedTuitionAndRelatedExpenses, adjustmentsMadeForPriorYear, scholarshipsOrGrants, adjustmentsToScholarshipsOrGrantsForPriorYear, includesAmountsForAcademicPeriodBeginningNextYearIndicator, atLeastHalfTimeStudentIndicator, graduateStudentIndicator, insuranceContractReimbursementsOrRefunds, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, address, address2, city, state, zip, email, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, addressVerification, stateAndLocalWithholding, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, tinType, businessName, businessName2, firstName, middleName, lastName, suffixName, recipientSecondName, accountNumber, officeCode, noTin, secondTinNotice, additionalProperties); + } + + 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 Form1098T {\n"); + sb.append(" paymentsReceivedForQualifiedTuitionAndRelatedExpenses: ").append(toIndentedString(paymentsReceivedForQualifiedTuitionAndRelatedExpenses)).append("\n"); + sb.append(" adjustmentsMadeForPriorYear: ").append(toIndentedString(adjustmentsMadeForPriorYear)).append("\n"); + sb.append(" scholarshipsOrGrants: ").append(toIndentedString(scholarshipsOrGrants)).append("\n"); + sb.append(" adjustmentsToScholarshipsOrGrantsForPriorYear: ").append(toIndentedString(adjustmentsToScholarshipsOrGrantsForPriorYear)).append("\n"); + sb.append(" includesAmountsForAcademicPeriodBeginningNextYearIndicator: ").append(toIndentedString(includesAmountsForAcademicPeriodBeginningNextYearIndicator)).append("\n"); + sb.append(" atLeastHalfTimeStudentIndicator: ").append(toIndentedString(atLeastHalfTimeStudentIndicator)).append("\n"); + sb.append(" graduateStudentIndicator: ").append(toIndentedString(graduateStudentIndicator)).append("\n"); + sb.append(" insuranceContractReimbursementsOrRefunds: ").append(toIndentedString(insuranceContractReimbursementsOrRefunds)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).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(" 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(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).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(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).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(" suffixName: ").append(toIndentedString(suffixName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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("id"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("referenceId"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("tinType"); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffixName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + 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 Form1098T + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1098T.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1098T is not found in the empty JSON string", Form1098T.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1098T.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").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 required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + 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("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("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + if (jsonObj.get("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)); + }; + } + } + 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("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("businessName2") != null && !jsonObj.get("businessName2").isJsonNull()) && !jsonObj.get("businessName2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessName2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessName2").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("suffixName") != null && !jsonObj.get("suffixName").isJsonNull()) && !jsonObj.get("suffixName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffixName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffixName").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("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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1098T.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1098T' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1098T.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1098T value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Form1098T read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form1098T instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1098T given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1098T + * @throws IOException if the JSON string is invalid with respect to Form1098T + */ + public static Form1098T fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1098T.class); + } + + /** + * Convert an instance of Form1098T 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/Form1099Base.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java index 58820d1..518f2be 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java @@ -79,6 +79,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -97,6 +99,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java index f7a3ede..238db4b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java @@ -173,6 +173,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -191,6 +193,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java index cf8cdf3..cca2481 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java @@ -155,6 +155,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -173,6 +175,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java index 0f7bbc5..c732d3e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java @@ -139,6 +139,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -157,6 +159,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java index 3be160a..f4a7812 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java @@ -263,6 +263,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -281,6 +283,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java index bbb4bb8..96b4b72 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java @@ -61,7 +61,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099ListRequest { /** - * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `W-2` + * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1098-T` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `1099-SA` * `W-2` */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { @@ -73,6 +73,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -91,6 +93,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; @@ -153,7 +157,7 @@ public Form1099ListRequest type(TypeEnum type) { } /** - * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `W-2` + * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1098-T` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `1099-SA` * `W-2` * @return type */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java index fad3c01..0174dbb 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java @@ -139,6 +139,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -157,6 +159,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java index c20804f..8b57e90 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java @@ -95,6 +95,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -113,6 +115,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java index cff3b92..2341092 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java @@ -131,6 +131,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -149,6 +151,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java index 8947b69..aa4bc25 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java @@ -373,6 +373,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -391,6 +393,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java index 0aa70c9..79b1f96 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java @@ -103,6 +103,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -121,6 +123,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Sa.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Sa.java new file mode 100644 index 0000000..fd2063d --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Sa.java @@ -0,0 +1,1940 @@ +/* + * 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 + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.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; + +/** + * Form 1099-SA: Distributions From an HSA, Archer MSA, or Medicare Advantage MSA The recipient is the account holder and the issuer is the trustee (payer). *Required:* Gross Distribution, Distribution Code, and exactly one of the three account type indicators (HSA, Archer MSA, Medicare Advantage MSA). Form 1099-SA has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099Sa { + public static final String SERIALIZED_NAME_GROSS_DISTRIBUTION = "grossDistribution"; + @SerializedName(SERIALIZED_NAME_GROSS_DISTRIBUTION) + private Double grossDistribution; + + public static final String SERIALIZED_NAME_EARNINGS_ON_EXCESS_CONTRIBUTIONS = "earningsOnExcessContributions"; + @SerializedName(SERIALIZED_NAME_EARNINGS_ON_EXCESS_CONTRIBUTIONS) + private Double earningsOnExcessContributions; + + /** + * Distribution code. * `1` - Normal distributions * `2` - Excess contributions * `3` - Disability * `4` - Death distribution other than code 6 * `5` - Prohibited transaction * `6` - Death distribution after year of death to a nonspouse beneficiary + */ + @JsonAdapter(DistributionCodeEnum.Adapter.class) + public enum DistributionCodeEnum { + _1("1"), + + _2("2"), + + _3("3"), + + _4("4"), + + _5("5"), + + _6("6"); + + private String value; + + DistributionCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DistributionCodeEnum fromValue(String value) { + for (DistributionCodeEnum b : DistributionCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DistributionCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DistributionCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DistributionCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DistributionCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_DISTRIBUTION_CODE = "distributionCode"; + @SerializedName(SERIALIZED_NAME_DISTRIBUTION_CODE) + private DistributionCodeEnum distributionCode; + + public static final String SERIALIZED_NAME_FAIR_MARKET_VALUE_ON_DATE_OF_DEATH = "fairMarketValueOnDateOfDeath"; + @SerializedName(SERIALIZED_NAME_FAIR_MARKET_VALUE_ON_DATE_OF_DEATH) + private Double fairMarketValueOnDateOfDeath; + + public static final String SERIALIZED_NAME_HSA_INDICATOR = "hsaIndicator"; + @SerializedName(SERIALIZED_NAME_HSA_INDICATOR) + private Boolean hsaIndicator; + + public static final String SERIALIZED_NAME_ARCHER_MSA_INDICATOR = "archerMsaIndicator"; + @SerializedName(SERIALIZED_NAME_ARCHER_MSA_INDICATOR) + private Boolean archerMsaIndicator; + + public static final String SERIALIZED_NAME_MEDICARE_ADVANTAGE_MSA_INDICATOR = "medicareAdvantageMsaIndicator"; + @SerializedName(SERIALIZED_NAME_MEDICARE_ADVANTAGE_MSA_INDICATOR) + private Boolean medicareAdvantageMsaIndicator; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1098_T("1098-T"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_INT("1099-INT"), + + _1099_K("1099-K"), + + _1099_MISC("1099-MISC"), + + _1099_NEC("1099-NEC"), + + _1099_PATR("1099-PATR"), + + _1099_R("1099-R"), + + _1099_S("1099-S"), + + _1099_SA("1099-SA"), + + W_2("W-2"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + 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_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; + + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + 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; + + /** + * Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"), + + INDIVIDUAL("INDIVIDUAL"), + + BUSINESS("BUSINESS"), + + UNKNOWN("UNKNOWN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; + @SerializedName(SERIALIZED_NAME_TIN_TYPE) + private TinTypeEnum tinType; + + public static final String SERIALIZED_NAME_BUSINESS_NAME = "businessName"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME) + private String businessName; + + public static final String SERIALIZED_NAME_BUSINESS_NAME2 = "businessName2"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME2) + private String businessName2; + + 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_SUFFIX_NAME = "suffixName"; + @SerializedName(SERIALIZED_NAME_SUFFIX_NAME) + private String suffixName; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @Deprecated + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + 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_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public Form1099Sa() { + } + + public Form1099Sa( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public Form1099Sa grossDistribution(Double grossDistribution) { + this.grossDistribution = grossDistribution; + return this; + } + + /** + * Gross distribution + * @return grossDistribution + */ + @javax.annotation.Nullable + public Double getGrossDistribution() { + return grossDistribution; + } + + public void setGrossDistribution(Double grossDistribution) { + this.grossDistribution = grossDistribution; + } + + + public Form1099Sa earningsOnExcessContributions(Double earningsOnExcessContributions) { + this.earningsOnExcessContributions = earningsOnExcessContributions; + return this; + } + + /** + * Earnings on excess contributions + * @return earningsOnExcessContributions + */ + @javax.annotation.Nullable + public Double getEarningsOnExcessContributions() { + return earningsOnExcessContributions; + } + + public void setEarningsOnExcessContributions(Double earningsOnExcessContributions) { + this.earningsOnExcessContributions = earningsOnExcessContributions; + } + + + public Form1099Sa distributionCode(DistributionCodeEnum distributionCode) { + this.distributionCode = distributionCode; + return this; + } + + /** + * Distribution code. * `1` - Normal distributions * `2` - Excess contributions * `3` - Disability * `4` - Death distribution other than code 6 * `5` - Prohibited transaction * `6` - Death distribution after year of death to a nonspouse beneficiary + * @return distributionCode + */ + @javax.annotation.Nullable + public DistributionCodeEnum getDistributionCode() { + return distributionCode; + } + + public void setDistributionCode(DistributionCodeEnum distributionCode) { + this.distributionCode = distributionCode; + } + + + public Form1099Sa fairMarketValueOnDateOfDeath(Double fairMarketValueOnDateOfDeath) { + this.fairMarketValueOnDateOfDeath = fairMarketValueOnDateOfDeath; + return this; + } + + /** + * Fair market value (FMV) of the account on the date of death + * @return fairMarketValueOnDateOfDeath + */ + @javax.annotation.Nullable + public Double getFairMarketValueOnDateOfDeath() { + return fairMarketValueOnDateOfDeath; + } + + public void setFairMarketValueOnDateOfDeath(Double fairMarketValueOnDateOfDeath) { + this.fairMarketValueOnDateOfDeath = fairMarketValueOnDateOfDeath; + } + + + public Form1099Sa hsaIndicator(Boolean hsaIndicator) { + this.hsaIndicator = hsaIndicator; + return this; + } + + /** + * If checked, the account is a health savings account (HSA). Exactly one account type indicator must be checked. + * @return hsaIndicator + */ + @javax.annotation.Nullable + public Boolean getHsaIndicator() { + return hsaIndicator; + } + + public void setHsaIndicator(Boolean hsaIndicator) { + this.hsaIndicator = hsaIndicator; + } + + + public Form1099Sa archerMsaIndicator(Boolean archerMsaIndicator) { + this.archerMsaIndicator = archerMsaIndicator; + return this; + } + + /** + * If checked, the account is an Archer medical savings account (MSA). Exactly one account type indicator must be checked. + * @return archerMsaIndicator + */ + @javax.annotation.Nullable + public Boolean getArcherMsaIndicator() { + return archerMsaIndicator; + } + + public void setArcherMsaIndicator(Boolean archerMsaIndicator) { + this.archerMsaIndicator = archerMsaIndicator; + } + + + public Form1099Sa medicareAdvantageMsaIndicator(Boolean medicareAdvantageMsaIndicator) { + this.medicareAdvantageMsaIndicator = medicareAdvantageMsaIndicator; + return this; + } + + /** + * If checked, the account is a Medicare Advantage MSA. Exactly one account type indicator must be checked. + * @return medicareAdvantageMsaIndicator + */ + @javax.annotation.Nullable + public Boolean getMedicareAdvantageMsaIndicator() { + return medicareAdvantageMsaIndicator; + } + + public void setMedicareAdvantageMsaIndicator(Boolean medicareAdvantageMsaIndicator) { + this.medicareAdvantageMsaIndicator = medicareAdvantageMsaIndicator; + } + + + public Form1099Sa type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Form type. + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + /** + * Form ID. Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + + + public Form1099Sa issuerId(String issuerId) { + this.issuerId = issuerId; + return this; + } + + /** + * Issuer ID - only required when creating forms + * @return issuerId + */ + @javax.annotation.Nullable + public String getIssuerId() { + return issuerId; + } + + public void setIssuerId(String issuerId) { + this.issuerId = issuerId; + } + + + public Form1099Sa issuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + return this; + } + + /** + * Issuer Reference ID - only required when creating forms via $bulk-upsert + * @return issuerReferenceId + */ + @javax.annotation.Nullable + public String getIssuerReferenceId() { + return issuerReferenceId; + } + + public void setIssuerReferenceId(String issuerReferenceId) { + this.issuerReferenceId = issuerReferenceId; + } + + + public Form1099Sa issuerTin(String issuerTin) { + this.issuerTin = issuerTin; + return this; + } + + /** + * Issuer TIN - readonly + * @return issuerTin + */ + @javax.annotation.Nullable + public String getIssuerTin() { + return issuerTin; + } + + public void setIssuerTin(String issuerTin) { + this.issuerTin = issuerTin; + } + + + public Form1099Sa taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Tax Year - only required when creating forms via $bulk-upsert + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public Form1099Sa referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Internal reference ID. Never shown to any agency or recipient. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public Form1099Sa tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Recipient's Federal Tax Identification Number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + @Deprecated + public Form1099Sa recipientName(String recipientName) { + this.recipientName = recipientName; + return this; + } + + /** + * DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. + * @return recipientName + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public String getRecipientName() { + return recipientName; + } + + @Deprecated + public void setRecipientName(String recipientName) { + this.recipientName = recipientName; + } + + + public Form1099Sa 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 Form1099Sa 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 Form1099Sa 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 Form1099Sa state(String state) { + this.state = state; + return this; + } + + /** + * Two-letter US state or Canadian province code (required for US/CA addresses). + * @return state + */ + @javax.annotation.Nullable + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + + public Form1099Sa 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 Form1099Sa email(String email) { + this.email = email; + return this; + } + + /** + * Recipient's Contact email address. + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public Form1099Sa nonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + return this; + } + + /** + * Province or region for non-US/CA addresses. + * @return nonUsProvince + */ + @javax.annotation.Nullable + public String getNonUsProvince() { + return nonUsProvince; + } + + public void setNonUsProvince(String nonUsProvince) { + this.nonUsProvince = nonUsProvince; + } + + + public Form1099Sa countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public Form1099Sa federalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; + return this; + } + + /** + * Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. + * @return federalEfileDate + */ + @javax.annotation.Nullable + public LocalDate getFederalEfileDate() { + return federalEfileDate; + } + + public void setFederalEfileDate(LocalDate federalEfileDate) { + this.federalEfileDate = federalEfileDate; + } + + + public Form1099Sa 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 Form1099Sa stateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; + return this; + } + + /** + * Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. + * @return stateEfileDate + */ + @javax.annotation.Nullable + public LocalDate getStateEfileDate() { + return stateEfileDate; + } + + public void setStateEfileDate(LocalDate stateEfileDate) { + this.stateEfileDate = stateEfileDate; + } + + + public Form1099Sa recipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; + return this; + } + + /** + * Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. + * @return recipientEdeliveryDate + */ + @javax.annotation.Nullable + public LocalDate getRecipientEdeliveryDate() { + return recipientEdeliveryDate; + } + + public void setRecipientEdeliveryDate(LocalDate recipientEdeliveryDate) { + this.recipientEdeliveryDate = recipientEdeliveryDate; + } + + + public Form1099Sa 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 Form1099Sa 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 Form1099Sa stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * State and local withholding information + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + /** + * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; + } + + + + /** + * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + + + /** + * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered + * @return postalMailStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + + + /** + * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + + + /** + * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + /** + * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + + + /** + * Validation errors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + + + /** + * Date time when the record was created. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + /** + * Date time when the record was last updated. + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + public Form1099Sa tinType(TinTypeEnum tinType) { + this.tinType = tinType; + return this; + } + + /** + * Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; + } + + + public Form1099Sa businessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** + * Business name. Required when the recipient of the form is a business; should only be used for businesses. + * @return businessName + */ + @javax.annotation.Nullable + public String getBusinessName() { + return businessName; + } + + public void setBusinessName(String businessName) { + this.businessName = businessName; + } + + + public Form1099Sa businessName2(String businessName2) { + this.businessName2 = businessName2; + return this; + } + + /** + * Business name line 2. Should only be used for businesses. + * @return businessName2 + */ + @javax.annotation.Nullable + public String getBusinessName2() { + return businessName2; + } + + public void setBusinessName2(String businessName2) { + this.businessName2 = businessName2; + } + + + public Form1099Sa firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * First name. Required when the recipient of the form is an individual; should only be used for individuals. + * @return firstName + */ + @javax.annotation.Nullable + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + public Form1099Sa middleName(String middleName) { + this.middleName = middleName; + return this; + } + + /** + * Middle name. Should only be used for individuals. + * @return middleName + */ + @javax.annotation.Nullable + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + + public Form1099Sa lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Last name. Required when the recipient of the form is an individual; should only be used for individuals. + * @return lastName + */ + @javax.annotation.Nullable + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + + public Form1099Sa suffixName(String suffixName) { + this.suffixName = suffixName; + return this; + } + + /** + * Suffix name. Should only be used for individuals. + * @return suffixName + */ + @javax.annotation.Nullable + public String getSuffixName() { + return suffixName; + } + + public void setSuffixName(String suffixName) { + this.suffixName = suffixName; + } + + + @Deprecated + public Form1099Sa recipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + return this; + } + + /** + * DEPRECATED: Use `businessName2` instead. + * @return recipientSecondName + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public String getRecipientSecondName() { + return recipientSecondName; + } + + @Deprecated + public void setRecipientSecondName(String recipientSecondName) { + this.recipientSecondName = recipientSecondName; + } + + + public Form1099Sa 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 Form1099Sa 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 Form1099Sa 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 Form1099Sa secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Second TIN notice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Form1099Sa instance itself + */ + public Form1099Sa putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099Sa form1099Sa = (Form1099Sa) o; + return Objects.equals(this.grossDistribution, form1099Sa.grossDistribution) && + Objects.equals(this.earningsOnExcessContributions, form1099Sa.earningsOnExcessContributions) && + Objects.equals(this.distributionCode, form1099Sa.distributionCode) && + Objects.equals(this.fairMarketValueOnDateOfDeath, form1099Sa.fairMarketValueOnDateOfDeath) && + Objects.equals(this.hsaIndicator, form1099Sa.hsaIndicator) && + Objects.equals(this.archerMsaIndicator, form1099Sa.archerMsaIndicator) && + Objects.equals(this.medicareAdvantageMsaIndicator, form1099Sa.medicareAdvantageMsaIndicator) && + Objects.equals(this.type, form1099Sa.type) && + Objects.equals(this.id, form1099Sa.id) && + Objects.equals(this.issuerId, form1099Sa.issuerId) && + Objects.equals(this.issuerReferenceId, form1099Sa.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099Sa.issuerTin) && + Objects.equals(this.taxYear, form1099Sa.taxYear) && + Objects.equals(this.referenceId, form1099Sa.referenceId) && + Objects.equals(this.tin, form1099Sa.tin) && + Objects.equals(this.recipientName, form1099Sa.recipientName) && + Objects.equals(this.address, form1099Sa.address) && + Objects.equals(this.address2, form1099Sa.address2) && + Objects.equals(this.city, form1099Sa.city) && + Objects.equals(this.state, form1099Sa.state) && + Objects.equals(this.zip, form1099Sa.zip) && + Objects.equals(this.email, form1099Sa.email) && + Objects.equals(this.nonUsProvince, form1099Sa.nonUsProvince) && + Objects.equals(this.countryCode, form1099Sa.countryCode) && + Objects.equals(this.federalEfileDate, form1099Sa.federalEfileDate) && + Objects.equals(this.postalMail, form1099Sa.postalMail) && + Objects.equals(this.stateEfileDate, form1099Sa.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099Sa.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099Sa.tinMatch) && + Objects.equals(this.addressVerification, form1099Sa.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099Sa.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form1099Sa.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099Sa.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099Sa.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099Sa.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099Sa.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099Sa.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1099Sa.validationErrors) && + Objects.equals(this.createdAt, form1099Sa.createdAt) && + Objects.equals(this.updatedAt, form1099Sa.updatedAt) && + Objects.equals(this.tinType, form1099Sa.tinType) && + Objects.equals(this.businessName, form1099Sa.businessName) && + Objects.equals(this.businessName2, form1099Sa.businessName2) && + Objects.equals(this.firstName, form1099Sa.firstName) && + Objects.equals(this.middleName, form1099Sa.middleName) && + Objects.equals(this.lastName, form1099Sa.lastName) && + Objects.equals(this.suffixName, form1099Sa.suffixName) && + Objects.equals(this.recipientSecondName, form1099Sa.recipientSecondName) && + Objects.equals(this.accountNumber, form1099Sa.accountNumber) && + Objects.equals(this.officeCode, form1099Sa.officeCode) && + Objects.equals(this.noTin, form1099Sa.noTin) && + Objects.equals(this.secondTinNotice, form1099Sa.secondTinNotice)&& + Objects.equals(this.additionalProperties, form1099Sa.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(grossDistribution, earningsOnExcessContributions, distributionCode, fairMarketValueOnDateOfDeath, hsaIndicator, archerMsaIndicator, medicareAdvantageMsaIndicator, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, address, address2, city, state, zip, email, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, addressVerification, stateAndLocalWithholding, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, tinType, businessName, businessName2, firstName, middleName, lastName, suffixName, recipientSecondName, accountNumber, officeCode, noTin, secondTinNotice, additionalProperties); + } + + 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 Form1099Sa {\n"); + sb.append(" grossDistribution: ").append(toIndentedString(grossDistribution)).append("\n"); + sb.append(" earningsOnExcessContributions: ").append(toIndentedString(earningsOnExcessContributions)).append("\n"); + sb.append(" distributionCode: ").append(toIndentedString(distributionCode)).append("\n"); + sb.append(" fairMarketValueOnDateOfDeath: ").append(toIndentedString(fairMarketValueOnDateOfDeath)).append("\n"); + sb.append(" hsaIndicator: ").append(toIndentedString(hsaIndicator)).append("\n"); + sb.append(" archerMsaIndicator: ").append(toIndentedString(archerMsaIndicator)).append("\n"); + sb.append(" medicareAdvantageMsaIndicator: ").append(toIndentedString(medicareAdvantageMsaIndicator)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).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(" 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(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).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(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).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(" suffixName: ").append(toIndentedString(suffixName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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("id"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("referenceId"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("tinType"); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffixName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("grossDistribution"); + openapiRequiredFields.add("distributionCode"); + openapiRequiredFields.add("type"); + 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 Form1099Sa + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099Sa.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099Sa is not found in the empty JSON string", Form1099Sa.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099Sa.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())); + } + // validate the required field `distributionCode` + DistributionCodeEnum.validateJsonElement(jsonObj.get("distributionCode")); + 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())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + 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("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("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + if (jsonObj.get("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)); + }; + } + } + 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("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("businessName2") != null && !jsonObj.get("businessName2").isJsonNull()) && !jsonObj.get("businessName2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessName2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessName2").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("suffixName") != null && !jsonObj.get("suffixName").isJsonNull()) && !jsonObj.get("suffixName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffixName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffixName").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("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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Form1099Sa.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099Sa' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099Sa.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099Sa value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Form1099Sa read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form1099Sa instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099Sa given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099Sa + * @throws IOException if the JSON string is invalid with respect to Form1099Sa + */ + public static Form1099Sa fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099Sa.class); + } + + /** + * Convert an instance of Form1099Sa 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/Form1099W2.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java index 1783de6..4a61ae3 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java @@ -203,6 +203,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -221,6 +223,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; 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 4287bd7..8473bfc 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java @@ -25,6 +25,7 @@ import Avalara.SDK.model.A1099.V2.Form1095B; import Avalara.SDK.model.A1099.V2.Form1095C; import Avalara.SDK.model.A1099.V2.Form1098; +import Avalara.SDK.model.A1099.V2.Form1098T; import Avalara.SDK.model.A1099.V2.Form1099C; import Avalara.SDK.model.A1099.V2.Form1099Div; import Avalara.SDK.model.A1099.V2.Form1099Int; @@ -34,6 +35,7 @@ import Avalara.SDK.model.A1099.V2.Form1099Patr; import Avalara.SDK.model.A1099.V2.Form1099R; import Avalara.SDK.model.A1099.V2.Form1099S; +import Avalara.SDK.model.A1099.V2.Form1099Sa; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.Form1099W2; import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; @@ -106,6 +108,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterForm1095B = gson.getDelegateAdapter(this, TypeToken.get(Form1095B.class)); final TypeAdapter adapterForm1095C = gson.getDelegateAdapter(this, TypeToken.get(Form1095C.class)); final TypeAdapter adapterForm1098 = gson.getDelegateAdapter(this, TypeToken.get(Form1098.class)); + final TypeAdapter adapterForm1098T = gson.getDelegateAdapter(this, TypeToken.get(Form1098T.class)); final TypeAdapter adapterForm1099C = gson.getDelegateAdapter(this, TypeToken.get(Form1099C.class)); final TypeAdapter adapterForm1099Div = gson.getDelegateAdapter(this, TypeToken.get(Form1099Div.class)); final TypeAdapter adapterForm1099Int = gson.getDelegateAdapter(this, TypeToken.get(Form1099Int.class)); @@ -115,6 +118,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterForm1099Patr = gson.getDelegateAdapter(this, TypeToken.get(Form1099Patr.class)); final TypeAdapter adapterForm1099R = gson.getDelegateAdapter(this, TypeToken.get(Form1099R.class)); final TypeAdapter adapterForm1099S = gson.getDelegateAdapter(this, TypeToken.get(Form1099S.class)); + final TypeAdapter adapterForm1099Sa = gson.getDelegateAdapter(this, TypeToken.get(Form1099Sa.class)); final TypeAdapter adapterForm1099W2 = gson.getDelegateAdapter(this, TypeToken.get(Form1099W2.class)); return (TypeAdapter) new TypeAdapter() { @@ -149,6 +153,12 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1098T` + if (value.getActualInstance() instanceof Form1098T) { + JsonElement element = adapterForm1098T.toJsonTree((Form1098T)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099C` if (value.getActualInstance() instanceof Form1099C) { JsonElement element = adapterForm1099C.toJsonTree((Form1099C)value.getActualInstance()); @@ -203,13 +213,19 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1099Sa` + if (value.getActualInstance() instanceof Form1099Sa) { + JsonElement element = adapterForm1099Sa.toJsonTree((Form1099Sa)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099W2` if (value.getActualInstance() instanceof Form1099W2) { JsonElement element = adapterForm1099W2.toJsonTree((Form1099W2)value.getActualInstance()); elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2"); } @Override @@ -269,6 +285,18 @@ public Get1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1098 failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1098'", e); } + // deserialize Form1098T + try { + // validate the JSON object to see if any exception is thrown + Form1098T.validateJsonElement(jsonElement); + actualAdapter = adapterForm1098T; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1098T'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1098T failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1098T'", e); + } // deserialize Form1099C try { // validate the JSON object to see if any exception is thrown @@ -377,6 +405,18 @@ public Get1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099S failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099S'", e); } + // deserialize Form1099Sa + try { + // validate the JSON object to see if any exception is thrown + Form1099Sa.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099Sa; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099Sa'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099Sa failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099Sa'", e); + } // deserialize Form1099W2 try { // validate the JSON object to see if any exception is thrown @@ -419,6 +459,7 @@ public Get1099Form200Response(Object o) { schemas.put("Form1095B", Form1095B.class); schemas.put("Form1095C", Form1095C.class); schemas.put("Form1098", Form1098.class); + schemas.put("Form1098T", Form1098T.class); schemas.put("Form1099C", Form1099C.class); schemas.put("Form1099Div", Form1099Div.class); schemas.put("Form1099Int", Form1099Int.class); @@ -428,6 +469,7 @@ public Get1099Form200Response(Object o) { schemas.put("Form1099Patr", Form1099Patr.class); schemas.put("Form1099R", Form1099R.class); schemas.put("Form1099S", Form1099S.class); + schemas.put("Form1099Sa", Form1099Sa.class); schemas.put("Form1099W2", Form1099W2.class); } @@ -439,7 +481,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2 + * Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2 * * It could be an instance of the 'oneOf' schemas. */ @@ -465,6 +507,11 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1098T) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099C) { super.setActualInstance(instance); return; @@ -510,19 +557,24 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1099Sa) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099W2) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2"); + throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2"); } /** * Get the actual instance, which can be the following: - * Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2 + * Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2 * - * @return The actual instance (Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2) + * @return The actual instance (Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2) */ @SuppressWarnings("unchecked") @Override @@ -570,6 +622,16 @@ public Form1095C getForm1095C() throws ClassCastException { public Form1098 getForm1098() throws ClassCastException { return (Form1098)super.getActualInstance(); } + /** + * Get the actual instance of `Form1098T`. If the actual instance is not `Form1098T`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1098T` + * @throws ClassCastException if the instance is not `Form1098T` + */ + public Form1098T getForm1098T() throws ClassCastException { + return (Form1098T)super.getActualInstance(); + } /** * Get the actual instance of `Form1099C`. If the actual instance is not `Form1099C`, * the ClassCastException will be thrown. @@ -660,6 +722,16 @@ public Form1099R getForm1099R() throws ClassCastException { public Form1099S getForm1099S() throws ClassCastException { return (Form1099S)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099Sa`. If the actual instance is not `Form1099Sa`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099Sa` + * @throws ClassCastException if the instance is not `Form1099Sa` + */ + public Form1099Sa getForm1099Sa() throws ClassCastException { + return (Form1099Sa)super.getActualInstance(); + } /** * Get the actual instance of `Form1099W2`. If the actual instance is not `Form1099W2`, * the ClassCastException will be thrown. @@ -713,6 +785,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1098 failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1098T + try { + Form1098T.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1098T failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099C try { Form1099C.validateJsonElement(jsonElement); @@ -785,6 +865,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099S failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099Sa + try { + Form1099Sa.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099Sa failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099W2 try { Form1099W2.validateJsonElement(jsonElement); @@ -794,7 +882,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2. %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: Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2. %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/IrisFormBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java index c046a37..5643f28 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java @@ -79,6 +79,8 @@ public enum TypeEnum { _1098("1098"), + _1098_T("1098-T"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), @@ -97,6 +99,8 @@ public enum TypeEnum { _1099_S("1099-S"), + _1099_SA("1099-SA"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ResubmitRejectedFormsResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/ResubmitRejectedFormsResponse.java new file mode 100644 index 0000000..8597899 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ResubmitRejectedFormsResponse.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 1099 & W-9 API Definition + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @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 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; + +/** + * ResubmitRejectedFormsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class ResubmitRejectedFormsResponse { + public static final String SERIALIZED_NAME_RESUBMITTED_FORMS_COUNT = "resubmittedFormsCount"; + @SerializedName(SERIALIZED_NAME_RESUBMITTED_FORMS_COUNT) + private Integer resubmittedFormsCount; + + public ResubmitRejectedFormsResponse() { + } + + public ResubmitRejectedFormsResponse resubmittedFormsCount(Integer resubmittedFormsCount) { + this.resubmittedFormsCount = resubmittedFormsCount; + return this; + } + + /** + * Number of forms scheduled for replacement submission. + * @return resubmittedFormsCount + */ + @javax.annotation.Nullable + public Integer getResubmittedFormsCount() { + return resubmittedFormsCount; + } + + public void setResubmittedFormsCount(Integer resubmittedFormsCount) { + this.resubmittedFormsCount = resubmittedFormsCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResubmitRejectedFormsResponse resubmitRejectedFormsResponse = (ResubmitRejectedFormsResponse) o; + return Objects.equals(this.resubmittedFormsCount, resubmitRejectedFormsResponse.resubmittedFormsCount); + } + + @Override + public int hashCode() { + return Objects.hash(resubmittedFormsCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResubmitRejectedFormsResponse {\n"); + sb.append(" resubmittedFormsCount: ").append(toIndentedString(resubmittedFormsCount)).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("resubmittedFormsCount"); + + // 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 ResubmitRejectedFormsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ResubmitRejectedFormsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ResubmitRejectedFormsResponse is not found in the empty JSON string", ResubmitRejectedFormsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ResubmitRejectedFormsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ResubmitRejectedFormsResponse` 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 (!ResubmitRejectedFormsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ResubmitRejectedFormsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ResubmitRejectedFormsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ResubmitRejectedFormsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ResubmitRejectedFormsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ResubmitRejectedFormsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ResubmitRejectedFormsResponse + * @throws IOException if the JSON string is invalid with respect to ResubmitRejectedFormsResponse + */ + public static ResubmitRejectedFormsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ResubmitRejectedFormsResponse.class); + } + + /** + * Convert an instance of ResubmitRejectedFormsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} +