diff --git a/README.md b/README.md index 8499915..24677ec 100644 --- a/README.md +++ b/README.md @@ -286,14 +286,20 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.EntryStatusResponse](docs/A1099/V2/EntryStatusResponse.md) - [Avalara.SDK.model.A1099.V2.ErrorResponse](docs/A1099/V2/ErrorResponse.md) - [Avalara.SDK.model.A1099.V2.ErrorResponseItem](docs/A1099/V2/ErrorResponseItem.md) + - [Avalara.SDK.model.A1099.V2.FederalEfileError](docs/A1099/V2/FederalEfileError.md) + - [Avalara.SDK.model.A1099.V2.FederalEfileErrorResponse](docs/A1099/V2/FederalEfileErrorResponse.md) + - [Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail](docs/A1099/V2/FederalEfileStatusDetail.md) - [Avalara.SDK.model.A1099.V2.Form1042S](docs/A1099/V2/Form1042S.md) - [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.Form1098E](docs/A1099/V2/Form1098E.md) - [Avalara.SDK.model.A1099.V2.Form1098T](docs/A1099/V2/Form1098T.md) + - [Avalara.SDK.model.A1099.V2.Form1099B](docs/A1099/V2/Form1099B.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) + - [Avalara.SDK.model.A1099.V2.Form1099G](docs/A1099/V2/Form1099G.md) - [Avalara.SDK.model.A1099.V2.Form1099Int](docs/A1099/V2/Form1099Int.md) - [Avalara.SDK.model.A1099.V2.Form1099K](docs/A1099/V2/Form1099K.md) - [Avalara.SDK.model.A1099.V2.Form1099ListRequest](docs/A1099/V2/Form1099ListRequest.md) @@ -305,6 +311,8 @@ Class | Method | HTTP request | Description - [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.Form5498](docs/A1099/V2/Form5498.md) + - [Avalara.SDK.model.A1099.V2.FormW2G](docs/A1099/V2/FormW2G.md) - [Avalara.SDK.model.A1099.V2.Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) - [Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough](docs/A1099/V2/IntermediaryOrFlowThrough.md) - [Avalara.SDK.model.A1099.V2.IrisFormBase](docs/A1099/V2/IrisFormBase.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 9307f9d..97e311a 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 = "6178f38d-9576-40f3-9d81-81923b745635"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d5ec43c1-fd8f-4d9d-8363-b79f38b90510"; // 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 { @@ -93,6 +93,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **201** | Created company | - | | **400** | Bad request (e.g., model validation failed) | - | | **401** | Authentication failed | - | @@ -136,7 +137,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 = "319f54f2-5b38-4c4f-909b-12fb99a51b62"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "fb46ccd9-bdd3-433e-bb75-524615bf9a1c"; // 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); @@ -178,6 +179,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **204** | Company deleted | - | | **401** | Authentication failed. | - | | **404** | Company was not found or your user does not have to permission to delete it. | - | @@ -191,7 +193,7 @@ null (empty response body) List companies -List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". +List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"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>Companies updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Companies updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Companies 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 @@ -228,7 +230,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 = "ddaab1c5-a4e7-44d0-992a-8d2477ae1709"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "43729342-0dcd-49df-8aea-11021b1411ec"; // 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); @@ -276,6 +278,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | List of companies | - | | **400** | Bad request (e.g., invalid sort key) | - | | **404** | Not Found | - | @@ -321,7 +324,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 = "79462281-b63b-40e6-bac7-e9e975607cde"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "853d549c-2e09-49c4-9280-063cb1d62e1a"; // 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); @@ -364,6 +367,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Single company | - | | **400** | Bad request (e.g., invalid sort key) | - | | **404** | Company not found | - | @@ -409,7 +413,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 = "a04b27f3-eb0f-4ec0-943c-d0902b668fa5"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b0a053fd-e264-4ec0-83d1-5751f9b58ca8"; // 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 { @@ -454,6 +458,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Updated company | - | | **400** | Bad request (e.g., model validation failed) | - | | **401** | Authentication failed | - | diff --git a/docs/A1099/V2/CreateW9Form201Response.md b/docs/A1099/V2/CreateW9Form201Response.md index d134fbe..6393dcf 100644 --- a/docs/A1099/V2/CreateW9Form201Response.md +++ b/docs/A1099/V2/CreateW9Form201Response.md @@ -175,7 +175,12 @@ |**alternativeWithholdingStatementRelianceCertification** | **Boolean** | Certifies that the entity may rely on the information in all associated withholding certificates under the applicable standards of knowledge in sections 1441 or 1471 when providing an alternative withholding statement. | [optional] | |**npFfiWithExemptBeneficialOwnersCertification** | **Boolean** | Certifies that the nonparticipating FFI is transmitting withholding documentation and providing a statement allocating payment portions to exempt beneficial owners. | [optional] | |**foreignCentralBankOfIssueCertification** | **Boolean** | Certifies that the entity is treated as the beneficial owner of the payment solely for purposes of chapter 4 under Regulations section 1.1471-6(d)(4). | [optional] | -|**businessName** | **String** | The name of the business associated with the form. | [optional] | +|**firstName** | **String** | Individual first name. | [optional] | +|**middleName** | **String** | Individual middle name. | [optional] | +|**lastName** | **String** | Individual last name. | [optional] | +|**suffixName** | **String** | Individual name suffix. | [optional] | +|**businessName** | **String** | DEPRECATED: The name of the business associated with the form. Use `name2` instead. | [optional] | +|**name2** | **String** | The name of the business associated with the form. Replaces the deprecated `businessName` field. | [optional] | |**businessClassification** | **String** | The classification of the business. | [optional] | |**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | |**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | diff --git a/docs/A1099/V2/CreateW9FormRequest.md b/docs/A1099/V2/CreateW9FormRequest.md index 6cd6639..92d6bb3 100644 --- a/docs/A1099/V2/CreateW9FormRequest.md +++ b/docs/A1099/V2/CreateW9FormRequest.md @@ -9,7 +9,12 @@ |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | The form type. | [optional] [readonly] | |**name** | **String** | The name of the individual or entity associated with the form. | | -|**businessName** | **String** | The name of the business associated with the form. | [optional] | +|**firstName** | **String** | Individual first name. Must be sent together with lastName; should only be used for individuals. Up to 40 characters. | [optional] | +|**middleName** | **String** | Individual middle name. Should only be used for individuals. Up to 40 characters. | [optional] | +|**lastName** | **String** | Individual last name. Must be sent together with firstName; should only be used for individuals. Up to 40 characters. | [optional] | +|**suffixName** | **String** | Individual name suffix (e.g. Jr., Sr.). Should only be used for individuals. Up to 10 characters. | [optional] | +|**businessName** | **String** | DEPRECATED: The name of the business associated with the form. Use `name2` instead. | [optional] | +|**name2** | **String** | The name of the business associated with the form. Replaces the deprecated `businessName` field. When both `businessName` and `name2` are provided, `businessName` takes precedence. | [optional] | |**businessClassification** | [**BusinessClassificationEnum**](#BusinessClassificationEnum) | The classification of the business. Available values: - Individual: Individual/sole proprietor - C Corporation: C Corporation - S Corporation: S Corporation - Partnership: Partnership - Trust/estate: Trust/estate - LLC-C: Limited liability company (C Corporation) - LLC-S: Limited liability company (S Corporation) - LLC-P: Limited liability company (Partnership) - Other: Other (requires BusinessOther field to be populated) | | |**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | |**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | diff --git a/docs/A1099/V2/FederalEfileError.md b/docs/A1099/V2/FederalEfileError.md new file mode 100644 index 0000000..93252df --- /dev/null +++ b/docs/A1099/V2/FederalEfileError.md @@ -0,0 +1,14 @@ + + +# FederalEfileError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | IRIS error code | [optional] | +|**message** | **String** | Error message | [optional] | + + + diff --git a/docs/A1099/V2/FederalEfileErrorResponse.md b/docs/A1099/V2/FederalEfileErrorResponse.md new file mode 100644 index 0000000..765f03a --- /dev/null +++ b/docs/A1099/V2/FederalEfileErrorResponse.md @@ -0,0 +1,14 @@ + + +# FederalEfileErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | The exact IRS/IRIS error code, when IRIS provides one. | [optional] | +|**message** | **String** | The human-readable error message associated with the code, if provided by IRIS. | [optional] | + + + diff --git a/docs/A1099/V2/FederalEfileStatusDetail.md b/docs/A1099/V2/FederalEfileStatusDetail.md new file mode 100644 index 0000000..cabd1a2 --- /dev/null +++ b/docs/A1099/V2/FederalEfileStatusDetail.md @@ -0,0 +1,15 @@ + + +# FederalEfileStatusDetail + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**time** | **String** | | [optional] | +|**status** | **String** | | [optional] | +|**errors** | [**List<FederalEfileError>**](FederalEfileError.md) | Errors the IRS returned for the form's most recent IRIS filing. Present only when the filing was rejected or accepted with errors; omitted for forms not filed through IRIS. | [optional] | + + + diff --git a/docs/A1099/V2/Form1042S.md b/docs/A1099/V2/Form1042S.md index ac7e50e..a2baa5f 100644 --- a/docs/A1099/V2/Form1042S.md +++ b/docs/A1099/V2/Form1042S.md @@ -56,7 +56,7 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -351,9 +351,12 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -362,7 +365,9 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1095B.md b/docs/A1099/V2/Form1095B.md index a6ae84e..b5a57bf 100644 --- a/docs/A1099/V2/Form1095B.md +++ b/docs/A1099/V2/Form1095B.md @@ -40,7 +40,7 @@ Form 1095-B: Health Coverage |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -74,9 +74,12 @@ Form 1095-B: Health Coverage | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -85,7 +88,9 @@ Form 1095-B: Health Coverage | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1095C.md b/docs/A1099/V2/Form1095C.md index f87776f..cc660d4 100644 --- a/docs/A1099/V2/Form1095C.md +++ b/docs/A1099/V2/Form1095C.md @@ -42,7 +42,7 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -82,9 +82,12 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -93,7 +96,9 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1098.md b/docs/A1099/V2/Form1098.md index cec0512..9ebbdbe 100644 --- a/docs/A1099/V2/Form1098.md +++ b/docs/A1099/V2/Form1098.md @@ -43,7 +43,7 @@ Form 1098: Mortgage Interest Statement The recipient is the borro |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -75,9 +75,12 @@ Form 1098: Mortgage Interest Statement The recipient is the borro | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -86,7 +89,9 @@ Form 1098: Mortgage Interest Statement The recipient is the borro | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1098E.md b/docs/A1099/V2/Form1098E.md new file mode 100644 index 0000000..24e355d --- /dev/null +++ b/docs/A1099/V2/Form1098E.md @@ -0,0 +1,102 @@ + + +# Form1098E + +Form 1098-E: Student Loan Interest Statement The recipient is the borrower and the issuer is the lender. *Required:* `studentLoanInterestReceivedByLender`. A blank or zero amount is reported on `#/payments`. A negative amount is not rejected. Form 1098-E has no state or local withholding and no second TIN notice, so `stateAndLocalWithholding` and `secondTinNotice` are discarded and read back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**studentLoanInterestReceivedByLender** | **Double** | Student loan interest received by lender | [optional] | +|**excludesLoanOriginationFeesOrCapitalizedInterestIndicator** | **Boolean** | If checked, the student loan interest received by lender does not include loan origination fees and/or capitalized interest for loans made before September 1, 2004 | [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** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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_E | "1098-E" | +| _1098_T | "1098-T" | +| _1099_B | "1099-B" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | +| _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" | +| _5498 | "5498" | +| W_2 | "W-2" | +| W_2_G | "W-2G" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/Form1098T.md b/docs/A1099/V2/Form1098T.md index ed56f6a..cd725e5 100644 --- a/docs/A1099/V2/Form1098T.md +++ b/docs/A1099/V2/Form1098T.md @@ -40,7 +40,7 @@ Form 1098-T: Tuition Statement The recipient is the student and t |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -72,9 +72,12 @@ Form 1098-T: Tuition Statement The recipient is the student and t | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -83,7 +86,9 @@ Form 1098-T: Tuition Statement The recipient is the student and t | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099B.md b/docs/A1099/V2/Form1099B.md new file mode 100644 index 0000000..d1585ff --- /dev/null +++ b/docs/A1099/V2/Form1099B.md @@ -0,0 +1,163 @@ + + +# Form1099B + +Form 1099-B: Proceeds From Broker and Barter Exchange Transactions The recipient is the customer and the issuer is the broker or barter exchange. Each form reports one sale. *Required:* `applicableCheckboxOnForm8949`, `descriptionOfProperty`, `proceeds` (which can be zero or negative) and `proceedsReportedToIrs`. `typeOfGainOrLoss` is required unless `noncoveredSecurity` is `true`. `dateSoldOrDisposed` must fall in the tax year. `dateAcquired` can't be after the tax year or before January 1 of the year 50 years before the current filing year, whatever the form's tax year. `costOrOtherBasis`, `washSaleLossDisallowed` and `federalIncomeTaxWithheld` can't be negative; the other amounts can. `federalIncomeTaxWithheld` must be less than `proceeds` (zero when `proceeds` is zero or negative), and can't be more than 24% of the other amounts on the form combined, not counting state and local withholding. `stateAndLocalWithholding` carries `state`, `stateId`, `stateTaxWithheld`, `locality`, `localityId` and `localTaxWithheld`. `state` and `stateId` are required when `stateTaxWithheld` has an amount. Form 1099-B has no state or local income fields, so `stateIncome` and `localIncome` are discarded and read back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**applicableCheckboxOnForm8949** | [**ApplicableCheckboxOnForm8949Enum**](#ApplicableCheckboxOnForm8949Enum) | Applicable checkbox on Form 8949. * `A` - Short-term transaction, basis reported to the IRS * `B` - Short-term transaction, basis not reported to the IRS * `D` - Long-term transaction, basis reported to the IRS * `E` - Long-term transaction, basis not reported to the IRS * `X` - Basis not reported to the IRS and the holding period is unknown | | +|**cusipNumber** | **String** | CUSIP number (up to 13 letters or digits) | [optional] | +|**descriptionOfProperty** | **String** | Description of property, such as the number of shares and the name of the stock | | +|**dateAcquired** | **LocalDate** | Date acquired. Can't be after the tax year or before January 1 of the year 50 years before the current filing year (for example, 1975-01-01 when filing for 2025), whatever the form's tax year. | [optional] | +|**dateSoldOrDisposed** | **LocalDate** | Date sold or disposed. Must fall in the tax year. | [optional] | +|**proceeds** | **Double** | Proceeds. Can be zero, or negative for a loss. | | +|**costOrOtherBasis** | **Double** | Cost or other basis | [optional] | +|**accruedMarketDiscount** | **Double** | Accrued market discount | [optional] | +|**washSaleLossDisallowed** | **Double** | Wash sale loss disallowed | [optional] | +|**typeOfGainOrLoss** | [**TypeOfGainOrLossEnum**](#TypeOfGainOrLossEnum) | Type of gain or loss. Required unless `noncoveredSecurity` is `true`. * `SHORT_TERM` - Short-term gain or loss * `LONG_TERM` - Long-term gain or loss * `ORDINARY_SHORT_TERM` - Ordinary, short-term * `ORDINARY_LONG_TERM` - Ordinary, long-term | [optional] | +|**proceedsFrom** | [**ProceedsFromEnum**](#ProceedsFromEnum) | Source of the proceeds, if they are from collectibles or a Qualified Opportunity Fund. * `COLLECTIBLES` - Collectibles * `QOF` - Qualified Opportunity Fund (QOF) | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld. Must be less than `proceeds` (zero when `proceeds` is zero or negative), and can't be more than 24% of the other amounts on the form combined, not counting state and local withholding. | [optional] | +|**noncoveredSecurity** | **Boolean** | If checked, the security is noncovered | [optional] | +|**proceedsReportedToIrs** | [**ProceedsReportedToIrsEnum**](#ProceedsReportedToIrsEnum) | Whether gross or net proceeds are reported to the IRS. * `GROSS` - Gross proceeds * `NET` - Net proceeds | | +|**lossNotAllowed** | **Boolean** | If checked, the loss is not allowed based on the amount in `proceeds` | [optional] | +|**profitOrLossRealizedOnClosedContracts** | **Double** | Profit or (loss) realized in the tax year on closed contracts | [optional] | +|**unrealizedProfitOrLossOnOpenContractsPriorYear** | **Double** | Unrealized profit or (loss) on open contracts at the end of the prior tax year | [optional] | +|**unrealizedProfitOrLossOnOpenContractsCurrentYear** | **Double** | Unrealized profit or (loss) on open contracts at the end of the tax year | [optional] | +|**aggregateProfitOrLossOnContracts** | **Double** | Aggregate profit or (loss) on contracts | [optional] | +|**basisReportedToIrs** | **Boolean** | If checked, the basis is reported to the IRS. Only takes effect when `noncoveredSecurity` is also checked: otherwise it isn't sent to the IRS, and changing it doesn't trigger a correction. | [optional] | +|**bartering** | **Double** | Bartering | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement | [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** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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: ApplicableCheckboxOnForm8949Enum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| D | "D" | +| E | "E" | +| X | "X" | + + + +## Enum: TypeOfGainOrLossEnum + +| Name | Value | +|---- | -----| +| SHORT_TERM | "SHORT_TERM" | +| LONG_TERM | "LONG_TERM" | +| ORDINARY_SHORT_TERM | "ORDINARY_SHORT_TERM" | +| ORDINARY_LONG_TERM | "ORDINARY_LONG_TERM" | + + + +## Enum: ProceedsFromEnum + +| Name | Value | +|---- | -----| +| COLLECTIBLES | "COLLECTIBLES" | +| QOF | "QOF" | + + + +## Enum: ProceedsReportedToIrsEnum + +| Name | Value | +|---- | -----| +| GROSS | "GROSS" | +| NET | "NET" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1098 | "1098" | +| _1098_E | "1098-E" | +| _1098_T | "1098-T" | +| _1099_B | "1099-B" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | +| _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" | +| _5498 | "5498" | +| W_2 | "W-2" | +| W_2_G | "W-2G" | + + + +## 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 4851bf3..c56856d 100644 --- a/docs/A1099/V2/Form1099Base.md +++ b/docs/A1099/V2/Form1099Base.md @@ -32,7 +32,7 @@ |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -52,9 +52,12 @@ | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -63,7 +66,9 @@ | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099C.md b/docs/A1099/V2/Form1099C.md index 1f7f57b..90d9db0 100644 --- a/docs/A1099/V2/Form1099C.md +++ b/docs/A1099/V2/Form1099C.md @@ -39,7 +39,7 @@ Form 1099-C: Cancellation of Debt *Required:* Date of Identifiabl |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -87,9 +87,12 @@ Form 1099-C: Cancellation of Debt *Required:* Date of Identifiabl | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -98,7 +101,9 @@ Form 1099-C: Cancellation of Debt *Required:* Date of Identifiabl | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099Div.md b/docs/A1099/V2/Form1099Div.md index cff02a9..b0b661f 100644 --- a/docs/A1099/V2/Form1099Div.md +++ b/docs/A1099/V2/Form1099Div.md @@ -51,7 +51,7 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -83,9 +83,12 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -94,7 +97,9 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099G.md b/docs/A1099/V2/Form1099G.md new file mode 100644 index 0000000..63bd2ab --- /dev/null +++ b/docs/A1099/V2/Form1099G.md @@ -0,0 +1,110 @@ + + +# Form1099G + +Form 1099-G: Certain Government Payments The December 2026 revision of the form adds Box 10 (family leave benefits) and renumbers the state boxes: state and state identification number move from Boxes 10a/10b to Boxes 11a/11b, and state income tax withheld moves from Box 11 to Box 12. The state boxes are reported through `stateAndLocalWithholding` (`state`, `stateId`, `stateTaxWithheld`, plus `locality`, `localityId`, and `localTaxWithheld`). Form 1099-G has no state or local income box, so `stateAndLocalWithholding.stateIncome` and `stateAndLocalWithholding.localIncome` are discarded and read back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**unemploymentCompensation** | **Double** | Box 1. Unemployment compensation | [optional] | +|**stateOrLocalIncomeTaxRefund** | **Double** | Box 2. State or local income tax refunds, credits, or offsets. Must be greater than zero when TradeOrBusinessIncomeIndicator is true, and requires TaxYearOfRefund. | [optional] | +|**taxYearOfRefund** | **String** | Box 3. Tax year (YYYY) that the Box 2 amount is for. Required when StateOrLocalIncomeTaxRefund is greater than zero. Must be a four-digit year no later than the form's tax year and no more than ten years before it. | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Box 4. Federal income tax withheld. Must be less than the total of the payment boxes. | [optional] | +|**rtaaPayments** | **Double** | Box 5. Reemployment trade adjustment assistance (RTAA) payments | [optional] | +|**taxableGrants** | **Double** | Box 6. Taxable grants | [optional] | +|**agriculturePayments** | **Double** | Box 7. Agriculture payments | [optional] | +|**tradeOrBusinessIncomeIndicator** | **Boolean** | Box 8. If checked, the amount in Box 2 (StateOrLocalIncomeTaxRefund) is attributable to income tax that applies exclusively to income from a trade or business. | [optional] | +|**marketGain** | **Double** | Box 9. Market gain | [optional] | +|**familyLeaveBenefits** | **Double** | Box 10. Family leave benefits paid under a state paid family leave program - Available only for tax year 2026 and later. Report the benefits before any withholding; federal income tax withheld from them goes in Box 4 (FederalIncomeTaxWithheld). | [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** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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_E | "1098-E" | +| _1098_T | "1098-T" | +| _1099_B | "1099-B" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | +| _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" | +| _5498 | "5498" | +| W_2 | "W-2" | +| W_2_G | "W-2G" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/Form1099Int.md b/docs/A1099/V2/Form1099Int.md index f5904b6..303ac61 100644 --- a/docs/A1099/V2/Form1099Int.md +++ b/docs/A1099/V2/Form1099Int.md @@ -47,7 +47,7 @@ Form 1099-INT: Interest Imcome *At least one of the following amo |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -79,9 +79,12 @@ Form 1099-INT: Interest Imcome *At least one of the following amo | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -90,7 +93,9 @@ Form 1099-INT: Interest Imcome *At least one of the following amo | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099K.md b/docs/A1099/V2/Form1099K.md index 324b79d..e0e0e5a 100644 --- a/docs/A1099/V2/Form1099K.md +++ b/docs/A1099/V2/Form1099K.md @@ -10,9 +10,14 @@ Form 1099-K: Payment Card and Third Party Network Transactions |------------ | ------------- | ------------- | -------------| |**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | Filer type for tax reporting purposes. Available values: - PSE: Payment Settlement Entity - EPF: Electronic Payment Facilitator or other third party | | |**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | Payment type for transaction classification. Available values: - PaymentCard: Payment card transactions - ThirdPartyNetwork: Third party network transactions | | -|**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number, if different from Filer's | [optional] | +|**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number, if different from Filer's. Deprecated: the IRS reports the name and phone number as separate fields (PSENm and PSEPhoneNum). Use Avalara1099.Application.Forms1099.Models.Form1099K.PaymentSettlementEntityName and Avalara1099.Application.Forms1099.Models.Form1099K.PaymentSettlementEntityPhoneNumber instead. Kept for backward compatibility with existing integrations. | [optional] | +|**paymentSettlementEntityName** | **String** | Payment settlement entity name, if different from Filer's | [optional] | +|**paymentSettlementEntityPhoneNumber** | **String** | Payment settlement entity phone number, if different from Filer's | [optional] | |**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions. This value must equal the total of all monthly payment amounts (January through December). | | |**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**cashTips** | **Double** | Box 1c. Cash tips - Available only for tax year 2026 and later. This amount is already included in GrossAmountPaymentCard (Box 1a) and is not added to it, so it may not exceed GrossAmountPaymentCard. | [optional] | +|**treasuryTippedOccupationCode** | **String** | Box 1d. Treasury Tipped Occupation Code (TTOC) for the payee's tipped occupation - Available only for tax year 2026 and later. A three-digit, zero-padded code from the IRS enumeration: 000 (tips received in a nonqualifying occupation), 101-110, 201-211, 301-304, 401-409, 501-508, 601-611, 701-706, or 801-809. The form accepts up to two codes - see TreasuryTippedOccupationCode2 for the second. Send the code exactly as three characters (\"001\", not \"1\"); leading zeros are not restored for you. Watch for spreadsheet software that strips leading zeros when a code is exported to CSV and re-imported. | [optional] | +|**treasuryTippedOccupationCode2** | **String** | Box 1d. Second Treasury Tipped Occupation Code (TTOC) - Available only for tax year 2026 and later. Same three-digit code list and formatting rules as TreasuryTippedOccupationCode, and must differ from it. | [optional] | |**merchantCategoryCode** | **String** | Merchant category code (4 numbers) | [optional] | |**paymentTransactionNumber** | **Double** | Number of payment transactions | | |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | @@ -52,7 +57,7 @@ Form 1099-K: Payment Card and Third Party Network Transactions |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -102,9 +107,12 @@ Form 1099-K: Payment Card and Third Party Network Transactions | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -113,7 +121,9 @@ Form 1099-K: Payment Card and Third Party Network Transactions | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099ListRequest.md b/docs/A1099/V2/Form1099ListRequest.md index 3011860..9936bc8 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` * `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] | +|**type** | [**TypeEnum**](#TypeEnum) | Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1098-E` * `1098-T` * `1099-B` * `1099-C` * `1099-DIV` * `1099-G` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `1099-SA` * `5498` * `W-2` * `W-2G` | [optional] | |**forms** | [**List<Get1099Form200Response>**](Get1099Form200Response.md) | | [optional] | @@ -20,9 +20,12 @@ | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -31,7 +34,9 @@ | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099Misc.md b/docs/A1099/V2/Form1099Misc.md index c4dfea7..7ce80fa 100644 --- a/docs/A1099/V2/Form1099Misc.md +++ b/docs/A1099/V2/Form1099Misc.md @@ -20,7 +20,11 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m |**grossProceedsPaidToAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | |**fishPurchasedForResale** | **Double** | Fish purchased for resale | [optional] | |**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | -|**excessGoldenParachutePayments** | **Double** | Excess golden parachute payments - Available only for tax year 2024 and earlier | [optional] | +|**cashTips** | **Double** | Box 13a. Cash tips, including tips paid in cash or charged by customers - Available only for tax year 2026 and later. | [optional] | +|**treasuryTippedOccupationCode** | **String** | Box 13b. Treasury Tipped Occupation Code (TTOC) for the recipient's tipped occupation - Available only for tax year 2026 and later. A three-digit, zero-padded code from the IRS enumeration: 000 (tips received in a nonqualifying occupation), 101-110, 201-211, 301-304, 401-409, 501-508, 601-611, 701-706, or 801-809. The form accepts up to two codes - see TreasuryTippedOccupationCode2 for the second. Send the code exactly as three characters (\"001\", not \"1\"); leading zeros are not restored for you. Watch for spreadsheet software that strips leading zeros when a code is exported to CSV and re-imported. | [optional] | +|**treasuryTippedOccupationCode2** | **String** | Box 13b. Second Treasury Tipped Occupation Code (TTOC) - Available only for tax year 2026 and later. Same three-digit code list and formatting rules as TreasuryTippedOccupationCode, and must differ from it. | [optional] | +|**overtimeCompensation** | **Double** | Box 14. Qualified overtime compensation - Available only for tax year 2026 and later. Named \"Box 14 Excess golden parachute payments\" on revisions of the form before the December 2026 revision - see ExcessGoldenParachutePayments for that field. | [optional] | +|**excessGoldenParachutePayments** | **Double** | Excess golden parachute payments - Available only for tax year 2024 and earlier. Was \"Box 14\" on those earlier revisions; the December 2026 revision reassigns Box 14 to OvertimeCompensation. | [optional] | |**nonqualifiedDeferredCompensation** | **Double** | Nonqualified deferred compensation | [optional] | |**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement. | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | Form type. | | @@ -47,7 +51,7 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -79,9 +83,12 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -90,7 +97,9 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099Nec.md b/docs/A1099/V2/Form1099Nec.md index 60b79e2..b5e072b 100644 --- a/docs/A1099/V2/Form1099Nec.md +++ b/docs/A1099/V2/Form1099Nec.md @@ -8,7 +8,11 @@ Form 1099-NEC: Nonemployee Compensation | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**nonemployeeCompensation** | **Double** | Nonemployee compensation. Required if DirectSalesIndicator is false. | | +|**nonemployeeCompensation** | **Double** | Box 1a. Nonemployee compensation. Required if DirectSalesIndicator is false. Named \"Box 1\" on revisions of the form before the December 2026 revision. | | +|**cashTips** | **Double** | Box 1b. Cash tips, including tips paid in cash or charged by customers - Available only for tax year 2026 and later. This amount is already included in NonemployeeCompensation (Box 1a) and is not added to it, so it may not exceed NonemployeeCompensation. | [optional] | +|**treasuryTippedOccupationCode** | **String** | Box 1c. Treasury Tipped Occupation Code (TTOC) for the recipient's tipped occupation - Available only for tax year 2026 and later. A three-digit, zero-padded code from the IRS enumeration: 000 (tips received in a nonqualifying occupation), 101-110, 201-211, 301-304, 401-409, 501-508, 601-611, 701-706, or 801-809. The form accepts up to two codes - see TreasuryTippedOccupationCode2 for the second. Send the code exactly as three characters (\"001\", not \"1\"); leading zeros are not restored for you. Watch for spreadsheet software that strips leading zeros when a code is exported to CSV and re-imported. | [optional] | +|**treasuryTippedOccupationCode2** | **String** | Box 1c. Second Treasury Tipped Occupation Code (TTOC) - Available only for tax year 2026 and later. Same three-digit code list and formatting rules as TreasuryTippedOccupationCode, and must differ from it. | [optional] | +|**overtimeCompensation** | **Double** | Box 1d. Qualified overtime compensation - Available only for tax year 2026 and later. This amount is already included in NonemployeeCompensation (Box 1a) and is not added to it, so it may not exceed NonemployeeCompensation. | [optional] | |**directSalesIndicator** | **Boolean** | Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale. Should be true if Nonemployee compensation is not provided. | [optional] | |**excessGoldenParachutePayments** | **Double** | Excess golden parachute payments - Available only for tax year 2025 and later | [optional] | |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld. | [optional] | @@ -36,7 +40,7 @@ Form 1099-NEC: Nonemployee Compensation |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -68,9 +72,12 @@ Form 1099-NEC: Nonemployee Compensation | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -79,7 +86,9 @@ Form 1099-NEC: Nonemployee Compensation | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099Patr.md b/docs/A1099/V2/Form1099Patr.md index 3f1736c..dc39128 100644 --- a/docs/A1099/V2/Form1099Patr.md +++ b/docs/A1099/V2/Form1099Patr.md @@ -2,7 +2,7 @@ # Form1099Patr -Form 1099-PATR: Taxable Distributions Received From Cooperatives *At least one of the following amounts must be greater than zero:* Patronage Dividends, Nonpatronage Distributions, Per-Unit Retain Allocations, or Redeemed Nonqualified Notices. Federal Income Tax Withheld, when provided, must be less than the total of those four amounts. Specified Cooperative may only be set when at least one of Qualified Payments, Section 199A(a) Qualified Items, or Section 199A(a) SSTB Items is provided. Form 1099-PATR has no state or local withholding boxes. `stateAndLocalWithholding` is not supported for this form type on any endpoint: a supplied value is discarded rather than stored, and the field always reads back as `null`. +Form 1099-PATR: Taxable Distributions Received From Cooperatives *At least one of the following amounts must be greater than zero:* Patronage Dividends, Nonpatronage Distributions, Per-Unit Retain Allocations, or Redeemed Nonqualified Notices. Federal Income Tax Withheld, when provided, must be less than the total of those four amounts. The Section 199A(g) deduction cannot exceed 9% of Qualified Payments. Other credits and deductions (Box 12), when greater than zero, must be itemized under the specific credit or deduction. This API does not expose those itemized fields, so a non-zero Box 12 is rejected downstream. Specified Cooperative may only be set when at least one of Qualified Payments, Section 199A(a) Qualified Items, or Section 199A(a) SSTB Items is provided. Form 1099-PATR has no state or local withholding boxes. `stateAndLocalWithholding` is not supported for this form type on any endpoint: a supplied value is discarded rather than stored, and the field always reads back as `null`. ## Properties @@ -19,7 +19,7 @@ Form 1099-PATR: Taxable Distributions Received From Cooperatives |**section199AaSstbItems** | **Double** | Section 199A(a) SSTB items | [optional] | |**investmentCredit** | **Double** | Investment credit | [optional] | |**workOpportunityCredit** | **Double** | Work opportunity credit | [optional] | -|**otherCreditsAndDeductions** | **Double** | Other credits and deductions | [optional] | +|**otherCreditsAndDeductions** | **Double** | Other credits and deductions (Box 12). Leave at zero unless the amount is itemized downstream under the specific credit or deduction it belongs to. | [optional] | |**specifiedCooperativeIndicator** | **Boolean** | Indicates the payer is a specified agricultural or horticultural cooperative | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | Form type. | | |**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | @@ -45,7 +45,7 @@ Form 1099-PATR: Taxable Distributions Received From Cooperatives |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -77,9 +77,12 @@ Form 1099-PATR: Taxable Distributions Received From Cooperatives | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -88,7 +91,9 @@ Form 1099-PATR: Taxable Distributions Received From Cooperatives | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099R.md b/docs/A1099/V2/Form1099R.md index 7b5268b..7e1bf49 100644 --- a/docs/A1099/V2/Form1099R.md +++ b/docs/A1099/V2/Form1099R.md @@ -16,12 +16,14 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin |**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | |**employeeContributionsOrDesignatedRothOrInsurancePremiums** | **Double** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | |**netUnrealizedAppreciationInEmployerSecurities** | **Double** | Net unrealized appreciation in employer's securities | [optional] | -|**distributionCode** | [**DistributionCodeEnum**](#DistributionCodeEnum) | Distribution code. 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) | | -|**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] | +|**distributionCode** | [**DistributionCodeEnum**](#DistributionCodeEnum) | Box 7a. 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) | | +|**secondDistributionCode** | [**SecondDistributionCodeEnum**](#SecondDistributionCodeEnum) | Box 7a. 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** | Box 7b. IRA/SEP/SIMPLE | [optional] | +|**trumpAccountIndicator** | **Boolean** | Box 7c. Trump account checkbox - Available only for tax year 2026 and later. | [optional] | +|**excessContributionsEarnings** | **Double** | Box 7d. Earnings on excess contributions - Available only for tax year 2026 and later. Enter 0 when the excess contributions had losses. | [optional] | |**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | -|**otherAmount** | **Double** | Other amount | [optional] | -|**otherPercentage** | **String** | Other percentage | [optional] | +|**otherAmount** | **Double** | Box 8a. Other amount | [optional] | +|**otherPercentage** | **String** | Box 8b. Other percentage | [optional] | |**totalDistributionPercentage** | **String** | Total distribution percentage | [optional] | |**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | |**amountAllocableToIrrWithin5Years** | **Double** | Amount allocable to IRR within 5 years | [optional] | @@ -52,7 +54,7 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -157,9 +159,12 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -168,7 +173,9 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099S.md b/docs/A1099/V2/Form1099S.md index 4ef7ccc..9b988da 100644 --- a/docs/A1099/V2/Form1099S.md +++ b/docs/A1099/V2/Form1099S.md @@ -38,7 +38,7 @@ Form 1099-S: Proceeds From Real Estate Transactions The recipient |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -70,9 +70,12 @@ Form 1099-S: Proceeds From Real Estate Transactions The recipient | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -81,7 +84,9 @@ Form 1099-S: Proceeds From Real Estate Transactions The recipient | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099Sa.md b/docs/A1099/V2/Form1099Sa.md index 4c2d58c..5f1a7fe 100644 --- a/docs/A1099/V2/Form1099Sa.md +++ b/docs/A1099/V2/Form1099Sa.md @@ -39,7 +39,7 @@ Form 1099-SA: Distributions From an HSA, Archer MSA, or Medicare Advantage MSA |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -84,9 +84,12 @@ Form 1099-SA: Distributions From an HSA, Archer MSA, or Medicare Advantage MSA | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -95,7 +98,9 @@ Form 1099-SA: Distributions From an HSA, Archer MSA, or Medicare Advantage MSA | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form1099W2.md b/docs/A1099/V2/Form1099W2.md index 677fc96..b48dbd1 100644 --- a/docs/A1099/V2/Form1099W2.md +++ b/docs/A1099/V2/Form1099W2.md @@ -63,7 +63,7 @@ Form W-2: Wage and Tax Statement. |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -95,9 +95,12 @@ Form W-2: Wage and Tax Statement. | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -106,7 +109,9 @@ Form W-2: Wage and Tax Statement. | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/Form5498.md b/docs/A1099/V2/Form5498.md new file mode 100644 index 0000000..722e8c8 --- /dev/null +++ b/docs/A1099/V2/Form5498.md @@ -0,0 +1,188 @@ + + +# Form5498 + +Form 5498: IRA Contribution Information The recipient is the participant and the issuer is the trustee or issuer of the IRA. *Required:* at least one amount above zero in Boxes 1-5, 8-10, 13a or 14a. Amounts can't be negative. Paired boxes are all-or-nothing: Box 7 is required when Box 2 or Box 5 has an amount, and Boxes 8, 9 and 10 are only allowed with Box 7 type SEP, SIMPLE and Roth IRA; Boxes 12a and 12b are required when Box 11 is checked and not allowed otherwise; Boxes 13b and 13c go with Box 13a, Box 14b with Box 14a, and Box 15b with Box 15a. Form 5498 has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**iraContributions** | **Double** | IRA contributions (other than amounts in Boxes 2-4, 8-10, 13a, and 14a) | [optional] | +|**rolloverContributions** | **Double** | Rollover contributions | [optional] | +|**rothIraConversionAmount** | **Double** | Roth IRA conversion amount | [optional] | +|**recharacterizedContributions** | **Double** | Recharacterized contributions | [optional] | +|**fairMarketValueOfAccount** | **Double** | Fair market value (FMV) of the account | [optional] | +|**lifeInsuranceCostIncludedInIraContributions** | **Double** | Life insurance cost included in the IRA contributions (Box 1). Can't be more than Box 1. | [optional] | +|**iraType** | [**IraTypeEnum**](#IraTypeEnum) | Type of IRA. Required when Box 2 or Box 5 has an amount. * `IRA` - Traditional IRA * `SEP` - SEP IRA * `SIMPLE` - SIMPLE IRA * `ROTH` - Roth IRA | [optional] | +|**sepContributions** | **Double** | SEP contributions. Only allowed when `iraType` is `SEP`. | [optional] | +|**simpleContributions** | **Double** | SIMPLE contributions. Only allowed when `iraType` is `SIMPLE`. | [optional] | +|**rothIraContributions** | **Double** | Roth IRA contributions. Only allowed when `iraType` is `ROTH`. | [optional] | +|**requiredMinimumDistributionIndicator** | **Boolean** | If checked, a required minimum distribution (RMD) is due for the year after the tax year | [optional] | +|**requiredMinimumDistributionDate** | **LocalDate** | RMD date, in the year after the tax year. Required when `requiredMinimumDistributionIndicator` is `true`. | [optional] | +|**requiredMinimumDistributionAmount** | **Double** | RMD amount. Required when `requiredMinimumDistributionIndicator` is `true`. | [optional] | +|**postponedLateContribution** | **Double** | Postponed or late contribution | [optional] | +|**postponedLateContributionYear** | **Integer** | Year the postponed or late contribution was for (four digits, from 1998 to the tax year). Required when `postponedLateContribution` has an amount. | [optional] | +|**postponedLateContributionCode** | [**PostponedLateContributionCodeEnum**](#PostponedLateContributionCodeEnum) | Postponed or late contribution code. Required when `postponedLateContribution` has an amount. * `FD` - Federally designated disaster area * `PL` - Public law * `EO` - Executive order * `PO` - Rollover of a qualified plan loan offset amount * `SC` - Late rollover under the self-certification procedure | [optional] | +|**postponedLateContributionReason** | **String** | Postponed or late contribution reason, such as the public law or executive order number (up to 6 characters) | [optional] | +|**repayments** | **Double** | Repayments | [optional] | +|**repaymentCode** | [**RepaymentCodeEnum**](#RepaymentCodeEnum) | Repayment code. Required when `repayments` has an amount. * `QR` - Qualified reservist distribution * `DD` - Federally designated disaster distribution * `BA` - Qualified birth or adoption distribution * `EP` - Emergency personal expense distribution * `DA` - Domestic abuse victim distribution * `TI` - Terminally ill individual distribution | [optional] | +|**fairMarketValueOfCertainSpecifiedAssets** | **Double** | FMV of certain specified assets | [optional] | +|**specifiedAssetCode** | [**SpecifiedAssetCodeEnum**](#SpecifiedAssetCodeEnum) | Specified asset code. Required when `fairMarketValueOfCertainSpecifiedAssets` has an amount. * `A` - Stock or other ownership interest in a corporation that is not readily tradable on an established securities market * `B` - Short- or long-term debt obligation that is not traded on an established securities market * `C` - Ownership interest in a limited liability company or similar entity (unless the interest is traded on an established securities market) * `D` - Real estate * `E` - Ownership interest in a partnership, trust, or similar entity (unless the interest is traded on an established securities market) * `F` - Option contract or similar product that is not offered for trade on an established option exchange * `G` - Other asset that does not have a readily available FMV * `H` - More than two types of assets (listed in `A` through `G`) are held in this IRA | [optional] | +|**secondSpecifiedAssetCode** | [**SecondSpecifiedAssetCodeEnum**](#SecondSpecifiedAssetCodeEnum) | Second specified asset code, when the IRA holds two types of specified assets. Takes the codes `A` through `G`; it can't repeat `specifiedAssetCode`, and isn't allowed when `specifiedAssetCode` is `H`. | [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** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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: IraTypeEnum + +| Name | Value | +|---- | -----| +| IRA | "IRA" | +| SEP | "SEP" | +| SIMPLE | "SIMPLE" | +| ROTH | "ROTH" | + + + +## Enum: PostponedLateContributionCodeEnum + +| Name | Value | +|---- | -----| +| FD | "FD" | +| PL | "PL" | +| EO | "EO" | +| PO | "PO" | +| SC | "SC" | + + + +## Enum: RepaymentCodeEnum + +| Name | Value | +|---- | -----| +| QR | "QR" | +| DD | "DD" | +| BA | "BA" | +| EP | "EP" | +| DA | "DA" | +| TI | "TI" | + + + +## Enum: SpecifiedAssetCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | +| H | "H" | + + + +## Enum: SecondSpecifiedAssetCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | +| H | "H" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1098 | "1098" | +| _1098_E | "1098-E" | +| _1098_T | "1098-T" | +| _1099_B | "1099-B" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | +| _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" | +| _5498 | "5498" | +| W_2 | "W-2" | +| W_2_G | "W-2G" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/FormW2G.md b/docs/A1099/V2/FormW2G.md new file mode 100644 index 0000000..a52c58e --- /dev/null +++ b/docs/A1099/V2/FormW2G.md @@ -0,0 +1,127 @@ + + +# FormW2G + +Form W-2G: Certain Gambling Winnings The recipient is the winner and the issuer is the payer. *Required:* `reportableWinnings`, `dateWon`, which must fall in the tax year, and `typeOfWager`. `reportableWinnings` only has to be present; zero is accepted. When the issuer's account checks for reasonable withholding, `federalIncomeTaxWithheld` can't be more than 31.58% of `reportableWinnings` and `winningsFromIdenticalWagers` combined (40% in January). The text fields are not length-checked, but only the first 15 characters (`transaction`, `firstId` and `secondId`) or 5 characters (`race`, `cashier` and `window`) are e-filed. `state` and `stateId` are required when `stateTaxWithheld` has an amount. W-2G has no locality ID field, so `localityId` is discarded and reads back as `null`. Form W-2G has no second TIN notice, so `secondTinNotice` is discarded and reads back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**reportableWinnings** | **Double** | Reportable winnings | | +|**dateWon** | **LocalDate** | Date won. Must fall in the tax year. | | +|**typeOfWager** | [**TypeOfWagerEnum**](#TypeOfWagerEnum) | Type of wager. * `1` - Horse race track (or off-track betting of a horse track nature) * `2` - Dog race track (or off-track betting of a dog track nature) * `3` - Jai-alai * `4` - State-conducted lottery * `5` - Keno * `6` - Bingo * `7` - Slot machines * `8` - Poker winnings * `9` - Any other type of gambling winnings Any other code is treated as missing, so the form is saved with a \"can't be blank\" error on `#/box_3_type_wager`. | | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**transaction** | **String** | Transaction, such as the ticket or card number | [optional] | +|**race** | **String** | Race, such as the race or game number | [optional] | +|**winningsFromIdenticalWagers** | **Double** | Winnings from identical wagers | [optional] | +|**cashier** | **String** | Cashier | [optional] | +|**window** | **String** | Window | [optional] | +|**firstId** | **String** | First identification of the winner, such as a driver's license number | [optional] | +|**secondId** | **String** | Second identification of the winner | [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** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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: TypeOfWagerEnum + +| Name | Value | +|---- | -----| +| _1 | "1" | +| _2 | "2" | +| _3 | "3" | +| _4 | "4" | +| _5 | "5" | +| _6 | "6" | +| _7 | "7" | +| _8 | "8" | +| _9 | "9" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1098 | "1098" | +| _1098_E | "1098-E" | +| _1098_T | "1098-T" | +| _1099_B | "1099-B" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | +| _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" | +| _5498 | "5498" | +| W_2 | "W-2" | +| W_2_G | "W-2G" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index d6f1c1c..3a0c454 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 = "6ebfbe2e-4ee0-4a66-bd1a-b85f7a231d9f"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f3f6a125-9683-44de-84e7-a35aad861b6d"; // 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 { @@ -97,6 +97,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Success | - | | **400** | Bad Request | - | | **404** | Not Found | - | @@ -141,7 +142,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "b5b67ba5-a605-40a6-81ba-e67011f5e0e5"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "413aabed-02e8-4f97-934b-46bc00ba3d85"; // 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 { @@ -185,6 +186,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **201** | Created | - | | **400** | Bad Request | - | | **500** | Server Error | - | @@ -229,7 +231,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 = "f41e7d08-4d01-48e7-8517-e69e88dfeab8"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "58eaeca0-f8ce-4407-a3f3-af22354c5eab"; // 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); @@ -271,6 +273,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **204** | No Content | - | | **400** | Bad Request | - | | **404** | Not Found | - | @@ -317,7 +320,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "45a8d1d6-6749-49c6-aba7-af26e12032be"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "038dbf33-2ca4-41f4-bc32-e58774e2e318"; // 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); @@ -360,6 +363,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Success | - | | **400** | Bad Request | - | | **404** | Not Found | - | @@ -406,7 +410,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 = "937e70b0-33c3-4f2e-966a-2be03048e06e"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "973252ba-3cde-429f-82d6-5d1db25730c9"; // 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); @@ -450,6 +454,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Success | - | | **400** | Bad Request | - | | **404** | Not Found | - | @@ -500,7 +505,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 = "9473fcfd-36c1-4d60-8edf-b8faf6f4765f"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "549d97b7-5c09-4166-9981-dac91cf19858"; // 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); @@ -548,6 +553,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Success | - | | **400** | Bad Request | - | | **404** | Not Found | - | @@ -593,7 +599,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "e4808387-f980-456b-bb19-49c90ce005c9"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "8c2a33ad-c706-4c3f-b62e-6462c876c9de"; // 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 { @@ -638,6 +644,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Success | - | | **400** | Bad Request | - | | **404** | Not Found | - | diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index 655da09..1bfd244 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 = "61709e9c-df43-4ce6-b7cf-977e76461170"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "c7ef5bbc-3c85-4da0-81dc-e859741e4801"; // 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 { @@ -97,6 +97,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **201** | The created W9/W4/W8 form | - | | **400** | Bad request (e.g. Unknown form type: W10\") | - | | **401** | Authentication failed | - | @@ -139,7 +140,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "cccaf71c-00e3-4c9b-89b0-a26e835fefe0"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "de1f0eaf-745c-44ec-960d-3630eb850218"; // 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 { @@ -183,6 +184,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **201** | The created W9/W4/W8 form | - | | **400** | Bad request (e.g., missing required field) | - | | **401** | Authentication failed | - | @@ -226,7 +228,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 = "61f5819f-dc87-4d2d-89d7-04a06081d8e7"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "34fd17a8-8ac8-47b9-8224-5046635af826"; // 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); @@ -268,6 +270,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **204** | Empty response | - | | **401** | Authentication failed | - | | **404** | W9/W4/W8 form not found | - | @@ -311,7 +314,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 = "06be2fec-b1fb-43ee-a540-6902ef7a1418"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "6be706e3-b56f-45b0-804c-4f7e43402955"; // 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); @@ -354,6 +357,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | W9/W4/W8 form with id | - | | **401** | Authentication failed | - | | **404** | W9/W4/W8 form not found | - | @@ -397,7 +401,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 = "f7097e4c-cf87-4d02-b80d-6df6999d89bc"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "66a2433c-5e29-4d54-9b5e-0b25a0717f93"; // 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); @@ -434,12 +438,13 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/pdf, application/json +- **Accept**: application/json, application/pdf ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Success | - | | **400** | Bad Request | - | | **401** | Unauthorized | - | @@ -489,7 +494,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 = "a91bb261-b009-42e0-a22c-adb74d576ac8"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "f0077fdc-b1ae-4c5d-aa7b-51fd45eac4b1"; // 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); @@ -537,6 +542,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | list | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | @@ -580,7 +586,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 = "647fc300-170e-49d9-8103-0a96d91bb0ba"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "03924113-5d45-47de-855a-89c21efbd8fe"; // 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); @@ -623,6 +629,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Email sent using existing form (form was already in 'Requested' status or descendant found) | - | | **201** | Email sent using newly created minimal form | - | | **400** | Bad request (e.g., missing vendor e-mail) | - | @@ -668,7 +675,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 = "6f7f15f5-d0a5-4739-bcd9-2f18e5cb817e"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b14e3c8c-068d-48b1-91a1-dcb4b7b8a317"; // 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 { @@ -713,6 +720,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | The updated W9/W4/W8 form | - | | **400** | Bad request (e.g., missing required field) | - | | **401** | Authentication failed | - | @@ -757,7 +765,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 = "c42f5622-8d65-4351-9ff3-4e0442edeb97"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "04e5649d-7bff-43f2-bdb8-40a53b92e01c"; // 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 { @@ -801,6 +809,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | | - | | **400** | Bad request (e.g., only .pdf files are allowed.) | - | | **401** | Authentication failed | - | diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index c9b13cc..c6dc7c6 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -55,7 +55,7 @@ |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -97,6 +97,8 @@ |**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] | +|**studentLoanInterestReceivedByLender** | **Double** | Student loan interest received by lender | [optional] | +|**excludesLoanOriginationFeesOrCapitalizedInterestIndicator** | **Boolean** | If checked, the student loan interest received by lender does not include loan origination fees and/or capitalized interest for loans made before September 1, 2004 | [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] | @@ -105,6 +107,28 @@ |**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] | +|**applicableCheckboxOnForm8949** | [**ApplicableCheckboxOnForm8949Enum**](#ApplicableCheckboxOnForm8949Enum) | Applicable checkbox on Form 8949. * `A` - Short-term transaction, basis reported to the IRS * `B` - Short-term transaction, basis not reported to the IRS * `D` - Long-term transaction, basis reported to the IRS * `E` - Long-term transaction, basis not reported to the IRS * `X` - Basis not reported to the IRS and the holding period is unknown | | +|**cusipNumber** | **String** | CUSIP number (up to 13 letters or digits) | [optional] | +|**descriptionOfProperty** | **String** | Description of property, such as the number of shares and the name of the stock | | +|**dateAcquired** | **LocalDate** | Date acquired. Can't be after the tax year or before January 1 of the year 50 years before the current filing year (for example, 1975-01-01 when filing for 2025), whatever the form's tax year. | [optional] | +|**dateSoldOrDisposed** | **LocalDate** | Date sold or disposed. Must fall in the tax year. | [optional] | +|**proceeds** | **Double** | Proceeds. Can be zero, or negative for a loss. | | +|**costOrOtherBasis** | **Double** | Cost or other basis | [optional] | +|**accruedMarketDiscount** | **Double** | Accrued market discount | [optional] | +|**washSaleLossDisallowed** | **Double** | Wash sale loss disallowed | [optional] | +|**typeOfGainOrLoss** | [**TypeOfGainOrLossEnum**](#TypeOfGainOrLossEnum) | Type of gain or loss. Required unless `noncoveredSecurity` is `true`. * `SHORT_TERM` - Short-term gain or loss * `LONG_TERM` - Long-term gain or loss * `ORDINARY_SHORT_TERM` - Ordinary, short-term * `ORDINARY_LONG_TERM` - Ordinary, long-term | [optional] | +|**proceedsFrom** | [**ProceedsFromEnum**](#ProceedsFromEnum) | Source of the proceeds, if they are from collectibles or a Qualified Opportunity Fund. * `COLLECTIBLES` - Collectibles * `QOF` - Qualified Opportunity Fund (QOF) | [optional] | +|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld | [optional] | +|**noncoveredSecurity** | **Boolean** | If checked, the security is noncovered | [optional] | +|**proceedsReportedToIrs** | [**ProceedsReportedToIrsEnum**](#ProceedsReportedToIrsEnum) | Whether gross or net proceeds are reported to the IRS. * `GROSS` - Gross proceeds * `NET` - Net proceeds | | +|**lossNotAllowed** | **Boolean** | If checked, the loss is not allowed based on the amount in `proceeds` | [optional] | +|**profitOrLossRealizedOnClosedContracts** | **Double** | Profit or (loss) realized in the tax year on closed contracts | [optional] | +|**unrealizedProfitOrLossOnOpenContractsPriorYear** | **Double** | Unrealized profit or (loss) on open contracts at the end of the prior tax year | [optional] | +|**unrealizedProfitOrLossOnOpenContractsCurrentYear** | **Double** | Unrealized profit or (loss) on open contracts at the end of the tax year | [optional] | +|**aggregateProfitOrLossOnContracts** | **Double** | Aggregate profit or (loss) on contracts | [optional] | +|**basisReportedToIrs** | **Boolean** | If checked, the basis is reported to the IRS. Only takes effect when `noncoveredSecurity` is also checked: otherwise it isn't sent to the IRS, and changing it doesn't trigger a correction. | [optional] | +|**bartering** | **Double** | Bartering | [optional] | +|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement. | [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] | @@ -121,7 +145,6 @@ |**section897OrdinaryDividends** | **Double** | Section 897 ordinary dividends | [optional] | |**section897CapitalGain** | **Double** | Section 897 capital gain | [optional] | |**nondividendDistributions** | **Double** | Nondividend distributions | [optional] | -|**federalIncomeTaxWithheld** | **Double** | Federal income tax withheld. | [optional] | |**section199ADividends** | **Double** | Section 199A dividends | [optional] | |**investmentExpenses** | **Double** | Investment Expenses | [optional] | |**foreignTaxPaid** | **Double** | Foreign tax paid | [optional] | @@ -130,7 +153,15 @@ |**noncashLiquidationDistributions** | **Double** | Noncash liquidation distributions | [optional] | |**exemptInterestDividends** | **Double** | Exempt-interest dividends | [optional] | |**specifiedPrivateActivityBondInterestDividends** | **Double** | Specified private activity bond interest dividends | [optional] | -|**fatcaFilingRequirement** | **Boolean** | FATCA filing requirement. | [optional] | +|**unemploymentCompensation** | **Double** | Box 1. Unemployment compensation | [optional] | +|**stateOrLocalIncomeTaxRefund** | **Double** | Box 2. State or local income tax refunds, credits, or offsets. Must be greater than zero when TradeOrBusinessIncomeIndicator is true, and requires TaxYearOfRefund. | [optional] | +|**taxYearOfRefund** | **String** | Box 3. Tax year (YYYY) that the Box 2 amount is for. Required when StateOrLocalIncomeTaxRefund is greater than zero. Must be a four-digit year no later than the form's tax year and no more than ten years before it. | [optional] | +|**rtaaPayments** | **Double** | Box 5. Reemployment trade adjustment assistance (RTAA) payments | [optional] | +|**taxableGrants** | **Double** | Box 6. Taxable grants | [optional] | +|**agriculturePayments** | **Double** | Box 7. Agriculture payments | [optional] | +|**tradeOrBusinessIncomeIndicator** | **Boolean** | Box 8. If checked, the amount in Box 2 (StateOrLocalIncomeTaxRefund) is attributable to income tax that applies exclusively to income from a trade or business. | [optional] | +|**marketGain** | **Double** | Box 9. Market gain | [optional] | +|**familyLeaveBenefits** | **Double** | Box 10. Family leave benefits paid under a state paid family leave program - Available only for tax year 2026 and later. Report the benefits before any withholding; federal income tax withheld from them goes in Box 4 (FederalIncomeTaxWithheld). | [optional] | |**interestIncome** | **Double** | Interest Income | [optional] | |**earlyWithdrawalPenalty** | **Double** | Early Withdrawal Penalty | [optional] | |**usSavingsBondsInterest** | **Double** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | @@ -144,9 +175,14 @@ |**taxExemptBondCusipNumber** | **String** | Tax exempt bond CUSIP no. Enter VARIOUS if the tax-exempt interest is reported in the aggregate for multiple bonds or accounts. | [optional] | |**filerType** | [**FilerTypeEnum**](#FilerTypeEnum) | Filer type for tax reporting purposes. Available values: - PSE: Payment Settlement Entity - EPF: Electronic Payment Facilitator or other third party | | |**paymentType** | [**PaymentTypeEnum**](#PaymentTypeEnum) | Payment type for transaction classification. Available values: - PaymentCard: Payment card transactions - ThirdPartyNetwork: Third party network transactions | | -|**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number, if different from Filer's | [optional] | +|**paymentSettlementEntityNamePhoneNumber** | **String** | Payment settlement entity name and phone number, if different from Filer's. Deprecated: the IRS reports the name and phone number as separate fields (PSENm and PSEPhoneNum). Use Avalara1099.Application.Forms1099.Models.Form1099K.PaymentSettlementEntityName and Avalara1099.Application.Forms1099.Models.Form1099K.PaymentSettlementEntityPhoneNumber instead. Kept for backward compatibility with existing integrations. | [optional] | +|**paymentSettlementEntityName** | **String** | Payment settlement entity name, if different from Filer's | [optional] | +|**paymentSettlementEntityPhoneNumber** | **String** | Payment settlement entity phone number, if different from Filer's | [optional] | |**grossAmountPaymentCard** | **Double** | Gross amount of payment card/third party network transactions. This value must equal the total of all monthly payment amounts (January through December). | | |**cardNotPresentTransactions** | **Double** | Card not present transactions | [optional] | +|**cashTips** | **Double** | Box 1b. Cash tips, including tips paid in cash or charged by customers - Available only for tax year 2026 and later. This amount is already included in NonemployeeCompensation (Box 1a) and is not added to it, so it may not exceed NonemployeeCompensation. | [optional] | +|**treasuryTippedOccupationCode** | **String** | Box 1c. Treasury Tipped Occupation Code (TTOC) for the recipient's tipped occupation - Available only for tax year 2026 and later. A three-digit, zero-padded code from the IRS enumeration: 000 (tips received in a nonqualifying occupation), 101-110, 201-211, 301-304, 401-409, 501-508, 601-611, 701-706, or 801-809. The form accepts up to two codes - see TreasuryTippedOccupationCode2 for the second. Send the code exactly as three characters (\"001\", not \"1\"); leading zeros are not restored for you. Watch for spreadsheet software that strips leading zeros when a code is exported to CSV and re-imported. | [optional] | +|**treasuryTippedOccupationCode2** | **String** | Box 1c. Second Treasury Tipped Occupation Code (TTOC) - Available only for tax year 2026 and later. Same three-digit code list and formatting rules as TreasuryTippedOccupationCode, and must differ from it. | [optional] | |**merchantCategoryCode** | **String** | Merchant category code (4 numbers) | [optional] | |**paymentTransactionNumber** | **Double** | Number of payment transactions | | |**january** | **Double** | January gross payments | [optional] | @@ -172,9 +208,10 @@ |**grossProceedsPaidToAttorney** | **Double** | Gross proceeds paid to an attorney | [optional] | |**fishPurchasedForResale** | **Double** | Fish purchased for resale | [optional] | |**section409ADeferrals** | **Double** | Section 409A deferrals | [optional] | +|**overtimeCompensation** | **Double** | Box 1d. Qualified overtime compensation - Available only for tax year 2026 and later. This amount is already included in NonemployeeCompensation (Box 1a) and is not added to it, so it may not exceed NonemployeeCompensation. | [optional] | |**excessGoldenParachutePayments** | **Double** | Excess golden parachute payments - Available only for tax year 2025 and later | [optional] | |**nonqualifiedDeferredCompensation** | **Double** | Nonqualified deferred compensation | [optional] | -|**nonemployeeCompensation** | **Double** | Nonemployee compensation. Required if DirectSalesIndicator is false. | | +|**nonemployeeCompensation** | **Double** | Box 1a. Nonemployee compensation. Required if DirectSalesIndicator is false. Named \"Box 1\" on revisions of the form before the December 2026 revision. | | |**patronageDividends** | **Double** | Patronage dividends | [optional] | |**nonpatronageDistributions** | **Double** | Nonpatronage distributions | [optional] | |**perUnitRetainAllocations** | **Double** | Per-unit retain allocations | [optional] | @@ -185,7 +222,7 @@ |**section199AaSstbItems** | **Double** | Section 199A(a) SSTB items | [optional] | |**investmentCredit** | **Double** | Investment credit | [optional] | |**workOpportunityCredit** | **Double** | Work opportunity credit | [optional] | -|**otherCreditsAndDeductions** | **Double** | Other credits and deductions | [optional] | +|**otherCreditsAndDeductions** | **Double** | Other credits and deductions (Box 12). Leave at zero unless the amount is itemized downstream under the specific credit or deduction it belongs to. | [optional] | |**specifiedCooperativeIndicator** | **Boolean** | Indicates the payer is a specified agricultural or horticultural cooperative | [optional] | |**grossDistribution** | **Double** | Gross distribution | | |**taxableAmount** | **Double** | Taxable amount | [optional] | @@ -195,11 +232,13 @@ |**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. * `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] | +|**secondDistributionCode** | [**SecondDistributionCodeEnum**](#SecondDistributionCodeEnum) | Box 7a. 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** | Box 7b. IRA/SEP/SIMPLE | [optional] | +|**trumpAccountIndicator** | **Boolean** | Box 7c. Trump account checkbox - Available only for tax year 2026 and later. | [optional] | +|**excessContributionsEarnings** | **Double** | Box 7d. Earnings on excess contributions - Available only for tax year 2026 and later. Enter 0 when the excess contributions had losses. | [optional] | |**traditionalIraSepSimpleOrRothConversionAmount** | **Double** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | -|**otherAmount** | **Double** | Other amount | [optional] | -|**otherPercentage** | **String** | Other percentage | [optional] | +|**otherAmount** | **Double** | Box 8a. Other amount | [optional] | +|**otherPercentage** | **String** | Box 8b. Other percentage | [optional] | |**totalDistributionPercentage** | **String** | Total distribution percentage | [optional] | |**totalEmployeeContributions** | **Double** | Total employee contributions | [optional] | |**amountAllocableToIrrWithin5Years** | **Double** | Amount allocable to IRR within 5 years | [optional] | @@ -242,6 +281,38 @@ |**other14b** | **String** | Other (max 30 chars) for slot b. | [optional] | |**other14c** | **String** | Other (max 30 chars) for slot c. | [optional] | |**stateAndLocalWithholdingSecondary** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | Secondary state and local withholding slot. | [optional] | +|**iraContributions** | **Double** | IRA contributions (other than amounts in Boxes 2-4, 8-10, 13a, and 14a) | [optional] | +|**rolloverContributions** | **Double** | Rollover contributions | [optional] | +|**rothIraConversionAmount** | **Double** | Roth IRA conversion amount | [optional] | +|**recharacterizedContributions** | **Double** | Recharacterized contributions | [optional] | +|**fairMarketValueOfAccount** | **Double** | Fair market value (FMV) of the account | [optional] | +|**lifeInsuranceCostIncludedInIraContributions** | **Double** | Life insurance cost included in the IRA contributions (Box 1). Can't be more than Box 1. | [optional] | +|**iraType** | [**IraTypeEnum**](#IraTypeEnum) | Type of IRA. Required when Box 2 or Box 5 has an amount. * `IRA` - Traditional IRA * `SEP` - SEP IRA * `SIMPLE` - SIMPLE IRA * `ROTH` - Roth IRA | [optional] | +|**sepContributions** | **Double** | SEP contributions. Only allowed when `iraType` is `SEP`. | [optional] | +|**simpleContributions** | **Double** | SIMPLE contributions. Only allowed when `iraType` is `SIMPLE`. | [optional] | +|**rothIraContributions** | **Double** | Roth IRA contributions. Only allowed when `iraType` is `ROTH`. | [optional] | +|**requiredMinimumDistributionIndicator** | **Boolean** | If checked, a required minimum distribution (RMD) is due for the year after the tax year | [optional] | +|**requiredMinimumDistributionDate** | **LocalDate** | RMD date, in the year after the tax year. Required when `requiredMinimumDistributionIndicator` is `true`. | [optional] | +|**requiredMinimumDistributionAmount** | **Double** | RMD amount. Required when `requiredMinimumDistributionIndicator` is `true`. | [optional] | +|**postponedLateContribution** | **Double** | Postponed or late contribution | [optional] | +|**postponedLateContributionYear** | **Integer** | Year the postponed or late contribution was for (four digits, from 1998 to the tax year). Required when `postponedLateContribution` has an amount. | [optional] | +|**postponedLateContributionCode** | [**PostponedLateContributionCodeEnum**](#PostponedLateContributionCodeEnum) | Postponed or late contribution code. Required when `postponedLateContribution` has an amount. * `FD` - Federally designated disaster area * `PL` - Public law * `EO` - Executive order * `PO` - Rollover of a qualified plan loan offset amount * `SC` - Late rollover under the self-certification procedure | [optional] | +|**postponedLateContributionReason** | **String** | Postponed or late contribution reason, such as the public law or executive order number (up to 6 characters) | [optional] | +|**repayments** | **Double** | Repayments | [optional] | +|**repaymentCode** | [**RepaymentCodeEnum**](#RepaymentCodeEnum) | Repayment code. Required when `repayments` has an amount. * `QR` - Qualified reservist distribution * `DD` - Federally designated disaster distribution * `BA` - Qualified birth or adoption distribution * `EP` - Emergency personal expense distribution * `DA` - Domestic abuse victim distribution * `TI` - Terminally ill individual distribution | [optional] | +|**fairMarketValueOfCertainSpecifiedAssets** | **Double** | FMV of certain specified assets | [optional] | +|**specifiedAssetCode** | [**SpecifiedAssetCodeEnum**](#SpecifiedAssetCodeEnum) | Specified asset code. Required when `fairMarketValueOfCertainSpecifiedAssets` has an amount. * `A` - Stock or other ownership interest in a corporation that is not readily tradable on an established securities market * `B` - Short- or long-term debt obligation that is not traded on an established securities market * `C` - Ownership interest in a limited liability company or similar entity (unless the interest is traded on an established securities market) * `D` - Real estate * `E` - Ownership interest in a partnership, trust, or similar entity (unless the interest is traded on an established securities market) * `F` - Option contract or similar product that is not offered for trade on an established option exchange * `G` - Other asset that does not have a readily available FMV * `H` - More than two types of assets (listed in `A` through `G`) are held in this IRA | [optional] | +|**secondSpecifiedAssetCode** | [**SecondSpecifiedAssetCodeEnum**](#SecondSpecifiedAssetCodeEnum) | Second specified asset code, when the IRA holds two types of specified assets. Takes the codes `A` through `G`; it can't repeat `specifiedAssetCode`, and isn't allowed when `specifiedAssetCode` is `H`. | [optional] | +|**reportableWinnings** | **Double** | Reportable winnings | | +|**dateWon** | **LocalDate** | Date won. Must fall in the tax year. | | +|**typeOfWager** | [**TypeOfWagerEnum**](#TypeOfWagerEnum) | Type of wager. * `1` - Horse race track (or off-track betting of a horse track nature) * `2` - Dog race track (or off-track betting of a dog track nature) * `3` - Jai-alai * `4` - State-conducted lottery * `5` - Keno * `6` - Bingo * `7` - Slot machines * `8` - Poker winnings * `9` - Any other type of gambling winnings Any other code is treated as missing, so the form is saved with a \"can't be blank\" error on `#/box_3_type_wager`. | | +|**transaction** | **String** | Transaction, such as the ticket or card number | [optional] | +|**race** | **String** | Race, such as the race or game number | [optional] | +|**winningsFromIdenticalWagers** | **Double** | Winnings from identical wagers | [optional] | +|**cashier** | **String** | Cashier | [optional] | +|**window** | **String** | Window | [optional] | +|**firstId** | **String** | First identification of the winner, such as a driver's license number | [optional] | +|**secondId** | **String** | Second identification of the winner | [optional] | @@ -516,9 +587,12 @@ | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -527,7 +601,9 @@ | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | @@ -579,6 +655,47 @@ +## Enum: ApplicableCheckboxOnForm8949Enum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| D | "D" | +| E | "E" | +| X | "X" | + + + +## Enum: TypeOfGainOrLossEnum + +| Name | Value | +|---- | -----| +| SHORT_TERM | "SHORT_TERM" | +| LONG_TERM | "LONG_TERM" | +| ORDINARY_SHORT_TERM | "ORDINARY_SHORT_TERM" | +| ORDINARY_LONG_TERM | "ORDINARY_LONG_TERM" | + + + +## Enum: ProceedsFromEnum + +| Name | Value | +|---- | -----| +| COLLECTIBLES | "COLLECTIBLES" | +| QOF | "QOF" | + + + +## Enum: ProceedsReportedToIrsEnum + +| Name | Value | +|---- | -----| +| GROSS | "GROSS" | +| NET | "NET" | + + + ## Enum: IdentifiableEventCodeEnum | Name | Value | @@ -662,3 +779,85 @@ +## Enum: IraTypeEnum + +| Name | Value | +|---- | -----| +| IRA | "IRA" | +| SEP | "SEP" | +| SIMPLE | "SIMPLE" | +| ROTH | "ROTH" | + + + +## Enum: PostponedLateContributionCodeEnum + +| Name | Value | +|---- | -----| +| FD | "FD" | +| PL | "PL" | +| EO | "EO" | +| PO | "PO" | +| SC | "SC" | + + + +## Enum: RepaymentCodeEnum + +| Name | Value | +|---- | -----| +| QR | "QR" | +| DD | "DD" | +| BA | "BA" | +| EP | "EP" | +| DA | "DA" | +| TI | "TI" | + + + +## Enum: SpecifiedAssetCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | +| H | "H" | + + + +## Enum: SecondSpecifiedAssetCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | +| H | "H" | + + + +## Enum: TypeOfWagerEnum + +| Name | Value | +|---- | -----| +| _1 | "1" | +| _2 | "2" | +| _3 | "3" | +| _4 | "4" | +| _5 | "5" | +| _6 | "6" | +| _7 | "7" | +| _8 | "8" | +| _9 | "9" | + + + diff --git a/docs/A1099/V2/IrisFormBase.md b/docs/A1099/V2/IrisFormBase.md index 37acff3..ef76c91 100644 --- a/docs/A1099/V2/IrisFormBase.md +++ b/docs/A1099/V2/IrisFormBase.md @@ -31,7 +31,7 @@ |**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] | +|**federalEfileStatus** | [**FederalEfileStatusDetail**](FederalEfileStatusDetail.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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. | [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] | @@ -63,9 +63,12 @@ | _1095_B | "1095-B" | | _1095_C | "1095-C" | | _1098 | "1098" | +| _1098_E | "1098-E" | | _1098_T | "1098-T" | +| _1099_B | "1099-B" | | _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | +| _1099_G | "1099-G" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | | _1099_MISC | "1099-MISC" | @@ -74,7 +77,9 @@ | _1099_R | "1099-R" | | _1099_S | "1099-S" | | _1099_SA | "1099-SA" | +| _5498 | "5498" | | W_2 | "W-2" | +| W_2_G | "W-2G" | diff --git a/docs/A1099/V2/IssuerResponse.md b/docs/A1099/V2/IssuerResponse.md index 969ba3b..7f852c7 100644 --- a/docs/A1099/V2/IssuerResponse.md +++ b/docs/A1099/V2/IssuerResponse.md @@ -32,6 +32,7 @@ |**id** | **String** | Unique identifier set when the record is created. | [optional] | |**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] | |**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] | +|**federalEfileErrors** | [**List<FederalEfileErrorResponse>**](FederalEfileErrorResponse.md) | Issuer-level IRS/IRIS rejection errors from the federal filing submissions of the issuer's forms that are still rejected and awaiting resubmission. | [optional] [readonly] | diff --git a/docs/A1099/V2/IssuerWriteResponse.md b/docs/A1099/V2/IssuerWriteResponse.md index ec19323..51c8704 100644 --- a/docs/A1099/V2/IssuerWriteResponse.md +++ b/docs/A1099/V2/IssuerWriteResponse.md @@ -32,6 +32,7 @@ |**id** | **String** | Unique identifier set when the record is created. | [optional] | |**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] | |**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] | +|**federalEfileErrors** | [**List<FederalEfileErrorResponse>**](FederalEfileErrorResponse.md) | Issuer-level IRS/IRIS rejection errors from the federal filing submissions of the issuer's forms that are still rejected and awaiting resubmission. | [optional] [readonly] | |**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Field-level validation errors. Populated when a POST or PUT request violated business rules but the issuer was still persisted. Each entry identifies the affected field and the issue. Empty array when the payload was fully valid. | [optional] [readonly] | diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index c2315f0..32d4dd0 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -50,7 +50,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "5ae71043-1efc-47f3-931c-194f239999b9"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "4b4a71df-d704-4441-938e-77ebd499ffc0"; // 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 { @@ -94,6 +94,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **201** | Created issuer | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | @@ -137,7 +138,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 = "f7a15738-d958-4708-aad8-eac25b686d81"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "a41f3692-5fd3-467e-bd69-b6519ff72bf1"; // 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); @@ -179,6 +180,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **204** | Empty response | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | @@ -222,7 +224,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 = "27ab9711-3475-41e4-b82a-2b7ce52ca884"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d0af6ce1-a2e1-4962-8a8e-e2d10defb317"; // 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); @@ -265,6 +267,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Single issuer | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | @@ -276,7 +279,7 @@ Name | Type | Description | Notes List issuers -List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. +List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, lastName, 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>Issuers updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Issuers updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Issuers 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 @@ -307,13 +310,13 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String $filter = "taxYear eq 2025"; // String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. + String $filter = "taxYear eq 2026"; // String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. Integer $top = 56; // Integer | If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. Integer $skip = 56; // Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "1dbcdaf4-7ea0-46e9-b83c-b663e6178568"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b0506838-51c7-442d-b969-853bea835e21"; // 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); @@ -361,6 +364,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | List of issuers | - | | **400** | Bad request (e.g., invalid sort key) | - | | **404** | Not Found | - | @@ -406,7 +410,7 @@ public class Example { 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 xCorrelationId = "35fd001d-2c7f-467f-bd35-3120d85a8317"; // 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); @@ -449,6 +453,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Rejected forms scheduled for replacement submission | - | | **401** | Authentication failed | - | | **403** | Caller does not have access to this issuer | - | @@ -493,7 +498,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 = "542fb8dd-e4ec-49c2-aef5-f9159dd46aaf"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "37538a0f-462a-4a58-83c1-b0c8c959f75f"; // 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 { @@ -538,6 +543,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Issuer updated. Body may contain `validationErrors[]` when business rules failed. | - | | **400** | Invalid id format, malformed JSON, or identity change rejected for an issuer with scheduled Forms 1099 (TIN, TIN type, or name are immutable in that case). | - | | **401** | Unauthorized | - | diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md index bd95372..00d1397 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 = "d583aa2b-23ac-46c3-8aa0-9b331b73ca3e"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "cb4adbd9-8864-4dee-b13f-3f323a253946"; // 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); @@ -89,6 +89,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Success | - | | **400** | Bad Request | - | | **404** | Not Found | - | diff --git a/docs/A1099/V2/TinMatchesApi.md b/docs/A1099/V2/TinMatchesApi.md index a98f2c4..d52e17a 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 = "77d79db6-e884-4ef0-a76d-0c10c41f5993"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "03374952-7012-4525-9ea0-56e42dabc7d4"; // 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); @@ -90,6 +90,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | Bulk TIN match details | - | | **401** | Authentication failed | - | | **404** | Bulk not found | - | @@ -137,7 +138,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 = "8bd78a31-95dc-4091-9f0e-fd0647ecc6f5"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "870967bd-fd8e-42ae-8123-2014d0b6acaa"; // 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); @@ -186,6 +187,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **200** | List of TIN match responses | - | | **400** | Bad request (e.g., invalid sort key) | - | | **401** | Authentication failed | - | @@ -229,7 +231,7 @@ public class Example { TinMatchesApi apiInstance = new TinMatchesApi(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "7f2a23f6-59ed-4fb9-95fd-7937e99952f5"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1b37371e-1fec-410e-a43c-5d877903c086"; // 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 { @@ -273,12 +275,12 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | IRS Service is not available. Client should retry later. | - | | **200** | TIN match result (matched or rejected) | - | | **400** | Bad request (e.g. invalid field values) | - | | **401** | Authentication failed | - | | **429** | Usage limit exceeded (10,000 successful calls per 24 hours) | - | | **403** | Authorization failed (lack of permissions or product not purchased) | - | -| **503** | IRS Service is not available. Client should retry later. | - | ## submitBulkTinMatch @@ -316,7 +318,7 @@ public class Example { TinMatchesApi apiInstance = new TinMatchesApi(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "88b0e4e3-1fd9-437c-9744-753f89dfef9f"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "a78efa3f-47be-4a5d-a2f4-07b9e16a1257"; // 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 { @@ -360,6 +362,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **503** | Server Error | - | | **202** | Accepted submission, indicating it will be processed later and where to get results from | - | | **400** | Bad request (e.g. invalid field values) | - | | **401** | Authentication failed | - | diff --git a/docs/A1099/V2/W9FormRequest.md b/docs/A1099/V2/W9FormRequest.md index 24e37a5..62d882f 100644 --- a/docs/A1099/V2/W9FormRequest.md +++ b/docs/A1099/V2/W9FormRequest.md @@ -8,8 +8,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"w9\" for this model). | [optional] [readonly] | -|**name** | **String** | The name of the individual or entity associated with the form. | | -|**businessName** | **String** | The name of the business associated with the form. | [optional] | +|**name** | **String** | The name of the individual or entity associated with the form. Required when neither firstName/lastName nor businessName/name2 are provided. Up to 40 characters. | [optional] | +|**firstName** | **String** | Individual first name. Must be sent together with lastName; should only be used for individuals. Up to 40 characters. | [optional] | +|**middleName** | **String** | Individual middle name. Should only be used for individuals. Up to 40 characters. | [optional] | +|**lastName** | **String** | Individual last name. Must be sent together with firstName; should only be used for individuals. Up to 40 characters. | [optional] | +|**suffixName** | **String** | Individual name suffix (e.g. Jr., Sr.). Should only be used for individuals. Up to 10 characters. | [optional] | +|**businessName** | **String** | DEPRECATED: The name of the business associated with the form. Use `name2` instead. | [optional] | +|**name2** | **String** | The name of the business associated with the form. Replaces the deprecated `businessName` field. When both `businessName` and `name2` are provided, `businessName` takes precedence. | [optional] | |**businessClassification** | [**BusinessClassificationEnum**](#BusinessClassificationEnum) | The classification of the business. Available values: - Individual: Individual/sole proprietor - C Corporation: C Corporation - S Corporation: S Corporation - Partnership: Partnership - Trust/estate: Trust/estate - LLC-C: Limited liability company (C Corporation) - LLC-S: Limited liability company (S Corporation) - LLC-P: Limited liability company (Partnership) - Other: Other (requires BusinessOther field to be populated) | | |**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | |**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | diff --git a/docs/A1099/V2/W9FormResponse.md b/docs/A1099/V2/W9FormResponse.md index ec28726..1d7524c 100644 --- a/docs/A1099/V2/W9FormResponse.md +++ b/docs/A1099/V2/W9FormResponse.md @@ -9,7 +9,12 @@ |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | The form type (always \"W9\" for this model). | [optional] [readonly] | |**name** | **String** | The name of the individual or entity associated with the form. | [optional] | -|**businessName** | **String** | The name of the business associated with the form. | [optional] | +|**firstName** | **String** | Individual first name. | [optional] | +|**middleName** | **String** | Individual middle name. | [optional] | +|**lastName** | **String** | Individual last name. | [optional] | +|**suffixName** | **String** | Individual name suffix. | [optional] | +|**businessName** | **String** | DEPRECATED: The name of the business associated with the form. Use `name2` instead. | [optional] | +|**name2** | **String** | The name of the business associated with the form. Replaces the deprecated `businessName` field. | [optional] | |**businessClassification** | **String** | The classification of the business. | [optional] | |**businessOther** | **String** | The classification description when \"businessClassification\" is \"Other\". | [optional] | |**foreignPartnerOwnerOrBeneficiary** | **Boolean** | Indicates whether the individual is a foreign partner, owner, or beneficiary. | [optional] | diff --git a/pom.xml b/pom.xml index a3a1e7c..7ab5a56 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ avalara-sdk jar avalara-sdk - 26.10.0 + 26.11.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 8e6ca33..2dd15f0 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java @@ -86,6 +86,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @http.response.details + @@ -174,6 +175,7 @@ private okhttp3.Call createCompanyValidateBeforeCall(CreateCompanyRequest reques * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ @@ -193,6 +195,7 @@ public CompanyResponse createCompany(CreateCompanyRequest requestParameters) thr * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ @@ -214,6 +217,7 @@ public ApiResponse createCompanyWithHttpInfo(CreateCompanyReque * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ @@ -270,6 +274,7 @@ public CreateCompanyRequest getCreateCompanyRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ @@ -365,6 +370,7 @@ private okhttp3.Call deleteCompanyValidateBeforeCall(DeleteCompanyRequest reques * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
+ @@ -385,6 +391,7 @@ public void deleteCompany(DeleteCompanyRequest requestParameters) throws ApiExce * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
+ @@ -407,6 +414,7 @@ public ApiResponse deleteCompanyWithHttpInfo(DeleteCompanyRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
+ @@ -464,6 +472,7 @@ public DeleteCompanyRequest getDeleteCompanyRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
+ @@ -571,13 +580,14 @@ private okhttp3.Call getCompaniesValidateBeforeCall(GetCompaniesRequest requestP /** * List companies - * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". + * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"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>Companies updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Companies updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Companies 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 PaginatedQueryResultModelCompanyResponse * @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
503 Server Error -
200 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
+ @@ -592,13 +602,14 @@ public PaginatedQueryResultModelCompanyResponse getCompanies(GetCompaniesRequest /** * List companies - * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". + * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"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>Companies updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Companies updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Companies 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<PaginatedQueryResultModelCompanyResponse> * @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
503 Server Error -
200 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
+ @@ -614,7 +625,7 @@ public ApiResponse getCompaniesWithHtt /** * List companies (asynchronously) - * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". + * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"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>Companies updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Companies updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Companies 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 @@ -622,6 +633,7 @@ public ApiResponse getCompaniesWithHtt * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
+ @@ -700,6 +712,7 @@ public GetCompaniesRequest getGetCompaniesRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
+ @@ -796,6 +809,7 @@ private okhttp3.Call getCompanyValidateBeforeCall(GetCompanyRequest requestParam * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
+ @@ -817,6 +831,7 @@ public CompanyResponse getCompany(GetCompanyRequest requestParameters) throws Ap * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
+ @@ -840,6 +855,7 @@ public ApiResponse getCompanyWithHttpInfo(GetCompanyRequest req * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
+ @@ -898,6 +914,7 @@ public GetCompanyRequest getGetCompanyRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
+ @@ -993,6 +1010,7 @@ private okhttp3.Call updateCompanyValidateBeforeCall(UpdateCompanyRequest reques * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ @@ -1013,6 +1031,7 @@ public CompanyResponse updateCompany(UpdateCompanyRequest requestParameters) thr * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ @@ -1035,6 +1054,7 @@ public ApiResponse updateCompanyWithHttpInfo(UpdateCompanyReque * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ @@ -1089,7 +1109,7 @@ public UpdateCompanyRequest getUpdateCompanyRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 89a9d3a..4f44767 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java @@ -88,6 +88,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ @@ -182,6 +183,7 @@ private okhttp3.Call bulkUpsert1099FormsValidateBeforeCall(BulkUpsert1099FormsRe * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -203,6 +205,7 @@ public JobResponse bulkUpsert1099Forms(BulkUpsert1099FormsRequest requestParamet * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -226,6 +229,7 @@ public ApiResponse bulkUpsert1099FormsWithHttpInfo(BulkUpsert1099Fo * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -288,6 +292,7 @@ public BulkUpsert1099FormsRequest getBulkUpsert1099FormsRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -377,6 +382,7 @@ private okhttp3.Call create1099FormValidateBeforeCall(Create1099FormRequest requ * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created -
400 Bad Request -
500 Server Error -
+ @@ -397,6 +403,7 @@ public Get1099Form200Response create1099Form(Create1099FormRequest requestParame * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created -
400 Bad Request -
500 Server Error -
+ @@ -419,6 +426,7 @@ public ApiResponse create1099FormWithHttpInfo(Create1099 * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created -
400 Bad Request -
500 Server Error -
+ @@ -476,6 +484,7 @@ public Create1099FormRequest getCreate1099FormRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created -
400 Bad Request -
500 Server Error -
+ @@ -572,6 +581,7 @@ private okhttp3.Call delete1099FormValidateBeforeCall(Delete1099FormRequest requ * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 No Content -
400 Bad Request -
404 Not Found -
+ @@ -593,6 +603,7 @@ public void delete1099Form(Delete1099FormRequest requestParameters) throws ApiEx * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 No Content -
400 Bad Request -
404 Not Found -
+ @@ -616,6 +627,7 @@ public ApiResponse delete1099FormWithHttpInfo(Delete1099FormRequest reques * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 No Content -
400 Bad Request -
404 Not Found -
+ @@ -674,6 +686,7 @@ public Delete1099FormRequest getDelete1099FormRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 No Content -
400 Bad Request -
404 Not Found -
+ @@ -770,6 +783,7 @@ private okhttp3.Call get1099FormValidateBeforeCall(Get1099FormRequest requestPar * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -791,6 +805,7 @@ public Get1099Form200Response get1099Form(Get1099FormRequest requestParameters) * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -814,6 +829,7 @@ public ApiResponse get1099FormWithHttpInfo(Get1099FormRe * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -872,6 +888,7 @@ public Get1099FormRequest getGet1099FormRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -972,6 +989,7 @@ private okhttp3.Call get1099FormPdfValidateBeforeCall(Get1099FormPdfRequest requ * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -993,6 +1011,7 @@ public File get1099FormPdf(Get1099FormPdfRequest requestParameters) throws ApiEx * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1016,6 +1035,7 @@ public ApiResponse get1099FormPdfWithHttpInfo(Get1099FormPdfRequest reques * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1078,6 +1098,7 @@ public Get1099FormPdfRequest getGet1099FormPdfRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1192,6 +1213,7 @@ private okhttp3.Call list1099FormsValidateBeforeCall(List1099FormsRequest reques * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1213,6 +1235,7 @@ public PaginatedQueryResultModelForm1099Base list1099Forms(List1099FormsRequest * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1236,6 +1259,7 @@ public ApiResponse list1099FormsWithHttpI * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1314,6 +1338,7 @@ public List1099FormsRequest getList1099FormsRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1410,6 +1435,7 @@ private okhttp3.Call update1099FormValidateBeforeCall(Update1099FormRequest requ * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1431,6 +1457,7 @@ public Get1099Form200Response update1099Form(Update1099FormRequest requestParame * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1454,6 +1481,7 @@ public ApiResponse update1099FormWithHttpInfo(Update1099 * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -1509,7 +1537,7 @@ public Update1099FormRequest getUpdate1099FormRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 37292e6..9eb7626 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java @@ -88,6 +88,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -176,6 +177,7 @@ private okhttp3.Call createAndSendW9FormEmailValidateBeforeCall(CreateAndSendW9F * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ @@ -195,6 +197,7 @@ public CreateW9Form201Response createAndSendW9FormEmail(CreateAndSendW9FormEmail * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ @@ -216,6 +219,7 @@ public ApiResponse createAndSendW9FormEmailWithHttpInfo * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ @@ -272,6 +276,7 @@ public CreateAndSendW9FormEmailRequest getCreateAndSendW9FormEmailRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ @@ -360,6 +365,7 @@ private okhttp3.Call createW9FormValidateBeforeCall(CreateW9FormRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ @@ -379,6 +385,7 @@ public CreateW9Form201Response createW9Form(CreateW9FormRequest requestParameter * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ @@ -400,6 +407,7 @@ public ApiResponse createW9FormWithHttpInfo(CreateW9For * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ @@ -456,6 +464,7 @@ public CreateW9FormRequest getCreateW9FormRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ @@ -549,6 +558,7 @@ private okhttp3.Call deleteW9FormValidateBeforeCall(DeleteW9FormRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ @@ -567,6 +577,7 @@ public void deleteW9Form(DeleteW9FormRequest requestParameters) throws ApiExcept * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ @@ -587,6 +598,7 @@ public ApiResponse deleteW9FormWithHttpInfo(DeleteW9FormRequest requestPar * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ @@ -642,6 +654,7 @@ public DeleteW9FormRequest getDeleteW9FormRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ @@ -736,6 +749,7 @@ private okhttp3.Call getW9FormValidateBeforeCall(GetW9FormRequest requestParamet * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ @@ -755,6 +769,7 @@ public CreateW9Form201Response getW9Form(GetW9FormRequest requestParameters) thr * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ @@ -776,6 +791,7 @@ public ApiResponse getW9FormWithHttpInfo(GetW9FormReque * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ @@ -832,6 +848,7 @@ public GetW9FormRequest getGetW9FormRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ @@ -881,7 +898,7 @@ public okhttp3.Call getW9FormPdfCall(GetW9FormPdfRequest requestParameters, fina } final String[] localVarAccepts = { - "application/pdf", "application/json" + "application/json", "application/pdf" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { @@ -927,6 +944,7 @@ private okhttp3.Call getW9FormPdfValidateBeforeCall(GetW9FormPdfRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
401 Unauthorized -
+ @@ -947,6 +965,7 @@ public File getW9FormPdf(GetW9FormPdfRequest requestParameters) throws ApiExcept * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
401 Unauthorized -
+ @@ -969,6 +988,7 @@ public ApiResponse getW9FormPdfWithHttpInfo(GetW9FormPdfRequest requestPar * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
401 Unauthorized -
+ @@ -1026,6 +1046,7 @@ public GetW9FormPdfRequest getGetW9FormPdfRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
401 Unauthorized -
+ @@ -1138,6 +1159,7 @@ private okhttp3.Call listW9FormsValidateBeforeCall(ListW9FormsRequest requestPar * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -1157,6 +1179,7 @@ public PaginatedQueryResultModelW9FormBaseResponse listW9Forms(ListW9FormsReques * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -1178,6 +1201,7 @@ public ApiResponse listW9FormsWithH * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -1254,6 +1278,7 @@ public ListW9FormsRequest getListW9FormsRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -1350,6 +1375,7 @@ private okhttp3.Call sendW9FormEmailValidateBeforeCall(SendW9FormEmailRequest re * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
+ @@ -1371,6 +1397,7 @@ public CreateW9Form201Response sendW9FormEmail(SendW9FormEmailRequest requestPar * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
+ @@ -1394,6 +1421,7 @@ public ApiResponse sendW9FormEmailWithHttpInfo(SendW9Fo * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
+ @@ -1452,6 +1480,7 @@ public SendW9FormEmailRequest getSendW9FormEmailRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
+ @@ -1547,6 +1576,7 @@ private okhttp3.Call updateW9FormValidateBeforeCall(UpdateW9FormRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ @@ -1567,6 +1597,7 @@ public CreateW9Form201Response updateW9Form(UpdateW9FormRequest requestParameter * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ @@ -1589,6 +1620,7 @@ public ApiResponse updateW9FormWithHttpInfo(UpdateW9For * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ @@ -1650,6 +1682,7 @@ public UpdateW9FormRequest getUpdateW9FormRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ @@ -1748,6 +1781,7 @@ private okhttp3.Call uploadW9FilesValidateBeforeCall(UploadW9FilesRequest reques * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
+ @@ -1767,6 +1801,7 @@ public void uploadW9Files(UploadW9FilesRequest requestParameters) throws ApiExce * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
+ @@ -1788,6 +1823,7 @@ public ApiResponse uploadW9FilesWithHttpInfo(UploadW9FilesRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
+ @@ -1841,7 +1877,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 e14ea9e..47d0103 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java @@ -88,6 +88,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
+ @@ -176,6 +177,7 @@ private okhttp3.Call createIssuerValidateBeforeCall(CreateIssuerRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -195,6 +197,7 @@ public IssuerWriteResponse createIssuer(CreateIssuerRequest requestParameters) t * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -216,6 +219,7 @@ public ApiResponse createIssuerWithHttpInfo(CreateIssuerReq * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -272,6 +276,7 @@ public CreateIssuerRequest getCreateIssuerRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -365,6 +370,7 @@ private okhttp3.Call deleteIssuerValidateBeforeCall(DeleteIssuerRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -383,6 +389,7 @@ public void deleteIssuer(DeleteIssuerRequest requestParameters) throws ApiExcept * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -403,6 +410,7 @@ public ApiResponse deleteIssuerWithHttpInfo(DeleteIssuerRequest requestPar * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -458,6 +466,7 @@ public DeleteIssuerRequest getDeleteIssuerRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -552,6 +561,7 @@ private okhttp3.Call getIssuerValidateBeforeCall(GetIssuerRequest requestParamet * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -571,6 +581,7 @@ public IssuerResponse getIssuer(GetIssuerRequest requestParameters) throws ApiEx * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -592,6 +603,7 @@ public ApiResponse getIssuerWithHttpInfo(GetIssuerRequest reques * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -648,6 +660,7 @@ public GetIssuerRequest getGetIssuerRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -755,13 +768,14 @@ private okhttp3.Call getIssuersValidateBeforeCall(GetIssuersRequest requestParam /** * List issuers - * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. + * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, lastName, 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>Issuers updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Issuers updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Issuers 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 PaginatedQueryResultModelIssuerResponse * @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
503 Server Error -
200 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
+ @@ -776,13 +790,14 @@ public PaginatedQueryResultModelIssuerResponse getIssuers(GetIssuersRequest requ /** * List issuers - * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. + * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, lastName, 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>Issuers updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Issuers updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Issuers 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<PaginatedQueryResultModelIssuerResponse> * @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
503 Server Error -
200 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
+ @@ -798,7 +813,7 @@ public ApiResponse getIssuersWithHttpIn /** * List issuers (asynchronously) - * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. + * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, lastName, 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>Issuers updated on a given day (2026-09-03): updatedAt ge '2026-09-03' and updatedAt lt '2026-09-04'</li></ul><ul><li>Issuers updated since a given moment (UTC): updatedAt ge '2026-09-03T15:49:35Z'</li></ul><ul><li>Issuers 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 @@ -806,6 +821,7 @@ public ApiResponse getIssuersWithHttpIn * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
+ @@ -884,6 +900,7 @@ public GetIssuersRequest getGetIssuersRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
+ @@ -979,6 +996,7 @@ private okhttp3.Call resubmitRejectedFormsValidateBeforeCall(ResubmitRejectedFor * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Rejected forms scheduled for replacement submission -
401 Authentication failed -
403 Caller does not have access to this issuer -
+ @@ -999,6 +1017,7 @@ public ResubmitRejectedFormsResponse resubmitRejectedForms(ResubmitRejectedForms * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Rejected forms scheduled for replacement submission -
401 Authentication failed -
403 Caller does not have access to this issuer -
+ @@ -1021,6 +1040,7 @@ public ApiResponse resubmitRejectedFormsWithHttpI * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Rejected forms scheduled for replacement submission -
401 Authentication failed -
403 Caller does not have access to this issuer -
+ @@ -1078,6 +1098,7 @@ public ResubmitRejectedFormsRequest getResubmitRejectedFormsRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Rejected forms scheduled for replacement submission -
401 Authentication failed -
403 Caller does not have access to this issuer -
+ @@ -1174,6 +1195,7 @@ private okhttp3.Call updateIssuerValidateBeforeCall(UpdateIssuerRequest requestP * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Issuer updated. Body may contain `validationErrors[]` when business rules failed. -
400 Invalid id format, malformed JSON, or identity change rejected for an issuer with scheduled Forms 1099 (TIN, TIN type, or name are immutable in that case). -
401 Unauthorized -
+ @@ -1195,6 +1217,7 @@ public IssuerWriteResponse updateIssuer(UpdateIssuerRequest requestParameters) t * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Issuer updated. Body may contain `validationErrors[]` when business rules failed. -
400 Invalid id format, malformed JSON, or identity change rejected for an issuer with scheduled Forms 1099 (TIN, TIN type, or name are immutable in that case). -
401 Unauthorized -
+ @@ -1218,6 +1241,7 @@ public ApiResponse updateIssuerWithHttpInfo(UpdateIssuerReq * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Issuer updated. Body may contain `validationErrors[]` when business rules failed. -
400 Invalid id format, malformed JSON, or identity change rejected for an issuer with scheduled Forms 1099 (TIN, TIN type, or name are immutable in that case). -
401 Unauthorized -
+ @@ -1273,7 +1297,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 78d1fb9..ae866a2 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java @@ -84,6 +84,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Issuer updated. Body may contain `validationErrors[]` when business rules failed. -
400 Invalid id format, malformed JSON, or identity change rejected for an issuer with scheduled Forms 1099 (TIN, TIN type, or name are immutable in that case). -
401 Unauthorized -
+ @@ -180,6 +181,7 @@ private okhttp3.Call getJobValidateBeforeCall(GetJobRequest requestParameters, f * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -201,6 +203,7 @@ public JobResponse getJob(GetJobRequest requestParameters) throws ApiException { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -224,6 +227,7 @@ public ApiResponse getJobWithHttpInfo(GetJobRequest requestParamete * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -275,7 +279,7 @@ public GetJobRequest getGetJobRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 1dc9fac..afa3d17 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java @@ -89,6 +89,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Success -
400 Bad Request -
404 Not Found -
+ @@ -183,6 +184,7 @@ private okhttp3.Call getBulkTinMatchValidateBeforeCall(GetBulkTinMatchRequest re * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Bulk TIN match details -
401 Authentication failed -
404 Bulk not found -
+ @@ -202,6 +204,7 @@ public BulkTinMatchResponse getBulkTinMatch(GetBulkTinMatchRequest requestParame * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Bulk TIN match details -
401 Authentication failed -
404 Bulk not found -
+ @@ -223,6 +226,7 @@ public ApiResponse getBulkTinMatchWithHttpInfo(GetBulkTinM * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Bulk TIN match details -
401 Authentication failed -
404 Bulk not found -
+ @@ -279,6 +283,7 @@ public GetBulkTinMatchRequest getGetBulkTinMatchRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 Bulk TIN match details -
401 Authentication failed -
404 Bulk not found -
+ @@ -398,6 +403,7 @@ private okhttp3.Call getBulkTinMatchResultsValidateBeforeCall(GetBulkTinMatchRes * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 List of TIN match responses -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -418,6 +424,7 @@ public PaginatedQueryResultModelBulkTinMatchResultItemResponse getBulkTinMatchRe * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 List of TIN match responses -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -440,6 +447,7 @@ public ApiResponse getB * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 List of TIN match responses -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ @@ -521,12 +529,12 @@ public GetBulkTinMatchResultsRequest getGetBulkTinMatchResultsRequest() { * @http.response.details
Status Code Description Response Headers
503 Server Error -
200 List of TIN match responses -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ -
Status Code Description Response Headers
503 IRS Service is not available. Client should retry later. -
200 TIN match result (matched or rejected) -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
429 Usage limit exceeded (10,000 successful calls per 24 hours) -
403 Authorization failed (lack of permissions or product not purchased) -
503 IRS Service is not available. Client should retry later. -
*/ public okhttp3.Call performRealTimeTinMatchCall(PerformRealTimeTinMatchRequest requestParameters, final ApiCallback _callback) throws ApiException { @@ -612,12 +620,12 @@ private okhttp3.Call performRealTimeTinMatchValidateBeforeCall(PerformRealTimeTi * @http.response.details + -
Status Code Description Response Headers
503 IRS Service is not available. Client should retry later. -
200 TIN match result (matched or rejected) -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
429 Usage limit exceeded (10,000 successful calls per 24 hours) -
403 Authorization failed (lack of permissions or product not purchased) -
503 IRS Service is not available. Client should retry later. -
*/ public RealTimeTinMatchResponse performRealTimeTinMatch(PerformRealTimeTinMatchRequest requestParameters) throws ApiException { @@ -634,12 +642,12 @@ public RealTimeTinMatchResponse performRealTimeTinMatch(PerformRealTimeTinMatchR * @http.response.details + -
Status Code Description Response Headers
503 IRS Service is not available. Client should retry later. -
200 TIN match result (matched or rejected) -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
429 Usage limit exceeded (10,000 successful calls per 24 hours) -
403 Authorization failed (lack of permissions or product not purchased) -
503 IRS Service is not available. Client should retry later. -
*/ public ApiResponse performRealTimeTinMatchWithHttpInfo(PerformRealTimeTinMatchRequest requestParameters) throws ApiException { @@ -658,12 +666,12 @@ public ApiResponse performRealTimeTinMatchWithHttpInfo * @http.response.details + -
Status Code Description Response Headers
503 IRS Service is not available. Client should retry later. -
200 TIN match result (matched or rejected) -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
429 Usage limit exceeded (10,000 successful calls per 24 hours) -
403 Authorization failed (lack of permissions or product not purchased) -
503 IRS Service is not available. Client should retry later. -
*/ public okhttp3.Call performRealTimeTinMatchAsync(PerformRealTimeTinMatchRequest requestParameters, final ApiCallback _callback) throws ApiException { @@ -717,6 +725,7 @@ public PerformRealTimeTinMatchRequest getPerformRealTimeTinMatchRequest() { * @http.response.details + @@ -805,6 +814,7 @@ private okhttp3.Call submitBulkTinMatchValidateBeforeCall(SubmitBulkTinMatchRequ * @http.response.details
Status Code Description Response Headers
503 Server Error -
202 Accepted submission, indicating it will be processed later and where to get results from -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
+ @@ -824,6 +834,7 @@ public BulkTinMatchAcceptedResponse submitBulkTinMatch(SubmitBulkTinMatchRequest * @http.response.details
Status Code Description Response Headers
503 Server Error -
202 Accepted submission, indicating it will be processed later and where to get results from -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
+ @@ -845,6 +856,7 @@ public ApiResponse submitBulkTinMatchWithHttpInfo( * @http.response.details
Status Code Description Response Headers
503 Server Error -
202 Accepted submission, indicating it will be processed later and where to get results from -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
+ @@ -894,7 +906,7 @@ public SubmitBulkTinMatchRequest getSubmitBulkTinMatchRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 6943b33..243fb8b 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 6b4d0f1..61b946f 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 f0d1027..0ba36f8 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 52a88a9..d15e0c2 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 e7ba009..b0dacc1 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 9cf2918..f8e4daf 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 11c3462..4b4ae02 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 9311a51..e21dc13 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.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 2756905..a632342 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.10.0"); + this.localVarApiClient.setSdkVersion("26.11.0"); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/FederalEfileError.java b/src/main/java/Avalara/SDK/model/A1099/V2/FederalEfileError.java new file mode 100644 index 0000000..c034ad1 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FederalEfileError.java @@ -0,0 +1,253 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **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 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; + +/** + * FederalEfileError + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class FederalEfileError { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public FederalEfileError() { + } + + public FederalEfileError code(String code) { + this.code = code; + return this; + } + + /** + * IRIS error code + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + + public FederalEfileError message(String message) { + this.message = message; + return this; + } + + /** + * Error message + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FederalEfileError federalEfileError = (FederalEfileError) o; + return Objects.equals(this.code, federalEfileError.code) && + Objects.equals(this.message, federalEfileError.message); + } + + 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(code, message); + } + + 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 FederalEfileError {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FederalEfileError + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FederalEfileError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FederalEfileError is not found in the empty JSON string", FederalEfileError.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FederalEfileError.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FederalEfileError` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FederalEfileError.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FederalEfileError' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FederalEfileError.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FederalEfileError value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FederalEfileError read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FederalEfileError given an JSON string + * + * @param jsonString JSON string + * @return An instance of FederalEfileError + * @throws IOException if the JSON string is invalid with respect to FederalEfileError + */ + public static FederalEfileError fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FederalEfileError.class); + } + + /** + * Convert an instance of FederalEfileError 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/FederalEfileErrorResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/FederalEfileErrorResponse.java new file mode 100644 index 0000000..83f8e41 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FederalEfileErrorResponse.java @@ -0,0 +1,253 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **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 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; + +/** + * FederalEfileErrorResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class FederalEfileErrorResponse { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public FederalEfileErrorResponse() { + } + + public FederalEfileErrorResponse code(String code) { + this.code = code; + return this; + } + + /** + * The exact IRS/IRIS error code, when IRIS provides one. + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + + public FederalEfileErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * The human-readable error message associated with the code, if provided by IRIS. + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FederalEfileErrorResponse federalEfileErrorResponse = (FederalEfileErrorResponse) o; + return Objects.equals(this.code, federalEfileErrorResponse.code) && + Objects.equals(this.message, federalEfileErrorResponse.message); + } + + 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(code, message); + } + + 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 FederalEfileErrorResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FederalEfileErrorResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FederalEfileErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FederalEfileErrorResponse is not found in the empty JSON string", FederalEfileErrorResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FederalEfileErrorResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FederalEfileErrorResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FederalEfileErrorResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FederalEfileErrorResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FederalEfileErrorResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FederalEfileErrorResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FederalEfileErrorResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FederalEfileErrorResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of FederalEfileErrorResponse + * @throws IOException if the JSON string is invalid with respect to FederalEfileErrorResponse + */ + public static FederalEfileErrorResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FederalEfileErrorResponse.class); + } + + /** + * Convert an instance of FederalEfileErrorResponse 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/FederalEfileStatusDetail.java b/src/main/java/Avalara/SDK/model/A1099/V2/FederalEfileStatusDetail.java new file mode 100644 index 0000000..ceb7f63 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FederalEfileStatusDetail.java @@ -0,0 +1,304 @@ +/* + * 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.FederalEfileError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * FederalEfileStatusDetail + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class FederalEfileStatusDetail { + public static final String SERIALIZED_NAME_TIME = "time"; + @SerializedName(SERIALIZED_NAME_TIME) + private String time; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private List errors; + + public FederalEfileStatusDetail() { + } + + public FederalEfileStatusDetail time(String time) { + this.time = time; + return this; + } + + /** + * Get time + * @return time + */ + @javax.annotation.Nullable + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + + public FederalEfileStatusDetail status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public FederalEfileStatusDetail errors(List errors) { + this.errors = errors; + return this; + } + + public FederalEfileStatusDetail addErrorsItem(FederalEfileError errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Errors the IRS returned for the form's most recent IRIS filing. Present only when the filing was rejected or accepted with errors; omitted for forms not filed through IRIS. + * @return errors + */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FederalEfileStatusDetail federalEfileStatusDetail = (FederalEfileStatusDetail) o; + return Objects.equals(this.time, federalEfileStatusDetail.time) && + Objects.equals(this.status, federalEfileStatusDetail.status) && + Objects.equals(this.errors, federalEfileStatusDetail.errors); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(time, status, errors); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FederalEfileStatusDetail {\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("time"); + openapiFields.add("status"); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to FederalEfileStatusDetail + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FederalEfileStatusDetail.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FederalEfileStatusDetail is not found in the empty JSON string", FederalEfileStatusDetail.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!FederalEfileStatusDetail.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FederalEfileStatusDetail` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("time") != null && !jsonObj.get("time").isJsonNull()) && !jsonObj.get("time").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `time` to be a primitive type in the JSON string but got `%s`", jsonObj.get("time").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + FederalEfileError.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!FederalEfileStatusDetail.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FederalEfileStatusDetail' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FederalEfileStatusDetail.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FederalEfileStatusDetail value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public FederalEfileStatusDetail read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of FederalEfileStatusDetail given an JSON string + * + * @param jsonString JSON string + * @return An instance of FederalEfileStatusDetail + * @throws IOException if the JSON string is invalid with respect to FederalEfileStatusDetail + */ + public static FederalEfileStatusDetail fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FederalEfileStatusDetail.class); + } + + /** + * Convert an instance of FederalEfileStatusDetail to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java index fa64d23..0f4c8e6 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent; @@ -975,12 +976,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -997,7 +1004,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -1141,7 +1152,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -1291,7 +1302,7 @@ public Form1042S() { public Form1042S( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -2223,11 +2234,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -2998,7 +3009,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 9d839ea..86eada7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java @@ -21,6 +21,7 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.CoveredIndividual; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -170,12 +171,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -192,7 +199,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -341,7 +352,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -380,7 +391,7 @@ public Form1095B() { public Form1095B( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1020,11 +1031,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1456,7 +1467,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 3d58999..318c772 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java @@ -21,6 +21,7 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.CoveredIndividual; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.OfferAndCoverage; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; @@ -191,12 +192,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -213,7 +220,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -362,7 +373,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -401,7 +412,7 @@ public Form1095C() { public Form1095C( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1087,11 +1098,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1538,7 +1549,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 8bd6739..5577cca 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -123,12 +124,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -145,7 +152,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -289,7 +300,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -439,7 +450,7 @@ public Form1098() { public Form1098( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1124,11 +1135,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1802,7 +1813,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1098E.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098E.java new file mode 100644 index 0000000..c2537a3 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098E.java @@ -0,0 +1,1759 @@ +/* + * 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.FederalEfileStatusDetail; +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-E: Student Loan Interest Statement The recipient is the borrower and the issuer is the lender. *Required:* `studentLoanInterestReceivedByLender`. A blank or zero amount is reported on `#/payments`. A negative amount is not rejected. Form 1098-E has no state or local withholding and no second TIN notice, so `stateAndLocalWithholding` and `secondTinNotice` are discarded and read back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1098E { + public static final String SERIALIZED_NAME_STUDENT_LOAN_INTEREST_RECEIVED_BY_LENDER = "studentLoanInterestReceivedByLender"; + @SerializedName(SERIALIZED_NAME_STUDENT_LOAN_INTEREST_RECEIVED_BY_LENDER) + private Double studentLoanInterestReceivedByLender; + + public static final String SERIALIZED_NAME_EXCLUDES_LOAN_ORIGINATION_FEES_OR_CAPITALIZED_INTEREST_INDICATOR = "excludesLoanOriginationFeesOrCapitalizedInterestIndicator"; + @SerializedName(SERIALIZED_NAME_EXCLUDES_LOAN_ORIGINATION_FEES_OR_CAPITALIZED_INTEREST_INDICATOR) + private Boolean excludesLoanOriginationFeesOrCapitalizedInterestIndicator; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1098_E("1098-E"), + + _1098_T("1098-T"), + + _1099_B("1099-B"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_G("1099-G"), + + _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"), + + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); + + 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 FederalEfileStatusDetail 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 Form1098E() { + } + + public Form1098E( + String id, + FederalEfileStatusDetail 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 Form1098E studentLoanInterestReceivedByLender(Double studentLoanInterestReceivedByLender) { + this.studentLoanInterestReceivedByLender = studentLoanInterestReceivedByLender; + return this; + } + + /** + * Student loan interest received by lender + * @return studentLoanInterestReceivedByLender + */ + @javax.annotation.Nullable + public Double getStudentLoanInterestReceivedByLender() { + return studentLoanInterestReceivedByLender; + } + + public void setStudentLoanInterestReceivedByLender(Double studentLoanInterestReceivedByLender) { + this.studentLoanInterestReceivedByLender = studentLoanInterestReceivedByLender; + } + + + public Form1098E excludesLoanOriginationFeesOrCapitalizedInterestIndicator(Boolean excludesLoanOriginationFeesOrCapitalizedInterestIndicator) { + this.excludesLoanOriginationFeesOrCapitalizedInterestIndicator = excludesLoanOriginationFeesOrCapitalizedInterestIndicator; + return this; + } + + /** + * If checked, the student loan interest received by lender does not include loan origination fees and/or capitalized interest for loans made before September 1, 2004 + * @return excludesLoanOriginationFeesOrCapitalizedInterestIndicator + */ + @javax.annotation.Nullable + public Boolean getExcludesLoanOriginationFeesOrCapitalizedInterestIndicator() { + return excludesLoanOriginationFeesOrCapitalizedInterestIndicator; + } + + public void setExcludesLoanOriginationFeesOrCapitalizedInterestIndicator(Boolean excludesLoanOriginationFeesOrCapitalizedInterestIndicator) { + this.excludesLoanOriginationFeesOrCapitalizedInterestIndicator = excludesLoanOriginationFeesOrCapitalizedInterestIndicator; + } + + + public Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public FederalEfileStatusDetail 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E 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 Form1098E instance itself + */ + public Form1098E 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; + } + Form1098E form1098E = (Form1098E) o; + return Objects.equals(this.studentLoanInterestReceivedByLender, form1098E.studentLoanInterestReceivedByLender) && + Objects.equals(this.excludesLoanOriginationFeesOrCapitalizedInterestIndicator, form1098E.excludesLoanOriginationFeesOrCapitalizedInterestIndicator) && + Objects.equals(this.type, form1098E.type) && + Objects.equals(this.id, form1098E.id) && + Objects.equals(this.issuerId, form1098E.issuerId) && + Objects.equals(this.issuerReferenceId, form1098E.issuerReferenceId) && + Objects.equals(this.issuerTin, form1098E.issuerTin) && + Objects.equals(this.taxYear, form1098E.taxYear) && + Objects.equals(this.referenceId, form1098E.referenceId) && + Objects.equals(this.tin, form1098E.tin) && + Objects.equals(this.recipientName, form1098E.recipientName) && + Objects.equals(this.address, form1098E.address) && + Objects.equals(this.address2, form1098E.address2) && + Objects.equals(this.city, form1098E.city) && + Objects.equals(this.state, form1098E.state) && + Objects.equals(this.zip, form1098E.zip) && + Objects.equals(this.email, form1098E.email) && + Objects.equals(this.nonUsProvince, form1098E.nonUsProvince) && + Objects.equals(this.countryCode, form1098E.countryCode) && + Objects.equals(this.federalEfileDate, form1098E.federalEfileDate) && + Objects.equals(this.postalMail, form1098E.postalMail) && + Objects.equals(this.stateEfileDate, form1098E.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1098E.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1098E.tinMatch) && + Objects.equals(this.addressVerification, form1098E.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1098E.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form1098E.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1098E.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1098E.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1098E.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1098E.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1098E.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1098E.validationErrors) && + Objects.equals(this.createdAt, form1098E.createdAt) && + Objects.equals(this.updatedAt, form1098E.updatedAt) && + Objects.equals(this.tinType, form1098E.tinType) && + Objects.equals(this.businessName, form1098E.businessName) && + Objects.equals(this.businessName2, form1098E.businessName2) && + Objects.equals(this.firstName, form1098E.firstName) && + Objects.equals(this.middleName, form1098E.middleName) && + Objects.equals(this.lastName, form1098E.lastName) && + Objects.equals(this.suffixName, form1098E.suffixName) && + Objects.equals(this.recipientSecondName, form1098E.recipientSecondName) && + Objects.equals(this.accountNumber, form1098E.accountNumber) && + Objects.equals(this.officeCode, form1098E.officeCode) && + Objects.equals(this.noTin, form1098E.noTin) && + Objects.equals(this.secondTinNotice, form1098E.secondTinNotice)&& + Objects.equals(this.additionalProperties, form1098E.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(studentLoanInterestReceivedByLender, excludesLoanOriginationFeesOrCapitalizedInterestIndicator, 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 Form1098E {\n"); + sb.append(" studentLoanInterestReceivedByLender: ").append(toIndentedString(studentLoanInterestReceivedByLender)).append("\n"); + sb.append(" excludesLoanOriginationFeesOrCapitalizedInterestIndicator: ").append(toIndentedString(excludesLoanOriginationFeesOrCapitalizedInterestIndicator)).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 Form1098E + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1098E.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1098E is not found in the empty JSON string", Form1098E.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1098E.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()) { + FederalEfileStatusDetail.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 (!Form1098E.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1098E' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1098E.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1098E 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 Form1098E read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form1098E 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 Form1098E given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1098E + * @throws IOException if the JSON string is invalid with respect to Form1098E + */ + public static Form1098E fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1098E.class); + } + + /** + * Convert an instance of Form1098E 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/Form1098T.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098T.java index 2d8864e..df7cc0c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1098T.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098T.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -111,12 +112,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -133,7 +140,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -277,7 +288,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -427,7 +438,7 @@ public Form1098T() { public Form1098T( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1055,11 +1066,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1721,7 +1732,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099B.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099B.java new file mode 100644 index 0000000..41fd662 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099B.java @@ -0,0 +1,2511 @@ +/* + * 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.FederalEfileStatusDetail; +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-B: Proceeds From Broker and Barter Exchange Transactions The recipient is the customer and the issuer is the broker or barter exchange. Each form reports one sale. *Required:* `applicableCheckboxOnForm8949`, `descriptionOfProperty`, `proceeds` (which can be zero or negative) and `proceedsReportedToIrs`. `typeOfGainOrLoss` is required unless `noncoveredSecurity` is `true`. `dateSoldOrDisposed` must fall in the tax year. `dateAcquired` can't be after the tax year or before January 1 of the year 50 years before the current filing year, whatever the form's tax year. `costOrOtherBasis`, `washSaleLossDisallowed` and `federalIncomeTaxWithheld` can't be negative; the other amounts can. `federalIncomeTaxWithheld` must be less than `proceeds` (zero when `proceeds` is zero or negative), and can't be more than 24% of the other amounts on the form combined, not counting state and local withholding. `stateAndLocalWithholding` carries `state`, `stateId`, `stateTaxWithheld`, `locality`, `localityId` and `localTaxWithheld`. `state` and `stateId` are required when `stateTaxWithheld` has an amount. Form 1099-B has no state or local income fields, so `stateIncome` and `localIncome` are discarded and read back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099B { + /** + * Applicable checkbox on Form 8949. * `A` - Short-term transaction, basis reported to the IRS * `B` - Short-term transaction, basis not reported to the IRS * `D` - Long-term transaction, basis reported to the IRS * `E` - Long-term transaction, basis not reported to the IRS * `X` - Basis not reported to the IRS and the holding period is unknown + */ + @JsonAdapter(ApplicableCheckboxOnForm8949Enum.Adapter.class) + public enum ApplicableCheckboxOnForm8949Enum { + A("A"), + + B("B"), + + D("D"), + + E("E"), + + X("X"); + + private String value; + + ApplicableCheckboxOnForm8949Enum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ApplicableCheckboxOnForm8949Enum fromValue(String value) { + for (ApplicableCheckboxOnForm8949Enum b : ApplicableCheckboxOnForm8949Enum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ApplicableCheckboxOnForm8949Enum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ApplicableCheckboxOnForm8949Enum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ApplicableCheckboxOnForm8949Enum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ApplicableCheckboxOnForm8949Enum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_APPLICABLE_CHECKBOX_ON_FORM8949 = "applicableCheckboxOnForm8949"; + @SerializedName(SERIALIZED_NAME_APPLICABLE_CHECKBOX_ON_FORM8949) + private ApplicableCheckboxOnForm8949Enum applicableCheckboxOnForm8949; + + public static final String SERIALIZED_NAME_CUSIP_NUMBER = "cusipNumber"; + @SerializedName(SERIALIZED_NAME_CUSIP_NUMBER) + private String cusipNumber; + + public static final String SERIALIZED_NAME_DESCRIPTION_OF_PROPERTY = "descriptionOfProperty"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION_OF_PROPERTY) + private String descriptionOfProperty; + + public static final String SERIALIZED_NAME_DATE_ACQUIRED = "dateAcquired"; + @SerializedName(SERIALIZED_NAME_DATE_ACQUIRED) + private LocalDate dateAcquired; + + public static final String SERIALIZED_NAME_DATE_SOLD_OR_DISPOSED = "dateSoldOrDisposed"; + @SerializedName(SERIALIZED_NAME_DATE_SOLD_OR_DISPOSED) + private LocalDate dateSoldOrDisposed; + + public static final String SERIALIZED_NAME_PROCEEDS = "proceeds"; + @SerializedName(SERIALIZED_NAME_PROCEEDS) + private Double proceeds; + + public static final String SERIALIZED_NAME_COST_OR_OTHER_BASIS = "costOrOtherBasis"; + @SerializedName(SERIALIZED_NAME_COST_OR_OTHER_BASIS) + private Double costOrOtherBasis; + + public static final String SERIALIZED_NAME_ACCRUED_MARKET_DISCOUNT = "accruedMarketDiscount"; + @SerializedName(SERIALIZED_NAME_ACCRUED_MARKET_DISCOUNT) + private Double accruedMarketDiscount; + + public static final String SERIALIZED_NAME_WASH_SALE_LOSS_DISALLOWED = "washSaleLossDisallowed"; + @SerializedName(SERIALIZED_NAME_WASH_SALE_LOSS_DISALLOWED) + private Double washSaleLossDisallowed; + + /** + * Type of gain or loss. Required unless `noncoveredSecurity` is `true`. * `SHORT_TERM` - Short-term gain or loss * `LONG_TERM` - Long-term gain or loss * `ORDINARY_SHORT_TERM` - Ordinary, short-term * `ORDINARY_LONG_TERM` - Ordinary, long-term + */ + @JsonAdapter(TypeOfGainOrLossEnum.Adapter.class) + public enum TypeOfGainOrLossEnum { + SHORT_TERM("SHORT_TERM"), + + LONG_TERM("LONG_TERM"), + + ORDINARY_SHORT_TERM("ORDINARY_SHORT_TERM"), + + ORDINARY_LONG_TERM("ORDINARY_LONG_TERM"); + + private String value; + + TypeOfGainOrLossEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeOfGainOrLossEnum fromValue(String value) { + for (TypeOfGainOrLossEnum b : TypeOfGainOrLossEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeOfGainOrLossEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeOfGainOrLossEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeOfGainOrLossEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeOfGainOrLossEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE_OF_GAIN_OR_LOSS = "typeOfGainOrLoss"; + @SerializedName(SERIALIZED_NAME_TYPE_OF_GAIN_OR_LOSS) + private TypeOfGainOrLossEnum typeOfGainOrLoss; + + /** + * Source of the proceeds, if they are from collectibles or a Qualified Opportunity Fund. * `COLLECTIBLES` - Collectibles * `QOF` - Qualified Opportunity Fund (QOF) + */ + @JsonAdapter(ProceedsFromEnum.Adapter.class) + public enum ProceedsFromEnum { + COLLECTIBLES("COLLECTIBLES"), + + QOF("QOF"); + + private String value; + + ProceedsFromEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProceedsFromEnum fromValue(String value) { + for (ProceedsFromEnum b : ProceedsFromEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ProceedsFromEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProceedsFromEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ProceedsFromEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ProceedsFromEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PROCEEDS_FROM = "proceedsFrom"; + @SerializedName(SERIALIZED_NAME_PROCEEDS_FROM) + private ProceedsFromEnum proceedsFrom; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_NONCOVERED_SECURITY = "noncoveredSecurity"; + @SerializedName(SERIALIZED_NAME_NONCOVERED_SECURITY) + private Boolean noncoveredSecurity; + + /** + * Whether gross or net proceeds are reported to the IRS. * `GROSS` - Gross proceeds * `NET` - Net proceeds + */ + @JsonAdapter(ProceedsReportedToIrsEnum.Adapter.class) + public enum ProceedsReportedToIrsEnum { + GROSS("GROSS"), + + NET("NET"); + + private String value; + + ProceedsReportedToIrsEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ProceedsReportedToIrsEnum fromValue(String value) { + for (ProceedsReportedToIrsEnum b : ProceedsReportedToIrsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ProceedsReportedToIrsEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ProceedsReportedToIrsEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ProceedsReportedToIrsEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + ProceedsReportedToIrsEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_PROCEEDS_REPORTED_TO_IRS = "proceedsReportedToIrs"; + @SerializedName(SERIALIZED_NAME_PROCEEDS_REPORTED_TO_IRS) + private ProceedsReportedToIrsEnum proceedsReportedToIrs; + + public static final String SERIALIZED_NAME_LOSS_NOT_ALLOWED = "lossNotAllowed"; + @SerializedName(SERIALIZED_NAME_LOSS_NOT_ALLOWED) + private Boolean lossNotAllowed; + + public static final String SERIALIZED_NAME_PROFIT_OR_LOSS_REALIZED_ON_CLOSED_CONTRACTS = "profitOrLossRealizedOnClosedContracts"; + @SerializedName(SERIALIZED_NAME_PROFIT_OR_LOSS_REALIZED_ON_CLOSED_CONTRACTS) + private Double profitOrLossRealizedOnClosedContracts; + + public static final String SERIALIZED_NAME_UNREALIZED_PROFIT_OR_LOSS_ON_OPEN_CONTRACTS_PRIOR_YEAR = "unrealizedProfitOrLossOnOpenContractsPriorYear"; + @SerializedName(SERIALIZED_NAME_UNREALIZED_PROFIT_OR_LOSS_ON_OPEN_CONTRACTS_PRIOR_YEAR) + private Double unrealizedProfitOrLossOnOpenContractsPriorYear; + + public static final String SERIALIZED_NAME_UNREALIZED_PROFIT_OR_LOSS_ON_OPEN_CONTRACTS_CURRENT_YEAR = "unrealizedProfitOrLossOnOpenContractsCurrentYear"; + @SerializedName(SERIALIZED_NAME_UNREALIZED_PROFIT_OR_LOSS_ON_OPEN_CONTRACTS_CURRENT_YEAR) + private Double unrealizedProfitOrLossOnOpenContractsCurrentYear; + + public static final String SERIALIZED_NAME_AGGREGATE_PROFIT_OR_LOSS_ON_CONTRACTS = "aggregateProfitOrLossOnContracts"; + @SerializedName(SERIALIZED_NAME_AGGREGATE_PROFIT_OR_LOSS_ON_CONTRACTS) + private Double aggregateProfitOrLossOnContracts; + + public static final String SERIALIZED_NAME_BASIS_REPORTED_TO_IRS = "basisReportedToIrs"; + @SerializedName(SERIALIZED_NAME_BASIS_REPORTED_TO_IRS) + private Boolean basisReportedToIrs; + + public static final String SERIALIZED_NAME_BARTERING = "bartering"; + @SerializedName(SERIALIZED_NAME_BARTERING) + private Double bartering; + + public static final String SERIALIZED_NAME_FATCA_FILING_REQUIREMENT = "fatcaFilingRequirement"; + @SerializedName(SERIALIZED_NAME_FATCA_FILING_REQUIREMENT) + private Boolean fatcaFilingRequirement; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1098_E("1098-E"), + + _1098_T("1098-T"), + + _1099_B("1099-B"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_G("1099-G"), + + _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"), + + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); + + 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 FederalEfileStatusDetail 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 Form1099B() { + } + + public Form1099B( + String id, + FederalEfileStatusDetail 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 Form1099B applicableCheckboxOnForm8949(ApplicableCheckboxOnForm8949Enum applicableCheckboxOnForm8949) { + this.applicableCheckboxOnForm8949 = applicableCheckboxOnForm8949; + return this; + } + + /** + * Applicable checkbox on Form 8949. * `A` - Short-term transaction, basis reported to the IRS * `B` - Short-term transaction, basis not reported to the IRS * `D` - Long-term transaction, basis reported to the IRS * `E` - Long-term transaction, basis not reported to the IRS * `X` - Basis not reported to the IRS and the holding period is unknown + * @return applicableCheckboxOnForm8949 + */ + @javax.annotation.Nullable + public ApplicableCheckboxOnForm8949Enum getApplicableCheckboxOnForm8949() { + return applicableCheckboxOnForm8949; + } + + public void setApplicableCheckboxOnForm8949(ApplicableCheckboxOnForm8949Enum applicableCheckboxOnForm8949) { + this.applicableCheckboxOnForm8949 = applicableCheckboxOnForm8949; + } + + + public Form1099B cusipNumber(String cusipNumber) { + this.cusipNumber = cusipNumber; + return this; + } + + /** + * CUSIP number (up to 13 letters or digits) + * @return cusipNumber + */ + @javax.annotation.Nullable + public String getCusipNumber() { + return cusipNumber; + } + + public void setCusipNumber(String cusipNumber) { + this.cusipNumber = cusipNumber; + } + + + public Form1099B descriptionOfProperty(String descriptionOfProperty) { + this.descriptionOfProperty = descriptionOfProperty; + return this; + } + + /** + * Description of property, such as the number of shares and the name of the stock + * @return descriptionOfProperty + */ + @javax.annotation.Nullable + public String getDescriptionOfProperty() { + return descriptionOfProperty; + } + + public void setDescriptionOfProperty(String descriptionOfProperty) { + this.descriptionOfProperty = descriptionOfProperty; + } + + + public Form1099B dateAcquired(LocalDate dateAcquired) { + this.dateAcquired = dateAcquired; + return this; + } + + /** + * Date acquired. Can't be after the tax year or before January 1 of the year 50 years before the current filing year (for example, 1975-01-01 when filing for 2025), whatever the form's tax year. + * @return dateAcquired + */ + @javax.annotation.Nullable + public LocalDate getDateAcquired() { + return dateAcquired; + } + + public void setDateAcquired(LocalDate dateAcquired) { + this.dateAcquired = dateAcquired; + } + + + public Form1099B dateSoldOrDisposed(LocalDate dateSoldOrDisposed) { + this.dateSoldOrDisposed = dateSoldOrDisposed; + return this; + } + + /** + * Date sold or disposed. Must fall in the tax year. + * @return dateSoldOrDisposed + */ + @javax.annotation.Nullable + public LocalDate getDateSoldOrDisposed() { + return dateSoldOrDisposed; + } + + public void setDateSoldOrDisposed(LocalDate dateSoldOrDisposed) { + this.dateSoldOrDisposed = dateSoldOrDisposed; + } + + + public Form1099B proceeds(Double proceeds) { + this.proceeds = proceeds; + return this; + } + + /** + * Proceeds. Can be zero, or negative for a loss. + * @return proceeds + */ + @javax.annotation.Nullable + public Double getProceeds() { + return proceeds; + } + + public void setProceeds(Double proceeds) { + this.proceeds = proceeds; + } + + + public Form1099B costOrOtherBasis(Double costOrOtherBasis) { + this.costOrOtherBasis = costOrOtherBasis; + return this; + } + + /** + * Cost or other basis + * @return costOrOtherBasis + */ + @javax.annotation.Nullable + public Double getCostOrOtherBasis() { + return costOrOtherBasis; + } + + public void setCostOrOtherBasis(Double costOrOtherBasis) { + this.costOrOtherBasis = costOrOtherBasis; + } + + + public Form1099B accruedMarketDiscount(Double accruedMarketDiscount) { + this.accruedMarketDiscount = accruedMarketDiscount; + return this; + } + + /** + * Accrued market discount + * @return accruedMarketDiscount + */ + @javax.annotation.Nullable + public Double getAccruedMarketDiscount() { + return accruedMarketDiscount; + } + + public void setAccruedMarketDiscount(Double accruedMarketDiscount) { + this.accruedMarketDiscount = accruedMarketDiscount; + } + + + public Form1099B washSaleLossDisallowed(Double washSaleLossDisallowed) { + this.washSaleLossDisallowed = washSaleLossDisallowed; + return this; + } + + /** + * Wash sale loss disallowed + * @return washSaleLossDisallowed + */ + @javax.annotation.Nullable + public Double getWashSaleLossDisallowed() { + return washSaleLossDisallowed; + } + + public void setWashSaleLossDisallowed(Double washSaleLossDisallowed) { + this.washSaleLossDisallowed = washSaleLossDisallowed; + } + + + public Form1099B typeOfGainOrLoss(TypeOfGainOrLossEnum typeOfGainOrLoss) { + this.typeOfGainOrLoss = typeOfGainOrLoss; + return this; + } + + /** + * Type of gain or loss. Required unless `noncoveredSecurity` is `true`. * `SHORT_TERM` - Short-term gain or loss * `LONG_TERM` - Long-term gain or loss * `ORDINARY_SHORT_TERM` - Ordinary, short-term * `ORDINARY_LONG_TERM` - Ordinary, long-term + * @return typeOfGainOrLoss + */ + @javax.annotation.Nullable + public TypeOfGainOrLossEnum getTypeOfGainOrLoss() { + return typeOfGainOrLoss; + } + + public void setTypeOfGainOrLoss(TypeOfGainOrLossEnum typeOfGainOrLoss) { + this.typeOfGainOrLoss = typeOfGainOrLoss; + } + + + public Form1099B proceedsFrom(ProceedsFromEnum proceedsFrom) { + this.proceedsFrom = proceedsFrom; + return this; + } + + /** + * Source of the proceeds, if they are from collectibles or a Qualified Opportunity Fund. * `COLLECTIBLES` - Collectibles * `QOF` - Qualified Opportunity Fund (QOF) + * @return proceedsFrom + */ + @javax.annotation.Nullable + public ProceedsFromEnum getProceedsFrom() { + return proceedsFrom; + } + + public void setProceedsFrom(ProceedsFromEnum proceedsFrom) { + this.proceedsFrom = proceedsFrom; + } + + + public Form1099B federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld. Must be less than `proceeds` (zero when `proceeds` is zero or negative), and can't be more than 24% of the other amounts on the form combined, not counting state and local withholding. + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099B noncoveredSecurity(Boolean noncoveredSecurity) { + this.noncoveredSecurity = noncoveredSecurity; + return this; + } + + /** + * If checked, the security is noncovered + * @return noncoveredSecurity + */ + @javax.annotation.Nullable + public Boolean getNoncoveredSecurity() { + return noncoveredSecurity; + } + + public void setNoncoveredSecurity(Boolean noncoveredSecurity) { + this.noncoveredSecurity = noncoveredSecurity; + } + + + public Form1099B proceedsReportedToIrs(ProceedsReportedToIrsEnum proceedsReportedToIrs) { + this.proceedsReportedToIrs = proceedsReportedToIrs; + return this; + } + + /** + * Whether gross or net proceeds are reported to the IRS. * `GROSS` - Gross proceeds * `NET` - Net proceeds + * @return proceedsReportedToIrs + */ + @javax.annotation.Nullable + public ProceedsReportedToIrsEnum getProceedsReportedToIrs() { + return proceedsReportedToIrs; + } + + public void setProceedsReportedToIrs(ProceedsReportedToIrsEnum proceedsReportedToIrs) { + this.proceedsReportedToIrs = proceedsReportedToIrs; + } + + + public Form1099B lossNotAllowed(Boolean lossNotAllowed) { + this.lossNotAllowed = lossNotAllowed; + return this; + } + + /** + * If checked, the loss is not allowed based on the amount in `proceeds` + * @return lossNotAllowed + */ + @javax.annotation.Nullable + public Boolean getLossNotAllowed() { + return lossNotAllowed; + } + + public void setLossNotAllowed(Boolean lossNotAllowed) { + this.lossNotAllowed = lossNotAllowed; + } + + + public Form1099B profitOrLossRealizedOnClosedContracts(Double profitOrLossRealizedOnClosedContracts) { + this.profitOrLossRealizedOnClosedContracts = profitOrLossRealizedOnClosedContracts; + return this; + } + + /** + * Profit or (loss) realized in the tax year on closed contracts + * @return profitOrLossRealizedOnClosedContracts + */ + @javax.annotation.Nullable + public Double getProfitOrLossRealizedOnClosedContracts() { + return profitOrLossRealizedOnClosedContracts; + } + + public void setProfitOrLossRealizedOnClosedContracts(Double profitOrLossRealizedOnClosedContracts) { + this.profitOrLossRealizedOnClosedContracts = profitOrLossRealizedOnClosedContracts; + } + + + public Form1099B unrealizedProfitOrLossOnOpenContractsPriorYear(Double unrealizedProfitOrLossOnOpenContractsPriorYear) { + this.unrealizedProfitOrLossOnOpenContractsPriorYear = unrealizedProfitOrLossOnOpenContractsPriorYear; + return this; + } + + /** + * Unrealized profit or (loss) on open contracts at the end of the prior tax year + * @return unrealizedProfitOrLossOnOpenContractsPriorYear + */ + @javax.annotation.Nullable + public Double getUnrealizedProfitOrLossOnOpenContractsPriorYear() { + return unrealizedProfitOrLossOnOpenContractsPriorYear; + } + + public void setUnrealizedProfitOrLossOnOpenContractsPriorYear(Double unrealizedProfitOrLossOnOpenContractsPriorYear) { + this.unrealizedProfitOrLossOnOpenContractsPriorYear = unrealizedProfitOrLossOnOpenContractsPriorYear; + } + + + public Form1099B unrealizedProfitOrLossOnOpenContractsCurrentYear(Double unrealizedProfitOrLossOnOpenContractsCurrentYear) { + this.unrealizedProfitOrLossOnOpenContractsCurrentYear = unrealizedProfitOrLossOnOpenContractsCurrentYear; + return this; + } + + /** + * Unrealized profit or (loss) on open contracts at the end of the tax year + * @return unrealizedProfitOrLossOnOpenContractsCurrentYear + */ + @javax.annotation.Nullable + public Double getUnrealizedProfitOrLossOnOpenContractsCurrentYear() { + return unrealizedProfitOrLossOnOpenContractsCurrentYear; + } + + public void setUnrealizedProfitOrLossOnOpenContractsCurrentYear(Double unrealizedProfitOrLossOnOpenContractsCurrentYear) { + this.unrealizedProfitOrLossOnOpenContractsCurrentYear = unrealizedProfitOrLossOnOpenContractsCurrentYear; + } + + + public Form1099B aggregateProfitOrLossOnContracts(Double aggregateProfitOrLossOnContracts) { + this.aggregateProfitOrLossOnContracts = aggregateProfitOrLossOnContracts; + return this; + } + + /** + * Aggregate profit or (loss) on contracts + * @return aggregateProfitOrLossOnContracts + */ + @javax.annotation.Nullable + public Double getAggregateProfitOrLossOnContracts() { + return aggregateProfitOrLossOnContracts; + } + + public void setAggregateProfitOrLossOnContracts(Double aggregateProfitOrLossOnContracts) { + this.aggregateProfitOrLossOnContracts = aggregateProfitOrLossOnContracts; + } + + + public Form1099B basisReportedToIrs(Boolean basisReportedToIrs) { + this.basisReportedToIrs = basisReportedToIrs; + return this; + } + + /** + * If checked, the basis is reported to the IRS. Only takes effect when `noncoveredSecurity` is also checked: otherwise it isn't sent to the IRS, and changing it doesn't trigger a correction. + * @return basisReportedToIrs + */ + @javax.annotation.Nullable + public Boolean getBasisReportedToIrs() { + return basisReportedToIrs; + } + + public void setBasisReportedToIrs(Boolean basisReportedToIrs) { + this.basisReportedToIrs = basisReportedToIrs; + } + + + public Form1099B bartering(Double bartering) { + this.bartering = bartering; + return this; + } + + /** + * Bartering + * @return bartering + */ + @javax.annotation.Nullable + public Double getBartering() { + return bartering; + } + + public void setBartering(Double bartering) { + this.bartering = bartering; + } + + + public Form1099B fatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + return this; + } + + /** + * FATCA filing requirement + * @return fatcaFilingRequirement + */ + @javax.annotation.Nullable + public Boolean getFatcaFilingRequirement() { + return fatcaFilingRequirement; + } + + public void setFatcaFilingRequirement(Boolean fatcaFilingRequirement) { + this.fatcaFilingRequirement = fatcaFilingRequirement; + } + + + public Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public FederalEfileStatusDetail 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B 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 Form1099B instance itself + */ + public Form1099B 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; + } + Form1099B form1099B = (Form1099B) o; + return Objects.equals(this.applicableCheckboxOnForm8949, form1099B.applicableCheckboxOnForm8949) && + Objects.equals(this.cusipNumber, form1099B.cusipNumber) && + Objects.equals(this.descriptionOfProperty, form1099B.descriptionOfProperty) && + Objects.equals(this.dateAcquired, form1099B.dateAcquired) && + Objects.equals(this.dateSoldOrDisposed, form1099B.dateSoldOrDisposed) && + Objects.equals(this.proceeds, form1099B.proceeds) && + Objects.equals(this.costOrOtherBasis, form1099B.costOrOtherBasis) && + Objects.equals(this.accruedMarketDiscount, form1099B.accruedMarketDiscount) && + Objects.equals(this.washSaleLossDisallowed, form1099B.washSaleLossDisallowed) && + Objects.equals(this.typeOfGainOrLoss, form1099B.typeOfGainOrLoss) && + Objects.equals(this.proceedsFrom, form1099B.proceedsFrom) && + Objects.equals(this.federalIncomeTaxWithheld, form1099B.federalIncomeTaxWithheld) && + Objects.equals(this.noncoveredSecurity, form1099B.noncoveredSecurity) && + Objects.equals(this.proceedsReportedToIrs, form1099B.proceedsReportedToIrs) && + Objects.equals(this.lossNotAllowed, form1099B.lossNotAllowed) && + Objects.equals(this.profitOrLossRealizedOnClosedContracts, form1099B.profitOrLossRealizedOnClosedContracts) && + Objects.equals(this.unrealizedProfitOrLossOnOpenContractsPriorYear, form1099B.unrealizedProfitOrLossOnOpenContractsPriorYear) && + Objects.equals(this.unrealizedProfitOrLossOnOpenContractsCurrentYear, form1099B.unrealizedProfitOrLossOnOpenContractsCurrentYear) && + Objects.equals(this.aggregateProfitOrLossOnContracts, form1099B.aggregateProfitOrLossOnContracts) && + Objects.equals(this.basisReportedToIrs, form1099B.basisReportedToIrs) && + Objects.equals(this.bartering, form1099B.bartering) && + Objects.equals(this.fatcaFilingRequirement, form1099B.fatcaFilingRequirement) && + Objects.equals(this.type, form1099B.type) && + Objects.equals(this.id, form1099B.id) && + Objects.equals(this.issuerId, form1099B.issuerId) && + Objects.equals(this.issuerReferenceId, form1099B.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099B.issuerTin) && + Objects.equals(this.taxYear, form1099B.taxYear) && + Objects.equals(this.referenceId, form1099B.referenceId) && + Objects.equals(this.tin, form1099B.tin) && + Objects.equals(this.recipientName, form1099B.recipientName) && + Objects.equals(this.address, form1099B.address) && + Objects.equals(this.address2, form1099B.address2) && + Objects.equals(this.city, form1099B.city) && + Objects.equals(this.state, form1099B.state) && + Objects.equals(this.zip, form1099B.zip) && + Objects.equals(this.email, form1099B.email) && + Objects.equals(this.nonUsProvince, form1099B.nonUsProvince) && + Objects.equals(this.countryCode, form1099B.countryCode) && + Objects.equals(this.federalEfileDate, form1099B.federalEfileDate) && + Objects.equals(this.postalMail, form1099B.postalMail) && + Objects.equals(this.stateEfileDate, form1099B.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099B.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099B.tinMatch) && + Objects.equals(this.addressVerification, form1099B.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099B.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form1099B.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099B.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099B.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099B.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099B.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099B.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1099B.validationErrors) && + Objects.equals(this.createdAt, form1099B.createdAt) && + Objects.equals(this.updatedAt, form1099B.updatedAt) && + Objects.equals(this.tinType, form1099B.tinType) && + Objects.equals(this.businessName, form1099B.businessName) && + Objects.equals(this.businessName2, form1099B.businessName2) && + Objects.equals(this.firstName, form1099B.firstName) && + Objects.equals(this.middleName, form1099B.middleName) && + Objects.equals(this.lastName, form1099B.lastName) && + Objects.equals(this.suffixName, form1099B.suffixName) && + Objects.equals(this.recipientSecondName, form1099B.recipientSecondName) && + Objects.equals(this.accountNumber, form1099B.accountNumber) && + Objects.equals(this.officeCode, form1099B.officeCode) && + Objects.equals(this.noTin, form1099B.noTin) && + Objects.equals(this.secondTinNotice, form1099B.secondTinNotice)&& + Objects.equals(this.additionalProperties, form1099B.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(applicableCheckboxOnForm8949, cusipNumber, descriptionOfProperty, dateAcquired, dateSoldOrDisposed, proceeds, costOrOtherBasis, accruedMarketDiscount, washSaleLossDisallowed, typeOfGainOrLoss, proceedsFrom, federalIncomeTaxWithheld, noncoveredSecurity, proceedsReportedToIrs, lossNotAllowed, profitOrLossRealizedOnClosedContracts, unrealizedProfitOrLossOnOpenContractsPriorYear, unrealizedProfitOrLossOnOpenContractsCurrentYear, aggregateProfitOrLossOnContracts, basisReportedToIrs, bartering, fatcaFilingRequirement, 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 Form1099B {\n"); + sb.append(" applicableCheckboxOnForm8949: ").append(toIndentedString(applicableCheckboxOnForm8949)).append("\n"); + sb.append(" cusipNumber: ").append(toIndentedString(cusipNumber)).append("\n"); + sb.append(" descriptionOfProperty: ").append(toIndentedString(descriptionOfProperty)).append("\n"); + sb.append(" dateAcquired: ").append(toIndentedString(dateAcquired)).append("\n"); + sb.append(" dateSoldOrDisposed: ").append(toIndentedString(dateSoldOrDisposed)).append("\n"); + sb.append(" proceeds: ").append(toIndentedString(proceeds)).append("\n"); + sb.append(" costOrOtherBasis: ").append(toIndentedString(costOrOtherBasis)).append("\n"); + sb.append(" accruedMarketDiscount: ").append(toIndentedString(accruedMarketDiscount)).append("\n"); + sb.append(" washSaleLossDisallowed: ").append(toIndentedString(washSaleLossDisallowed)).append("\n"); + sb.append(" typeOfGainOrLoss: ").append(toIndentedString(typeOfGainOrLoss)).append("\n"); + sb.append(" proceedsFrom: ").append(toIndentedString(proceedsFrom)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" noncoveredSecurity: ").append(toIndentedString(noncoveredSecurity)).append("\n"); + sb.append(" proceedsReportedToIrs: ").append(toIndentedString(proceedsReportedToIrs)).append("\n"); + sb.append(" lossNotAllowed: ").append(toIndentedString(lossNotAllowed)).append("\n"); + sb.append(" profitOrLossRealizedOnClosedContracts: ").append(toIndentedString(profitOrLossRealizedOnClosedContracts)).append("\n"); + sb.append(" unrealizedProfitOrLossOnOpenContractsPriorYear: ").append(toIndentedString(unrealizedProfitOrLossOnOpenContractsPriorYear)).append("\n"); + sb.append(" unrealizedProfitOrLossOnOpenContractsCurrentYear: ").append(toIndentedString(unrealizedProfitOrLossOnOpenContractsCurrentYear)).append("\n"); + sb.append(" aggregateProfitOrLossOnContracts: ").append(toIndentedString(aggregateProfitOrLossOnContracts)).append("\n"); + sb.append(" basisReportedToIrs: ").append(toIndentedString(basisReportedToIrs)).append("\n"); + sb.append(" bartering: ").append(toIndentedString(bartering)).append("\n"); + sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).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("applicableCheckboxOnForm8949"); + openapiRequiredFields.add("descriptionOfProperty"); + openapiRequiredFields.add("proceeds"); + openapiRequiredFields.add("proceedsReportedToIrs"); + 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 Form1099B + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099B.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099B is not found in the empty JSON string", Form1099B.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099B.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("applicableCheckboxOnForm8949") != null && !jsonObj.get("applicableCheckboxOnForm8949").isJsonNull()) && !jsonObj.get("applicableCheckboxOnForm8949").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `applicableCheckboxOnForm8949` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicableCheckboxOnForm8949").toString())); + } + // validate the required field `applicableCheckboxOnForm8949` + ApplicableCheckboxOnForm8949Enum.validateJsonElement(jsonObj.get("applicableCheckboxOnForm8949")); + if ((jsonObj.get("cusipNumber") != null && !jsonObj.get("cusipNumber").isJsonNull()) && !jsonObj.get("cusipNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cusipNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cusipNumber").toString())); + } + if ((jsonObj.get("descriptionOfProperty") != null && !jsonObj.get("descriptionOfProperty").isJsonNull()) && !jsonObj.get("descriptionOfProperty").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `descriptionOfProperty` to be a primitive type in the JSON string but got `%s`", jsonObj.get("descriptionOfProperty").toString())); + } + if ((jsonObj.get("typeOfGainOrLoss") != null && !jsonObj.get("typeOfGainOrLoss").isJsonNull()) && !jsonObj.get("typeOfGainOrLoss").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `typeOfGainOrLoss` to be a primitive type in the JSON string but got `%s`", jsonObj.get("typeOfGainOrLoss").toString())); + } + // validate the optional field `typeOfGainOrLoss` + if (jsonObj.get("typeOfGainOrLoss") != null && !jsonObj.get("typeOfGainOrLoss").isJsonNull()) { + TypeOfGainOrLossEnum.validateJsonElement(jsonObj.get("typeOfGainOrLoss")); + } + if ((jsonObj.get("proceedsFrom") != null && !jsonObj.get("proceedsFrom").isJsonNull()) && !jsonObj.get("proceedsFrom").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `proceedsFrom` to be a primitive type in the JSON string but got `%s`", jsonObj.get("proceedsFrom").toString())); + } + // validate the optional field `proceedsFrom` + if (jsonObj.get("proceedsFrom") != null && !jsonObj.get("proceedsFrom").isJsonNull()) { + ProceedsFromEnum.validateJsonElement(jsonObj.get("proceedsFrom")); + } + if ((jsonObj.get("proceedsReportedToIrs") != null && !jsonObj.get("proceedsReportedToIrs").isJsonNull()) && !jsonObj.get("proceedsReportedToIrs").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `proceedsReportedToIrs` to be a primitive type in the JSON string but got `%s`", jsonObj.get("proceedsReportedToIrs").toString())); + } + // validate the required field `proceedsReportedToIrs` + ProceedsReportedToIrsEnum.validateJsonElement(jsonObj.get("proceedsReportedToIrs")); + 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()) { + FederalEfileStatusDetail.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 (!Form1099B.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099B' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099B.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099B 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 Form1099B read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form1099B 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 Form1099B given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099B + * @throws IOException if the JSON string is invalid with respect to Form1099B + */ + public static Form1099B fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099B.class); + } + + /** + * Convert an instance of Form1099B 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 518f2be..6faceac 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -79,12 +80,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -101,7 +108,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -250,7 +261,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -289,7 +300,7 @@ public Form1099Base() { public Form1099Base( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -788,11 +799,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1176,7 +1187,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 238db4b..84ab58e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -173,12 +174,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -195,7 +202,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -339,7 +350,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -489,7 +500,7 @@ public Form1099C() { public Form1099C( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1098,11 +1109,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1774,7 +1785,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 cca2481..c05a583 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -155,12 +156,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -177,7 +184,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -321,7 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -471,7 +482,7 @@ public Form1099Div() { public Form1099Div( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1308,11 +1319,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1999,7 +2010,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099G.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099G.java new file mode 100644 index 0000000..5124727 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099G.java @@ -0,0 +1,1962 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **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.FederalEfileStatusDetail; +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-G: Certain Government Payments The December 2026 revision of the form adds Box 10 (family leave benefits) and renumbers the state boxes: state and state identification number move from Boxes 10a/10b to Boxes 11a/11b, and state income tax withheld moves from Box 11 to Box 12. The state boxes are reported through `stateAndLocalWithholding` (`state`, `stateId`, `stateTaxWithheld`, plus `locality`, `localityId`, and `localTaxWithheld`). Form 1099-G has no state or local income box, so `stateAndLocalWithholding.stateIncome` and `stateAndLocalWithholding.localIncome` are discarded and read back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099G { + public static final String SERIALIZED_NAME_UNEMPLOYMENT_COMPENSATION = "unemploymentCompensation"; + @SerializedName(SERIALIZED_NAME_UNEMPLOYMENT_COMPENSATION) + private Double unemploymentCompensation; + + public static final String SERIALIZED_NAME_STATE_OR_LOCAL_INCOME_TAX_REFUND = "stateOrLocalIncomeTaxRefund"; + @SerializedName(SERIALIZED_NAME_STATE_OR_LOCAL_INCOME_TAX_REFUND) + private Double stateOrLocalIncomeTaxRefund; + + public static final String SERIALIZED_NAME_TAX_YEAR_OF_REFUND = "taxYearOfRefund"; + @SerializedName(SERIALIZED_NAME_TAX_YEAR_OF_REFUND) + private String taxYearOfRefund; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_RTAA_PAYMENTS = "rtaaPayments"; + @SerializedName(SERIALIZED_NAME_RTAA_PAYMENTS) + private Double rtaaPayments; + + public static final String SERIALIZED_NAME_TAXABLE_GRANTS = "taxableGrants"; + @SerializedName(SERIALIZED_NAME_TAXABLE_GRANTS) + private Double taxableGrants; + + public static final String SERIALIZED_NAME_AGRICULTURE_PAYMENTS = "agriculturePayments"; + @SerializedName(SERIALIZED_NAME_AGRICULTURE_PAYMENTS) + private Double agriculturePayments; + + public static final String SERIALIZED_NAME_TRADE_OR_BUSINESS_INCOME_INDICATOR = "tradeOrBusinessIncomeIndicator"; + @SerializedName(SERIALIZED_NAME_TRADE_OR_BUSINESS_INCOME_INDICATOR) + private Boolean tradeOrBusinessIncomeIndicator; + + public static final String SERIALIZED_NAME_MARKET_GAIN = "marketGain"; + @SerializedName(SERIALIZED_NAME_MARKET_GAIN) + private Double marketGain; + + public static final String SERIALIZED_NAME_FAMILY_LEAVE_BENEFITS = "familyLeaveBenefits"; + @SerializedName(SERIALIZED_NAME_FAMILY_LEAVE_BENEFITS) + private Double familyLeaveBenefits; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1098_E("1098-E"), + + _1098_T("1098-T"), + + _1099_B("1099-B"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_G("1099-G"), + + _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"), + + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); + + 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 FederalEfileStatusDetail 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 Form1099G() { + } + + public Form1099G( + String id, + FederalEfileStatusDetail 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 Form1099G unemploymentCompensation(Double unemploymentCompensation) { + this.unemploymentCompensation = unemploymentCompensation; + return this; + } + + /** + * Box 1. Unemployment compensation + * @return unemploymentCompensation + */ + @javax.annotation.Nullable + public Double getUnemploymentCompensation() { + return unemploymentCompensation; + } + + public void setUnemploymentCompensation(Double unemploymentCompensation) { + this.unemploymentCompensation = unemploymentCompensation; + } + + + public Form1099G stateOrLocalIncomeTaxRefund(Double stateOrLocalIncomeTaxRefund) { + this.stateOrLocalIncomeTaxRefund = stateOrLocalIncomeTaxRefund; + return this; + } + + /** + * Box 2. State or local income tax refunds, credits, or offsets. Must be greater than zero when TradeOrBusinessIncomeIndicator is true, and requires TaxYearOfRefund. + * @return stateOrLocalIncomeTaxRefund + */ + @javax.annotation.Nullable + public Double getStateOrLocalIncomeTaxRefund() { + return stateOrLocalIncomeTaxRefund; + } + + public void setStateOrLocalIncomeTaxRefund(Double stateOrLocalIncomeTaxRefund) { + this.stateOrLocalIncomeTaxRefund = stateOrLocalIncomeTaxRefund; + } + + + public Form1099G taxYearOfRefund(String taxYearOfRefund) { + this.taxYearOfRefund = taxYearOfRefund; + return this; + } + + /** + * Box 3. Tax year (YYYY) that the Box 2 amount is for. Required when StateOrLocalIncomeTaxRefund is greater than zero. Must be a four-digit year no later than the form's tax year and no more than ten years before it. + * @return taxYearOfRefund + */ + @javax.annotation.Nullable + public String getTaxYearOfRefund() { + return taxYearOfRefund; + } + + public void setTaxYearOfRefund(String taxYearOfRefund) { + this.taxYearOfRefund = taxYearOfRefund; + } + + + public Form1099G federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Box 4. Federal income tax withheld. Must be less than the total of the payment boxes. + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public Form1099G rtaaPayments(Double rtaaPayments) { + this.rtaaPayments = rtaaPayments; + return this; + } + + /** + * Box 5. Reemployment trade adjustment assistance (RTAA) payments + * @return rtaaPayments + */ + @javax.annotation.Nullable + public Double getRtaaPayments() { + return rtaaPayments; + } + + public void setRtaaPayments(Double rtaaPayments) { + this.rtaaPayments = rtaaPayments; + } + + + public Form1099G taxableGrants(Double taxableGrants) { + this.taxableGrants = taxableGrants; + return this; + } + + /** + * Box 6. Taxable grants + * @return taxableGrants + */ + @javax.annotation.Nullable + public Double getTaxableGrants() { + return taxableGrants; + } + + public void setTaxableGrants(Double taxableGrants) { + this.taxableGrants = taxableGrants; + } + + + public Form1099G agriculturePayments(Double agriculturePayments) { + this.agriculturePayments = agriculturePayments; + return this; + } + + /** + * Box 7. Agriculture payments + * @return agriculturePayments + */ + @javax.annotation.Nullable + public Double getAgriculturePayments() { + return agriculturePayments; + } + + public void setAgriculturePayments(Double agriculturePayments) { + this.agriculturePayments = agriculturePayments; + } + + + public Form1099G tradeOrBusinessIncomeIndicator(Boolean tradeOrBusinessIncomeIndicator) { + this.tradeOrBusinessIncomeIndicator = tradeOrBusinessIncomeIndicator; + return this; + } + + /** + * Box 8. If checked, the amount in Box 2 (StateOrLocalIncomeTaxRefund) is attributable to income tax that applies exclusively to income from a trade or business. + * @return tradeOrBusinessIncomeIndicator + */ + @javax.annotation.Nullable + public Boolean getTradeOrBusinessIncomeIndicator() { + return tradeOrBusinessIncomeIndicator; + } + + public void setTradeOrBusinessIncomeIndicator(Boolean tradeOrBusinessIncomeIndicator) { + this.tradeOrBusinessIncomeIndicator = tradeOrBusinessIncomeIndicator; + } + + + public Form1099G marketGain(Double marketGain) { + this.marketGain = marketGain; + return this; + } + + /** + * Box 9. Market gain + * @return marketGain + */ + @javax.annotation.Nullable + public Double getMarketGain() { + return marketGain; + } + + public void setMarketGain(Double marketGain) { + this.marketGain = marketGain; + } + + + public Form1099G familyLeaveBenefits(Double familyLeaveBenefits) { + this.familyLeaveBenefits = familyLeaveBenefits; + return this; + } + + /** + * Box 10. Family leave benefits paid under a state paid family leave program - Available only for tax year 2026 and later. Report the benefits before any withholding; federal income tax withheld from them goes in Box 4 (FederalIncomeTaxWithheld). + * @return familyLeaveBenefits + */ + @javax.annotation.Nullable + public Double getFamilyLeaveBenefits() { + return familyLeaveBenefits; + } + + public void setFamilyLeaveBenefits(Double familyLeaveBenefits) { + this.familyLeaveBenefits = familyLeaveBenefits; + } + + + public Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public FederalEfileStatusDetail 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G 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 Form1099G instance itself + */ + public Form1099G 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; + } + Form1099G form1099G = (Form1099G) o; + return Objects.equals(this.unemploymentCompensation, form1099G.unemploymentCompensation) && + Objects.equals(this.stateOrLocalIncomeTaxRefund, form1099G.stateOrLocalIncomeTaxRefund) && + Objects.equals(this.taxYearOfRefund, form1099G.taxYearOfRefund) && + Objects.equals(this.federalIncomeTaxWithheld, form1099G.federalIncomeTaxWithheld) && + Objects.equals(this.rtaaPayments, form1099G.rtaaPayments) && + Objects.equals(this.taxableGrants, form1099G.taxableGrants) && + Objects.equals(this.agriculturePayments, form1099G.agriculturePayments) && + Objects.equals(this.tradeOrBusinessIncomeIndicator, form1099G.tradeOrBusinessIncomeIndicator) && + Objects.equals(this.marketGain, form1099G.marketGain) && + Objects.equals(this.familyLeaveBenefits, form1099G.familyLeaveBenefits) && + Objects.equals(this.type, form1099G.type) && + Objects.equals(this.id, form1099G.id) && + Objects.equals(this.issuerId, form1099G.issuerId) && + Objects.equals(this.issuerReferenceId, form1099G.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099G.issuerTin) && + Objects.equals(this.taxYear, form1099G.taxYear) && + Objects.equals(this.referenceId, form1099G.referenceId) && + Objects.equals(this.tin, form1099G.tin) && + Objects.equals(this.recipientName, form1099G.recipientName) && + Objects.equals(this.address, form1099G.address) && + Objects.equals(this.address2, form1099G.address2) && + Objects.equals(this.city, form1099G.city) && + Objects.equals(this.state, form1099G.state) && + Objects.equals(this.zip, form1099G.zip) && + Objects.equals(this.email, form1099G.email) && + Objects.equals(this.nonUsProvince, form1099G.nonUsProvince) && + Objects.equals(this.countryCode, form1099G.countryCode) && + Objects.equals(this.federalEfileDate, form1099G.federalEfileDate) && + Objects.equals(this.postalMail, form1099G.postalMail) && + Objects.equals(this.stateEfileDate, form1099G.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099G.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099G.tinMatch) && + Objects.equals(this.addressVerification, form1099G.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099G.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form1099G.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099G.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099G.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099G.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099G.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099G.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1099G.validationErrors) && + Objects.equals(this.createdAt, form1099G.createdAt) && + Objects.equals(this.updatedAt, form1099G.updatedAt) && + Objects.equals(this.tinType, form1099G.tinType) && + Objects.equals(this.businessName, form1099G.businessName) && + Objects.equals(this.businessName2, form1099G.businessName2) && + Objects.equals(this.firstName, form1099G.firstName) && + Objects.equals(this.middleName, form1099G.middleName) && + Objects.equals(this.lastName, form1099G.lastName) && + Objects.equals(this.suffixName, form1099G.suffixName) && + Objects.equals(this.recipientSecondName, form1099G.recipientSecondName) && + Objects.equals(this.accountNumber, form1099G.accountNumber) && + Objects.equals(this.officeCode, form1099G.officeCode) && + Objects.equals(this.noTin, form1099G.noTin) && + Objects.equals(this.secondTinNotice, form1099G.secondTinNotice)&& + Objects.equals(this.additionalProperties, form1099G.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(unemploymentCompensation, stateOrLocalIncomeTaxRefund, taxYearOfRefund, federalIncomeTaxWithheld, rtaaPayments, taxableGrants, agriculturePayments, tradeOrBusinessIncomeIndicator, marketGain, familyLeaveBenefits, 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 Form1099G {\n"); + sb.append(" unemploymentCompensation: ").append(toIndentedString(unemploymentCompensation)).append("\n"); + sb.append(" stateOrLocalIncomeTaxRefund: ").append(toIndentedString(stateOrLocalIncomeTaxRefund)).append("\n"); + sb.append(" taxYearOfRefund: ").append(toIndentedString(taxYearOfRefund)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" rtaaPayments: ").append(toIndentedString(rtaaPayments)).append("\n"); + sb.append(" taxableGrants: ").append(toIndentedString(taxableGrants)).append("\n"); + sb.append(" agriculturePayments: ").append(toIndentedString(agriculturePayments)).append("\n"); + sb.append(" tradeOrBusinessIncomeIndicator: ").append(toIndentedString(tradeOrBusinessIncomeIndicator)).append("\n"); + sb.append(" marketGain: ").append(toIndentedString(marketGain)).append("\n"); + sb.append(" familyLeaveBenefits: ").append(toIndentedString(familyLeaveBenefits)).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 Form1099G + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099G.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099G is not found in the empty JSON string", Form1099G.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099G.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("taxYearOfRefund") != null && !jsonObj.get("taxYearOfRefund").isJsonNull()) && !jsonObj.get("taxYearOfRefund").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `taxYearOfRefund` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxYearOfRefund").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // 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()) { + FederalEfileStatusDetail.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 (!Form1099G.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099G' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099G.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099G 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 Form1099G read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form1099G 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 Form1099G given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099G + * @throws IOException if the JSON string is invalid with respect to Form1099G + */ + public static Form1099G fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099G.class); + } + + /** + * Convert an instance of Form1099G 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/Form1099Int.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java index c732d3e..79407c0 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -139,12 +140,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -161,7 +168,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -305,7 +316,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -455,7 +466,7 @@ public Form1099Int() { public Form1099Int( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1216,11 +1227,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1902,7 +1913,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 f4a7812..7d9f4a8 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -182,6 +183,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME_PHONE_NUMBER) private String paymentSettlementEntityNamePhoneNumber; + public static final String SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME = "paymentSettlementEntityName"; + @SerializedName(SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_NAME) + private String paymentSettlementEntityName; + + public static final String SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_PHONE_NUMBER = "paymentSettlementEntityPhoneNumber"; + @SerializedName(SERIALIZED_NAME_PAYMENT_SETTLEMENT_ENTITY_PHONE_NUMBER) + private String paymentSettlementEntityPhoneNumber; + public static final String SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD = "grossAmountPaymentCard"; @SerializedName(SERIALIZED_NAME_GROSS_AMOUNT_PAYMENT_CARD) private Double grossAmountPaymentCard; @@ -190,6 +199,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_CARD_NOT_PRESENT_TRANSACTIONS) private Double cardNotPresentTransactions; + public static final String SERIALIZED_NAME_CASH_TIPS = "cashTips"; + @SerializedName(SERIALIZED_NAME_CASH_TIPS) + private Double cashTips; + + public static final String SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE = "treasuryTippedOccupationCode"; + @SerializedName(SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE) + private String treasuryTippedOccupationCode; + + public static final String SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE2 = "treasuryTippedOccupationCode2"; + @SerializedName(SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE2) + private String treasuryTippedOccupationCode2; + public static final String SERIALIZED_NAME_MERCHANT_CATEGORY_CODE = "merchantCategoryCode"; @SerializedName(SERIALIZED_NAME_MERCHANT_CATEGORY_CODE) private String merchantCategoryCode; @@ -263,12 +284,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -285,7 +312,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -429,7 +460,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -579,7 +610,7 @@ public Form1099K() { public Form1099K( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -646,7 +677,7 @@ public Form1099K paymentSettlementEntityNamePhoneNumber(String paymentSettlement } /** - * Payment settlement entity name and phone number, if different from Filer's + * Payment settlement entity name and phone number, if different from Filer's. Deprecated: the IRS reports the name and phone number as separate fields (PSENm and PSEPhoneNum). Use Avalara1099.Application.Forms1099.Models.Form1099K.PaymentSettlementEntityName and Avalara1099.Application.Forms1099.Models.Form1099K.PaymentSettlementEntityPhoneNumber instead. Kept for backward compatibility with existing integrations. * @return paymentSettlementEntityNamePhoneNumber */ @javax.annotation.Nullable @@ -659,6 +690,44 @@ public void setPaymentSettlementEntityNamePhoneNumber(String paymentSettlementEn } + public Form1099K paymentSettlementEntityName(String paymentSettlementEntityName) { + this.paymentSettlementEntityName = paymentSettlementEntityName; + return this; + } + + /** + * Payment settlement entity name, if different from Filer's + * @return paymentSettlementEntityName + */ + @javax.annotation.Nullable + public String getPaymentSettlementEntityName() { + return paymentSettlementEntityName; + } + + public void setPaymentSettlementEntityName(String paymentSettlementEntityName) { + this.paymentSettlementEntityName = paymentSettlementEntityName; + } + + + public Form1099K paymentSettlementEntityPhoneNumber(String paymentSettlementEntityPhoneNumber) { + this.paymentSettlementEntityPhoneNumber = paymentSettlementEntityPhoneNumber; + return this; + } + + /** + * Payment settlement entity phone number, if different from Filer's + * @return paymentSettlementEntityPhoneNumber + */ + @javax.annotation.Nullable + public String getPaymentSettlementEntityPhoneNumber() { + return paymentSettlementEntityPhoneNumber; + } + + public void setPaymentSettlementEntityPhoneNumber(String paymentSettlementEntityPhoneNumber) { + this.paymentSettlementEntityPhoneNumber = paymentSettlementEntityPhoneNumber; + } + + public Form1099K grossAmountPaymentCard(Double grossAmountPaymentCard) { this.grossAmountPaymentCard = grossAmountPaymentCard; return this; @@ -697,6 +766,63 @@ public void setCardNotPresentTransactions(Double cardNotPresentTransactions) { } + public Form1099K cashTips(Double cashTips) { + this.cashTips = cashTips; + return this; + } + + /** + * Box 1c. Cash tips - Available only for tax year 2026 and later. This amount is already included in GrossAmountPaymentCard (Box 1a) and is not added to it, so it may not exceed GrossAmountPaymentCard. + * @return cashTips + */ + @javax.annotation.Nullable + public Double getCashTips() { + return cashTips; + } + + public void setCashTips(Double cashTips) { + this.cashTips = cashTips; + } + + + public Form1099K treasuryTippedOccupationCode(String treasuryTippedOccupationCode) { + this.treasuryTippedOccupationCode = treasuryTippedOccupationCode; + return this; + } + + /** + * Box 1d. Treasury Tipped Occupation Code (TTOC) for the payee's tipped occupation - Available only for tax year 2026 and later. A three-digit, zero-padded code from the IRS enumeration: 000 (tips received in a nonqualifying occupation), 101-110, 201-211, 301-304, 401-409, 501-508, 601-611, 701-706, or 801-809. The form accepts up to two codes - see TreasuryTippedOccupationCode2 for the second. Send the code exactly as three characters (\"001\", not \"1\"); leading zeros are not restored for you. Watch for spreadsheet software that strips leading zeros when a code is exported to CSV and re-imported. + * @return treasuryTippedOccupationCode + */ + @javax.annotation.Nullable + public String getTreasuryTippedOccupationCode() { + return treasuryTippedOccupationCode; + } + + public void setTreasuryTippedOccupationCode(String treasuryTippedOccupationCode) { + this.treasuryTippedOccupationCode = treasuryTippedOccupationCode; + } + + + public Form1099K treasuryTippedOccupationCode2(String treasuryTippedOccupationCode2) { + this.treasuryTippedOccupationCode2 = treasuryTippedOccupationCode2; + return this; + } + + /** + * Box 1d. Second Treasury Tipped Occupation Code (TTOC) - Available only for tax year 2026 and later. Same three-digit code list and formatting rules as TreasuryTippedOccupationCode, and must differ from it. + * @return treasuryTippedOccupationCode2 + */ + @javax.annotation.Nullable + public String getTreasuryTippedOccupationCode2() { + return treasuryTippedOccupationCode2; + } + + public void setTreasuryTippedOccupationCode2(String treasuryTippedOccupationCode2) { + this.treasuryTippedOccupationCode2 = treasuryTippedOccupationCode2; + } + + public Form1099K merchantCategoryCode(String merchantCategoryCode) { this.merchantCategoryCode = merchantCategoryCode; return this; @@ -1435,11 +1561,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1822,8 +1948,13 @@ public boolean equals(Object o) { return Objects.equals(this.filerType, form1099K.filerType) && Objects.equals(this.paymentType, form1099K.paymentType) && Objects.equals(this.paymentSettlementEntityNamePhoneNumber, form1099K.paymentSettlementEntityNamePhoneNumber) && + Objects.equals(this.paymentSettlementEntityName, form1099K.paymentSettlementEntityName) && + Objects.equals(this.paymentSettlementEntityPhoneNumber, form1099K.paymentSettlementEntityPhoneNumber) && Objects.equals(this.grossAmountPaymentCard, form1099K.grossAmountPaymentCard) && Objects.equals(this.cardNotPresentTransactions, form1099K.cardNotPresentTransactions) && + Objects.equals(this.cashTips, form1099K.cashTips) && + Objects.equals(this.treasuryTippedOccupationCode, form1099K.treasuryTippedOccupationCode) && + Objects.equals(this.treasuryTippedOccupationCode2, form1099K.treasuryTippedOccupationCode2) && Objects.equals(this.merchantCategoryCode, form1099K.merchantCategoryCode) && Objects.equals(this.paymentTransactionNumber, form1099K.paymentTransactionNumber) && Objects.equals(this.federalIncomeTaxWithheld, form1099K.federalIncomeTaxWithheld) && @@ -1893,7 +2024,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, september, october, november, december, 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); + return Objects.hash(filerType, paymentType, paymentSettlementEntityNamePhoneNumber, paymentSettlementEntityName, paymentSettlementEntityPhoneNumber, grossAmountPaymentCard, cardNotPresentTransactions, cashTips, treasuryTippedOccupationCode, treasuryTippedOccupationCode2, merchantCategoryCode, paymentTransactionNumber, federalIncomeTaxWithheld, january, february, march, april, may, june, july, august, september, october, november, december, 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) { @@ -1910,8 +2041,13 @@ public String toString() { sb.append(" filerType: ").append(toIndentedString(filerType)).append("\n"); sb.append(" paymentType: ").append(toIndentedString(paymentType)).append("\n"); sb.append(" paymentSettlementEntityNamePhoneNumber: ").append(toIndentedString(paymentSettlementEntityNamePhoneNumber)).append("\n"); + sb.append(" paymentSettlementEntityName: ").append(toIndentedString(paymentSettlementEntityName)).append("\n"); + sb.append(" paymentSettlementEntityPhoneNumber: ").append(toIndentedString(paymentSettlementEntityPhoneNumber)).append("\n"); sb.append(" grossAmountPaymentCard: ").append(toIndentedString(grossAmountPaymentCard)).append("\n"); sb.append(" cardNotPresentTransactions: ").append(toIndentedString(cardNotPresentTransactions)).append("\n"); + sb.append(" cashTips: ").append(toIndentedString(cashTips)).append("\n"); + sb.append(" treasuryTippedOccupationCode: ").append(toIndentedString(treasuryTippedOccupationCode)).append("\n"); + sb.append(" treasuryTippedOccupationCode2: ").append(toIndentedString(treasuryTippedOccupationCode2)).append("\n"); sb.append(" merchantCategoryCode: ").append(toIndentedString(merchantCategoryCode)).append("\n"); sb.append(" paymentTransactionNumber: ").append(toIndentedString(paymentTransactionNumber)).append("\n"); sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); @@ -2086,6 +2222,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("paymentSettlementEntityNamePhoneNumber") != null && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityNamePhoneNumber").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityNamePhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityNamePhoneNumber").toString())); } + if ((jsonObj.get("paymentSettlementEntityName") != null && !jsonObj.get("paymentSettlementEntityName").isJsonNull()) && !jsonObj.get("paymentSettlementEntityName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityName").toString())); + } + if ((jsonObj.get("paymentSettlementEntityPhoneNumber") != null && !jsonObj.get("paymentSettlementEntityPhoneNumber").isJsonNull()) && !jsonObj.get("paymentSettlementEntityPhoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `paymentSettlementEntityPhoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("paymentSettlementEntityPhoneNumber").toString())); + } + if ((jsonObj.get("treasuryTippedOccupationCode") != null && !jsonObj.get("treasuryTippedOccupationCode").isJsonNull()) && !jsonObj.get("treasuryTippedOccupationCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `treasuryTippedOccupationCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treasuryTippedOccupationCode").toString())); + } + if ((jsonObj.get("treasuryTippedOccupationCode2") != null && !jsonObj.get("treasuryTippedOccupationCode2").isJsonNull()) && !jsonObj.get("treasuryTippedOccupationCode2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `treasuryTippedOccupationCode2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treasuryTippedOccupationCode2").toString())); + } if ((jsonObj.get("merchantCategoryCode") != null && !jsonObj.get("merchantCategoryCode").isJsonNull()) && !jsonObj.get("merchantCategoryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `merchantCategoryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("merchantCategoryCode").toString())); } @@ -2145,7 +2293,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 96b4b72..8815474 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` * `1098-T` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `1099-SA` * `W-2` + * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1098-E` * `1098-T` * `1099-B` * `1099-C` * `1099-DIV` * `1099-G` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `1099-SA` * `5498` * `W-2` * `W-2G` */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { @@ -73,12 +73,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -95,7 +101,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -157,7 +167,7 @@ public Form1099ListRequest type(TypeEnum type) { } /** - * 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` + * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1098-E` * `1098-T` * `1099-B` * `1099-C` * `1099-DIV` * `1099-G` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `1099-SA` * `5498` * `W-2` * `W-2G` * @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 0174dbb..7e50da6 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -114,6 +115,22 @@ public class Form1099Misc { @SerializedName(SERIALIZED_NAME_SECTION409_A_DEFERRALS) private Double section409ADeferrals; + public static final String SERIALIZED_NAME_CASH_TIPS = "cashTips"; + @SerializedName(SERIALIZED_NAME_CASH_TIPS) + private Double cashTips; + + public static final String SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE = "treasuryTippedOccupationCode"; + @SerializedName(SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE) + private String treasuryTippedOccupationCode; + + public static final String SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE2 = "treasuryTippedOccupationCode2"; + @SerializedName(SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE2) + private String treasuryTippedOccupationCode2; + + public static final String SERIALIZED_NAME_OVERTIME_COMPENSATION = "overtimeCompensation"; + @SerializedName(SERIALIZED_NAME_OVERTIME_COMPENSATION) + private Double overtimeCompensation; + public static final String SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS = "excessGoldenParachutePayments"; @SerializedName(SERIALIZED_NAME_EXCESS_GOLDEN_PARACHUTE_PAYMENTS) private Double excessGoldenParachutePayments; @@ -139,12 +156,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -161,7 +184,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -305,7 +332,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -455,7 +482,7 @@ public Form1099Misc() { public Form1099Misc( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -706,13 +733,89 @@ public void setSection409ADeferrals(Double section409ADeferrals) { } + public Form1099Misc cashTips(Double cashTips) { + this.cashTips = cashTips; + return this; + } + + /** + * Box 13a. Cash tips, including tips paid in cash or charged by customers - Available only for tax year 2026 and later. + * @return cashTips + */ + @javax.annotation.Nullable + public Double getCashTips() { + return cashTips; + } + + public void setCashTips(Double cashTips) { + this.cashTips = cashTips; + } + + + public Form1099Misc treasuryTippedOccupationCode(String treasuryTippedOccupationCode) { + this.treasuryTippedOccupationCode = treasuryTippedOccupationCode; + return this; + } + + /** + * Box 13b. Treasury Tipped Occupation Code (TTOC) for the recipient's tipped occupation - Available only for tax year 2026 and later. A three-digit, zero-padded code from the IRS enumeration: 000 (tips received in a nonqualifying occupation), 101-110, 201-211, 301-304, 401-409, 501-508, 601-611, 701-706, or 801-809. The form accepts up to two codes - see TreasuryTippedOccupationCode2 for the second. Send the code exactly as three characters (\"001\", not \"1\"); leading zeros are not restored for you. Watch for spreadsheet software that strips leading zeros when a code is exported to CSV and re-imported. + * @return treasuryTippedOccupationCode + */ + @javax.annotation.Nullable + public String getTreasuryTippedOccupationCode() { + return treasuryTippedOccupationCode; + } + + public void setTreasuryTippedOccupationCode(String treasuryTippedOccupationCode) { + this.treasuryTippedOccupationCode = treasuryTippedOccupationCode; + } + + + public Form1099Misc treasuryTippedOccupationCode2(String treasuryTippedOccupationCode2) { + this.treasuryTippedOccupationCode2 = treasuryTippedOccupationCode2; + return this; + } + + /** + * Box 13b. Second Treasury Tipped Occupation Code (TTOC) - Available only for tax year 2026 and later. Same three-digit code list and formatting rules as TreasuryTippedOccupationCode, and must differ from it. + * @return treasuryTippedOccupationCode2 + */ + @javax.annotation.Nullable + public String getTreasuryTippedOccupationCode2() { + return treasuryTippedOccupationCode2; + } + + public void setTreasuryTippedOccupationCode2(String treasuryTippedOccupationCode2) { + this.treasuryTippedOccupationCode2 = treasuryTippedOccupationCode2; + } + + + public Form1099Misc overtimeCompensation(Double overtimeCompensation) { + this.overtimeCompensation = overtimeCompensation; + return this; + } + + /** + * Box 14. Qualified overtime compensation - Available only for tax year 2026 and later. Named \"Box 14 Excess golden parachute payments\" on revisions of the form before the December 2026 revision - see ExcessGoldenParachutePayments for that field. + * @return overtimeCompensation + */ + @javax.annotation.Nullable + public Double getOvertimeCompensation() { + return overtimeCompensation; + } + + public void setOvertimeCompensation(Double overtimeCompensation) { + this.overtimeCompensation = overtimeCompensation; + } + + public Form1099Misc excessGoldenParachutePayments(Double excessGoldenParachutePayments) { this.excessGoldenParachutePayments = excessGoldenParachutePayments; return this; } /** - * Excess golden parachute payments - Available only for tax year 2024 and earlier + * Excess golden parachute payments - Available only for tax year 2024 and earlier. Was \"Box 14\" on those earlier revisions; the December 2026 revision reassigns Box 14 to OvertimeCompensation. * @return excessGoldenParachutePayments */ @javax.annotation.Nullable @@ -1216,11 +1319,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1612,6 +1715,10 @@ public boolean equals(Object o) { Objects.equals(this.grossProceedsPaidToAttorney, form1099Misc.grossProceedsPaidToAttorney) && Objects.equals(this.fishPurchasedForResale, form1099Misc.fishPurchasedForResale) && Objects.equals(this.section409ADeferrals, form1099Misc.section409ADeferrals) && + Objects.equals(this.cashTips, form1099Misc.cashTips) && + Objects.equals(this.treasuryTippedOccupationCode, form1099Misc.treasuryTippedOccupationCode) && + Objects.equals(this.treasuryTippedOccupationCode2, form1099Misc.treasuryTippedOccupationCode2) && + Objects.equals(this.overtimeCompensation, form1099Misc.overtimeCompensation) && Objects.equals(this.excessGoldenParachutePayments, form1099Misc.excessGoldenParachutePayments) && Objects.equals(this.nonqualifiedDeferredCompensation, form1099Misc.nonqualifiedDeferredCompensation) && Objects.equals(this.fatcaFilingRequirement, form1099Misc.fatcaFilingRequirement) && @@ -1669,7 +1776,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(rents, royalties, otherIncome, federalIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, fatcaFilingRequirement, 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); + return Objects.hash(rents, royalties, otherIncome, federalIncomeTaxWithheld, fishingBoatProceeds, medicalAndHealthCarePayments, directSalesIndicator, substitutePayments, cropInsuranceProceeds, grossProceedsPaidToAttorney, fishPurchasedForResale, section409ADeferrals, cashTips, treasuryTippedOccupationCode, treasuryTippedOccupationCode2, overtimeCompensation, excessGoldenParachutePayments, nonqualifiedDeferredCompensation, fatcaFilingRequirement, 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) { @@ -1695,6 +1802,10 @@ public String toString() { sb.append(" grossProceedsPaidToAttorney: ").append(toIndentedString(grossProceedsPaidToAttorney)).append("\n"); sb.append(" fishPurchasedForResale: ").append(toIndentedString(fishPurchasedForResale)).append("\n"); sb.append(" section409ADeferrals: ").append(toIndentedString(section409ADeferrals)).append("\n"); + sb.append(" cashTips: ").append(toIndentedString(cashTips)).append("\n"); + sb.append(" treasuryTippedOccupationCode: ").append(toIndentedString(treasuryTippedOccupationCode)).append("\n"); + sb.append(" treasuryTippedOccupationCode2: ").append(toIndentedString(treasuryTippedOccupationCode2)).append("\n"); + sb.append(" overtimeCompensation: ").append(toIndentedString(overtimeCompensation)).append("\n"); sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); sb.append(" nonqualifiedDeferredCompensation: ").append(toIndentedString(nonqualifiedDeferredCompensation)).append("\n"); sb.append(" fatcaFilingRequirement: ").append(toIndentedString(fatcaFilingRequirement)).append("\n"); @@ -1840,6 +1951,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("treasuryTippedOccupationCode") != null && !jsonObj.get("treasuryTippedOccupationCode").isJsonNull()) && !jsonObj.get("treasuryTippedOccupationCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `treasuryTippedOccupationCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treasuryTippedOccupationCode").toString())); + } + if ((jsonObj.get("treasuryTippedOccupationCode2") != null && !jsonObj.get("treasuryTippedOccupationCode2").isJsonNull()) && !jsonObj.get("treasuryTippedOccupationCode2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `treasuryTippedOccupationCode2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treasuryTippedOccupationCode2").toString())); + } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -1896,7 +2013,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 8b57e90..648e874 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -70,6 +71,22 @@ public class Form1099Nec { @SerializedName(SERIALIZED_NAME_NONEMPLOYEE_COMPENSATION) private Double nonemployeeCompensation; + public static final String SERIALIZED_NAME_CASH_TIPS = "cashTips"; + @SerializedName(SERIALIZED_NAME_CASH_TIPS) + private Double cashTips; + + public static final String SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE = "treasuryTippedOccupationCode"; + @SerializedName(SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE) + private String treasuryTippedOccupationCode; + + public static final String SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE2 = "treasuryTippedOccupationCode2"; + @SerializedName(SERIALIZED_NAME_TREASURY_TIPPED_OCCUPATION_CODE2) + private String treasuryTippedOccupationCode2; + + public static final String SERIALIZED_NAME_OVERTIME_COMPENSATION = "overtimeCompensation"; + @SerializedName(SERIALIZED_NAME_OVERTIME_COMPENSATION) + private Double overtimeCompensation; + public static final String SERIALIZED_NAME_DIRECT_SALES_INDICATOR = "directSalesIndicator"; @SerializedName(SERIALIZED_NAME_DIRECT_SALES_INDICATOR) private Boolean directSalesIndicator; @@ -95,12 +112,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -117,7 +140,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -261,7 +288,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -411,7 +438,7 @@ public Form1099Nec() { public Form1099Nec( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -440,7 +467,7 @@ public Form1099Nec nonemployeeCompensation(Double nonemployeeCompensation) { } /** - * Nonemployee compensation. Required if DirectSalesIndicator is false. + * Box 1a. Nonemployee compensation. Required if DirectSalesIndicator is false. Named \"Box 1\" on revisions of the form before the December 2026 revision. * @return nonemployeeCompensation */ @javax.annotation.Nullable @@ -453,6 +480,82 @@ public void setNonemployeeCompensation(Double nonemployeeCompensation) { } + public Form1099Nec cashTips(Double cashTips) { + this.cashTips = cashTips; + return this; + } + + /** + * Box 1b. Cash tips, including tips paid in cash or charged by customers - Available only for tax year 2026 and later. This amount is already included in NonemployeeCompensation (Box 1a) and is not added to it, so it may not exceed NonemployeeCompensation. + * @return cashTips + */ + @javax.annotation.Nullable + public Double getCashTips() { + return cashTips; + } + + public void setCashTips(Double cashTips) { + this.cashTips = cashTips; + } + + + public Form1099Nec treasuryTippedOccupationCode(String treasuryTippedOccupationCode) { + this.treasuryTippedOccupationCode = treasuryTippedOccupationCode; + return this; + } + + /** + * Box 1c. Treasury Tipped Occupation Code (TTOC) for the recipient's tipped occupation - Available only for tax year 2026 and later. A three-digit, zero-padded code from the IRS enumeration: 000 (tips received in a nonqualifying occupation), 101-110, 201-211, 301-304, 401-409, 501-508, 601-611, 701-706, or 801-809. The form accepts up to two codes - see TreasuryTippedOccupationCode2 for the second. Send the code exactly as three characters (\"001\", not \"1\"); leading zeros are not restored for you. Watch for spreadsheet software that strips leading zeros when a code is exported to CSV and re-imported. + * @return treasuryTippedOccupationCode + */ + @javax.annotation.Nullable + public String getTreasuryTippedOccupationCode() { + return treasuryTippedOccupationCode; + } + + public void setTreasuryTippedOccupationCode(String treasuryTippedOccupationCode) { + this.treasuryTippedOccupationCode = treasuryTippedOccupationCode; + } + + + public Form1099Nec treasuryTippedOccupationCode2(String treasuryTippedOccupationCode2) { + this.treasuryTippedOccupationCode2 = treasuryTippedOccupationCode2; + return this; + } + + /** + * Box 1c. Second Treasury Tipped Occupation Code (TTOC) - Available only for tax year 2026 and later. Same three-digit code list and formatting rules as TreasuryTippedOccupationCode, and must differ from it. + * @return treasuryTippedOccupationCode2 + */ + @javax.annotation.Nullable + public String getTreasuryTippedOccupationCode2() { + return treasuryTippedOccupationCode2; + } + + public void setTreasuryTippedOccupationCode2(String treasuryTippedOccupationCode2) { + this.treasuryTippedOccupationCode2 = treasuryTippedOccupationCode2; + } + + + public Form1099Nec overtimeCompensation(Double overtimeCompensation) { + this.overtimeCompensation = overtimeCompensation; + return this; + } + + /** + * Box 1d. Qualified overtime compensation - Available only for tax year 2026 and later. This amount is already included in NonemployeeCompensation (Box 1a) and is not added to it, so it may not exceed NonemployeeCompensation. + * @return overtimeCompensation + */ + @javax.annotation.Nullable + public Double getOvertimeCompensation() { + return overtimeCompensation; + } + + public void setOvertimeCompensation(Double overtimeCompensation) { + this.overtimeCompensation = overtimeCompensation; + } + + public Form1099Nec directSalesIndicator(Boolean directSalesIndicator) { this.directSalesIndicator = directSalesIndicator; return this; @@ -963,11 +1066,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1348,6 +1451,10 @@ public boolean equals(Object o) { } Form1099Nec form1099Nec = (Form1099Nec) o; return Objects.equals(this.nonemployeeCompensation, form1099Nec.nonemployeeCompensation) && + Objects.equals(this.cashTips, form1099Nec.cashTips) && + Objects.equals(this.treasuryTippedOccupationCode, form1099Nec.treasuryTippedOccupationCode) && + Objects.equals(this.treasuryTippedOccupationCode2, form1099Nec.treasuryTippedOccupationCode2) && + Objects.equals(this.overtimeCompensation, form1099Nec.overtimeCompensation) && Objects.equals(this.directSalesIndicator, form1099Nec.directSalesIndicator) && Objects.equals(this.excessGoldenParachutePayments, form1099Nec.excessGoldenParachutePayments) && Objects.equals(this.federalIncomeTaxWithheld, form1099Nec.federalIncomeTaxWithheld) && @@ -1405,7 +1512,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(nonemployeeCompensation, directSalesIndicator, excessGoldenParachutePayments, federalIncomeTaxWithheld, 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); + return Objects.hash(nonemployeeCompensation, cashTips, treasuryTippedOccupationCode, treasuryTippedOccupationCode2, overtimeCompensation, directSalesIndicator, excessGoldenParachutePayments, federalIncomeTaxWithheld, 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) { @@ -1420,6 +1527,10 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1099Nec {\n"); sb.append(" nonemployeeCompensation: ").append(toIndentedString(nonemployeeCompensation)).append("\n"); + sb.append(" cashTips: ").append(toIndentedString(cashTips)).append("\n"); + sb.append(" treasuryTippedOccupationCode: ").append(toIndentedString(treasuryTippedOccupationCode)).append("\n"); + sb.append(" treasuryTippedOccupationCode2: ").append(toIndentedString(treasuryTippedOccupationCode2)).append("\n"); + sb.append(" overtimeCompensation: ").append(toIndentedString(overtimeCompensation)).append("\n"); sb.append(" directSalesIndicator: ").append(toIndentedString(directSalesIndicator)).append("\n"); sb.append(" excessGoldenParachutePayments: ").append(toIndentedString(excessGoldenParachutePayments)).append("\n"); sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); @@ -1566,6 +1677,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("treasuryTippedOccupationCode") != null && !jsonObj.get("treasuryTippedOccupationCode").isJsonNull()) && !jsonObj.get("treasuryTippedOccupationCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `treasuryTippedOccupationCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treasuryTippedOccupationCode").toString())); + } + if ((jsonObj.get("treasuryTippedOccupationCode2") != null && !jsonObj.get("treasuryTippedOccupationCode2").isJsonNull()) && !jsonObj.get("treasuryTippedOccupationCode2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `treasuryTippedOccupationCode2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("treasuryTippedOccupationCode2").toString())); + } if (!jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -1622,7 +1739,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 2341092..4d1db4c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -62,7 +63,7 @@ import Avalara.SDK.JSON; /** - * Form 1099-PATR: Taxable Distributions Received From Cooperatives *At least one of the following amounts must be greater than zero:* Patronage Dividends, Nonpatronage Distributions, Per-Unit Retain Allocations, or Redeemed Nonqualified Notices. Federal Income Tax Withheld, when provided, must be less than the total of those four amounts. Specified Cooperative may only be set when at least one of Qualified Payments, Section 199A(a) Qualified Items, or Section 199A(a) SSTB Items is provided. Form 1099-PATR has no state or local withholding boxes. `stateAndLocalWithholding` is not supported for this form type on any endpoint: a supplied value is discarded rather than stored, and the field always reads back as `null`. + * Form 1099-PATR: Taxable Distributions Received From Cooperatives *At least one of the following amounts must be greater than zero:* Patronage Dividends, Nonpatronage Distributions, Per-Unit Retain Allocations, or Redeemed Nonqualified Notices. Federal Income Tax Withheld, when provided, must be less than the total of those four amounts. The Section 199A(g) deduction cannot exceed 9% of Qualified Payments. Other credits and deductions (Box 12), when greater than zero, must be itemized under the specific credit or deduction. This API does not expose those itemized fields, so a non-zero Box 12 is rejected downstream. Specified Cooperative may only be set when at least one of Qualified Payments, Section 199A(a) Qualified Items, or Section 199A(a) SSTB Items is provided. Form 1099-PATR has no state or local withholding boxes. `stateAndLocalWithholding` is not supported for this form type on any endpoint: a supplied value is discarded rather than stored, and the field always reads back as `null`. */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099Patr { @@ -131,12 +132,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -153,7 +160,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -297,7 +308,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -447,7 +458,7 @@ public Form1099Patr() { public Form1099Patr( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -685,7 +696,7 @@ public Form1099Patr otherCreditsAndDeductions(Double otherCreditsAndDeductions) } /** - * Other credits and deductions + * Other credits and deductions (Box 12). Leave at zero unless the amount is itemized downstream under the specific credit or deduction it belongs to. * @return otherCreditsAndDeductions */ @javax.annotation.Nullable @@ -1170,11 +1181,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1846,7 +1857,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 aa4bc25..572a82e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -99,7 +100,7 @@ public class Form1099R { private Double netUnrealizedAppreciationInEmployerSecurities; /** - * Distribution code. Available values: - 1: Early distribution, no known exception (in most cases, under age 59½) - 2: Early distribution, exception applies (under age 59½) - 3: Disability - 4: Death - 5: Prohibited transaction - 6: Section 1035 exchange (a tax-free exchange of life insurance, annuity, qualified long-term care insurance, or endowment contracts) - 7: Normal distribution - 8: Excess contributions plus earnings/excess deferrals (and/or earnings) taxable in payment year - 9: Cost of current life insurance protection (premiums paid by a trustee or custodian for current insurance protection) - A: May be eligible for 10-year tax option - B: Designated Roth account distribution - C: Reportable Death Benefits Under Section 6050Y(c) - D: Annuity payments from nonqualified annuity payments and distributions from life insurance contracts that may be subject to tax under section 1411 - E: Distribution under Employee Plans Compliance Resolution System (EPCRS) - F: Charitable gift annuity - G: Direct rollover and rollover contribution - H: Direct rollover of distribution from a designated Roth account to a Roth IRA - J: Early distribution from a Roth IRA (This code may be used with a Code 8 or P) - K: Distribution of IRA Assets Not Having A Readily Available FMV - L: Loans treated as deemed distributions under section 72(p) - M: Qualified Plan Loan Offsets - N: Recharacterized IRA contribution made for year following payment year - P: Excess contributions plus earnings/excess deferrals taxable for year prior to payment year - Q: Qualified distribution from a Roth IRA (Distribution from a Roth IRA when the 5-year holding period has been met, and the recipient has reached 59½, has died, or is disabled) - R: Recharacterized IRA contribution made for year prior to payment year - S: Early distribution from a SIMPLE IRA in first 2 years no known exceptions - T: Roth IRA distribution exception applies because participant has reached 59½, died or is disabled, but it is unknown if the 5-year period has been met - U: Distribution from ESOP under Section 404(k) - W: Charges or payments for purchasing qualified long-term care insurance contracts under combined arrangements - Y: Qualified charitable distribution (QCD) claimed under section 408(d)(8) (Available for 2025 on) + * Box 7a. 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) */ @JsonAdapter(DistributionCodeEnum.Adapter.class) public enum DistributionCodeEnum { @@ -211,7 +212,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private DistributionCodeEnum distributionCode; /** - * Second distribution code. Must be a valid combination with the first distribution code. See DistributionCode property documentation for code descriptions. Valid combinations based on first distribution code: - 1: _, 8, B, D, K, L, M, P - 2: _, 8, B, D, K, L, M, P - 3: _, D - 4: _, 8, A, B, D, G, H, K, L, M, P - 5: _ - 6: _, W - 7: _, A, B, D, K, L, M - 8: _, 1, 2, 4, B, J, K - 9: _ - A: 4, 7 - B: _, 1, 2, 4, 7, 8, G, L, M, P, U - C: _, D - D: 1, 2, 3, 4, 7, C - E: _ - F: _ - G: _, 4, B, K - H: _, 4 - J: _, 8, P - K: 1, 2, 4, 7, 8, G - L: _, 1, 2, 4, 7, B - M: _, 1, 2, 4, 7, B - N: _ - P: _, 1, 2, 4, B, J - Q: _ - R: _ - S: _ - T: _ - U: _, B - W: _, 6 - Y: 4, 7, K (_ indicates no second distribution code) (format: firstDistributionCode: availableSecondDistributionCodes) + * Box 7a. 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) */ @JsonAdapter(SecondDistributionCodeEnum.Adapter.class) public enum SecondDistributionCodeEnum { @@ -324,6 +325,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_IRA_SEP_SIMPLE) private Boolean iraSepSimple; + public static final String SERIALIZED_NAME_TRUMP_ACCOUNT_INDICATOR = "trumpAccountIndicator"; + @SerializedName(SERIALIZED_NAME_TRUMP_ACCOUNT_INDICATOR) + private Boolean trumpAccountIndicator; + + public static final String SERIALIZED_NAME_EXCESS_CONTRIBUTIONS_EARNINGS = "excessContributionsEarnings"; + @SerializedName(SERIALIZED_NAME_EXCESS_CONTRIBUTIONS_EARNINGS) + private Double excessContributionsEarnings; + public static final String SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT = "traditionalIraSepSimpleOrRothConversionAmount"; @SerializedName(SERIALIZED_NAME_TRADITIONAL_IRA_SEP_SIMPLE_OR_ROTH_CONVERSION_AMOUNT) private Double traditionalIraSepSimpleOrRothConversionAmount; @@ -373,12 +382,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -395,7 +410,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -539,7 +558,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -689,7 +708,7 @@ public Form1099R() { public Form1099R( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -870,7 +889,7 @@ public Form1099R distributionCode(DistributionCodeEnum distributionCode) { } /** - * 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) + * Box 7a. 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) * @return distributionCode */ @javax.annotation.Nullable @@ -889,7 +908,7 @@ public Form1099R secondDistributionCode(SecondDistributionCodeEnum secondDistrib } /** - * 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) + * Box 7a. 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) * @return secondDistributionCode */ @javax.annotation.Nullable @@ -908,7 +927,7 @@ public Form1099R iraSepSimple(Boolean iraSepSimple) { } /** - * IRA/SEP/SIMPLE + * Box 7b. IRA/SEP/SIMPLE * @return iraSepSimple */ @javax.annotation.Nullable @@ -921,6 +940,44 @@ public void setIraSepSimple(Boolean iraSepSimple) { } + public Form1099R trumpAccountIndicator(Boolean trumpAccountIndicator) { + this.trumpAccountIndicator = trumpAccountIndicator; + return this; + } + + /** + * Box 7c. Trump account checkbox - Available only for tax year 2026 and later. + * @return trumpAccountIndicator + */ + @javax.annotation.Nullable + public Boolean getTrumpAccountIndicator() { + return trumpAccountIndicator; + } + + public void setTrumpAccountIndicator(Boolean trumpAccountIndicator) { + this.trumpAccountIndicator = trumpAccountIndicator; + } + + + public Form1099R excessContributionsEarnings(Double excessContributionsEarnings) { + this.excessContributionsEarnings = excessContributionsEarnings; + return this; + } + + /** + * Box 7d. Earnings on excess contributions - Available only for tax year 2026 and later. Enter 0 when the excess contributions had losses. + * @return excessContributionsEarnings + */ + @javax.annotation.Nullable + public Double getExcessContributionsEarnings() { + return excessContributionsEarnings; + } + + public void setExcessContributionsEarnings(Double excessContributionsEarnings) { + this.excessContributionsEarnings = excessContributionsEarnings; + } + + public Form1099R traditionalIraSepSimpleOrRothConversionAmount(Double traditionalIraSepSimpleOrRothConversionAmount) { this.traditionalIraSepSimpleOrRothConversionAmount = traditionalIraSepSimpleOrRothConversionAmount; return this; @@ -946,7 +1003,7 @@ public Form1099R otherAmount(Double otherAmount) { } /** - * Other amount + * Box 8a. Other amount * @return otherAmount */ @javax.annotation.Nullable @@ -965,7 +1022,7 @@ public Form1099R otherPercentage(String otherPercentage) { } /** - * Other percentage + * Box 8b. Other percentage * @return otherPercentage */ @javax.annotation.Nullable @@ -1545,11 +1602,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1940,6 +1997,8 @@ public boolean equals(Object o) { Objects.equals(this.distributionCode, form1099R.distributionCode) && Objects.equals(this.secondDistributionCode, form1099R.secondDistributionCode) && Objects.equals(this.iraSepSimple, form1099R.iraSepSimple) && + Objects.equals(this.trumpAccountIndicator, form1099R.trumpAccountIndicator) && + Objects.equals(this.excessContributionsEarnings, form1099R.excessContributionsEarnings) && Objects.equals(this.traditionalIraSepSimpleOrRothConversionAmount, form1099R.traditionalIraSepSimpleOrRothConversionAmount) && Objects.equals(this.otherAmount, form1099R.otherAmount) && Objects.equals(this.otherPercentage, form1099R.otherPercentage) && @@ -2003,7 +2062,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, dateOfPayment, fatcaFilingRequirement, 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); + return Objects.hash(grossDistribution, taxableAmount, taxableAmountNotDetermined, totalDistributionDetermined, capitalGain, federalIncomeTaxWithheld, employeeContributionsOrDesignatedRothOrInsurancePremiums, netUnrealizedAppreciationInEmployerSecurities, distributionCode, secondDistributionCode, iraSepSimple, trumpAccountIndicator, excessContributionsEarnings, traditionalIraSepSimpleOrRothConversionAmount, otherAmount, otherPercentage, totalDistributionPercentage, totalEmployeeContributions, amountAllocableToIrrWithin5Years, firstYearOfDesignatedRothContribution, dateOfPayment, fatcaFilingRequirement, 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) { @@ -2028,6 +2087,8 @@ public String toString() { sb.append(" distributionCode: ").append(toIndentedString(distributionCode)).append("\n"); sb.append(" secondDistributionCode: ").append(toIndentedString(secondDistributionCode)).append("\n"); sb.append(" iraSepSimple: ").append(toIndentedString(iraSepSimple)).append("\n"); + sb.append(" trumpAccountIndicator: ").append(toIndentedString(trumpAccountIndicator)).append("\n"); + sb.append(" excessContributionsEarnings: ").append(toIndentedString(excessContributionsEarnings)).append("\n"); sb.append(" traditionalIraSepSimpleOrRothConversionAmount: ").append(toIndentedString(traditionalIraSepSimpleOrRothConversionAmount)).append("\n"); sb.append(" otherAmount: ").append(toIndentedString(otherAmount)).append("\n"); sb.append(" otherPercentage: ").append(toIndentedString(otherPercentage)).append("\n"); @@ -2257,7 +2318,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 79b1f96..9e71036 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -103,12 +104,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -125,7 +132,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -269,7 +280,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -419,7 +430,7 @@ public Form1099S() { public Form1099S( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1009,11 +1020,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1676,7 +1687,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Sa.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Sa.java index fd2063d..3d872dd 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Sa.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Sa.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -167,12 +168,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -189,7 +196,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -333,7 +344,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -483,7 +494,7 @@ public Form1099Sa() { public Form1099Sa( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1092,11 +1103,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1763,7 +1774,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); 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 4a61ae3..4b49267 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -203,12 +204,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -225,7 +232,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -369,7 +380,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -519,7 +530,7 @@ public Form1099W2() { public Form1099W2( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -1584,11 +1595,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -2333,7 +2344,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form5498.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form5498.java new file mode 100644 index 0000000..6b65d0a --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form5498.java @@ -0,0 +1,2599 @@ +/* + * 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.FederalEfileStatusDetail; +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 5498: IRA Contribution Information The recipient is the participant and the issuer is the trustee or issuer of the IRA. *Required:* at least one amount above zero in Boxes 1-5, 8-10, 13a or 14a. Amounts can't be negative. Paired boxes are all-or-nothing: Box 7 is required when Box 2 or Box 5 has an amount, and Boxes 8, 9 and 10 are only allowed with Box 7 type SEP, SIMPLE and Roth IRA; Boxes 12a and 12b are required when Box 11 is checked and not allowed otherwise; Boxes 13b and 13c go with Box 13a, Box 14b with Box 14a, and Box 15b with Box 15a. Form 5498 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 Form5498 { + public static final String SERIALIZED_NAME_IRA_CONTRIBUTIONS = "iraContributions"; + @SerializedName(SERIALIZED_NAME_IRA_CONTRIBUTIONS) + private Double iraContributions; + + public static final String SERIALIZED_NAME_ROLLOVER_CONTRIBUTIONS = "rolloverContributions"; + @SerializedName(SERIALIZED_NAME_ROLLOVER_CONTRIBUTIONS) + private Double rolloverContributions; + + public static final String SERIALIZED_NAME_ROTH_IRA_CONVERSION_AMOUNT = "rothIraConversionAmount"; + @SerializedName(SERIALIZED_NAME_ROTH_IRA_CONVERSION_AMOUNT) + private Double rothIraConversionAmount; + + public static final String SERIALIZED_NAME_RECHARACTERIZED_CONTRIBUTIONS = "recharacterizedContributions"; + @SerializedName(SERIALIZED_NAME_RECHARACTERIZED_CONTRIBUTIONS) + private Double recharacterizedContributions; + + public static final String SERIALIZED_NAME_FAIR_MARKET_VALUE_OF_ACCOUNT = "fairMarketValueOfAccount"; + @SerializedName(SERIALIZED_NAME_FAIR_MARKET_VALUE_OF_ACCOUNT) + private Double fairMarketValueOfAccount; + + public static final String SERIALIZED_NAME_LIFE_INSURANCE_COST_INCLUDED_IN_IRA_CONTRIBUTIONS = "lifeInsuranceCostIncludedInIraContributions"; + @SerializedName(SERIALIZED_NAME_LIFE_INSURANCE_COST_INCLUDED_IN_IRA_CONTRIBUTIONS) + private Double lifeInsuranceCostIncludedInIraContributions; + + /** + * Type of IRA. Required when Box 2 or Box 5 has an amount. * `IRA` - Traditional IRA * `SEP` - SEP IRA * `SIMPLE` - SIMPLE IRA * `ROTH` - Roth IRA + */ + @JsonAdapter(IraTypeEnum.Adapter.class) + public enum IraTypeEnum { + IRA("IRA"), + + SEP("SEP"), + + SIMPLE("SIMPLE"), + + ROTH("ROTH"); + + private String value; + + IraTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IraTypeEnum fromValue(String value) { + for (IraTypeEnum b : IraTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IraTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IraTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IraTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IraTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IRA_TYPE = "iraType"; + @SerializedName(SERIALIZED_NAME_IRA_TYPE) + private IraTypeEnum iraType; + + public static final String SERIALIZED_NAME_SEP_CONTRIBUTIONS = "sepContributions"; + @SerializedName(SERIALIZED_NAME_SEP_CONTRIBUTIONS) + private Double sepContributions; + + public static final String SERIALIZED_NAME_SIMPLE_CONTRIBUTIONS = "simpleContributions"; + @SerializedName(SERIALIZED_NAME_SIMPLE_CONTRIBUTIONS) + private Double simpleContributions; + + public static final String SERIALIZED_NAME_ROTH_IRA_CONTRIBUTIONS = "rothIraContributions"; + @SerializedName(SERIALIZED_NAME_ROTH_IRA_CONTRIBUTIONS) + private Double rothIraContributions; + + public static final String SERIALIZED_NAME_REQUIRED_MINIMUM_DISTRIBUTION_INDICATOR = "requiredMinimumDistributionIndicator"; + @SerializedName(SERIALIZED_NAME_REQUIRED_MINIMUM_DISTRIBUTION_INDICATOR) + private Boolean requiredMinimumDistributionIndicator; + + public static final String SERIALIZED_NAME_REQUIRED_MINIMUM_DISTRIBUTION_DATE = "requiredMinimumDistributionDate"; + @SerializedName(SERIALIZED_NAME_REQUIRED_MINIMUM_DISTRIBUTION_DATE) + private LocalDate requiredMinimumDistributionDate; + + public static final String SERIALIZED_NAME_REQUIRED_MINIMUM_DISTRIBUTION_AMOUNT = "requiredMinimumDistributionAmount"; + @SerializedName(SERIALIZED_NAME_REQUIRED_MINIMUM_DISTRIBUTION_AMOUNT) + private Double requiredMinimumDistributionAmount; + + public static final String SERIALIZED_NAME_POSTPONED_LATE_CONTRIBUTION = "postponedLateContribution"; + @SerializedName(SERIALIZED_NAME_POSTPONED_LATE_CONTRIBUTION) + private Double postponedLateContribution; + + public static final String SERIALIZED_NAME_POSTPONED_LATE_CONTRIBUTION_YEAR = "postponedLateContributionYear"; + @SerializedName(SERIALIZED_NAME_POSTPONED_LATE_CONTRIBUTION_YEAR) + private Integer postponedLateContributionYear; + + /** + * Postponed or late contribution code. Required when `postponedLateContribution` has an amount. * `FD` - Federally designated disaster area * `PL` - Public law * `EO` - Executive order * `PO` - Rollover of a qualified plan loan offset amount * `SC` - Late rollover under the self-certification procedure + */ + @JsonAdapter(PostponedLateContributionCodeEnum.Adapter.class) + public enum PostponedLateContributionCodeEnum { + FD("FD"), + + PL("PL"), + + EO("EO"), + + PO("PO"), + + SC("SC"); + + private String value; + + PostponedLateContributionCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static PostponedLateContributionCodeEnum fromValue(String value) { + for (PostponedLateContributionCodeEnum b : PostponedLateContributionCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PostponedLateContributionCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public PostponedLateContributionCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return PostponedLateContributionCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + PostponedLateContributionCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_POSTPONED_LATE_CONTRIBUTION_CODE = "postponedLateContributionCode"; + @SerializedName(SERIALIZED_NAME_POSTPONED_LATE_CONTRIBUTION_CODE) + private PostponedLateContributionCodeEnum postponedLateContributionCode; + + public static final String SERIALIZED_NAME_POSTPONED_LATE_CONTRIBUTION_REASON = "postponedLateContributionReason"; + @SerializedName(SERIALIZED_NAME_POSTPONED_LATE_CONTRIBUTION_REASON) + private String postponedLateContributionReason; + + public static final String SERIALIZED_NAME_REPAYMENTS = "repayments"; + @SerializedName(SERIALIZED_NAME_REPAYMENTS) + private Double repayments; + + /** + * Repayment code. Required when `repayments` has an amount. * `QR` - Qualified reservist distribution * `DD` - Federally designated disaster distribution * `BA` - Qualified birth or adoption distribution * `EP` - Emergency personal expense distribution * `DA` - Domestic abuse victim distribution * `TI` - Terminally ill individual distribution + */ + @JsonAdapter(RepaymentCodeEnum.Adapter.class) + public enum RepaymentCodeEnum { + QR("QR"), + + DD("DD"), + + BA("BA"), + + EP("EP"), + + DA("DA"), + + TI("TI"); + + private String value; + + RepaymentCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RepaymentCodeEnum fromValue(String value) { + for (RepaymentCodeEnum b : RepaymentCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RepaymentCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RepaymentCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RepaymentCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RepaymentCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_REPAYMENT_CODE = "repaymentCode"; + @SerializedName(SERIALIZED_NAME_REPAYMENT_CODE) + private RepaymentCodeEnum repaymentCode; + + public static final String SERIALIZED_NAME_FAIR_MARKET_VALUE_OF_CERTAIN_SPECIFIED_ASSETS = "fairMarketValueOfCertainSpecifiedAssets"; + @SerializedName(SERIALIZED_NAME_FAIR_MARKET_VALUE_OF_CERTAIN_SPECIFIED_ASSETS) + private Double fairMarketValueOfCertainSpecifiedAssets; + + /** + * Specified asset code. Required when `fairMarketValueOfCertainSpecifiedAssets` has an amount. * `A` - Stock or other ownership interest in a corporation that is not readily tradable on an established securities market * `B` - Short- or long-term debt obligation that is not traded on an established securities market * `C` - Ownership interest in a limited liability company or similar entity (unless the interest is traded on an established securities market) * `D` - Real estate * `E` - Ownership interest in a partnership, trust, or similar entity (unless the interest is traded on an established securities market) * `F` - Option contract or similar product that is not offered for trade on an established option exchange * `G` - Other asset that does not have a readily available FMV * `H` - More than two types of assets (listed in `A` through `G`) are held in this IRA + */ + @JsonAdapter(SpecifiedAssetCodeEnum.Adapter.class) + public enum SpecifiedAssetCodeEnum { + A("A"), + + B("B"), + + C("C"), + + D("D"), + + E("E"), + + F("F"), + + G("G"), + + H("H"); + + private String value; + + SpecifiedAssetCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SpecifiedAssetCodeEnum fromValue(String value) { + for (SpecifiedAssetCodeEnum b : SpecifiedAssetCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SpecifiedAssetCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SpecifiedAssetCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SpecifiedAssetCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SpecifiedAssetCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SPECIFIED_ASSET_CODE = "specifiedAssetCode"; + @SerializedName(SERIALIZED_NAME_SPECIFIED_ASSET_CODE) + private SpecifiedAssetCodeEnum specifiedAssetCode; + + /** + * Second specified asset code, when the IRA holds two types of specified assets. Takes the codes `A` through `G`; it can't repeat `specifiedAssetCode`, and isn't allowed when `specifiedAssetCode` is `H`. + */ + @JsonAdapter(SecondSpecifiedAssetCodeEnum.Adapter.class) + public enum SecondSpecifiedAssetCodeEnum { + A("A"), + + B("B"), + + C("C"), + + D("D"), + + E("E"), + + F("F"), + + G("G"), + + H("H"); + + private String value; + + SecondSpecifiedAssetCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SecondSpecifiedAssetCodeEnum fromValue(String value) { + for (SecondSpecifiedAssetCodeEnum b : SecondSpecifiedAssetCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final SecondSpecifiedAssetCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public SecondSpecifiedAssetCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return SecondSpecifiedAssetCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + SecondSpecifiedAssetCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_SECOND_SPECIFIED_ASSET_CODE = "secondSpecifiedAssetCode"; + @SerializedName(SERIALIZED_NAME_SECOND_SPECIFIED_ASSET_CODE) + private SecondSpecifiedAssetCodeEnum secondSpecifiedAssetCode; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1098_E("1098-E"), + + _1098_T("1098-T"), + + _1099_B("1099-B"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_G("1099-G"), + + _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"), + + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); + + 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 FederalEfileStatusDetail 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 Form5498() { + } + + public Form5498( + String id, + FederalEfileStatusDetail 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 Form5498 iraContributions(Double iraContributions) { + this.iraContributions = iraContributions; + return this; + } + + /** + * IRA contributions (other than amounts in Boxes 2-4, 8-10, 13a, and 14a) + * @return iraContributions + */ + @javax.annotation.Nullable + public Double getIraContributions() { + return iraContributions; + } + + public void setIraContributions(Double iraContributions) { + this.iraContributions = iraContributions; + } + + + public Form5498 rolloverContributions(Double rolloverContributions) { + this.rolloverContributions = rolloverContributions; + return this; + } + + /** + * Rollover contributions + * @return rolloverContributions + */ + @javax.annotation.Nullable + public Double getRolloverContributions() { + return rolloverContributions; + } + + public void setRolloverContributions(Double rolloverContributions) { + this.rolloverContributions = rolloverContributions; + } + + + public Form5498 rothIraConversionAmount(Double rothIraConversionAmount) { + this.rothIraConversionAmount = rothIraConversionAmount; + return this; + } + + /** + * Roth IRA conversion amount + * @return rothIraConversionAmount + */ + @javax.annotation.Nullable + public Double getRothIraConversionAmount() { + return rothIraConversionAmount; + } + + public void setRothIraConversionAmount(Double rothIraConversionAmount) { + this.rothIraConversionAmount = rothIraConversionAmount; + } + + + public Form5498 recharacterizedContributions(Double recharacterizedContributions) { + this.recharacterizedContributions = recharacterizedContributions; + return this; + } + + /** + * Recharacterized contributions + * @return recharacterizedContributions + */ + @javax.annotation.Nullable + public Double getRecharacterizedContributions() { + return recharacterizedContributions; + } + + public void setRecharacterizedContributions(Double recharacterizedContributions) { + this.recharacterizedContributions = recharacterizedContributions; + } + + + public Form5498 fairMarketValueOfAccount(Double fairMarketValueOfAccount) { + this.fairMarketValueOfAccount = fairMarketValueOfAccount; + return this; + } + + /** + * Fair market value (FMV) of the account + * @return fairMarketValueOfAccount + */ + @javax.annotation.Nullable + public Double getFairMarketValueOfAccount() { + return fairMarketValueOfAccount; + } + + public void setFairMarketValueOfAccount(Double fairMarketValueOfAccount) { + this.fairMarketValueOfAccount = fairMarketValueOfAccount; + } + + + public Form5498 lifeInsuranceCostIncludedInIraContributions(Double lifeInsuranceCostIncludedInIraContributions) { + this.lifeInsuranceCostIncludedInIraContributions = lifeInsuranceCostIncludedInIraContributions; + return this; + } + + /** + * Life insurance cost included in the IRA contributions (Box 1). Can't be more than Box 1. + * @return lifeInsuranceCostIncludedInIraContributions + */ + @javax.annotation.Nullable + public Double getLifeInsuranceCostIncludedInIraContributions() { + return lifeInsuranceCostIncludedInIraContributions; + } + + public void setLifeInsuranceCostIncludedInIraContributions(Double lifeInsuranceCostIncludedInIraContributions) { + this.lifeInsuranceCostIncludedInIraContributions = lifeInsuranceCostIncludedInIraContributions; + } + + + public Form5498 iraType(IraTypeEnum iraType) { + this.iraType = iraType; + return this; + } + + /** + * Type of IRA. Required when Box 2 or Box 5 has an amount. * `IRA` - Traditional IRA * `SEP` - SEP IRA * `SIMPLE` - SIMPLE IRA * `ROTH` - Roth IRA + * @return iraType + */ + @javax.annotation.Nullable + public IraTypeEnum getIraType() { + return iraType; + } + + public void setIraType(IraTypeEnum iraType) { + this.iraType = iraType; + } + + + public Form5498 sepContributions(Double sepContributions) { + this.sepContributions = sepContributions; + return this; + } + + /** + * SEP contributions. Only allowed when `iraType` is `SEP`. + * @return sepContributions + */ + @javax.annotation.Nullable + public Double getSepContributions() { + return sepContributions; + } + + public void setSepContributions(Double sepContributions) { + this.sepContributions = sepContributions; + } + + + public Form5498 simpleContributions(Double simpleContributions) { + this.simpleContributions = simpleContributions; + return this; + } + + /** + * SIMPLE contributions. Only allowed when `iraType` is `SIMPLE`. + * @return simpleContributions + */ + @javax.annotation.Nullable + public Double getSimpleContributions() { + return simpleContributions; + } + + public void setSimpleContributions(Double simpleContributions) { + this.simpleContributions = simpleContributions; + } + + + public Form5498 rothIraContributions(Double rothIraContributions) { + this.rothIraContributions = rothIraContributions; + return this; + } + + /** + * Roth IRA contributions. Only allowed when `iraType` is `ROTH`. + * @return rothIraContributions + */ + @javax.annotation.Nullable + public Double getRothIraContributions() { + return rothIraContributions; + } + + public void setRothIraContributions(Double rothIraContributions) { + this.rothIraContributions = rothIraContributions; + } + + + public Form5498 requiredMinimumDistributionIndicator(Boolean requiredMinimumDistributionIndicator) { + this.requiredMinimumDistributionIndicator = requiredMinimumDistributionIndicator; + return this; + } + + /** + * If checked, a required minimum distribution (RMD) is due for the year after the tax year + * @return requiredMinimumDistributionIndicator + */ + @javax.annotation.Nullable + public Boolean getRequiredMinimumDistributionIndicator() { + return requiredMinimumDistributionIndicator; + } + + public void setRequiredMinimumDistributionIndicator(Boolean requiredMinimumDistributionIndicator) { + this.requiredMinimumDistributionIndicator = requiredMinimumDistributionIndicator; + } + + + public Form5498 requiredMinimumDistributionDate(LocalDate requiredMinimumDistributionDate) { + this.requiredMinimumDistributionDate = requiredMinimumDistributionDate; + return this; + } + + /** + * RMD date, in the year after the tax year. Required when `requiredMinimumDistributionIndicator` is `true`. + * @return requiredMinimumDistributionDate + */ + @javax.annotation.Nullable + public LocalDate getRequiredMinimumDistributionDate() { + return requiredMinimumDistributionDate; + } + + public void setRequiredMinimumDistributionDate(LocalDate requiredMinimumDistributionDate) { + this.requiredMinimumDistributionDate = requiredMinimumDistributionDate; + } + + + public Form5498 requiredMinimumDistributionAmount(Double requiredMinimumDistributionAmount) { + this.requiredMinimumDistributionAmount = requiredMinimumDistributionAmount; + return this; + } + + /** + * RMD amount. Required when `requiredMinimumDistributionIndicator` is `true`. + * @return requiredMinimumDistributionAmount + */ + @javax.annotation.Nullable + public Double getRequiredMinimumDistributionAmount() { + return requiredMinimumDistributionAmount; + } + + public void setRequiredMinimumDistributionAmount(Double requiredMinimumDistributionAmount) { + this.requiredMinimumDistributionAmount = requiredMinimumDistributionAmount; + } + + + public Form5498 postponedLateContribution(Double postponedLateContribution) { + this.postponedLateContribution = postponedLateContribution; + return this; + } + + /** + * Postponed or late contribution + * @return postponedLateContribution + */ + @javax.annotation.Nullable + public Double getPostponedLateContribution() { + return postponedLateContribution; + } + + public void setPostponedLateContribution(Double postponedLateContribution) { + this.postponedLateContribution = postponedLateContribution; + } + + + public Form5498 postponedLateContributionYear(Integer postponedLateContributionYear) { + this.postponedLateContributionYear = postponedLateContributionYear; + return this; + } + + /** + * Year the postponed or late contribution was for (four digits, from 1998 to the tax year). Required when `postponedLateContribution` has an amount. + * @return postponedLateContributionYear + */ + @javax.annotation.Nullable + public Integer getPostponedLateContributionYear() { + return postponedLateContributionYear; + } + + public void setPostponedLateContributionYear(Integer postponedLateContributionYear) { + this.postponedLateContributionYear = postponedLateContributionYear; + } + + + public Form5498 postponedLateContributionCode(PostponedLateContributionCodeEnum postponedLateContributionCode) { + this.postponedLateContributionCode = postponedLateContributionCode; + return this; + } + + /** + * Postponed or late contribution code. Required when `postponedLateContribution` has an amount. * `FD` - Federally designated disaster area * `PL` - Public law * `EO` - Executive order * `PO` - Rollover of a qualified plan loan offset amount * `SC` - Late rollover under the self-certification procedure + * @return postponedLateContributionCode + */ + @javax.annotation.Nullable + public PostponedLateContributionCodeEnum getPostponedLateContributionCode() { + return postponedLateContributionCode; + } + + public void setPostponedLateContributionCode(PostponedLateContributionCodeEnum postponedLateContributionCode) { + this.postponedLateContributionCode = postponedLateContributionCode; + } + + + public Form5498 postponedLateContributionReason(String postponedLateContributionReason) { + this.postponedLateContributionReason = postponedLateContributionReason; + return this; + } + + /** + * Postponed or late contribution reason, such as the public law or executive order number (up to 6 characters) + * @return postponedLateContributionReason + */ + @javax.annotation.Nullable + public String getPostponedLateContributionReason() { + return postponedLateContributionReason; + } + + public void setPostponedLateContributionReason(String postponedLateContributionReason) { + this.postponedLateContributionReason = postponedLateContributionReason; + } + + + public Form5498 repayments(Double repayments) { + this.repayments = repayments; + return this; + } + + /** + * Repayments + * @return repayments + */ + @javax.annotation.Nullable + public Double getRepayments() { + return repayments; + } + + public void setRepayments(Double repayments) { + this.repayments = repayments; + } + + + public Form5498 repaymentCode(RepaymentCodeEnum repaymentCode) { + this.repaymentCode = repaymentCode; + return this; + } + + /** + * Repayment code. Required when `repayments` has an amount. * `QR` - Qualified reservist distribution * `DD` - Federally designated disaster distribution * `BA` - Qualified birth or adoption distribution * `EP` - Emergency personal expense distribution * `DA` - Domestic abuse victim distribution * `TI` - Terminally ill individual distribution + * @return repaymentCode + */ + @javax.annotation.Nullable + public RepaymentCodeEnum getRepaymentCode() { + return repaymentCode; + } + + public void setRepaymentCode(RepaymentCodeEnum repaymentCode) { + this.repaymentCode = repaymentCode; + } + + + public Form5498 fairMarketValueOfCertainSpecifiedAssets(Double fairMarketValueOfCertainSpecifiedAssets) { + this.fairMarketValueOfCertainSpecifiedAssets = fairMarketValueOfCertainSpecifiedAssets; + return this; + } + + /** + * FMV of certain specified assets + * @return fairMarketValueOfCertainSpecifiedAssets + */ + @javax.annotation.Nullable + public Double getFairMarketValueOfCertainSpecifiedAssets() { + return fairMarketValueOfCertainSpecifiedAssets; + } + + public void setFairMarketValueOfCertainSpecifiedAssets(Double fairMarketValueOfCertainSpecifiedAssets) { + this.fairMarketValueOfCertainSpecifiedAssets = fairMarketValueOfCertainSpecifiedAssets; + } + + + public Form5498 specifiedAssetCode(SpecifiedAssetCodeEnum specifiedAssetCode) { + this.specifiedAssetCode = specifiedAssetCode; + return this; + } + + /** + * Specified asset code. Required when `fairMarketValueOfCertainSpecifiedAssets` has an amount. * `A` - Stock or other ownership interest in a corporation that is not readily tradable on an established securities market * `B` - Short- or long-term debt obligation that is not traded on an established securities market * `C` - Ownership interest in a limited liability company or similar entity (unless the interest is traded on an established securities market) * `D` - Real estate * `E` - Ownership interest in a partnership, trust, or similar entity (unless the interest is traded on an established securities market) * `F` - Option contract or similar product that is not offered for trade on an established option exchange * `G` - Other asset that does not have a readily available FMV * `H` - More than two types of assets (listed in `A` through `G`) are held in this IRA + * @return specifiedAssetCode + */ + @javax.annotation.Nullable + public SpecifiedAssetCodeEnum getSpecifiedAssetCode() { + return specifiedAssetCode; + } + + public void setSpecifiedAssetCode(SpecifiedAssetCodeEnum specifiedAssetCode) { + this.specifiedAssetCode = specifiedAssetCode; + } + + + public Form5498 secondSpecifiedAssetCode(SecondSpecifiedAssetCodeEnum secondSpecifiedAssetCode) { + this.secondSpecifiedAssetCode = secondSpecifiedAssetCode; + return this; + } + + /** + * Second specified asset code, when the IRA holds two types of specified assets. Takes the codes `A` through `G`; it can't repeat `specifiedAssetCode`, and isn't allowed when `specifiedAssetCode` is `H`. + * @return secondSpecifiedAssetCode + */ + @javax.annotation.Nullable + public SecondSpecifiedAssetCodeEnum getSecondSpecifiedAssetCode() { + return secondSpecifiedAssetCode; + } + + public void setSecondSpecifiedAssetCode(SecondSpecifiedAssetCodeEnum secondSpecifiedAssetCode) { + this.secondSpecifiedAssetCode = secondSpecifiedAssetCode; + } + + + public Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public FederalEfileStatusDetail 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 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 Form5498 instance itself + */ + public Form5498 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; + } + Form5498 form5498 = (Form5498) o; + return Objects.equals(this.iraContributions, form5498.iraContributions) && + Objects.equals(this.rolloverContributions, form5498.rolloverContributions) && + Objects.equals(this.rothIraConversionAmount, form5498.rothIraConversionAmount) && + Objects.equals(this.recharacterizedContributions, form5498.recharacterizedContributions) && + Objects.equals(this.fairMarketValueOfAccount, form5498.fairMarketValueOfAccount) && + Objects.equals(this.lifeInsuranceCostIncludedInIraContributions, form5498.lifeInsuranceCostIncludedInIraContributions) && + Objects.equals(this.iraType, form5498.iraType) && + Objects.equals(this.sepContributions, form5498.sepContributions) && + Objects.equals(this.simpleContributions, form5498.simpleContributions) && + Objects.equals(this.rothIraContributions, form5498.rothIraContributions) && + Objects.equals(this.requiredMinimumDistributionIndicator, form5498.requiredMinimumDistributionIndicator) && + Objects.equals(this.requiredMinimumDistributionDate, form5498.requiredMinimumDistributionDate) && + Objects.equals(this.requiredMinimumDistributionAmount, form5498.requiredMinimumDistributionAmount) && + Objects.equals(this.postponedLateContribution, form5498.postponedLateContribution) && + Objects.equals(this.postponedLateContributionYear, form5498.postponedLateContributionYear) && + Objects.equals(this.postponedLateContributionCode, form5498.postponedLateContributionCode) && + Objects.equals(this.postponedLateContributionReason, form5498.postponedLateContributionReason) && + Objects.equals(this.repayments, form5498.repayments) && + Objects.equals(this.repaymentCode, form5498.repaymentCode) && + Objects.equals(this.fairMarketValueOfCertainSpecifiedAssets, form5498.fairMarketValueOfCertainSpecifiedAssets) && + Objects.equals(this.specifiedAssetCode, form5498.specifiedAssetCode) && + Objects.equals(this.secondSpecifiedAssetCode, form5498.secondSpecifiedAssetCode) && + Objects.equals(this.type, form5498.type) && + Objects.equals(this.id, form5498.id) && + Objects.equals(this.issuerId, form5498.issuerId) && + Objects.equals(this.issuerReferenceId, form5498.issuerReferenceId) && + Objects.equals(this.issuerTin, form5498.issuerTin) && + Objects.equals(this.taxYear, form5498.taxYear) && + Objects.equals(this.referenceId, form5498.referenceId) && + Objects.equals(this.tin, form5498.tin) && + Objects.equals(this.recipientName, form5498.recipientName) && + Objects.equals(this.address, form5498.address) && + Objects.equals(this.address2, form5498.address2) && + Objects.equals(this.city, form5498.city) && + Objects.equals(this.state, form5498.state) && + Objects.equals(this.zip, form5498.zip) && + Objects.equals(this.email, form5498.email) && + Objects.equals(this.nonUsProvince, form5498.nonUsProvince) && + Objects.equals(this.countryCode, form5498.countryCode) && + Objects.equals(this.federalEfileDate, form5498.federalEfileDate) && + Objects.equals(this.postalMail, form5498.postalMail) && + Objects.equals(this.stateEfileDate, form5498.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form5498.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form5498.tinMatch) && + Objects.equals(this.addressVerification, form5498.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form5498.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form5498.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form5498.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form5498.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form5498.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form5498.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form5498.eDeliveryStatus) && + Objects.equals(this.validationErrors, form5498.validationErrors) && + Objects.equals(this.createdAt, form5498.createdAt) && + Objects.equals(this.updatedAt, form5498.updatedAt) && + Objects.equals(this.tinType, form5498.tinType) && + Objects.equals(this.businessName, form5498.businessName) && + Objects.equals(this.businessName2, form5498.businessName2) && + Objects.equals(this.firstName, form5498.firstName) && + Objects.equals(this.middleName, form5498.middleName) && + Objects.equals(this.lastName, form5498.lastName) && + Objects.equals(this.suffixName, form5498.suffixName) && + Objects.equals(this.recipientSecondName, form5498.recipientSecondName) && + Objects.equals(this.accountNumber, form5498.accountNumber) && + Objects.equals(this.officeCode, form5498.officeCode) && + Objects.equals(this.noTin, form5498.noTin) && + Objects.equals(this.secondTinNotice, form5498.secondTinNotice)&& + Objects.equals(this.additionalProperties, form5498.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(iraContributions, rolloverContributions, rothIraConversionAmount, recharacterizedContributions, fairMarketValueOfAccount, lifeInsuranceCostIncludedInIraContributions, iraType, sepContributions, simpleContributions, rothIraContributions, requiredMinimumDistributionIndicator, requiredMinimumDistributionDate, requiredMinimumDistributionAmount, postponedLateContribution, postponedLateContributionYear, postponedLateContributionCode, postponedLateContributionReason, repayments, repaymentCode, fairMarketValueOfCertainSpecifiedAssets, specifiedAssetCode, secondSpecifiedAssetCode, 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 Form5498 {\n"); + sb.append(" iraContributions: ").append(toIndentedString(iraContributions)).append("\n"); + sb.append(" rolloverContributions: ").append(toIndentedString(rolloverContributions)).append("\n"); + sb.append(" rothIraConversionAmount: ").append(toIndentedString(rothIraConversionAmount)).append("\n"); + sb.append(" recharacterizedContributions: ").append(toIndentedString(recharacterizedContributions)).append("\n"); + sb.append(" fairMarketValueOfAccount: ").append(toIndentedString(fairMarketValueOfAccount)).append("\n"); + sb.append(" lifeInsuranceCostIncludedInIraContributions: ").append(toIndentedString(lifeInsuranceCostIncludedInIraContributions)).append("\n"); + sb.append(" iraType: ").append(toIndentedString(iraType)).append("\n"); + sb.append(" sepContributions: ").append(toIndentedString(sepContributions)).append("\n"); + sb.append(" simpleContributions: ").append(toIndentedString(simpleContributions)).append("\n"); + sb.append(" rothIraContributions: ").append(toIndentedString(rothIraContributions)).append("\n"); + sb.append(" requiredMinimumDistributionIndicator: ").append(toIndentedString(requiredMinimumDistributionIndicator)).append("\n"); + sb.append(" requiredMinimumDistributionDate: ").append(toIndentedString(requiredMinimumDistributionDate)).append("\n"); + sb.append(" requiredMinimumDistributionAmount: ").append(toIndentedString(requiredMinimumDistributionAmount)).append("\n"); + sb.append(" postponedLateContribution: ").append(toIndentedString(postponedLateContribution)).append("\n"); + sb.append(" postponedLateContributionYear: ").append(toIndentedString(postponedLateContributionYear)).append("\n"); + sb.append(" postponedLateContributionCode: ").append(toIndentedString(postponedLateContributionCode)).append("\n"); + sb.append(" postponedLateContributionReason: ").append(toIndentedString(postponedLateContributionReason)).append("\n"); + sb.append(" repayments: ").append(toIndentedString(repayments)).append("\n"); + sb.append(" repaymentCode: ").append(toIndentedString(repaymentCode)).append("\n"); + sb.append(" fairMarketValueOfCertainSpecifiedAssets: ").append(toIndentedString(fairMarketValueOfCertainSpecifiedAssets)).append("\n"); + sb.append(" specifiedAssetCode: ").append(toIndentedString(specifiedAssetCode)).append("\n"); + sb.append(" secondSpecifiedAssetCode: ").append(toIndentedString(secondSpecifiedAssetCode)).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 Form5498 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form5498.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form5498 is not found in the empty JSON string", Form5498.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form5498.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("iraType") != null && !jsonObj.get("iraType").isJsonNull()) && !jsonObj.get("iraType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `iraType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iraType").toString())); + } + // validate the optional field `iraType` + if (jsonObj.get("iraType") != null && !jsonObj.get("iraType").isJsonNull()) { + IraTypeEnum.validateJsonElement(jsonObj.get("iraType")); + } + if ((jsonObj.get("postponedLateContributionCode") != null && !jsonObj.get("postponedLateContributionCode").isJsonNull()) && !jsonObj.get("postponedLateContributionCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postponedLateContributionCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postponedLateContributionCode").toString())); + } + // validate the optional field `postponedLateContributionCode` + if (jsonObj.get("postponedLateContributionCode") != null && !jsonObj.get("postponedLateContributionCode").isJsonNull()) { + PostponedLateContributionCodeEnum.validateJsonElement(jsonObj.get("postponedLateContributionCode")); + } + if ((jsonObj.get("postponedLateContributionReason") != null && !jsonObj.get("postponedLateContributionReason").isJsonNull()) && !jsonObj.get("postponedLateContributionReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `postponedLateContributionReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("postponedLateContributionReason").toString())); + } + if ((jsonObj.get("repaymentCode") != null && !jsonObj.get("repaymentCode").isJsonNull()) && !jsonObj.get("repaymentCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `repaymentCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("repaymentCode").toString())); + } + // validate the optional field `repaymentCode` + if (jsonObj.get("repaymentCode") != null && !jsonObj.get("repaymentCode").isJsonNull()) { + RepaymentCodeEnum.validateJsonElement(jsonObj.get("repaymentCode")); + } + if ((jsonObj.get("specifiedAssetCode") != null && !jsonObj.get("specifiedAssetCode").isJsonNull()) && !jsonObj.get("specifiedAssetCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `specifiedAssetCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("specifiedAssetCode").toString())); + } + // validate the optional field `specifiedAssetCode` + if (jsonObj.get("specifiedAssetCode") != null && !jsonObj.get("specifiedAssetCode").isJsonNull()) { + SpecifiedAssetCodeEnum.validateJsonElement(jsonObj.get("specifiedAssetCode")); + } + if ((jsonObj.get("secondSpecifiedAssetCode") != null && !jsonObj.get("secondSpecifiedAssetCode").isJsonNull()) && !jsonObj.get("secondSpecifiedAssetCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secondSpecifiedAssetCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondSpecifiedAssetCode").toString())); + } + // validate the optional field `secondSpecifiedAssetCode` + if (jsonObj.get("secondSpecifiedAssetCode") != null && !jsonObj.get("secondSpecifiedAssetCode").isJsonNull()) { + SecondSpecifiedAssetCodeEnum.validateJsonElement(jsonObj.get("secondSpecifiedAssetCode")); + } + 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()) { + FederalEfileStatusDetail.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 (!Form5498.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form5498' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form5498.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form5498 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 Form5498 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form5498 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 Form5498 given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form5498 + * @throws IOException if the JSON string is invalid with respect to Form5498 + */ + public static Form5498 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form5498.class); + } + + /** + * Convert an instance of Form5498 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/FormW2G.java b/src/main/java/Avalara/SDK/model/A1099/V2/FormW2G.java new file mode 100644 index 0000000..9454e95 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/FormW2G.java @@ -0,0 +1,2076 @@ +/* + * 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.FederalEfileStatusDetail; +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 W-2G: Certain Gambling Winnings The recipient is the winner and the issuer is the payer. *Required:* `reportableWinnings`, `dateWon`, which must fall in the tax year, and `typeOfWager`. `reportableWinnings` only has to be present; zero is accepted. When the issuer's account checks for reasonable withholding, `federalIncomeTaxWithheld` can't be more than 31.58% of `reportableWinnings` and `winningsFromIdenticalWagers` combined (40% in January). The text fields are not length-checked, but only the first 15 characters (`transaction`, `firstId` and `secondId`) or 5 characters (`race`, `cashier` and `window`) are e-filed. `state` and `stateId` are required when `stateTaxWithheld` has an amount. W-2G has no locality ID field, so `localityId` is discarded and reads back as `null`. Form W-2G has no second TIN notice, so `secondTinNotice` is discarded and reads back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class FormW2G { + public static final String SERIALIZED_NAME_REPORTABLE_WINNINGS = "reportableWinnings"; + @SerializedName(SERIALIZED_NAME_REPORTABLE_WINNINGS) + private Double reportableWinnings; + + public static final String SERIALIZED_NAME_DATE_WON = "dateWon"; + @SerializedName(SERIALIZED_NAME_DATE_WON) + private LocalDate dateWon; + + /** + * Type of wager. * `1` - Horse race track (or off-track betting of a horse track nature) * `2` - Dog race track (or off-track betting of a dog track nature) * `3` - Jai-alai * `4` - State-conducted lottery * `5` - Keno * `6` - Bingo * `7` - Slot machines * `8` - Poker winnings * `9` - Any other type of gambling winnings Any other code is treated as missing, so the form is saved with a \"can't be blank\" error on `#/box_3_type_wager`. + */ + @JsonAdapter(TypeOfWagerEnum.Adapter.class) + public enum TypeOfWagerEnum { + _1("1"), + + _2("2"), + + _3("3"), + + _4("4"), + + _5("5"), + + _6("6"), + + _7("7"), + + _8("8"), + + _9("9"); + + private String value; + + TypeOfWagerEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeOfWagerEnum fromValue(String value) { + for (TypeOfWagerEnum b : TypeOfWagerEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeOfWagerEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeOfWagerEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeOfWagerEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeOfWagerEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE_OF_WAGER = "typeOfWager"; + @SerializedName(SERIALIZED_NAME_TYPE_OF_WAGER) + private TypeOfWagerEnum typeOfWager; + + public static final String SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD = "federalIncomeTaxWithheld"; + @SerializedName(SERIALIZED_NAME_FEDERAL_INCOME_TAX_WITHHELD) + private Double federalIncomeTaxWithheld; + + public static final String SERIALIZED_NAME_TRANSACTION = "transaction"; + @SerializedName(SERIALIZED_NAME_TRANSACTION) + private String transaction; + + public static final String SERIALIZED_NAME_RACE = "race"; + @SerializedName(SERIALIZED_NAME_RACE) + private String race; + + public static final String SERIALIZED_NAME_WINNINGS_FROM_IDENTICAL_WAGERS = "winningsFromIdenticalWagers"; + @SerializedName(SERIALIZED_NAME_WINNINGS_FROM_IDENTICAL_WAGERS) + private Double winningsFromIdenticalWagers; + + public static final String SERIALIZED_NAME_CASHIER = "cashier"; + @SerializedName(SERIALIZED_NAME_CASHIER) + private String cashier; + + public static final String SERIALIZED_NAME_WINDOW = "window"; + @SerializedName(SERIALIZED_NAME_WINDOW) + private String window; + + public static final String SERIALIZED_NAME_FIRST_ID = "firstId"; + @SerializedName(SERIALIZED_NAME_FIRST_ID) + private String firstId; + + public static final String SERIALIZED_NAME_SECOND_ID = "secondId"; + @SerializedName(SERIALIZED_NAME_SECOND_ID) + private String secondId; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1098_E("1098-E"), + + _1098_T("1098-T"), + + _1099_B("1099-B"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_G("1099-G"), + + _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"), + + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); + + 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 FederalEfileStatusDetail 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 FormW2G() { + } + + public FormW2G( + String id, + FederalEfileStatusDetail 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 FormW2G reportableWinnings(Double reportableWinnings) { + this.reportableWinnings = reportableWinnings; + return this; + } + + /** + * Reportable winnings + * @return reportableWinnings + */ + @javax.annotation.Nullable + public Double getReportableWinnings() { + return reportableWinnings; + } + + public void setReportableWinnings(Double reportableWinnings) { + this.reportableWinnings = reportableWinnings; + } + + + public FormW2G dateWon(LocalDate dateWon) { + this.dateWon = dateWon; + return this; + } + + /** + * Date won. Must fall in the tax year. + * @return dateWon + */ + @javax.annotation.Nullable + public LocalDate getDateWon() { + return dateWon; + } + + public void setDateWon(LocalDate dateWon) { + this.dateWon = dateWon; + } + + + public FormW2G typeOfWager(TypeOfWagerEnum typeOfWager) { + this.typeOfWager = typeOfWager; + return this; + } + + /** + * Type of wager. * `1` - Horse race track (or off-track betting of a horse track nature) * `2` - Dog race track (or off-track betting of a dog track nature) * `3` - Jai-alai * `4` - State-conducted lottery * `5` - Keno * `6` - Bingo * `7` - Slot machines * `8` - Poker winnings * `9` - Any other type of gambling winnings Any other code is treated as missing, so the form is saved with a \"can't be blank\" error on `#/box_3_type_wager`. + * @return typeOfWager + */ + @javax.annotation.Nullable + public TypeOfWagerEnum getTypeOfWager() { + return typeOfWager; + } + + public void setTypeOfWager(TypeOfWagerEnum typeOfWager) { + this.typeOfWager = typeOfWager; + } + + + public FormW2G federalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + return this; + } + + /** + * Federal income tax withheld + * @return federalIncomeTaxWithheld + */ + @javax.annotation.Nullable + public Double getFederalIncomeTaxWithheld() { + return federalIncomeTaxWithheld; + } + + public void setFederalIncomeTaxWithheld(Double federalIncomeTaxWithheld) { + this.federalIncomeTaxWithheld = federalIncomeTaxWithheld; + } + + + public FormW2G transaction(String transaction) { + this.transaction = transaction; + return this; + } + + /** + * Transaction, such as the ticket or card number + * @return transaction + */ + @javax.annotation.Nullable + public String getTransaction() { + return transaction; + } + + public void setTransaction(String transaction) { + this.transaction = transaction; + } + + + public FormW2G race(String race) { + this.race = race; + return this; + } + + /** + * Race, such as the race or game number + * @return race + */ + @javax.annotation.Nullable + public String getRace() { + return race; + } + + public void setRace(String race) { + this.race = race; + } + + + public FormW2G winningsFromIdenticalWagers(Double winningsFromIdenticalWagers) { + this.winningsFromIdenticalWagers = winningsFromIdenticalWagers; + return this; + } + + /** + * Winnings from identical wagers + * @return winningsFromIdenticalWagers + */ + @javax.annotation.Nullable + public Double getWinningsFromIdenticalWagers() { + return winningsFromIdenticalWagers; + } + + public void setWinningsFromIdenticalWagers(Double winningsFromIdenticalWagers) { + this.winningsFromIdenticalWagers = winningsFromIdenticalWagers; + } + + + public FormW2G cashier(String cashier) { + this.cashier = cashier; + return this; + } + + /** + * Cashier + * @return cashier + */ + @javax.annotation.Nullable + public String getCashier() { + return cashier; + } + + public void setCashier(String cashier) { + this.cashier = cashier; + } + + + public FormW2G window(String window) { + this.window = window; + return this; + } + + /** + * Window + * @return window + */ + @javax.annotation.Nullable + public String getWindow() { + return window; + } + + public void setWindow(String window) { + this.window = window; + } + + + public FormW2G firstId(String firstId) { + this.firstId = firstId; + return this; + } + + /** + * First identification of the winner, such as a driver's license number + * @return firstId + */ + @javax.annotation.Nullable + public String getFirstId() { + return firstId; + } + + public void setFirstId(String firstId) { + this.firstId = firstId; + } + + + public FormW2G secondId(String secondId) { + this.secondId = secondId; + return this; + } + + /** + * Second identification of the winner + * @return secondId + */ + @javax.annotation.Nullable + public String getSecondId() { + return secondId; + } + + public void setSecondId(String secondId) { + this.secondId = secondId; + } + + + public FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public FederalEfileStatusDetail 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G 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 FormW2G instance itself + */ + public FormW2G 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; + } + FormW2G formW2G = (FormW2G) o; + return Objects.equals(this.reportableWinnings, formW2G.reportableWinnings) && + Objects.equals(this.dateWon, formW2G.dateWon) && + Objects.equals(this.typeOfWager, formW2G.typeOfWager) && + Objects.equals(this.federalIncomeTaxWithheld, formW2G.federalIncomeTaxWithheld) && + Objects.equals(this.transaction, formW2G.transaction) && + Objects.equals(this.race, formW2G.race) && + Objects.equals(this.winningsFromIdenticalWagers, formW2G.winningsFromIdenticalWagers) && + Objects.equals(this.cashier, formW2G.cashier) && + Objects.equals(this.window, formW2G.window) && + Objects.equals(this.firstId, formW2G.firstId) && + Objects.equals(this.secondId, formW2G.secondId) && + Objects.equals(this.type, formW2G.type) && + Objects.equals(this.id, formW2G.id) && + Objects.equals(this.issuerId, formW2G.issuerId) && + Objects.equals(this.issuerReferenceId, formW2G.issuerReferenceId) && + Objects.equals(this.issuerTin, formW2G.issuerTin) && + Objects.equals(this.taxYear, formW2G.taxYear) && + Objects.equals(this.referenceId, formW2G.referenceId) && + Objects.equals(this.tin, formW2G.tin) && + Objects.equals(this.recipientName, formW2G.recipientName) && + Objects.equals(this.address, formW2G.address) && + Objects.equals(this.address2, formW2G.address2) && + Objects.equals(this.city, formW2G.city) && + Objects.equals(this.state, formW2G.state) && + Objects.equals(this.zip, formW2G.zip) && + Objects.equals(this.email, formW2G.email) && + Objects.equals(this.nonUsProvince, formW2G.nonUsProvince) && + Objects.equals(this.countryCode, formW2G.countryCode) && + Objects.equals(this.federalEfileDate, formW2G.federalEfileDate) && + Objects.equals(this.postalMail, formW2G.postalMail) && + Objects.equals(this.stateEfileDate, formW2G.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, formW2G.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, formW2G.tinMatch) && + Objects.equals(this.addressVerification, formW2G.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, formW2G.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, formW2G.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, formW2G.stateEfileStatus) && + Objects.equals(this.postalMailStatus, formW2G.postalMailStatus) && + Objects.equals(this.tinMatchStatus, formW2G.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, formW2G.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, formW2G.eDeliveryStatus) && + Objects.equals(this.validationErrors, formW2G.validationErrors) && + Objects.equals(this.createdAt, formW2G.createdAt) && + Objects.equals(this.updatedAt, formW2G.updatedAt) && + Objects.equals(this.tinType, formW2G.tinType) && + Objects.equals(this.businessName, formW2G.businessName) && + Objects.equals(this.businessName2, formW2G.businessName2) && + Objects.equals(this.firstName, formW2G.firstName) && + Objects.equals(this.middleName, formW2G.middleName) && + Objects.equals(this.lastName, formW2G.lastName) && + Objects.equals(this.suffixName, formW2G.suffixName) && + Objects.equals(this.recipientSecondName, formW2G.recipientSecondName) && + Objects.equals(this.accountNumber, formW2G.accountNumber) && + Objects.equals(this.officeCode, formW2G.officeCode) && + Objects.equals(this.noTin, formW2G.noTin) && + Objects.equals(this.secondTinNotice, formW2G.secondTinNotice)&& + Objects.equals(this.additionalProperties, formW2G.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(reportableWinnings, dateWon, typeOfWager, federalIncomeTaxWithheld, transaction, race, winningsFromIdenticalWagers, cashier, window, firstId, secondId, 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 FormW2G {\n"); + sb.append(" reportableWinnings: ").append(toIndentedString(reportableWinnings)).append("\n"); + sb.append(" dateWon: ").append(toIndentedString(dateWon)).append("\n"); + sb.append(" typeOfWager: ").append(toIndentedString(typeOfWager)).append("\n"); + sb.append(" federalIncomeTaxWithheld: ").append(toIndentedString(federalIncomeTaxWithheld)).append("\n"); + sb.append(" transaction: ").append(toIndentedString(transaction)).append("\n"); + sb.append(" race: ").append(toIndentedString(race)).append("\n"); + sb.append(" winningsFromIdenticalWagers: ").append(toIndentedString(winningsFromIdenticalWagers)).append("\n"); + sb.append(" cashier: ").append(toIndentedString(cashier)).append("\n"); + sb.append(" window: ").append(toIndentedString(window)).append("\n"); + sb.append(" firstId: ").append(toIndentedString(firstId)).append("\n"); + sb.append(" secondId: ").append(toIndentedString(secondId)).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("reportableWinnings"); + openapiRequiredFields.add("dateWon"); + openapiRequiredFields.add("typeOfWager"); + 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 FormW2G + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!FormW2G.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in FormW2G is not found in the empty JSON string", FormW2G.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : FormW2G.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("typeOfWager") != null && !jsonObj.get("typeOfWager").isJsonNull()) && !jsonObj.get("typeOfWager").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `typeOfWager` to be a primitive type in the JSON string but got `%s`", jsonObj.get("typeOfWager").toString())); + } + // validate the required field `typeOfWager` + TypeOfWagerEnum.validateJsonElement(jsonObj.get("typeOfWager")); + if ((jsonObj.get("transaction") != null && !jsonObj.get("transaction").isJsonNull()) && !jsonObj.get("transaction").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `transaction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transaction").toString())); + } + if ((jsonObj.get("race") != null && !jsonObj.get("race").isJsonNull()) && !jsonObj.get("race").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `race` to be a primitive type in the JSON string but got `%s`", jsonObj.get("race").toString())); + } + if ((jsonObj.get("cashier") != null && !jsonObj.get("cashier").isJsonNull()) && !jsonObj.get("cashier").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `cashier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cashier").toString())); + } + if ((jsonObj.get("window") != null && !jsonObj.get("window").isJsonNull()) && !jsonObj.get("window").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `window` to be a primitive type in the JSON string but got `%s`", jsonObj.get("window").toString())); + } + if ((jsonObj.get("firstId") != null && !jsonObj.get("firstId").isJsonNull()) && !jsonObj.get("firstId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstId").toString())); + } + if ((jsonObj.get("secondId") != null && !jsonObj.get("secondId").isJsonNull()) && !jsonObj.get("secondId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `secondId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secondId").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // 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()) { + FederalEfileStatusDetail.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 (!FormW2G.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'FormW2G' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(FormW2G.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, FormW2G 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 FormW2G read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + FormW2G 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 FormW2G given an JSON string + * + * @param jsonString JSON string + * @return An instance of FormW2G + * @throws IOException if the JSON string is invalid with respect to FormW2G + */ + public static FormW2G fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, FormW2G.class); + } + + /** + * Convert an instance of FormW2G 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/Get1099Form200Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java index 8473bfc..1c1551e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java @@ -21,13 +21,17 @@ import java.util.Objects; import Avalara.SDK.model.A1099.V2.CoveredIndividual; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1042S; 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.Form1098E; import Avalara.SDK.model.A1099.V2.Form1098T; +import Avalara.SDK.model.A1099.V2.Form1099B; import Avalara.SDK.model.A1099.V2.Form1099C; import Avalara.SDK.model.A1099.V2.Form1099Div; +import Avalara.SDK.model.A1099.V2.Form1099G; import Avalara.SDK.model.A1099.V2.Form1099Int; import Avalara.SDK.model.A1099.V2.Form1099K; import Avalara.SDK.model.A1099.V2.Form1099Misc; @@ -38,6 +42,8 @@ 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.Form5498; +import Avalara.SDK.model.A1099.V2.FormW2G; import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; import Avalara.SDK.model.A1099.V2.OfferAndCoverage; import Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent; @@ -108,9 +114,12 @@ 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 adapterForm1098E = gson.getDelegateAdapter(this, TypeToken.get(Form1098E.class)); final TypeAdapter adapterForm1098T = gson.getDelegateAdapter(this, TypeToken.get(Form1098T.class)); + final TypeAdapter adapterForm1099B = gson.getDelegateAdapter(this, TypeToken.get(Form1099B.class)); final TypeAdapter adapterForm1099C = gson.getDelegateAdapter(this, TypeToken.get(Form1099C.class)); final TypeAdapter adapterForm1099Div = gson.getDelegateAdapter(this, TypeToken.get(Form1099Div.class)); + final TypeAdapter adapterForm1099G = gson.getDelegateAdapter(this, TypeToken.get(Form1099G.class)); final TypeAdapter adapterForm1099Int = gson.getDelegateAdapter(this, TypeToken.get(Form1099Int.class)); final TypeAdapter adapterForm1099K = gson.getDelegateAdapter(this, TypeToken.get(Form1099K.class)); final TypeAdapter adapterForm1099Misc = gson.getDelegateAdapter(this, TypeToken.get(Form1099Misc.class)); @@ -120,6 +129,8 @@ public TypeAdapter create(Gson gson, TypeToken type) { 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)); + final TypeAdapter adapterForm5498 = gson.getDelegateAdapter(this, TypeToken.get(Form5498.class)); + final TypeAdapter adapterFormW2G = gson.getDelegateAdapter(this, TypeToken.get(FormW2G.class)); return (TypeAdapter) new TypeAdapter() { @Override @@ -153,12 +164,24 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1098E` + if (value.getActualInstance() instanceof Form1098E) { + JsonElement element = adapterForm1098E.toJsonTree((Form1098E)value.getActualInstance()); + 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 `Form1099B` + if (value.getActualInstance() instanceof Form1099B) { + JsonElement element = adapterForm1099B.toJsonTree((Form1099B)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()); @@ -171,6 +194,12 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1099G` + if (value.getActualInstance() instanceof Form1099G) { + JsonElement element = adapterForm1099G.toJsonTree((Form1099G)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099Int` if (value.getActualInstance() instanceof Form1099Int) { JsonElement element = adapterForm1099Int.toJsonTree((Form1099Int)value.getActualInstance()); @@ -225,7 +254,19 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2"); + // check if the actual instance is of the type `Form5498` + if (value.getActualInstance() instanceof Form5498) { + JsonElement element = adapterForm5498.toJsonTree((Form5498)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `FormW2G` + if (value.getActualInstance() instanceof FormW2G) { + JsonElement element = adapterFormW2G.toJsonTree((FormW2G)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, Form1098E, Form1098T, Form1099B, Form1099C, Form1099Div, Form1099G, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2, Form5498, FormW2G"); } @Override @@ -285,6 +326,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 Form1098E + try { + // validate the JSON object to see if any exception is thrown + Form1098E.validateJsonElement(jsonElement); + actualAdapter = adapterForm1098E; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1098E'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1098E failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1098E'", e); + } // deserialize Form1098T try { // validate the JSON object to see if any exception is thrown @@ -297,6 +350,18 @@ public Get1099Form200Response read(JsonReader in) throws IOException { 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 Form1099B + try { + // validate the JSON object to see if any exception is thrown + Form1099B.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099B; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099B'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099B failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099B'", e); + } // deserialize Form1099C try { // validate the JSON object to see if any exception is thrown @@ -321,6 +386,18 @@ public Get1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099Div failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099Div'", e); } + // deserialize Form1099G + try { + // validate the JSON object to see if any exception is thrown + Form1099G.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099G; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099G'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099G failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099G'", e); + } // deserialize Form1099Int try { // validate the JSON object to see if any exception is thrown @@ -429,6 +506,30 @@ public Get1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099W2 failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099W2'", e); } + // deserialize Form5498 + try { + // validate the JSON object to see if any exception is thrown + Form5498.validateJsonElement(jsonElement); + actualAdapter = adapterForm5498; + match++; + log.log(Level.FINER, "Input data matches schema 'Form5498'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form5498 failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form5498'", e); + } + // deserialize FormW2G + try { + // validate the JSON object to see if any exception is thrown + FormW2G.validateJsonElement(jsonElement); + actualAdapter = adapterFormW2G; + match++; + log.log(Level.FINER, "Input data matches schema 'FormW2G'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for FormW2G failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'FormW2G'", e); + } if (match == 1) { Get1099Form200Response ret = new Get1099Form200Response(); @@ -459,9 +560,12 @@ public Get1099Form200Response(Object o) { schemas.put("Form1095B", Form1095B.class); schemas.put("Form1095C", Form1095C.class); schemas.put("Form1098", Form1098.class); + schemas.put("Form1098E", Form1098E.class); schemas.put("Form1098T", Form1098T.class); + schemas.put("Form1099B", Form1099B.class); schemas.put("Form1099C", Form1099C.class); schemas.put("Form1099Div", Form1099Div.class); + schemas.put("Form1099G", Form1099G.class); schemas.put("Form1099Int", Form1099Int.class); schemas.put("Form1099K", Form1099K.class); schemas.put("Form1099Misc", Form1099Misc.class); @@ -471,6 +575,8 @@ public Get1099Form200Response(Object o) { schemas.put("Form1099S", Form1099S.class); schemas.put("Form1099Sa", Form1099Sa.class); schemas.put("Form1099W2", Form1099W2.class); + schemas.put("Form5498", Form5498.class); + schemas.put("FormW2G", FormW2G.class); } @Override @@ -481,7 +587,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, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2 + * Form1042S, Form1095B, Form1095C, Form1098, Form1098E, Form1098T, Form1099B, Form1099C, Form1099Div, Form1099G, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2, Form5498, FormW2G * * It could be an instance of the 'oneOf' schemas. */ @@ -507,11 +613,21 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1098E) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1098T) { super.setActualInstance(instance); return; } + if (instance instanceof Form1099B) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099C) { super.setActualInstance(instance); return; @@ -522,6 +638,11 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1099G) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099Int) { super.setActualInstance(instance); return; @@ -567,14 +688,24 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2"); + if (instance instanceof Form5498) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof FormW2G) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1095C, Form1098, Form1098E, Form1098T, Form1099B, Form1099C, Form1099Div, Form1099G, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2, Form5498, FormW2G"); } /** * Get the actual instance, which can be the following: - * Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2 + * Form1042S, Form1095B, Form1095C, Form1098, Form1098E, Form1098T, Form1099B, Form1099C, Form1099Div, Form1099G, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2, Form5498, FormW2G * - * @return The actual instance (Form1042S, Form1095B, Form1095C, Form1098, Form1098T, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2) + * @return The actual instance (Form1042S, Form1095B, Form1095C, Form1098, Form1098E, Form1098T, Form1099B, Form1099C, Form1099Div, Form1099G, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2, Form5498, FormW2G) */ @SuppressWarnings("unchecked") @Override @@ -622,6 +753,16 @@ public Form1095C getForm1095C() throws ClassCastException { public Form1098 getForm1098() throws ClassCastException { return (Form1098)super.getActualInstance(); } + /** + * Get the actual instance of `Form1098E`. If the actual instance is not `Form1098E`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1098E` + * @throws ClassCastException if the instance is not `Form1098E` + */ + public Form1098E getForm1098E() throws ClassCastException { + return (Form1098E)super.getActualInstance(); + } /** * Get the actual instance of `Form1098T`. If the actual instance is not `Form1098T`, * the ClassCastException will be thrown. @@ -632,6 +773,16 @@ public Form1098 getForm1098() throws ClassCastException { public Form1098T getForm1098T() throws ClassCastException { return (Form1098T)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099B`. If the actual instance is not `Form1099B`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099B` + * @throws ClassCastException if the instance is not `Form1099B` + */ + public Form1099B getForm1099B() throws ClassCastException { + return (Form1099B)super.getActualInstance(); + } /** * Get the actual instance of `Form1099C`. If the actual instance is not `Form1099C`, * the ClassCastException will be thrown. @@ -652,6 +803,16 @@ public Form1099C getForm1099C() throws ClassCastException { public Form1099Div getForm1099Div() throws ClassCastException { return (Form1099Div)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099G`. If the actual instance is not `Form1099G`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099G` + * @throws ClassCastException if the instance is not `Form1099G` + */ + public Form1099G getForm1099G() throws ClassCastException { + return (Form1099G)super.getActualInstance(); + } /** * Get the actual instance of `Form1099Int`. If the actual instance is not `Form1099Int`, * the ClassCastException will be thrown. @@ -742,6 +903,26 @@ public Form1099Sa getForm1099Sa() throws ClassCastException { public Form1099W2 getForm1099W2() throws ClassCastException { return (Form1099W2)super.getActualInstance(); } + /** + * Get the actual instance of `Form5498`. If the actual instance is not `Form5498`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form5498` + * @throws ClassCastException if the instance is not `Form5498` + */ + public Form5498 getForm5498() throws ClassCastException { + return (Form5498)super.getActualInstance(); + } + /** + * Get the actual instance of `FormW2G`. If the actual instance is not `FormW2G`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `FormW2G` + * @throws ClassCastException if the instance is not `FormW2G` + */ + public FormW2G getFormW2G() throws ClassCastException { + return (FormW2G)super.getActualInstance(); + } /** * Validates the JSON Element and throws an exception if issues found @@ -785,6 +966,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 Form1098E + try { + Form1098E.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1098E failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1098T try { Form1098T.validateJsonElement(jsonElement); @@ -793,6 +982,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1098T failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099B + try { + Form1099B.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099B failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099C try { Form1099C.validateJsonElement(jsonElement); @@ -809,6 +1006,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099Div failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099G + try { + Form1099G.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099G failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099Int try { Form1099Int.validateJsonElement(jsonElement); @@ -881,8 +1086,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099W2 failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form5498 + try { + Form5498.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form5498 failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with FormW2G + try { + FormW2G.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for FormW2G failed with `%s`.", e.getMessage())); + // continue to the next one + } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: 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())); + throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042S, Form1095B, Form1095C, Form1098, Form1098E, Form1098T, Form1099B, Form1099C, Form1099Div, Form1099G, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099Sa, Form1099W2, Form5498, FormW2G. %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 5643f28..94b85d7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileStatusDetail; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; @@ -79,12 +80,18 @@ public enum TypeEnum { _1098("1098"), + _1098_E("1098-E"), + _1098_T("1098-T"), + _1099_B("1099-B"), + _1099_C("1099-C"), _1099_DIV("1099-DIV"), + _1099_G("1099-G"), + _1099_INT("1099-INT"), _1099_K("1099-K"), @@ -101,7 +108,11 @@ public enum TypeEnum { _1099_SA("1099-SA"), - W_2("W-2"); + _5498("5498"), + + W_2("W-2"), + + W_2_G("W-2G"); private String value; @@ -245,7 +256,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) - private Form1099StatusDetail federalEfileStatus; + private FederalEfileStatusDetail federalEfileStatus; public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) @@ -395,7 +406,7 @@ public IrisFormBase() { public IrisFormBase( String id, - Form1099StatusDetail federalEfileStatus, + FederalEfileStatusDetail federalEfileStatus, List stateEfileStatus, Form1099StatusDetail postalMailStatus, Form1099StatusDetail tinMatchStatus, @@ -871,11 +882,11 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi /** - * 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) + * 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) When the form's most recent IRIS filing was rejected or accepted with errors, `errors` lists what the IRS reported. * @return federalEfileStatus */ @javax.annotation.Nullable - public Form1099StatusDetail getFederalEfileStatus() { + public FederalEfileStatusDetail getFederalEfileStatus() { return federalEfileStatus; } @@ -1483,7 +1494,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // validate the optional field `federalEfileStatus` if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { - Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + FederalEfileStatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); } if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java index 953b879..7044e09 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileErrorResponse; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -27,7 +28,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -215,9 +218,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_ERRORS = "federalEfileErrors"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_ERRORS) + private List federalEfileErrors; + public IssuerResponse() { } + public IssuerResponse( + List federalEfileErrors + ) { + this(); + this.federalEfileErrors = federalEfileErrors; + } + public IssuerResponse businessName(String businessName) { this.businessName = businessName; return this; @@ -701,6 +715,17 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { } + /** + * Issuer-level IRS/IRIS rejection errors from the federal filing submissions of the issuer's forms that are still rejected and awaiting resubmission. + * @return federalEfileErrors + */ + @javax.annotation.Nullable + public List getFederalEfileErrors() { + return federalEfileErrors; + } + + + @Override public boolean equals(Object o) { @@ -735,7 +760,8 @@ public boolean equals(Object o) { Objects.equals(this.lastFiling, issuerResponse.lastFiling) && Objects.equals(this.id, issuerResponse.id) && Objects.equals(this.createdAt, issuerResponse.createdAt) && - Objects.equals(this.updatedAt, issuerResponse.updatedAt); + Objects.equals(this.updatedAt, issuerResponse.updatedAt) && + Objects.equals(this.federalEfileErrors, issuerResponse.federalEfileErrors); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -744,7 +770,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(businessName, businessName2, name, dbaName, tinType, firstName, middleName, lastName, suffix, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling, id, createdAt, updatedAt); + return Objects.hash(businessName, businessName2, name, dbaName, tinType, firstName, middleName, lastName, suffix, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling, id, createdAt, updatedAt, federalEfileErrors); } private static int hashCodeNullable(JsonNullable a) { @@ -783,6 +809,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" federalEfileErrors: ").append(toIndentedString(federalEfileErrors)).append("\n"); sb.append("}"); return sb.toString(); } @@ -830,6 +857,7 @@ private String toIndentedString(Object o) { openapiFields.add("id"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); + openapiFields.add("federalEfileErrors"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -939,6 +967,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("federalEfileErrors") != null && !jsonObj.get("federalEfileErrors").isJsonNull()) { + JsonArray jsonArrayfederalEfileErrors = jsonObj.getAsJsonArray("federalEfileErrors"); + if (jsonArrayfederalEfileErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("federalEfileErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `federalEfileErrors` to be an array in the JSON string but got `%s`", jsonObj.get("federalEfileErrors").toString())); + } + + // validate the optional field `federalEfileErrors` (array) + for (int i = 0; i < jsonArrayfederalEfileErrors.size(); i++) { + FederalEfileErrorResponse.validateJsonElement(jsonArrayfederalEfileErrors.get(i)); + }; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java index acb562e..9a77525 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java @@ -20,6 +20,7 @@ package Avalara.SDK.model.A1099.V2; import java.util.Objects; +import Avalara.SDK.model.A1099.V2.FederalEfileErrorResponse; import Avalara.SDK.model.A1099.V2.ValidationError; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -218,6 +219,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_UPDATED_AT) private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_FEDERAL_EFILE_ERRORS = "federalEfileErrors"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_ERRORS) + private List federalEfileErrors; + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) private List validationErrors; @@ -226,9 +231,11 @@ public IssuerWriteResponse() { } public IssuerWriteResponse( + List federalEfileErrors, List validationErrors ) { this(); + this.federalEfileErrors = federalEfileErrors; this.validationErrors = validationErrors; } @@ -715,6 +722,17 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { } + /** + * Issuer-level IRS/IRIS rejection errors from the federal filing submissions of the issuer's forms that are still rejected and awaiting resubmission. + * @return federalEfileErrors + */ + @javax.annotation.Nullable + public List getFederalEfileErrors() { + return federalEfileErrors; + } + + + /** * Field-level validation errors. Populated when a POST or PUT request violated business rules but the issuer was still persisted. Each entry identifies the affected field and the issue. Empty array when the payload was fully valid. * @return validationErrors @@ -761,6 +779,7 @@ public boolean equals(Object o) { Objects.equals(this.id, issuerWriteResponse.id) && Objects.equals(this.createdAt, issuerWriteResponse.createdAt) && Objects.equals(this.updatedAt, issuerWriteResponse.updatedAt) && + Objects.equals(this.federalEfileErrors, issuerWriteResponse.federalEfileErrors) && Objects.equals(this.validationErrors, issuerWriteResponse.validationErrors); } @@ -770,7 +789,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(businessName, businessName2, name, dbaName, tinType, firstName, middleName, lastName, suffix, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling, id, createdAt, updatedAt, validationErrors); + return Objects.hash(businessName, businessName2, name, dbaName, tinType, firstName, middleName, lastName, suffix, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling, id, createdAt, updatedAt, federalEfileErrors, validationErrors); } private static int hashCodeNullable(JsonNullable a) { @@ -809,6 +828,7 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" federalEfileErrors: ").append(toIndentedString(federalEfileErrors)).append("\n"); sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); sb.append("}"); return sb.toString(); @@ -857,6 +877,7 @@ private String toIndentedString(Object o) { openapiFields.add("id"); openapiFields.add("createdAt"); openapiFields.add("updatedAt"); + openapiFields.add("federalEfileErrors"); openapiFields.add("validationErrors"); // a set of required properties/fields (JSON key names) @@ -967,6 +988,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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("federalEfileErrors") != null && !jsonObj.get("federalEfileErrors").isJsonNull()) { + JsonArray jsonArrayfederalEfileErrors = jsonObj.getAsJsonArray("federalEfileErrors"); + if (jsonArrayfederalEfileErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("federalEfileErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `federalEfileErrors` to be an array in the JSON string but got `%s`", jsonObj.get("federalEfileErrors").toString())); + } + + // validate the optional field `federalEfileErrors` (array) + for (int i = 0; i < jsonArrayfederalEfileErrors.size(); i++) { + FederalEfileErrorResponse.validateJsonElement(jsonArrayfederalEfileErrors.get(i)); + }; + } + } if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); if (jsonArrayvalidationErrors != null) { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java index b8fc875..b5987c9 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java @@ -125,10 +125,31 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_NAME) private String name; + 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_BUSINESS_NAME = "businessName"; + @Deprecated @SerializedName(SERIALIZED_NAME_BUSINESS_NAME) private String businessName; + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + /** * The classification of the business. Available values: - Individual: Individual/sole proprietor - C Corporation: C Corporation - S Corporation: S Corporation - Partnership: Partnership - Trust/estate: Trust/estate - LLC-C: Limited liability company (C Corporation) - LLC-S: Limited liability company (S Corporation) - LLC-P: Limited liability company (Partnership) - Other: Other (requires BusinessOther field to be populated) */ @@ -306,10 +327,10 @@ public W9FormRequest name(String name) { } /** - * The name of the individual or entity associated with the form. + * The name of the individual or entity associated with the form. Required when neither firstName/lastName nor businessName/name2 are provided. Up to 40 characters. * @return name */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -319,25 +340,124 @@ public void setName(String name) { } + public W9FormRequest firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Individual first name. Must be sent together with lastName; should only be used for individuals. Up to 40 characters. + * @return firstName + */ + @javax.annotation.Nullable + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + public W9FormRequest middleName(String middleName) { + this.middleName = middleName; + return this; + } + + /** + * Individual middle name. Should only be used for individuals. Up to 40 characters. + * @return middleName + */ + @javax.annotation.Nullable + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + + public W9FormRequest lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Individual last name. Must be sent together with firstName; should only be used for individuals. Up to 40 characters. + * @return lastName + */ + @javax.annotation.Nullable + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + + public W9FormRequest suffixName(String suffixName) { + this.suffixName = suffixName; + return this; + } + + /** + * Individual name suffix (e.g. Jr., Sr.). Should only be used for individuals. Up to 10 characters. + * @return suffixName + */ + @javax.annotation.Nullable + public String getSuffixName() { + return suffixName; + } + + public void setSuffixName(String suffixName) { + this.suffixName = suffixName; + } + + + @Deprecated public W9FormRequest businessName(String businessName) { this.businessName = businessName; return this; } /** - * The name of the business associated with the form. + * DEPRECATED: The name of the business associated with the form. Use `name2` instead. * @return businessName + * @deprecated */ + @Deprecated @javax.annotation.Nullable public String getBusinessName() { return businessName; } + @Deprecated public void setBusinessName(String businessName) { this.businessName = businessName; } + public W9FormRequest name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * The name of the business associated with the form. Replaces the deprecated `businessName` field. When both `businessName` and `name2` are provided, `businessName` takes precedence. + * @return name2 + */ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + public W9FormRequest businessClassification(BusinessClassificationEnum businessClassification) { this.businessClassification = businessClassification; return this; @@ -749,7 +869,12 @@ public boolean equals(Object o) { W9FormRequest w9FormRequest = (W9FormRequest) o; return Objects.equals(this.type, w9FormRequest.type) && Objects.equals(this.name, w9FormRequest.name) && + Objects.equals(this.firstName, w9FormRequest.firstName) && + Objects.equals(this.middleName, w9FormRequest.middleName) && + Objects.equals(this.lastName, w9FormRequest.lastName) && + Objects.equals(this.suffixName, w9FormRequest.suffixName) && Objects.equals(this.businessName, w9FormRequest.businessName) && + Objects.equals(this.name2, w9FormRequest.name2) && Objects.equals(this.businessClassification, w9FormRequest.businessClassification) && Objects.equals(this.businessOther, w9FormRequest.businessOther) && Objects.equals(this.foreignPartnerOwnerOrBeneficiary, w9FormRequest.foreignPartnerOwnerOrBeneficiary) && @@ -779,7 +904,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, companyId, referenceId, email, eDeliveryConsentedAt, signature); + return Objects.hash(type, name, firstName, middleName, lastName, suffixName, businessName, name2, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, companyId, referenceId, email, eDeliveryConsentedAt, signature); } private static int hashCodeNullable(JsonNullable a) { @@ -795,7 +920,12 @@ public String toString() { sb.append("class W9FormRequest {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).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(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); sb.append(" businessClassification: ").append(toIndentedString(businessClassification)).append("\n"); sb.append(" businessOther: ").append(toIndentedString(businessOther)).append("\n"); sb.append(" foreignPartnerOwnerOrBeneficiary: ").append(toIndentedString(foreignPartnerOwnerOrBeneficiary)).append("\n"); @@ -848,7 +978,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); openapiRequiredFields.add("businessClassification"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); @@ -893,12 +1022,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { TypeEnum.validateJsonElement(jsonObj.get("type")); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + if ((jsonObj.get("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("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("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } if (!jsonObj.get("businessClassification").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `businessClassification` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessClassification").toString())); } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java index 26fa51b..3ef1bd8 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java @@ -127,10 +127,31 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_NAME) private String name; + 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_BUSINESS_NAME = "businessName"; + @Deprecated @SerializedName(SERIALIZED_NAME_BUSINESS_NAME) private String businessName; + public static final String SERIALIZED_NAME_NAME2 = "name2"; + @SerializedName(SERIALIZED_NAME_NAME2) + private String name2; + public static final String SERIALIZED_NAME_BUSINESS_CLASSIFICATION = "businessClassification"; @SerializedName(SERIALIZED_NAME_BUSINESS_CLASSIFICATION) private String businessClassification; @@ -291,25 +312,124 @@ public void setName(String name) { } + public W9FormResponse firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Individual first name. + * @return firstName + */ + @javax.annotation.Nullable + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + + public W9FormResponse middleName(String middleName) { + this.middleName = middleName; + return this; + } + + /** + * Individual middle name. + * @return middleName + */ + @javax.annotation.Nullable + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + + public W9FormResponse lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Individual last name. + * @return lastName + */ + @javax.annotation.Nullable + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + + public W9FormResponse suffixName(String suffixName) { + this.suffixName = suffixName; + return this; + } + + /** + * Individual name suffix. + * @return suffixName + */ + @javax.annotation.Nullable + public String getSuffixName() { + return suffixName; + } + + public void setSuffixName(String suffixName) { + this.suffixName = suffixName; + } + + + @Deprecated public W9FormResponse businessName(String businessName) { this.businessName = businessName; return this; } /** - * The name of the business associated with the form. + * DEPRECATED: The name of the business associated with the form. Use `name2` instead. * @return businessName + * @deprecated */ + @Deprecated @javax.annotation.Nullable public String getBusinessName() { return businessName; } + @Deprecated public void setBusinessName(String businessName) { this.businessName = businessName; } + public W9FormResponse name2(String name2) { + this.name2 = name2; + return this; + } + + /** + * The name of the business associated with the form. Replaces the deprecated `businessName` field. + * @return name2 + */ + @javax.annotation.Nullable + public String getName2() { + return name2; + } + + public void setName2(String name2) { + this.name2 = name2; + } + + public W9FormResponse businessClassification(String businessClassification) { this.businessClassification = businessClassification; return this; @@ -892,7 +1012,12 @@ public boolean equals(Object o) { W9FormResponse w9FormResponse = (W9FormResponse) o; return Objects.equals(this.type, w9FormResponse.type) && Objects.equals(this.name, w9FormResponse.name) && + Objects.equals(this.firstName, w9FormResponse.firstName) && + Objects.equals(this.middleName, w9FormResponse.middleName) && + Objects.equals(this.lastName, w9FormResponse.lastName) && + Objects.equals(this.suffixName, w9FormResponse.suffixName) && Objects.equals(this.businessName, w9FormResponse.businessName) && + Objects.equals(this.name2, w9FormResponse.name2) && Objects.equals(this.businessClassification, w9FormResponse.businessClassification) && Objects.equals(this.businessOther, w9FormResponse.businessOther) && Objects.equals(this.foreignPartnerOwnerOrBeneficiary, w9FormResponse.foreignPartnerOwnerOrBeneficiary) && @@ -931,7 +1056,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, tinMatchStatus, id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt); + return Objects.hash(type, name, firstName, middleName, lastName, suffixName, businessName, name2, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, tinMatchStatus, id, entryStatus, referenceId, companyId, displayName, email, archived, ancestorId, signature, signedDate, eDeliveryConsentedAt, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -947,7 +1072,12 @@ public String toString() { sb.append("class W9FormResponse {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).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(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" name2: ").append(toIndentedString(name2)).append("\n"); sb.append(" businessClassification: ").append(toIndentedString(businessClassification)).append("\n"); sb.append(" businessOther: ").append(toIndentedString(businessOther)).append("\n"); sb.append(" foreignPartnerOwnerOrBeneficiary: ").append(toIndentedString(foreignPartnerOwnerOrBeneficiary)).append("\n"); @@ -1050,9 +1180,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } + if ((jsonObj.get("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("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("name2") != null && !jsonObj.get("name2").isJsonNull()) && !jsonObj.get("name2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name2").toString())); + } if ((jsonObj.get("businessClassification") != null && !jsonObj.get("businessClassification").isJsonNull()) && !jsonObj.get("businessClassification").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `businessClassification` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessClassification").toString())); }
Status Code Description Response Headers
503 Server Error -
202 Accepted submission, indicating it will be processed later and where to get results from -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -