diff --git a/README.md b/README.md index 428b9c1..8b1623d 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,7 @@ Class | Method | HTTP request | Description *Issuers1099Api* | [**getIssuers**](docs/A1099/V2/Issuers1099Api.md#getissuers) | **GET** /1099/issuers | List issuers *Issuers1099Api* | [**updateIssuer**](docs/A1099/V2/Issuers1099Api.md#updateissuer) | **PUT** /1099/issuers/{id} | Update an issuer *JobsApi* | [**getJob**](docs/A1099/V2/JobsApi.md#getjob) | **GET** /jobs/{id} | Retrieves information about the job +*TinMatchesApi* | [**performRealTimeTinMatch**](docs/A1099/V2/TinMatchesApi.md#performrealtimetinmatch) | **POST** /tin-matches/$real-time | Perform real time TIN Match ## Documentation for Models @@ -266,7 +267,6 @@ Class | Method | HTTP request | Description ### A1099 V2 Model Documentation - - [Avalara.SDK.model.A1099.V2.CompanyBase](docs/A1099/V2/CompanyBase.md) - [Avalara.SDK.model.A1099.V2.CompanyRequest](docs/A1099/V2/CompanyRequest.md) - [Avalara.SDK.model.A1099.V2.CompanyResponse](docs/A1099/V2/CompanyResponse.md) - [Avalara.SDK.model.A1099.V2.CoveredIndividual](docs/A1099/V2/CoveredIndividual.md) @@ -291,10 +291,11 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.Form1099W2](docs/A1099/V2/Form1099W2.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) - [Avalara.SDK.model.A1099.V2.IrsResponse](docs/A1099/V2/IrsResponse.md) - - [Avalara.SDK.model.A1099.V2.IssuerBase](docs/A1099/V2/IssuerBase.md) - [Avalara.SDK.model.A1099.V2.IssuerRequest](docs/A1099/V2/IssuerRequest.md) - [Avalara.SDK.model.A1099.V2.IssuerResponse](docs/A1099/V2/IssuerResponse.md) + - [Avalara.SDK.model.A1099.V2.IssuerWriteResponse](docs/A1099/V2/IssuerWriteResponse.md) - [Avalara.SDK.model.A1099.V2.JobResponse](docs/A1099/V2/JobResponse.md) - [Avalara.SDK.model.A1099.V2.OfferAndCoverage](docs/A1099/V2/OfferAndCoverage.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) @@ -302,6 +303,9 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelW9FormBaseResponse](docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md) - [Avalara.SDK.model.A1099.V2.PrimaryWithholdingAgent](docs/A1099/V2/PrimaryWithholdingAgent.md) + - [Avalara.SDK.model.A1099.V2.RealTimeTinMatchIrsResponse](docs/A1099/V2/RealTimeTinMatchIrsResponse.md) + - [Avalara.SDK.model.A1099.V2.RealTimeTinMatchRequest](docs/A1099/V2/RealTimeTinMatchRequest.md) + - [Avalara.SDK.model.A1099.V2.RealTimeTinMatchResponse](docs/A1099/V2/RealTimeTinMatchResponse.md) - [Avalara.SDK.model.A1099.V2.StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) - [Avalara.SDK.model.A1099.V2.StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) - [Avalara.SDK.model.A1099.V2.SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 90d2fd5..e7bf079 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -1,6 +1,6 @@ # CompaniesW9Api -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -49,7 +49,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d8a91153-a928-4bb1-9bdf-3108ec7a303d"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "445307e1-57a7-46d0-93bd-99c9cc698790"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CompanyRequest companyRequest = new CompanyRequest(); // CompanyRequest | The company to create try { @@ -136,7 +136,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The company to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "0f8143df-fd6a-47a4-9612-f0b1def1d6b0"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "983bdd19-d944-400f-a332-6dbed9977702"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -228,7 +228,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "0f6ead76-1245-4eb9-9f7c-925733e9d4a7"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "c02a5d8b-6916-4d0c-9d97-e31bfc2020e1"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelCompanyResponse result = apiInstance.getCompanies(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -321,7 +321,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | Id of the company String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "5d11a039-7f81-4ec9-b32f-b665ffe488e5"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "ccf63d6b-d313-44b9-bc14-86486a6c1b19"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CompanyResponse result = apiInstance.getCompany(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -409,7 +409,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String id = "id_example"; // String | The ID of the company to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "8e190a86-7ec8-4984-9126-c2d48e2ccdfc"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "57991ce4-31f7-41c8-8517-e363058bc302"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CompanyRequest companyRequest = new CompanyRequest(); // CompanyRequest | The updated company data try { diff --git a/docs/A1099/V2/CompanyResponse.md b/docs/A1099/V2/CompanyResponse.md index ea3cd1c..e23ddbb 100644 --- a/docs/A1099/V2/CompanyResponse.md +++ b/docs/A1099/V2/CompanyResponse.md @@ -7,9 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**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] | |**name** | **String** | Legal name. Not the DBA name. | | |**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. | [optional] | |**email** | **String** | Contact email address. For inquiries by vendors/employees. | | @@ -27,6 +24,9 @@ |**resendRequests** | **Boolean** | Boolean to enable automatic reminder emails (default: false). | [optional] | |**resendIntervalDays** | **Integer** | Days between reminder emails (7-365, required if resendRequests is true). | [optional] | |**maxReminderAttempts** | **Integer** | Maximum number of reminder attempts (1-52, required if resendRequests is true). | [optional] | +|**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] | diff --git a/docs/A1099/V2/CreateW9Form201Response.md b/docs/A1099/V2/CreateW9Form201Response.md index 3502727..d134fbe 100644 --- a/docs/A1099/V2/CreateW9Form201Response.md +++ b/docs/A1099/V2/CreateW9Form201Response.md @@ -12,7 +12,7 @@ |**employeeMiddleName** | **String** | The middle name of the employee. | [optional] | |**employeeLastName** | **String** | The last name of the employee. | [optional] | |**employeeNameSuffix** | **String** | The name suffix of the employee. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. | [optional] | +|**tinType** | **String** | 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] | |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**address** | **String** | The address of the individual or entity. | [optional] | |**city** | **String** | The city of the address. | [optional] | diff --git a/docs/A1099/V2/CreateW9FormRequest.md b/docs/A1099/V2/CreateW9FormRequest.md index 350659b..6cd6639 100644 --- a/docs/A1099/V2/CreateW9FormRequest.md +++ b/docs/A1099/V2/CreateW9FormRequest.md @@ -22,15 +22,15 @@ |**state** | **String** | The state of residence of the employee. Required unless exempt. | | |**zip** | **String** | The ZIP code of residence of the employee. Required unless exempt. | | |**accountNumber** | **String** | The account number associated with the form. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. | | +|**tinType** | **String** | 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 | | |**tin** | **String** | The taxpayer identification number (TIN). | | |**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | |**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | |**companyId** | **String** | The ID of the associated company. Required when creating a form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | |**citizenshipCountry** | [**CitizenshipCountryEnum**](#CitizenshipCountryEnum) | The country of citizenship.. Allowed values: US, AF, AX, AL, AG, AQ, AN, AO, AV, AY (and 248 more) | | |**disregardedEntity** | **String** | The name of the disregarded entity receiving the payment (if applicable). | [optional] | |**entityType** | [**EntityTypeEnum**](#EntityTypeEnum) | Represents the entity type for tax forms. Each value corresponds to a specific entity classification. - 1: Corporation - 2: Disregarded entity - 3: Partnership - 4: Simple trust - 5: Grantor trust - 6: Complex trust - 7: Estate - 8: Foreign Government - Controlled Entity - 9: Central Bank of Issue - 10: Tax-exempt organization - 11: Private foundation - 12: International organization - 13: Foreign Government - Controlled Integral Part | | diff --git a/docs/A1099/V2/Form1042S.md b/docs/A1099/V2/Form1042S.md index 1687e37..3cad99e 100644 --- a/docs/A1099/V2/Form1042S.md +++ b/docs/A1099/V2/Form1042S.md @@ -8,7 +8,6 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] [readonly] | |**uniqueFormId** | **String** | Unique form identifier | | |**recipientDateOfBirth** | **LocalDate** | Recipient's date of birth | [optional] | |**recipientGiin** | **String** | Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. | [optional] | @@ -41,16 +40,13 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding |**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** | Recipient name | | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -58,10 +54,8 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -71,17 +65,18 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding |**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] | - - - -## Enum: TinTypeEnum - -| Name | Value | -|---- | -----| -| EIN | "EIN" | -| SSN | "SSN" | -| ITIN | "ITIN" | -| ATIN | "ATIN" | +|**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] | @@ -365,3 +360,17 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/Form1095B.md b/docs/A1099/V2/Form1095B.md index fbfda61..e662af7 100644 --- a/docs/A1099/V2/Form1095B.md +++ b/docs/A1099/V2/Form1095B.md @@ -23,17 +23,14 @@ Form 1095-B: Health Coverage |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -41,10 +38,8 @@ Form 1095-B: Health Coverage |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -88,14 +83,3 @@ Form 1095-B: Health Coverage -## Enum: TinTypeEnum - -| Name | Value | -|---- | -----| -| EIN | "EIN" | -| SSN | "SSN" | -| ITIN | "ITIN" | -| ATIN | "ATIN" | - - - diff --git a/docs/A1099/V2/Form1095C.md b/docs/A1099/V2/Form1095C.md index c1118f7..7191de4 100644 --- a/docs/A1099/V2/Form1095C.md +++ b/docs/A1099/V2/Form1095C.md @@ -25,17 +25,14 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -43,10 +40,8 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -96,14 +91,3 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage -## Enum: TinTypeEnum - -| Name | Value | -|---- | -----| -| EIN | "EIN" | -| SSN | "SSN" | -| ITIN | "ITIN" | -| ATIN | "ATIN" | - - - diff --git a/docs/A1099/V2/Form1099Base.md b/docs/A1099/V2/Form1099Base.md index f1ef4fc..2b62528 100644 --- a/docs/A1099/V2/Form1099Base.md +++ b/docs/A1099/V2/Form1099Base.md @@ -15,17 +15,14 @@ |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -33,10 +30,8 @@ |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -66,14 +61,3 @@ -## Enum: TinTypeEnum - -| Name | Value | -|---- | -----| -| EIN | "EIN" | -| SSN | "SSN" | -| ITIN | "ITIN" | -| ATIN | "ATIN" | - - - diff --git a/docs/A1099/V2/Form1099Div.md b/docs/A1099/V2/Form1099Div.md index 9e5dcf2..4a62650 100644 --- a/docs/A1099/V2/Form1099Div.md +++ b/docs/A1099/V2/Form1099Div.md @@ -35,17 +35,13 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -53,10 +49,8 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -66,6 +60,18 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f |**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] | @@ -94,6 +100,9 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f | 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 c9dfde5..4dd6dbc 100644 --- a/docs/A1099/V2/Form1099Int.md +++ b/docs/A1099/V2/Form1099Int.md @@ -31,17 +31,13 @@ Form 1099-INT: Interest Imcome *At least one of the following amo |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -49,10 +45,8 @@ Form 1099-INT: Interest Imcome *At least one of the following amo |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -62,6 +56,18 @@ Form 1099-INT: Interest Imcome *At least one of the following amo |**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] | @@ -90,6 +96,9 @@ Form 1099-INT: Interest Imcome *At least one of the following amo | SSN | "SSN" | | ITIN | "ITIN" | | ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | diff --git a/docs/A1099/V2/Form1099K.md b/docs/A1099/V2/Form1099K.md index dec8163..be297a5 100644 --- a/docs/A1099/V2/Form1099K.md +++ b/docs/A1099/V2/Form1099K.md @@ -36,17 +36,13 @@ Form 1099-K: Payment Card and Third Party Network Transactions |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -54,10 +50,8 @@ Form 1099-K: Payment Card and Third Party Network Transactions |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -67,6 +61,18 @@ Form 1099-K: Payment Card and Third Party Network Transactions |**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] | @@ -113,6 +119,9 @@ Form 1099-K: Payment Card and Third Party Network Transactions | SSN | "SSN" | | ITIN | "ITIN" | | ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | diff --git a/docs/A1099/V2/Form1099Misc.md b/docs/A1099/V2/Form1099Misc.md index 675dbaf..1327fdd 100644 --- a/docs/A1099/V2/Form1099Misc.md +++ b/docs/A1099/V2/Form1099Misc.md @@ -31,17 +31,13 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -49,10 +45,8 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -62,6 +56,18 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m |**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] | @@ -90,6 +96,9 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m | SSN | "SSN" | | ITIN | "ITIN" | | ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | diff --git a/docs/A1099/V2/Form1099Nec.md b/docs/A1099/V2/Form1099Nec.md index 07d76e3..cfaa7d6 100644 --- a/docs/A1099/V2/Form1099Nec.md +++ b/docs/A1099/V2/Form1099Nec.md @@ -20,17 +20,13 @@ Form 1099-NEC: Nonemployee Compensation |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -38,10 +34,8 @@ Form 1099-NEC: Nonemployee Compensation |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -51,6 +45,18 @@ Form 1099-NEC: Nonemployee Compensation |**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] | @@ -79,6 +85,9 @@ Form 1099-NEC: Nonemployee Compensation | SSN | "SSN" | | ITIN | "ITIN" | | ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | diff --git a/docs/A1099/V2/Form1099R.md b/docs/A1099/V2/Form1099R.md index cf1d8fe..f343c5d 100644 --- a/docs/A1099/V2/Form1099R.md +++ b/docs/A1099/V2/Form1099R.md @@ -36,17 +36,13 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -54,10 +50,8 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -67,6 +61,18 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin |**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] | @@ -168,6 +174,9 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin | SSN | "SSN" | | ITIN | "ITIN" | | ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | diff --git a/docs/A1099/V2/Form1099W2.md b/docs/A1099/V2/Form1099W2.md index 1d43c40..c4340fb 100644 --- a/docs/A1099/V2/Form1099W2.md +++ b/docs/A1099/V2/Form1099W2.md @@ -47,17 +47,13 @@ Form W-2: Wage and Tax Statement. |**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** | Recipient name | | -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -65,10 +61,8 @@ Form W-2: Wage and Tax Statement. |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -78,6 +72,18 @@ Form W-2: Wage and Tax Statement. |**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] | @@ -106,6 +112,9 @@ Form W-2: Wage and Tax Statement. | 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 1fb245d..a0a768f 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -1,6 +1,6 @@ # Forms1099Api -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -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 = "fd02f159-f2af-48e4-92b1-8185bcf20f90"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "7285c0b2-0432-4f2f-8d4e-2027526d39c5"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . Form1099ListRequest form1099ListRequest = new Form1099ListRequest(); // Form1099ListRequest | try { @@ -141,7 +141,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "b5153c6c-b731-4d1d-a3fb-d618e239d65c"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "23791bc3-1ee7-4dc9-a782-7ebe65332730"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . Get1099Form200Response get1099Form200Response = new Get1099Form200Response(); // Get1099Form200Response | try { @@ -229,7 +229,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | The unique identifier of the desired form to delete. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "e9de0484-cb5a-4d77-aeb0-06ed67420a2d"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d970b833-acc0-4278-8e3f-a950755e5260"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.delete1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -317,7 +317,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "f9e45fdc-29d9-456e-b5b6-ce3218225878"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "28cce977-9cdb-4520-bf8c-89b9d8195133"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { Get1099Form200Response result = apiInstance.get1099Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -406,7 +406,7 @@ public class Example { String id = "id_example"; // String | The ID of the form String avalaraVersion = "2.0.0"; // String | API version Boolean markEdelivered = true; // Boolean | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered - String xCorrelationId = "8c295caf-1568-4d0d-8e0c-7152a9204c11"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "2d57149a-71b6-4123-9ba3-49c09d4df472"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { File result = apiInstance.get1099FormPdf(id, avalaraVersion, markEdelivered, xCorrelationId, xAvalaraClient); @@ -500,7 +500,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "857d60b8-f4d6-4f00-bc39-3bcf1d8d72f6"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "e3fd9737-b458-4a1d-9874-d3990ecff109"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelForm1099Base result = apiInstance.list1099Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -593,7 +593,7 @@ public class Example { Forms1099Api apiInstance = new Forms1099Api(apiClient); String id = "id_example"; // String | String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "0d0b68af-3130-4571-a05e-a21427cbf280"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "07227337-490f-48f8-97d6-b0aaac48d3e6"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . Get1099Form200Response get1099Form200Response = new Get1099Form200Response(); // Get1099Form200Response | try { diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index 1e234bf..da7a59a 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -1,6 +1,6 @@ # FormsW9Api -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -53,7 +53,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "0b0e88b5-6443-4c90-a5c9-28bde5a4d4a0"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "c842afc6-dce2-410c-a95e-c71b5236892f"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest = new CreateAndSendW9FormEmailRequest(); // CreateAndSendW9FormEmailRequest | Form to be created try { @@ -139,7 +139,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "3439cc97-e4ae-482a-8d89-ed3bee63a053"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "3f573288-3491-46f3-8c49-896d5778a376"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be created try { @@ -226,7 +226,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "f712b02e-1b2f-482f-89ac-c809e42238f4"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "48db4467-ed91-463f-899d-9f505667d9de"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -311,7 +311,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "636fe950-3af0-42df-95ed-0868ba340628"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b3f1951f-f9f7-484a-9a90-b805a5641766"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CreateW9Form201Response result = apiInstance.getW9Form(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -397,7 +397,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | Id of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "378b0ba7-8d33-499d-a7d4-8bdc3a3648f8"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1286516d-cd84-4daf-9381-4f20acea9619"; // 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); @@ -489,7 +489,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "6a525897-0868-4606-bad3-04892c61a573"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "e482d129-5ce4-4b4a-a4fd-c360b92c6a77"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelW9FormBaseResponse result = apiInstance.listW9Forms(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -580,7 +580,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | The ID of the W9/W4/W8 form. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "1f36d8fe-d804-4194-b4be-31a5b02ae9f9"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "234cbc16-88cc-4fbb-85a6-07bc770529d3"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { CreateW9Form201Response result = apiInstance.sendW9FormEmail(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -668,7 +668,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | ID of the form to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "ffdf8c9a-cf07-4fe0-b737-38d1c044a0dc"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "cdef88f5-1b1d-42fd-a2c3-01d14e9d7cb9"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CreateW9FormRequest createW9FormRequest = new CreateW9FormRequest(); // CreateW9FormRequest | Form to be updated try { @@ -757,7 +757,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String id = "id_example"; // String | Id of the form String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d669f88f-c57a-4a17-9f05-cabe7ebe0b5b"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "dccfb6c1-f301-4c9a-89ae-baa7065ab8f2"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . File _file = new File("/path/to/file"); // File | try { diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index 7c9cc0a..ecfc264 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -7,7 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number | [optional] | |**uniqueFormId** | **String** | Unique form identifier | | |**recipientDateOfBirth** | **LocalDate** | Recipient's date of birth | [optional] | |**recipientGiin** | **String** | Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'. | [optional] | @@ -40,16 +39,13 @@ |**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** | Recipient name | | -|**recipientSecondName** | **String** | Recipient second name | [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] | -|**accountNumber** | **String** | Account number | [optional] | -|**officeCode** | **String** | Office code | [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] | @@ -57,10 +53,8 @@ |**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] | -|**noTin** | **Boolean** | No TIN indicator | [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] | -|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | |**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | |**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | |**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | @@ -70,6 +64,18 @@ |**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] | |**employeeFirstName** | **String** | Employee first name (max 15 chars). | | |**employeeMiddleName** | **String** | Employee middle name (max 15 chars, optional). | [optional] | |**employeeLastName** | **String** | Employee last name (max 20 chars). | | @@ -190,17 +196,6 @@ -## Enum: TinTypeEnum - -| Name | Value | -|---- | -----| -| EIN | "EIN" | -| SSN | "SSN" | -| ITIN | "ITIN" | -| ATIN | "ATIN" | - - - ## Enum: LobCodeEnum | Name | Value | @@ -481,6 +476,20 @@ +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + ## Enum: OriginOfHealthCoverageCodeEnum | Name | Value | diff --git a/docs/A1099/V2/GetIssuer200Response.md b/docs/A1099/V2/GetIssuer200Response.md new file mode 100644 index 0000000..f8d30ca --- /dev/null +++ b/docs/A1099/V2/GetIssuer200Response.md @@ -0,0 +1,48 @@ + + +# GetIssuer200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] | +|**name** | **String** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] | +|**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] | +|**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] | +|**suffix** | **String** | Suffix name. Should only be used for individuals. | [optional] | +|**tin** | **String** | Federal Tax Identification Number (TIN). | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] | +|**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | | +|**taxYear** | **Integer** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. It's only required on creation, and cannot be modified on update. | | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | | +|**email** | **String** | Contact email address. For recipient inquiries. Phone will be used on communications if you don't specify an email | [optional] | +|**address** | **String** | Address. | | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | | +|**zip** | **String** | ZIP/postal code. | | +|**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**transferAgentName** | **String** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] | +|**lastFiling** | **Boolean** | Indicates if this is the issuer's final year filing. | | +|**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] | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "UNKNOWN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | + + + diff --git a/docs/A1099/V2/IrisFormBase.md b/docs/A1099/V2/IrisFormBase.md new file mode 100644 index 0000000..575b7db --- /dev/null +++ b/docs/A1099/V2/IrisFormBase.md @@ -0,0 +1,88 @@ + + +# IrisFormBase + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Form type. | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms via $bulk-upsert | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms via $bulk-upsert | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. | [optional] | +|**firstName** | **String** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**middleName** | **String** | Middle name. Should only be used for individuals. | [optional] | +|**lastName** | **String** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**suffixName** | **String** | Suffix name. Should only be used for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1099_DIV | "1099-DIV" | +| _1099_INT | "1099-INT" | +| _1099_K | "1099-K" | +| _1099_MISC | "1099-MISC" | +| _1099_NEC | "1099-NEC" | +| _1099_R | "1099-R" | +| W_2 | "W-2" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/IssuerBase.md b/docs/A1099/V2/IssuerBase.md index de956d8..58fa2fd 100644 --- a/docs/A1099/V2/IssuerBase.md +++ b/docs/A1099/V2/IssuerBase.md @@ -7,8 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | Legal name. Not the DBA name. | | -|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] | +|**name** | **String** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] | +|**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] | +|**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] | +|**suffix** | **String** | Suffix name. Should only be used for individuals. | [optional] | |**tin** | **String** | Federal Tax Identification Number (TIN). | [optional] | |**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] | |**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | | @@ -25,3 +32,13 @@ +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "UNKNOWN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | + + + diff --git a/docs/A1099/V2/IssuerRequest.md b/docs/A1099/V2/IssuerRequest.md index 2299589..e68b4cc 100644 --- a/docs/A1099/V2/IssuerRequest.md +++ b/docs/A1099/V2/IssuerRequest.md @@ -7,8 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | Legal name. Not the DBA name. | | -|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] | +|**name** | **String** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] | +|**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] | +|**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] | +|**suffix** | **String** | Suffix name. Should only be used for individuals. | [optional] | |**tin** | **String** | Federal Tax Identification Number (TIN). | [optional] | |**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] | |**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | | @@ -25,3 +32,13 @@ +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "UNKNOWN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | + + + diff --git a/docs/A1099/V2/IssuerResponse.md b/docs/A1099/V2/IssuerResponse.md index f4b674b..969ba3b 100644 --- a/docs/A1099/V2/IssuerResponse.md +++ b/docs/A1099/V2/IssuerResponse.md @@ -7,11 +7,15 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**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] | -|**name** | **String** | Legal name. Not the DBA name. | | -|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] | +|**name** | **String** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] | +|**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] | +|**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] | +|**suffix** | **String** | Suffix name. Should only be used for individuals. | [optional] | |**tin** | **String** | Federal Tax Identification Number (TIN). | [optional] | |**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] | |**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | | @@ -25,6 +29,19 @@ |**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | |**transferAgentName** | **String** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] | |**lastFiling** | **Boolean** | Indicates if this is the issuer's final year filing. | | +|**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] | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "UNKNOWN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | diff --git a/docs/A1099/V2/IssuerWriteResponse.md b/docs/A1099/V2/IssuerWriteResponse.md new file mode 100644 index 0000000..ec19323 --- /dev/null +++ b/docs/A1099/V2/IssuerWriteResponse.md @@ -0,0 +1,48 @@ + + +# IssuerWriteResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. | [optional] | +|**name** | **String** | Legal name. Not the DBA name. Deprecated alias for 'businessName'. | [optional] | +|**dbaName** | **String** | Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. | [optional] | +|**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] | +|**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] | +|**suffix** | **String** | Suffix name. Should only be used for individuals. | [optional] | +|**tin** | **String** | Federal Tax Identification Number (TIN). | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. | [optional] | +|**telephone** | **String** | Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. | | +|**taxYear** | **Integer** | Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. It's only required on creation, and cannot be modified on update. | | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address. | | +|**email** | **String** | Contact email address. For recipient inquiries. Phone will be used on communications if you don't specify an email | [optional] | +|**address** | **String** | Address. | | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | | +|**zip** | **String** | ZIP/postal code. | | +|**foreignProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**transferAgentName** | **String** | Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. | [optional] | +|**lastFiling** | **Boolean** | Indicates if this is the issuer's final year filing. | | +|**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] | +|**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] | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| UNKNOWN | "UNKNOWN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | + + + diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index 26e3e79..911ac8b 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -1,6 +1,6 @@ # Issuers1099Api -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -14,7 +14,7 @@ Method | HTTP request | Description ## createIssuer -> IssuerResponse createIssuer(avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest) +> IssuerWriteResponse createIssuer(avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest) Create an issuer @@ -49,11 +49,11 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "deb4448e-a364-4e99-b30c-9e876743be1f"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "14e92c5a-0e21-4dcd-8e3f-59111c335ba3"; // 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 { - IssuerResponse result = apiInstance.createIssuer(avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest); + IssuerWriteResponse result = apiInstance.createIssuer(avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Issuers1099Api#createIssuer"); @@ -78,7 +78,7 @@ Name | Type | Description | Notes ### Return type -[**IssuerResponse**](IssuerResponse.md) +[**IssuerWriteResponse**](IssuerWriteResponse.md) ### Authorization @@ -136,7 +136,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to delete String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "fbe6b0c6-506b-4d42-951d-dfbd382b2223"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "cc721fe4-7f1e-4228-87d2-9351c780d9e9"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { apiInstance.deleteIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -221,7 +221,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to retrieve String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "9b9f0e80-4a47-4390-ae04-cedb799f6f0c"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1c49f829-d029-4e67-8d87-c87a83033413"; // 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); @@ -275,7 +275,7 @@ Name | Type | Description | Notes List issuers -List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. +List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. ### Example @@ -312,7 +312,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "81488870-629b-4a05-8d4c-673e5db15454"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "7845d8ad-09ab-4ba4-a644-bc06bcb806b0"; // 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); @@ -369,11 +369,11 @@ Name | Type | Description | Notes ## updateIssuer -> updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest) +> IssuerWriteResponse updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest) Update an issuer -Update an issuer (also known as a Payer). +Update an issuer (also known as a Payer). When the payload violates field-level business rules, the issuer is still persisted and the response body includes a `validationErrors[]` array describing each violation. ### Example @@ -405,11 +405,12 @@ 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 = "0c9b920f-cb85-4332-a9f6-bc06014dab8e"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "484d0024-b885-4e06-aac7-bf3ab4daba3b"; // 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 { - apiInstance.updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest); + IssuerWriteResponse result = apiInstance.updateIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient, issuerRequest); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling Issuers1099Api#updateIssuer"); System.err.println("Status code: " + e.getCode()); @@ -434,7 +435,7 @@ Name | Type | Description | Notes ### Return type -null (empty response body) +[**IssuerWriteResponse**](IssuerWriteResponse.md) ### Authorization @@ -449,8 +450,9 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Issuer updated | - | -| **400** | Bad request (e.g., invalid sort key) | - | +| **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 | - | -| **404** | Resource Not Found | - | +| **403** | Caller does not have access to this issuer. | - | +| **404** | Issuer not found. | - | diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md index fa89862..f076a25 100644 --- a/docs/A1099/V2/JobsApi.md +++ b/docs/A1099/V2/JobsApi.md @@ -1,6 +1,6 @@ # JobsApi -All URIs are relative to *https://api.sbx.avalara.com/avalara1099* +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -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 = "2703d90c-9006-449d-b10d-2cf416cd6a4c"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "010a01be-bbf4-407e-afff-6151b0580377"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { JobResponse result = apiInstance.getJob(id, avalaraVersion, xCorrelationId, xAvalaraClient); diff --git a/docs/A1099/V2/RealTimeTinMatchIrsResponse.md b/docs/A1099/V2/RealTimeTinMatchIrsResponse.md new file mode 100644 index 0000000..04c11f6 --- /dev/null +++ b/docs/A1099/V2/RealTimeTinMatchIrsResponse.md @@ -0,0 +1,14 @@ + + +# RealTimeTinMatchIrsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | The IRS response code. | [optional] | +|**description** | **String** | The description for the IRS response. | [optional] | + + + diff --git a/docs/A1099/V2/RealTimeTinMatchRequest.md b/docs/A1099/V2/RealTimeTinMatchRequest.md new file mode 100644 index 0000000..f2a0f7e --- /dev/null +++ b/docs/A1099/V2/RealTimeTinMatchRequest.md @@ -0,0 +1,25 @@ + + +# RealTimeTinMatchRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | The TIN type. | [optional] | +|**tin** | **String** | The TIN to be submitted to TIN match. | [optional] | +|**name** | **String** | The entity name to be submitted to TIN match. | [optional] | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| BUSINESS | "Business" | +| INDIVIDUAL | "Individual" | +| UNKNOWN | "Unknown" | + + + diff --git a/docs/A1099/V2/RealTimeTinMatchResponse.md b/docs/A1099/V2/RealTimeTinMatchResponse.md new file mode 100644 index 0000000..3a8f027 --- /dev/null +++ b/docs/A1099/V2/RealTimeTinMatchResponse.md @@ -0,0 +1,14 @@ + + +# RealTimeTinMatchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | The status of the TIN match (matched or rejected). | [optional] | +|**irsResponse** | [**RealTimeTinMatchIrsResponse**](RealTimeTinMatchIrsResponse.md) | The IRS response details. | [optional] | + + + diff --git a/docs/A1099/V2/TinMatchesApi.md b/docs/A1099/V2/TinMatchesApi.md new file mode 100644 index 0000000..dfc1257 --- /dev/null +++ b/docs/A1099/V2/TinMatchesApi.md @@ -0,0 +1,98 @@ +# TinMatchesApi + +All URIs are relative to *https://api-ava1099.edge.qa.us-east-1.aws.avalara.io/avalara1099* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**performRealTimeTinMatch**](TinMatchesApi.md#performRealTimeTinMatch) | **POST** /tin-matches/$real-time | Perform real time TIN Match + + + +## performRealTimeTinMatch + +> RealTimeTinMatchResponse performRealTimeTinMatch(avalaraVersion, xCorrelationId, xAvalaraClient, realTimeTinMatchRequest) + +Perform real time TIN Match + +Perform real time TIN Match. + +### Example + +```java +// Import classes: +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.Configuration; +import Avalara.SDK.auth.*; +import Avalara.SDK.models.*; +import Avalara.SDK.api.A1099.V2.TinMatchesApi; + +public class Example { + public static void main(String[] args) { + Configuration configuration = new Configuration(); + configuration.setAppName("Test"); + configuration.setAppVersion("1.0"); + configuration.setMachineName("LocalBox"); + configuration.setTimeout(5000); + configuration.setEnvironment(AvaTaxEnvironment.Sandbox); + // Configure HTTP basic authorization + configuration.setUsername("YOUR USERNAME"); + configuration.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization + configuration.setBearerToken("YOUR ACCESS TOKEN"); + + ApiClient apiClient = new ApiClient(configuration); + + TinMatchesApi apiInstance = new TinMatchesApi(apiClient); + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "86993e01-0897-4667-b8f3-bac8c0081c4c"; // 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 { + RealTimeTinMatchResponse result = apiInstance.performRealTimeTinMatch(avalaraVersion, xCorrelationId, xAvalaraClient, realTimeTinMatchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TinMatchesApi#performRealTimeTinMatch"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **avalaraVersion** | **String**| API version | + **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] + **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] + **realTimeTinMatchRequest** | [**RealTimeTinMatchRequest**](RealTimeTinMatchRequest.md)| Required data to perform TIN match | [optional] + +### Return type + +[**RealTimeTinMatchResponse**](RealTimeTinMatchResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json, text/json, application/*+json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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. | - | + diff --git a/docs/A1099/V2/W4FormRequest.md b/docs/A1099/V2/W4FormRequest.md index 67800a0..1bf6415 100644 --- a/docs/A1099/V2/W4FormRequest.md +++ b/docs/A1099/V2/W4FormRequest.md @@ -12,7 +12,7 @@ |**employeeMiddleName** | **String** | The middle name of the employee. | [optional] | |**employeeLastName** | **String** | The last name of the employee. | | |**employeeNameSuffix** | **String** | The name suffix of the employee. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. | | +|**tinType** | **String** | 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 | | |**tin** | **String** | The taxpayer identification number (TIN). | | |**address** | **String** | The address of the employee. Required unless exempt. | [optional] | |**city** | **String** | The city of residence of the employee. Required unless exempt. | [optional] | @@ -27,11 +27,11 @@ |**additionalWithheld** | **Float** | The additional amount withheld. | [optional] | |**exemptFromWithholding** | **Boolean** | Indicates whether the employee is exempt from withholding. | [optional] | |**officeCode** | **String** | The office code associated with the form. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | |**companyId** | **String** | The ID of the associated company. Required when creating a form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | diff --git a/docs/A1099/V2/W4FormResponse.md b/docs/A1099/V2/W4FormResponse.md index 93147cc..eb22c89 100644 --- a/docs/A1099/V2/W4FormResponse.md +++ b/docs/A1099/V2/W4FormResponse.md @@ -12,7 +12,7 @@ |**employeeMiddleName** | **String** | The middle name of the employee. | [optional] | |**employeeLastName** | **String** | The last name of the employee. | [optional] | |**employeeNameSuffix** | **String** | The name suffix of the employee. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. | [optional] | +|**tinType** | **String** | 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] | |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**address** | **String** | The address of the employee. | [optional] | |**city** | **String** | The city of residence of the employee. | [optional] | diff --git a/docs/A1099/V2/W8BenEFormRequest.md b/docs/A1099/V2/W8BenEFormRequest.md index bbf116d..b89202a 100644 --- a/docs/A1099/V2/W8BenEFormRequest.md +++ b/docs/A1099/V2/W8BenEFormRequest.md @@ -103,11 +103,11 @@ |**substantialUsOwners** | [**List<SubstantialUsOwnerRequest>**](SubstantialUsOwnerRequest.md) | The list of substantial U.S. owners of passive NFFE. | [optional] | |**signerName** | **String** | The name of the signer. | [optional] | |**capacityToSignCertification** | **Boolean** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | |**companyId** | **String** | The ID of the associated company. Required when creating a form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | diff --git a/docs/A1099/V2/W8BenEFormResponse.md b/docs/A1099/V2/W8BenEFormResponse.md index 542ac8f..edb2edc 100644 --- a/docs/A1099/V2/W8BenEFormResponse.md +++ b/docs/A1099/V2/W8BenEFormResponse.md @@ -25,7 +25,7 @@ |**mailingState** | **String** | The state of the mailing address. | [optional] | |**mailingZip** | **String** | The ZIP code of the mailing address. | [optional] | |**mailingCountry** | **String** | The country of the mailing address. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. | [optional] | +|**tinType** | **String** | 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] | |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**giin** | **String** | The global intermediary identification number (GIIN). | [optional] | |**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not required. | [optional] | diff --git a/docs/A1099/V2/W8BenFormRequest.md b/docs/A1099/V2/W8BenFormRequest.md index d519b96..3ef27ca 100644 --- a/docs/A1099/V2/W8BenFormRequest.md +++ b/docs/A1099/V2/W8BenFormRequest.md @@ -32,11 +32,11 @@ |**withholdingRate** | [**WithholdingRateEnum**](#WithholdingRateEnum) | The withholding rate applied as per the treaty. Must be a percentage with up to two decimals (e.g., 12.50, 0).. Allowed values: 0, 0.0, 0.00, 5, 5.5, 10, 12.50, 15, 20, 25 (and 1 more) | [optional] | |**incomeType** | **String** | The type of income covered by the treaty. | [optional] | |**signerName** | **String** | The name of the signer of the form. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | |**companyId** | **String** | The ID of the associated company. Required when creating a form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | diff --git a/docs/A1099/V2/W8BenFormResponse.md b/docs/A1099/V2/W8BenFormResponse.md index 5900bcb..934d80d 100644 --- a/docs/A1099/V2/W8BenFormResponse.md +++ b/docs/A1099/V2/W8BenFormResponse.md @@ -21,7 +21,7 @@ |**mailingState** | **String** | The state of the mailing address. | [optional] | |**mailingZip** | **String** | The ZIP code of the mailing address. | [optional] | |**mailingCountry** | **String** | The country of the mailing address. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. | [optional] | +|**tinType** | **String** | 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] | |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**foreignTinNotRequired** | **Boolean** | Indicates whether a foreign TIN is not required. | [optional] | |**foreignTin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | diff --git a/docs/A1099/V2/W8ImyFormRequest.md b/docs/A1099/V2/W8ImyFormRequest.md index 33e9cba..79b3792 100644 --- a/docs/A1099/V2/W8ImyFormRequest.md +++ b/docs/A1099/V2/W8ImyFormRequest.md @@ -24,7 +24,7 @@ |**mailingState** | **String** | The state of the mailing address. | [optional] | |**mailingZip** | **String** | The ZIP code of the mailing address. | [optional] | |**mailingCountry** | **String** | The country of the mailing address. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number | [optional] | +|**tinType** | **String** | 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 Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number | [optional] | |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**giin** | **String** | The global intermediary identification number (GIIN). | [optional] | |**foreignTin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | @@ -119,11 +119,11 @@ |**sponsoredDirectReportingNffeCertification** | **Boolean** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] | |**directReportingNffeSponsoringEntity** | **String** | The name of the entity that sponsors the direct reporting NFFE. | [optional] | |**signerName** | **String** | The name of the signer. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | |**companyId** | **String** | The ID of the associated company. Required when creating a form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | diff --git a/docs/A1099/V2/W8ImyFormResponse.md b/docs/A1099/V2/W8ImyFormResponse.md index 2d6b4d3..9a0874b 100644 --- a/docs/A1099/V2/W8ImyFormResponse.md +++ b/docs/A1099/V2/W8ImyFormResponse.md @@ -24,7 +24,7 @@ |**mailingState** | **String** | The state of the mailing address. | [optional] | |**mailingZip** | **String** | The ZIP code of the mailing address. | [optional] | |**mailingCountry** | **String** | The country of the mailing address. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. | [optional] | +|**tinType** | **String** | 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] | |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**giin** | **String** | The global intermediary identification number (GIIN). | [optional] | |**foreignTin** | **String** | The foreign taxpayer identification number (TIN). | [optional] | diff --git a/docs/A1099/V2/W9FormBaseRequest.md b/docs/A1099/V2/W9FormBaseRequest.md index 229e03e..4aea6d8 100644 --- a/docs/A1099/V2/W9FormBaseRequest.md +++ b/docs/A1099/V2/W9FormBaseRequest.md @@ -7,12 +7,12 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | |**type** | [**TypeEnum**](#TypeEnum) | The form type. | [optional] [readonly] | |**companyId** | **String** | The ID of the associated company. Required when creating a form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | diff --git a/docs/A1099/V2/W9FormRequest.md b/docs/A1099/V2/W9FormRequest.md index dda3bf2..24e37a5 100644 --- a/docs/A1099/V2/W9FormRequest.md +++ b/docs/A1099/V2/W9FormRequest.md @@ -22,15 +22,15 @@ |**state** | **String** | The state of the address. | | |**zip** | **String** | The ZIP code of the address. | | |**accountNumber** | **String** | The account number associated with the form. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. SSN/ITIN (for individuals) and EIN (for businesses). | | +|**tinType** | **String** | 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 SSN/ITIN (for individuals) and EIN (for businesses). | | |**tin** | **String** | The taxpayer identification number (TIN). | | |**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | |**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | -|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | -|**signature** | **String** | The signature of the form. | [optional] | |**companyId** | **String** | The ID of the associated company. Required when creating a form. | [optional] | |**referenceId** | **String** | A reference identifier for the form. | [optional] | |**email** | **String** | The email address of the individual associated with the form. | [optional] | +|**eDeliveryConsentedAt** | **OffsetDateTime** | The date when e-delivery was consented. | [optional] | +|**signature** | **String** | The signature of the form. | [optional] | diff --git a/docs/A1099/V2/W9FormResponse.md b/docs/A1099/V2/W9FormResponse.md index baef31d..ec28726 100644 --- a/docs/A1099/V2/W9FormResponse.md +++ b/docs/A1099/V2/W9FormResponse.md @@ -22,7 +22,7 @@ |**state** | **String** | The state of the address. | [optional] | |**zip** | **String** | The ZIP code of the address. | [optional] | |**accountNumber** | **String** | The account number associated with the form. | [optional] | -|**tinType** | **String** | Tax Identification Number (TIN) type. | [optional] | +|**tinType** | **String** | 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] | |**tin** | **String** | The taxpayer identification number (TIN). | [optional] | |**backupWithholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | |**is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | diff --git a/pom.xml b/pom.xml index 6f0145b..d8eaac6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ avalara-sdk jar avalara-sdk - 26.5.0 + 26.7.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 f37c765..d3b05de 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -1089,7 +1089,7 @@ public UpdateCompanyRequest getUpdateCompanyRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 55982e9..d8963a3 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -1509,7 +1509,7 @@ public Update1099FormRequest getUpdate1099FormRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 ba65b8c..139773f 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -1841,7 +1841,7 @@ public UploadW9FilesRequest getUploadW9FilesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 835e9e2..26a80e6 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -39,6 +39,7 @@ import Avalara.SDK.model.A1099.V2.ErrorResponse; import Avalara.SDK.model.A1099.V2.IssuerRequest; import Avalara.SDK.model.A1099.V2.IssuerResponse; +import Avalara.SDK.model.A1099.V2.IssuerWriteResponse; import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse; import java.lang.reflect.Type; @@ -169,7 +170,7 @@ private okhttp3.Call createIssuerValidateBeforeCall(CreateIssuerRequest requestP * Create an issuer * Create an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request - * @return IssuerResponse + * @return IssuerWriteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,8 +180,8 @@ private okhttp3.Call createIssuerValidateBeforeCall(CreateIssuerRequest requestP
401 Authentication failed -
*/ - public IssuerResponse createIssuer(CreateIssuerRequest requestParameters) throws ApiException { - ApiResponse localVarResp = createIssuerWithHttpInfo(requestParameters); + public IssuerWriteResponse createIssuer(CreateIssuerRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createIssuerWithHttpInfo(requestParameters); return localVarResp.getData(); } @@ -188,7 +189,7 @@ public IssuerResponse createIssuer(CreateIssuerRequest requestParameters) throws * Create an issuer * Create an issuer (also known as a Payer). * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<IssuerResponse> + * @return ApiResponse<IssuerWriteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -198,9 +199,9 @@ public IssuerResponse createIssuer(CreateIssuerRequest requestParameters) throws
401 Authentication failed -
*/ - public ApiResponse createIssuerWithHttpInfo(CreateIssuerRequest requestParameters) throws ApiException { + public ApiResponse createIssuerWithHttpInfo(CreateIssuerRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = createIssuerValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -219,10 +220,10 @@ public ApiResponse createIssuerWithHttpInfo(CreateIssuerRequest 401 Authentication failed - */ - public okhttp3.Call createIssuerAsync(CreateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createIssuerAsync(CreateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createIssuerValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -753,7 +754,7 @@ private okhttp3.Call getIssuersValidateBeforeCall(GetIssuersRequest requestParam /** * List issuers - * List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. + * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. * @param requestOptions Object which represents the options available for a given API/request * @return PaginatedQueryResultModelIssuerResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -774,7 +775,7 @@ public PaginatedQueryResultModelIssuerResponse getIssuers(GetIssuersRequest requ /** * List issuers - * List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. + * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. * @param requestOptions Object which represents the options available for a given API/request * @return ApiResponse<PaginatedQueryResultModelIssuerResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -796,7 +797,7 @@ public ApiResponse getIssuersWithHttpIn /** * List issuers (asynchronously) - * List issuers (also known as Payers). Filterable fields are name, referenceId and taxYear. + * List issuers (also known as Payers). Filterable fields are businessName, businessName2, referenceId, taxYear, firstName, and lastName. * @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 @@ -882,10 +883,11 @@ public GetIssuersRequest getGetIssuersRequest() { * @http.response.details - - + + - + +
Status Code Description Response Headers
200 Issuer updated -
400 Bad request (e.g., invalid sort key) -
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 -
404 Resource Not Found -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
*/ public okhttp3.Call updateIssuerCall(UpdateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { @@ -970,45 +972,50 @@ private okhttp3.Call updateIssuerValidateBeforeCall(UpdateIssuerRequest requestP /** * Update an issuer - * Update an issuer (also known as a Payer). + * Update an issuer (also known as a Payer). When the payload violates field-level business rules, the issuer is still persisted and the response body includes a `validationErrors[]` array describing each violation. * @param requestOptions Object which represents the options available for a given API/request + * @return IssuerWriteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + + - + +
Status Code Description Response Headers
200 Issuer updated -
400 Bad request (e.g., invalid sort key) -
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 -
404 Resource Not Found -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
*/ - public void updateIssuer(UpdateIssuerRequest requestParameters) throws ApiException { - updateIssuerWithHttpInfo(requestParameters); + public IssuerWriteResponse updateIssuer(UpdateIssuerRequest requestParameters) throws ApiException { + ApiResponse localVarResp = updateIssuerWithHttpInfo(requestParameters); + return localVarResp.getData(); } /** * Update an issuer - * Update an issuer (also known as a Payer). + * Update an issuer (also known as a Payer). When the payload violates field-level business rules, the issuer is still persisted and the response body includes a `validationErrors[]` array describing each violation. * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Void> + * @return ApiResponse<IssuerWriteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + + - + +
Status Code Description Response Headers
200 Issuer updated -
400 Bad request (e.g., invalid sort key) -
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 -
404 Resource Not Found -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
*/ - public ApiResponse updateIssuerWithHttpInfo(UpdateIssuerRequest requestParameters) throws ApiException { + public ApiResponse updateIssuerWithHttpInfo(UpdateIssuerRequest requestParameters) throws ApiException { okhttp3.Call localVarCall = updateIssuerValidateBeforeCall(requestParameters, null); - return localVarApiClient.execute(localVarCall); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update an issuer (asynchronously) - * Update an issuer (also known as a Payer). + * Update an issuer (also known as a Payer). When the payload violates field-level business rules, the issuer is still persisted and the response body includes a `validationErrors[]` array describing each violation. * @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 @@ -1016,16 +1023,18 @@ public ApiResponse updateIssuerWithHttpInfo(UpdateIssuerRequest requestPar * @http.response.details - - + + - + +
Status Code Description Response Headers
200 Issuer updated -
400 Bad request (e.g., invalid sort key) -
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 -
404 Resource Not Found -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
*/ - public okhttp3.Call updateIssuerAsync(UpdateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateIssuerAsync(UpdateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateIssuerValidateBeforeCall(requestParameters, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** @@ -1069,7 +1078,7 @@ public UpdateIssuerRequest getUpdateIssuerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 f66ea00..216af4f 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -275,7 +275,7 @@ public GetJobRequest getGetJobRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 new file mode 100644 index 0000000..d1d6cfb --- /dev/null +++ b/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java @@ -0,0 +1,280 @@ +/* + * 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.api.A1099.V2; + +import Avalara.SDK.ApiCallback; +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.ApiResponse; +import Avalara.SDK.Configuration; +import Avalara.SDK.Pair; +import Avalara.SDK.ProgressRequestBody; +import Avalara.SDK.ProgressResponseBody; +import Avalara.SDK.AvalaraMicroservice; + + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; +import java.util.*; + + +import Avalara.SDK.model.A1099.V2.ErrorResponse; +import Avalara.SDK.model.A1099.V2.RealTimeTinMatchRequest; +import Avalara.SDK.model.A1099.V2.RealTimeTinMatchResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class TinMatchesApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public TinMatchesApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + SetConfiguration(apiClient); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for performRealTimeTinMatch + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 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 { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = requestParameters.getRealTimeTinMatchRequest(); + + // create path and map variables + String localVarPath = "/tin-matches/$real-time"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json", "text/json", "application/*+json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call performRealTimeTinMatchValidateBeforeCall(PerformRealTimeTinMatchRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling performRealTimeTinMatch(Async)"); + } + + + okhttp3.Call localVarCall = performRealTimeTinMatchCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Perform real time TIN Match + * Perform real time TIN Match. + * @param requestOptions Object which represents the options available for a given API/request + * @return RealTimeTinMatchResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 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 { + ApiResponse localVarResp = performRealTimeTinMatchWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Perform real time TIN Match + * Perform real time TIN Match. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<RealTimeTinMatchResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 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 { + okhttp3.Call localVarCall = performRealTimeTinMatchValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Perform real time TIN Match (asynchronously) + * Perform real time TIN Match. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 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 { + + okhttp3.Call localVarCall = performRealTimeTinMatchValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the PerformRealTimeTinMatch API + * + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + * @param realTimeTinMatchRequest Required data to perform TIN match (optional) + */ + public class PerformRealTimeTinMatchRequest { + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private RealTimeTinMatchRequest realTimeTinMatchRequest; + + public PerformRealTimeTinMatchRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public RealTimeTinMatchRequest getRealTimeTinMatchRequest() { return realTimeTinMatchRequest; } + public void setRealTimeTinMatchRequest(RealTimeTinMatchRequest realTimeTinMatchRequest) { this.realTimeTinMatchRequest = realTimeTinMatchRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns PerformRealTimeTinMatchRequest + */ + public PerformRealTimeTinMatchRequest getPerformRealTimeTinMatchRequest() { + return this.new PerformRealTimeTinMatchRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.7.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 0e36886..81cbb8f 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 d8595ff..451ba3a 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 100b90e..65b2a0f 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 26015c4..9632e1a 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 8e515fe..d2ddfe3 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 4cccb03..d6b5782 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 6d60c64..72fd125 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 7790da7..631e7a7 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.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 9d782ef..0ffda3a 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.5.0"); + this.localVarApiClient.setSdkVersion("26.7.0"); } } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java b/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java index 89412d4..0759a2e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyBase.java index dad6b9d..2c67fdb 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyBase.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java index ea6acde..fb940e5 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java index 0b8d112..303b998 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -59,18 +59,6 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class CompanyResponse { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; - public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -139,66 +127,21 @@ public class CompanyResponse { @SerializedName(SERIALIZED_NAME_MAX_REMINDER_ATTEMPTS) private Integer maxReminderAttempts; - public CompanyResponse() { - } - - public CompanyResponse id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier set when the record is created. - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public CompanyResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Date time when the record was created. - * @return createdAt - */ - @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; - public CompanyResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; - /** - * Date time when the record was last updated. - * @return updatedAt - */ - @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; + public CompanyResponse() { } - public CompanyResponse name(String name) { this.name = name; return this; @@ -522,6 +465,63 @@ public void setMaxReminderAttempts(Integer maxReminderAttempts) { } + public CompanyResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public CompanyResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Date time when the record was created. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public CompanyResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Date time when the record was last updated. + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override public boolean equals(Object o) { @@ -532,10 +532,7 @@ public boolean equals(Object o) { return false; } CompanyResponse companyResponse = (CompanyResponse) o; - return Objects.equals(this.id, companyResponse.id) && - Objects.equals(this.createdAt, companyResponse.createdAt) && - Objects.equals(this.updatedAt, companyResponse.updatedAt) && - Objects.equals(this.name, companyResponse.name) && + return Objects.equals(this.name, companyResponse.name) && Objects.equals(this.dbaName, companyResponse.dbaName) && Objects.equals(this.email, companyResponse.email) && Objects.equals(this.address, companyResponse.address) && @@ -551,7 +548,10 @@ public boolean equals(Object o) { Objects.equals(this.countryCode, companyResponse.countryCode) && Objects.equals(this.resendRequests, companyResponse.resendRequests) && Objects.equals(this.resendIntervalDays, companyResponse.resendIntervalDays) && - Objects.equals(this.maxReminderAttempts, companyResponse.maxReminderAttempts); + Objects.equals(this.maxReminderAttempts, companyResponse.maxReminderAttempts) && + Objects.equals(this.id, companyResponse.id) && + Objects.equals(this.createdAt, companyResponse.createdAt) && + Objects.equals(this.updatedAt, companyResponse.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -560,7 +560,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, createdAt, updatedAt, name, dbaName, email, address, city, state, zip, telephone, tin, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts); + return Objects.hash(name, dbaName, email, address, city, state, zip, telephone, tin, referenceId, doTinMatch, groupName, foreignProvince, countryCode, resendRequests, resendIntervalDays, maxReminderAttempts, id, createdAt, updatedAt); } private static int hashCodeNullable(JsonNullable a) { @@ -574,9 +574,6 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CompanyResponse {\n"); - 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(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); @@ -594,6 +591,9 @@ public String toString() { sb.append(" resendRequests: ").append(toIndentedString(resendRequests)).append("\n"); sb.append(" resendIntervalDays: ").append(toIndentedString(resendIntervalDays)).append("\n"); sb.append(" maxReminderAttempts: ").append(toIndentedString(maxReminderAttempts)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -633,6 +633,9 @@ private String toIndentedString(Object o) { openapiFields.add("resendRequests"); openapiFields.add("resendIntervalDays"); openapiFields.add("maxReminderAttempts"); + openapiFields.add("id"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -674,9 +677,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } if ((jsonObj.get("name") != 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())); } @@ -716,6 +716,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); } + if ((jsonObj.get("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())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java index de660ee..826dc7e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java index 157c0af..e1ffb5f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java index 953bd4e..1fae59f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java index 0cd0794..8df43c6 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java index 31a308d..7e7628b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java index 7df47aa..24803d0 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java index 968883f..db64c3b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 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 9643b22..153fe9a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -68,66 +68,6 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1042S { - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TinTypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TinTypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TinTypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; - @SerializedName(SERIALIZED_NAME_TIN_TYPE) - private TinTypeEnum tinType; - public static final String SERIALIZED_NAME_UNIQUE_FORM_ID = "uniqueFormId"; @SerializedName(SERIALIZED_NAME_UNIQUE_FORM_ID) private String uniqueFormId; @@ -1123,13 +1063,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -1154,14 +1091,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -1190,10 +1119,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -1202,10 +1127,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -1242,11 +1163,121 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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 Form1042S() { } public Form1042S( - TinTypeEnum tinType, String id, Form1099StatusDetail federalEfileStatus, List stateEfileStatus, @@ -1259,7 +1290,6 @@ public Form1042S( OffsetDateTime updatedAt ) { this(); - this.tinType = tinType; this.id = id; this.federalEfileStatus = federalEfileStatus; this.stateEfileStatus = stateEfileStatus; @@ -1272,17 +1302,6 @@ public Form1042S( this.updatedAt = updatedAt; } - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - - public Form1042S uniqueFormId(String uniqueFormId) { this.uniqueFormId = uniqueFormId; return this; @@ -1883,44 +1902,29 @@ public void setTin(String tin) { } + @Deprecated public Form1042S recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1042S recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - public Form1042S address(String address) { this.address = address; return this; @@ -2035,44 +2039,6 @@ public void setEmail(String email) { } - public Form1042S 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 Form1042S 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 Form1042S nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -2206,25 +2172,6 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1042S 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 Form1042S addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -2263,25 +2210,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1042S 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -2380,6 +2308,238 @@ public OffsetDateTime getUpdatedAt() { } + + public Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 Form1042S 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 @@ -2435,8 +2595,7 @@ public boolean equals(Object o) { return false; } Form1042S form1042S = (Form1042S) o; - return Objects.equals(this.tinType, form1042S.tinType) && - Objects.equals(this.uniqueFormId, form1042S.uniqueFormId) && + return Objects.equals(this.uniqueFormId, form1042S.uniqueFormId) && Objects.equals(this.recipientDateOfBirth, form1042S.recipientDateOfBirth) && Objects.equals(this.recipientGiin, form1042S.recipientGiin) && Objects.equals(this.recipientForeignTin, form1042S.recipientForeignTin) && @@ -2469,15 +2628,12 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1042S.referenceId) && Objects.equals(this.tin, form1042S.tin) && Objects.equals(this.recipientName, form1042S.recipientName) && - Objects.equals(this.recipientSecondName, form1042S.recipientSecondName) && Objects.equals(this.address, form1042S.address) && Objects.equals(this.address2, form1042S.address2) && Objects.equals(this.city, form1042S.city) && Objects.equals(this.state, form1042S.state) && Objects.equals(this.zip, form1042S.zip) && Objects.equals(this.email, form1042S.email) && - Objects.equals(this.accountNumber, form1042S.accountNumber) && - Objects.equals(this.officeCode, form1042S.officeCode) && Objects.equals(this.nonUsProvince, form1042S.nonUsProvince) && Objects.equals(this.countryCode, form1042S.countryCode) && Objects.equals(this.federalEfileDate, form1042S.federalEfileDate) && @@ -2485,10 +2641,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1042S.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1042S.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1042S.tinMatch) && - Objects.equals(this.noTin, form1042S.noTin) && Objects.equals(this.addressVerification, form1042S.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1042S.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1042S.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1042S.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1042S.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1042S.postalMailStatus) && @@ -2497,7 +2651,19 @@ public boolean equals(Object o) { Objects.equals(this.eDeliveryStatus, form1042S.eDeliveryStatus) && Objects.equals(this.validationErrors, form1042S.validationErrors) && Objects.equals(this.createdAt, form1042S.createdAt) && - Objects.equals(this.updatedAt, form1042S.updatedAt)&& + Objects.equals(this.updatedAt, form1042S.updatedAt) && + Objects.equals(this.tinType, form1042S.tinType) && + Objects.equals(this.businessName, form1042S.businessName) && + Objects.equals(this.businessName2, form1042S.businessName2) && + Objects.equals(this.firstName, form1042S.firstName) && + Objects.equals(this.middleName, form1042S.middleName) && + Objects.equals(this.lastName, form1042S.lastName) && + Objects.equals(this.suffixName, form1042S.suffixName) && + Objects.equals(this.recipientSecondName, form1042S.recipientSecondName) && + Objects.equals(this.accountNumber, form1042S.accountNumber) && + Objects.equals(this.officeCode, form1042S.officeCode) && + Objects.equals(this.noTin, form1042S.noTin) && + Objects.equals(this.secondTinNotice, form1042S.secondTinNotice)&& Objects.equals(this.additionalProperties, form1042S.additionalProperties); } @@ -2507,7 +2673,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(tinType, uniqueFormId, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, withholdingRatePoolIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + return Objects.hash(uniqueFormId, recipientDateOfBirth, recipientGiin, recipientForeignTin, lobCode, incomeCode, grossIncome, withholdingIndicator, taxCountryCode, exemptionCodeChap3, exemptionCodeChap4, taxRateChap3, withholdingAllowance, federalTaxWithheld, taxNotDepositedIndicator, academicIndicator, withholdingRatePoolIndicator, taxWithheldOtherAgents, amountRepaid, taxPaidAgent, chap3StatusCode, chap4StatusCode, primaryWithholdingAgent, intermediaryOrFlowThrough, 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) { @@ -2521,7 +2687,6 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Form1042S {\n"); - sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" uniqueFormId: ").append(toIndentedString(uniqueFormId)).append("\n"); sb.append(" recipientDateOfBirth: ").append(toIndentedString(recipientDateOfBirth)).append("\n"); sb.append(" recipientGiin: ").append(toIndentedString(recipientGiin)).append("\n"); @@ -2555,15 +2720,12 @@ public String toString() { 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(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -2571,10 +2733,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -2584,6 +2744,18 @@ public String toString() { 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(); @@ -2616,16 +2788,12 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -2633,10 +2801,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -2646,6 +2812,18 @@ private String toIndentedString(Object o) { 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(); @@ -2655,7 +2833,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("withholdingIndicator"); openapiRequiredFields.add("taxCountryCode"); openapiRequiredFields.add("type"); - openapiRequiredFields.add("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -2681,13 +2858,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - 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("uniqueFormId") != null && !jsonObj.get("uniqueFormId").isJsonNull()) && !jsonObj.get("uniqueFormId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `uniqueFormId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uniqueFormId").toString())); } @@ -2786,9 +2956,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -2807,12 +2974,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } @@ -2871,6 +3032,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + 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 { 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 fd2f7b0..110cfee 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -258,70 +258,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) private String recipientSecondName; @@ -349,14 +291,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -385,10 +319,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -397,10 +327,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -750,58 +676,47 @@ public void setTin(String tin) { } + @Deprecated public Form1095B recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1095B tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - + @Deprecated public Form1095B recipientSecondName(String recipientSecondName) { this.recipientSecondName = recipientSecondName; return this; } /** - * Recipient second name + * 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; } @@ -921,44 +836,6 @@ public void setEmail(String email) { } - public Form1095B 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 Form1095B 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 Form1095B nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -1092,25 +969,6 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1095B 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 Form1095B addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -1149,25 +1007,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1095B 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1337,7 +1176,6 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1095B.referenceId) && Objects.equals(this.tin, form1095B.tin) && Objects.equals(this.recipientName, form1095B.recipientName) && - Objects.equals(this.tinType, form1095B.tinType) && Objects.equals(this.recipientSecondName, form1095B.recipientSecondName) && Objects.equals(this.address, form1095B.address) && Objects.equals(this.address2, form1095B.address2) && @@ -1345,8 +1183,6 @@ public boolean equals(Object o) { Objects.equals(this.state, form1095B.state) && Objects.equals(this.zip, form1095B.zip) && Objects.equals(this.email, form1095B.email) && - Objects.equals(this.accountNumber, form1095B.accountNumber) && - Objects.equals(this.officeCode, form1095B.officeCode) && Objects.equals(this.nonUsProvince, form1095B.nonUsProvince) && Objects.equals(this.countryCode, form1095B.countryCode) && Objects.equals(this.federalEfileDate, form1095B.federalEfileDate) && @@ -1354,10 +1190,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1095B.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1095B.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1095B.tinMatch) && - Objects.equals(this.noTin, form1095B.noTin) && Objects.equals(this.addressVerification, form1095B.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1095B.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1095B.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1095B.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1095B.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1095B.postalMailStatus) && @@ -1376,7 +1210,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, employeeDateOfBirth, originOfHealthCoverageCode, coveredIndividuals, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, recipientSecondName, address, address2, city, state, zip, email, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, addressVerification, stateAndLocalWithholding, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -1406,7 +1240,6 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); @@ -1414,8 +1247,6 @@ public String toString() { sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1423,10 +1254,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1468,7 +1297,6 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); @@ -1476,8 +1304,6 @@ private String toIndentedString(Object o) { openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1485,10 +1311,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1505,7 +1329,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("employeeLastName"); openapiRequiredFields.add("originOfHealthCoverageCode"); openapiRequiredFields.add("type"); - openapiRequiredFields.add("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -1588,13 +1411,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1616,12 +1432,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } 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 431e5ca..c8561a9 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -279,70 +279,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) private String recipientSecondName; @@ -370,14 +312,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -406,10 +340,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -418,10 +348,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -817,58 +743,47 @@ public void setTin(String tin) { } + @Deprecated public Form1095C recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1095C tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - + @Deprecated public Form1095C recipientSecondName(String recipientSecondName) { this.recipientSecondName = recipientSecondName; return this; } /** - * Recipient second name + * 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; } @@ -988,44 +903,6 @@ public void setEmail(String email) { } - public Form1095C 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 Form1095C 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 Form1095C nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -1159,25 +1036,6 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1095C 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 Form1095C addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -1216,25 +1074,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1095C 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1406,7 +1245,6 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1095C.referenceId) && Objects.equals(this.tin, form1095C.tin) && Objects.equals(this.recipientName, form1095C.recipientName) && - Objects.equals(this.tinType, form1095C.tinType) && Objects.equals(this.recipientSecondName, form1095C.recipientSecondName) && Objects.equals(this.address, form1095C.address) && Objects.equals(this.address2, form1095C.address2) && @@ -1414,8 +1252,6 @@ public boolean equals(Object o) { Objects.equals(this.state, form1095C.state) && Objects.equals(this.zip, form1095C.zip) && Objects.equals(this.email, form1095C.email) && - Objects.equals(this.accountNumber, form1095C.accountNumber) && - Objects.equals(this.officeCode, form1095C.officeCode) && Objects.equals(this.nonUsProvince, form1095C.nonUsProvince) && Objects.equals(this.countryCode, form1095C.countryCode) && Objects.equals(this.federalEfileDate, form1095C.federalEfileDate) && @@ -1423,10 +1259,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1095C.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1095C.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1095C.tinMatch) && - Objects.equals(this.noTin, form1095C.noTin) && Objects.equals(this.addressVerification, form1095C.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1095C.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1095C.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1095C.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1095C.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1095C.postalMailStatus) && @@ -1445,7 +1279,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, recipientDateOfBirth, planStartMonth, employerProvidedSiCoverage, offerAndCoverages, coveredIndividuals, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, recipientDateOfBirth, planStartMonth, employerProvidedSiCoverage, offerAndCoverages, coveredIndividuals, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, recipientSecondName, address, address2, city, state, zip, email, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, addressVerification, stateAndLocalWithholding, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -1477,7 +1311,6 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); @@ -1485,8 +1318,6 @@ public String toString() { sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1494,10 +1325,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1539,7 +1368,6 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); @@ -1547,8 +1375,6 @@ private String toIndentedString(Object o) { openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1556,10 +1382,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1577,7 +1401,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("planStartMonth"); openapiRequiredFields.add("offerAndCoverages"); openapiRequiredFields.add("type"); - openapiRequiredFields.add("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -1670,13 +1493,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1698,12 +1514,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } 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 a1d1878..54cb71a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -167,70 +167,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) private String recipientSecondName; @@ -258,14 +200,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -294,10 +228,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -306,10 +236,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -518,58 +444,47 @@ public void setTin(String tin) { } + @Deprecated public Form1099Base recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1099Base tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - + @Deprecated public Form1099Base recipientSecondName(String recipientSecondName) { this.recipientSecondName = recipientSecondName; return this; } /** - * Recipient second name + * 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; } @@ -689,44 +604,6 @@ public void setEmail(String email) { } - public Form1099Base 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 Form1099Base 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 Form1099Base nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -860,25 +737,6 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1099Base 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 Form1099Base addressVerification(Boolean addressVerification) { this.addressVerification = addressVerification; return this; @@ -917,25 +775,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1099Base 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1098,7 +937,6 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1099Base.referenceId) && Objects.equals(this.tin, form1099Base.tin) && Objects.equals(this.recipientName, form1099Base.recipientName) && - Objects.equals(this.tinType, form1099Base.tinType) && Objects.equals(this.recipientSecondName, form1099Base.recipientSecondName) && Objects.equals(this.address, form1099Base.address) && Objects.equals(this.address2, form1099Base.address2) && @@ -1106,8 +944,6 @@ public boolean equals(Object o) { Objects.equals(this.state, form1099Base.state) && Objects.equals(this.zip, form1099Base.zip) && Objects.equals(this.email, form1099Base.email) && - Objects.equals(this.accountNumber, form1099Base.accountNumber) && - Objects.equals(this.officeCode, form1099Base.officeCode) && Objects.equals(this.nonUsProvince, form1099Base.nonUsProvince) && Objects.equals(this.countryCode, form1099Base.countryCode) && Objects.equals(this.federalEfileDate, form1099Base.federalEfileDate) && @@ -1115,10 +951,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1099Base.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1099Base.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1099Base.tinMatch) && - Objects.equals(this.noTin, form1099Base.noTin) && Objects.equals(this.addressVerification, form1099Base.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099Base.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1099Base.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1099Base.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1099Base.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1099Base.postalMailStatus) && @@ -1137,7 +971,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + return Objects.hash(type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, recipientSecondName, address, address2, city, state, zip, email, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, addressVerification, stateAndLocalWithholding, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -1160,7 +994,6 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); @@ -1168,8 +1001,6 @@ public String toString() { sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1177,10 +1008,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1222,7 +1051,6 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); @@ -1230,8 +1058,6 @@ private String toIndentedString(Object o) { openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1239,10 +1065,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1256,7 +1080,6 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("type"); - openapiRequiredFields.add("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -1308,13 +1131,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); } @@ -1336,12 +1152,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } 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 4b9f82b..5444380 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -243,73 +243,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -334,14 +271,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -370,10 +299,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -382,10 +307,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -422,6 +343,117 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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 Form1099Div() { } @@ -955,63 +987,29 @@ public void setTin(String tin) { } + @Deprecated public Form1099Div recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1099Div tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099Div recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - public Form1099Div address(String address) { this.address = address; return this; @@ -1126,44 +1124,6 @@ public void setEmail(String email) { } - public Form1099Div 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 Form1099Div 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 Form1099Div nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -1297,41 +1257,22 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1099Div noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Div addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * No TIN indicator - * @return noTin + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getAddressVerification() { + return addressVerification; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099Div 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 void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } @@ -1354,25 +1295,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1099Div 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1471,6 +1393,238 @@ public OffsetDateTime getUpdatedAt() { } + + public Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 Form1099Div 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 @@ -1554,16 +1708,12 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1099Div.referenceId) && Objects.equals(this.tin, form1099Div.tin) && Objects.equals(this.recipientName, form1099Div.recipientName) && - Objects.equals(this.tinType, form1099Div.tinType) && - Objects.equals(this.recipientSecondName, form1099Div.recipientSecondName) && Objects.equals(this.address, form1099Div.address) && Objects.equals(this.address2, form1099Div.address2) && Objects.equals(this.city, form1099Div.city) && Objects.equals(this.state, form1099Div.state) && Objects.equals(this.zip, form1099Div.zip) && Objects.equals(this.email, form1099Div.email) && - Objects.equals(this.accountNumber, form1099Div.accountNumber) && - Objects.equals(this.officeCode, form1099Div.officeCode) && Objects.equals(this.nonUsProvince, form1099Div.nonUsProvince) && Objects.equals(this.countryCode, form1099Div.countryCode) && Objects.equals(this.federalEfileDate, form1099Div.federalEfileDate) && @@ -1571,10 +1721,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1099Div.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1099Div.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1099Div.tinMatch) && - Objects.equals(this.noTin, form1099Div.noTin) && Objects.equals(this.addressVerification, form1099Div.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099Div.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1099Div.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1099Div.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1099Div.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1099Div.postalMailStatus) && @@ -1583,7 +1731,19 @@ public boolean equals(Object o) { Objects.equals(this.eDeliveryStatus, form1099Div.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Div.validationErrors) && Objects.equals(this.createdAt, form1099Div.createdAt) && - Objects.equals(this.updatedAt, form1099Div.updatedAt)&& + Objects.equals(this.updatedAt, form1099Div.updatedAt) && + Objects.equals(this.tinType, form1099Div.tinType) && + Objects.equals(this.businessName, form1099Div.businessName) && + Objects.equals(this.businessName2, form1099Div.businessName2) && + Objects.equals(this.firstName, form1099Div.firstName) && + Objects.equals(this.middleName, form1099Div.middleName) && + Objects.equals(this.lastName, form1099Div.lastName) && + Objects.equals(this.suffixName, form1099Div.suffixName) && + Objects.equals(this.recipientSecondName, form1099Div.recipientSecondName) && + Objects.equals(this.accountNumber, form1099Div.accountNumber) && + Objects.equals(this.officeCode, form1099Div.officeCode) && + Objects.equals(this.noTin, form1099Div.noTin) && + Objects.equals(this.secondTinNotice, form1099Div.secondTinNotice)&& Objects.equals(this.additionalProperties, form1099Div.additionalProperties); } @@ -1593,7 +1753,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, fatcaFilingRequirement, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + return Objects.hash(totalOrdinaryDividends, qualifiedDividends, totalCapitalGainDistributions, unrecapturedSection1250Gain, section1202Gain, collectiblesGain, section897OrdinaryDividends, section897CapitalGain, nondividendDistributions, federalIncomeTaxWithheld, section199ADividends, investmentExpenses, foreignTaxPaid, foreignCountryOrUSPossession, cashLiquidationDistributions, noncashLiquidationDistributions, exemptInterestDividends, specifiedPrivateActivityBondInterestDividends, 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) { @@ -1635,16 +1795,12 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1652,10 +1808,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1665,6 +1819,18 @@ public String toString() { 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(); @@ -1697,16 +1863,12 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1714,10 +1876,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1727,11 +1887,22 @@ private String toIndentedString(Object o) { 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("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -1786,16 +1957,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -1814,12 +1975,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } @@ -1878,6 +2033,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + 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 { 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 c73d8b2..480bfff 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -227,73 +227,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -318,14 +255,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -354,10 +283,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -366,10 +291,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -406,6 +327,117 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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 Form1099Int() { } @@ -863,63 +895,29 @@ public void setTin(String tin) { } + @Deprecated public Form1099Int recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1099Int tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099Int recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - public Form1099Int address(String address) { this.address = address; return this; @@ -1034,44 +1032,6 @@ public void setEmail(String email) { } - public Form1099Int 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 Form1099Int 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 Form1099Int nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -1205,41 +1165,22 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1099Int noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Int addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * No TIN indicator - * @return noTin + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getAddressVerification() { + return addressVerification; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099Int 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 void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } @@ -1262,25 +1203,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1099Int 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1379,6 +1301,238 @@ public OffsetDateTime getUpdatedAt() { } + + public Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 Form1099Int 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 @@ -1458,16 +1612,12 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1099Int.referenceId) && Objects.equals(this.tin, form1099Int.tin) && Objects.equals(this.recipientName, form1099Int.recipientName) && - Objects.equals(this.tinType, form1099Int.tinType) && - Objects.equals(this.recipientSecondName, form1099Int.recipientSecondName) && Objects.equals(this.address, form1099Int.address) && Objects.equals(this.address2, form1099Int.address2) && Objects.equals(this.city, form1099Int.city) && Objects.equals(this.state, form1099Int.state) && Objects.equals(this.zip, form1099Int.zip) && Objects.equals(this.email, form1099Int.email) && - Objects.equals(this.accountNumber, form1099Int.accountNumber) && - Objects.equals(this.officeCode, form1099Int.officeCode) && Objects.equals(this.nonUsProvince, form1099Int.nonUsProvince) && Objects.equals(this.countryCode, form1099Int.countryCode) && Objects.equals(this.federalEfileDate, form1099Int.federalEfileDate) && @@ -1475,10 +1625,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1099Int.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1099Int.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1099Int.tinMatch) && - Objects.equals(this.noTin, form1099Int.noTin) && Objects.equals(this.addressVerification, form1099Int.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099Int.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1099Int.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1099Int.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1099Int.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1099Int.postalMailStatus) && @@ -1487,7 +1635,19 @@ public boolean equals(Object o) { Objects.equals(this.eDeliveryStatus, form1099Int.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Int.validationErrors) && Objects.equals(this.createdAt, form1099Int.createdAt) && - Objects.equals(this.updatedAt, form1099Int.updatedAt)&& + Objects.equals(this.updatedAt, form1099Int.updatedAt) && + Objects.equals(this.tinType, form1099Int.tinType) && + Objects.equals(this.businessName, form1099Int.businessName) && + Objects.equals(this.businessName2, form1099Int.businessName2) && + Objects.equals(this.firstName, form1099Int.firstName) && + Objects.equals(this.middleName, form1099Int.middleName) && + Objects.equals(this.lastName, form1099Int.lastName) && + Objects.equals(this.suffixName, form1099Int.suffixName) && + Objects.equals(this.recipientSecondName, form1099Int.recipientSecondName) && + Objects.equals(this.accountNumber, form1099Int.accountNumber) && + Objects.equals(this.officeCode, form1099Int.officeCode) && + Objects.equals(this.noTin, form1099Int.noTin) && + Objects.equals(this.secondTinNotice, form1099Int.secondTinNotice)&& Objects.equals(this.additionalProperties, form1099Int.additionalProperties); } @@ -1497,7 +1657,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, fatcaFilingRequirement, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + return Objects.hash(interestIncome, earlyWithdrawalPenalty, usSavingsBondsInterest, federalIncomeTaxWithheld, investmentExpenses, foreignTaxPaid, foreignCountry, taxExemptInterest, specifiedPrivateActivityBondInterest, marketDiscount, bondPremium, bondPremiumOnTreasuryObligations, bondPremiumOnTaxExemptBond, taxExemptBondCusipNumber, 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) { @@ -1535,16 +1695,12 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1552,10 +1708,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1565,6 +1719,18 @@ public String toString() { 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(); @@ -1597,16 +1763,12 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1614,10 +1776,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1627,11 +1787,22 @@ private String toIndentedString(Object o) { 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("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -1689,16 +1860,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -1717,12 +1878,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } @@ -1781,6 +1936,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + 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 { 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 8bdba9f..0b2b283 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -351,73 +351,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -442,14 +379,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -478,10 +407,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -490,10 +415,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -530,6 +451,117 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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 Form1099K() { } @@ -1082,63 +1114,29 @@ public void setTin(String tin) { } + @Deprecated public Form1099K recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1099K tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099K recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - public Form1099K address(String address) { this.address = address; return this; @@ -1253,44 +1251,6 @@ public void setEmail(String email) { } - public Form1099K 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 Form1099K 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 Form1099K nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -1424,41 +1384,22 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1099K noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099K addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * No TIN indicator - * @return noTin + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getAddressVerification() { + return addressVerification; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099K 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 void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } @@ -1481,25 +1422,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1099K 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1598,6 +1520,238 @@ public OffsetDateTime getUpdatedAt() { } + + public Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 Form1099K 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 @@ -1682,16 +1836,12 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1099K.referenceId) && Objects.equals(this.tin, form1099K.tin) && Objects.equals(this.recipientName, form1099K.recipientName) && - Objects.equals(this.tinType, form1099K.tinType) && - Objects.equals(this.recipientSecondName, form1099K.recipientSecondName) && Objects.equals(this.address, form1099K.address) && Objects.equals(this.address2, form1099K.address2) && Objects.equals(this.city, form1099K.city) && Objects.equals(this.state, form1099K.state) && Objects.equals(this.zip, form1099K.zip) && Objects.equals(this.email, form1099K.email) && - Objects.equals(this.accountNumber, form1099K.accountNumber) && - Objects.equals(this.officeCode, form1099K.officeCode) && Objects.equals(this.nonUsProvince, form1099K.nonUsProvince) && Objects.equals(this.countryCode, form1099K.countryCode) && Objects.equals(this.federalEfileDate, form1099K.federalEfileDate) && @@ -1699,10 +1849,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1099K.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1099K.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1099K.tinMatch) && - Objects.equals(this.noTin, form1099K.noTin) && Objects.equals(this.addressVerification, form1099K.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099K.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1099K.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1099K.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1099K.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1099K.postalMailStatus) && @@ -1711,7 +1859,19 @@ public boolean equals(Object o) { Objects.equals(this.eDeliveryStatus, form1099K.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099K.validationErrors) && Objects.equals(this.createdAt, form1099K.createdAt) && - Objects.equals(this.updatedAt, form1099K.updatedAt)&& + Objects.equals(this.updatedAt, form1099K.updatedAt) && + Objects.equals(this.tinType, form1099K.tinType) && + Objects.equals(this.businessName, form1099K.businessName) && + Objects.equals(this.businessName2, form1099K.businessName2) && + Objects.equals(this.firstName, form1099K.firstName) && + Objects.equals(this.middleName, form1099K.middleName) && + Objects.equals(this.lastName, form1099K.lastName) && + Objects.equals(this.suffixName, form1099K.suffixName) && + Objects.equals(this.recipientSecondName, form1099K.recipientSecondName) && + Objects.equals(this.accountNumber, form1099K.accountNumber) && + Objects.equals(this.officeCode, form1099K.officeCode) && + Objects.equals(this.noTin, form1099K.noTin) && + Objects.equals(this.secondTinNotice, form1099K.secondTinNotice)&& Objects.equals(this.additionalProperties, form1099K.additionalProperties); } @@ -1721,7 +1881,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, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + 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); } private static int hashCodeNullable(JsonNullable a) { @@ -1764,16 +1924,12 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1781,10 +1937,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1794,6 +1948,18 @@ public String toString() { 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(); @@ -1826,16 +1992,12 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1843,10 +2005,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1856,6 +2016,18 @@ private String toIndentedString(Object o) { 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(); @@ -1864,7 +2036,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("grossAmountPaymentCard"); openapiRequiredFields.add("paymentTransactionNumber"); openapiRequiredFields.add("type"); - openapiRequiredFields.add("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -1932,16 +2103,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -1960,12 +2121,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } @@ -2024,6 +2179,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + 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 { 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 bd767a3..9167250 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 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 11fb521..d67ddb7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -227,73 +227,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -318,14 +255,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -354,10 +283,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -366,10 +291,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -406,6 +327,117 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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 Form1099Misc() { } @@ -863,63 +895,29 @@ public void setTin(String tin) { } + @Deprecated public Form1099Misc recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1099Misc tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099Misc recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - public Form1099Misc address(String address) { this.address = address; return this; @@ -1034,44 +1032,6 @@ public void setEmail(String email) { } - public Form1099Misc 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 Form1099Misc 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 Form1099Misc nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -1205,41 +1165,22 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1099Misc noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Misc addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * No TIN indicator - * @return noTin + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getAddressVerification() { + return addressVerification; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099Misc 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 void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } @@ -1262,25 +1203,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1099Misc 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1379,6 +1301,238 @@ public OffsetDateTime getUpdatedAt() { } + + public Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 Form1099Misc 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 @@ -1458,16 +1612,12 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1099Misc.referenceId) && Objects.equals(this.tin, form1099Misc.tin) && Objects.equals(this.recipientName, form1099Misc.recipientName) && - Objects.equals(this.tinType, form1099Misc.tinType) && - Objects.equals(this.recipientSecondName, form1099Misc.recipientSecondName) && Objects.equals(this.address, form1099Misc.address) && Objects.equals(this.address2, form1099Misc.address2) && Objects.equals(this.city, form1099Misc.city) && Objects.equals(this.state, form1099Misc.state) && Objects.equals(this.zip, form1099Misc.zip) && Objects.equals(this.email, form1099Misc.email) && - Objects.equals(this.accountNumber, form1099Misc.accountNumber) && - Objects.equals(this.officeCode, form1099Misc.officeCode) && Objects.equals(this.nonUsProvince, form1099Misc.nonUsProvince) && Objects.equals(this.countryCode, form1099Misc.countryCode) && Objects.equals(this.federalEfileDate, form1099Misc.federalEfileDate) && @@ -1475,10 +1625,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1099Misc.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1099Misc.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1099Misc.tinMatch) && - Objects.equals(this.noTin, form1099Misc.noTin) && Objects.equals(this.addressVerification, form1099Misc.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099Misc.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1099Misc.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1099Misc.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1099Misc.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1099Misc.postalMailStatus) && @@ -1487,7 +1635,19 @@ public boolean equals(Object o) { Objects.equals(this.eDeliveryStatus, form1099Misc.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Misc.validationErrors) && Objects.equals(this.createdAt, form1099Misc.createdAt) && - Objects.equals(this.updatedAt, form1099Misc.updatedAt)&& + Objects.equals(this.updatedAt, form1099Misc.updatedAt) && + Objects.equals(this.tinType, form1099Misc.tinType) && + Objects.equals(this.businessName, form1099Misc.businessName) && + Objects.equals(this.businessName2, form1099Misc.businessName2) && + Objects.equals(this.firstName, form1099Misc.firstName) && + Objects.equals(this.middleName, form1099Misc.middleName) && + Objects.equals(this.lastName, form1099Misc.lastName) && + Objects.equals(this.suffixName, form1099Misc.suffixName) && + Objects.equals(this.recipientSecondName, form1099Misc.recipientSecondName) && + Objects.equals(this.accountNumber, form1099Misc.accountNumber) && + Objects.equals(this.officeCode, form1099Misc.officeCode) && + Objects.equals(this.noTin, form1099Misc.noTin) && + Objects.equals(this.secondTinNotice, form1099Misc.secondTinNotice)&& Objects.equals(this.additionalProperties, form1099Misc.additionalProperties); } @@ -1497,7 +1657,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, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + 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); } private static int hashCodeNullable(JsonNullable a) { @@ -1535,16 +1695,12 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1552,10 +1708,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1565,6 +1719,18 @@ public String toString() { 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(); @@ -1597,16 +1763,12 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1614,10 +1776,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1627,11 +1787,22 @@ private String toIndentedString(Object o) { 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("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -1683,16 +1854,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -1711,12 +1872,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } @@ -1775,6 +1930,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + 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 { 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 87db7e7..917401a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -183,73 +183,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -274,14 +211,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -310,10 +239,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -322,10 +247,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -362,6 +283,117 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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 Form1099Nec() { } @@ -610,63 +642,29 @@ public void setTin(String tin) { } + @Deprecated public Form1099Nec recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1099Nec tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099Nec recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - public Form1099Nec address(String address) { this.address = address; return this; @@ -781,44 +779,6 @@ public void setEmail(String email) { } - public Form1099Nec 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 Form1099Nec 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 Form1099Nec nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -952,41 +912,22 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1099Nec noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099Nec addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * No TIN indicator - * @return noTin + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getAddressVerification() { + return addressVerification; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099Nec 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 void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } @@ -1009,25 +950,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1099Nec 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1126,6 +1048,238 @@ public OffsetDateTime getUpdatedAt() { } + + public Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 Form1099Nec 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 @@ -1194,16 +1348,12 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1099Nec.referenceId) && Objects.equals(this.tin, form1099Nec.tin) && Objects.equals(this.recipientName, form1099Nec.recipientName) && - Objects.equals(this.tinType, form1099Nec.tinType) && - Objects.equals(this.recipientSecondName, form1099Nec.recipientSecondName) && Objects.equals(this.address, form1099Nec.address) && Objects.equals(this.address2, form1099Nec.address2) && Objects.equals(this.city, form1099Nec.city) && Objects.equals(this.state, form1099Nec.state) && Objects.equals(this.zip, form1099Nec.zip) && Objects.equals(this.email, form1099Nec.email) && - Objects.equals(this.accountNumber, form1099Nec.accountNumber) && - Objects.equals(this.officeCode, form1099Nec.officeCode) && Objects.equals(this.nonUsProvince, form1099Nec.nonUsProvince) && Objects.equals(this.countryCode, form1099Nec.countryCode) && Objects.equals(this.federalEfileDate, form1099Nec.federalEfileDate) && @@ -1211,10 +1361,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1099Nec.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1099Nec.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1099Nec.tinMatch) && - Objects.equals(this.noTin, form1099Nec.noTin) && Objects.equals(this.addressVerification, form1099Nec.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099Nec.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1099Nec.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1099Nec.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1099Nec.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1099Nec.postalMailStatus) && @@ -1223,7 +1371,19 @@ public boolean equals(Object o) { Objects.equals(this.eDeliveryStatus, form1099Nec.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099Nec.validationErrors) && Objects.equals(this.createdAt, form1099Nec.createdAt) && - Objects.equals(this.updatedAt, form1099Nec.updatedAt)&& + Objects.equals(this.updatedAt, form1099Nec.updatedAt) && + Objects.equals(this.tinType, form1099Nec.tinType) && + Objects.equals(this.businessName, form1099Nec.businessName) && + Objects.equals(this.businessName2, form1099Nec.businessName2) && + Objects.equals(this.firstName, form1099Nec.firstName) && + Objects.equals(this.middleName, form1099Nec.middleName) && + Objects.equals(this.lastName, form1099Nec.lastName) && + Objects.equals(this.suffixName, form1099Nec.suffixName) && + Objects.equals(this.recipientSecondName, form1099Nec.recipientSecondName) && + Objects.equals(this.accountNumber, form1099Nec.accountNumber) && + Objects.equals(this.officeCode, form1099Nec.officeCode) && + Objects.equals(this.noTin, form1099Nec.noTin) && + Objects.equals(this.secondTinNotice, form1099Nec.secondTinNotice)&& Objects.equals(this.additionalProperties, form1099Nec.additionalProperties); } @@ -1233,7 +1393,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, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + 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); } private static int hashCodeNullable(JsonNullable a) { @@ -1260,16 +1420,12 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1277,10 +1433,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1290,6 +1444,18 @@ public String toString() { 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(); @@ -1322,16 +1488,12 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1339,10 +1501,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1352,12 +1512,23 @@ private String toIndentedString(Object o) { 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("nonemployeeCompensation"); openapiRequiredFields.add("type"); - openapiRequiredFields.add("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -1409,16 +1580,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -1437,12 +1598,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } @@ -1501,6 +1656,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + 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 { 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 e5910e0..bf3bb3f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -461,73 +461,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -552,14 +489,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -588,10 +517,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -600,10 +525,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -640,6 +561,117 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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 Form1099R() { } @@ -1192,63 +1224,29 @@ public void setTin(String tin) { } + @Deprecated public Form1099R recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1099R tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099R recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - public Form1099R address(String address) { this.address = address; return this; @@ -1363,44 +1361,6 @@ public void setEmail(String email) { } - public Form1099R 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 Form1099R 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 Form1099R nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -1534,41 +1494,22 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1099R noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099R addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * No TIN indicator - * @return noTin + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getAddressVerification() { + return addressVerification; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099R 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 void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } @@ -1591,25 +1532,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1099R 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1708,6 +1630,238 @@ public OffsetDateTime getUpdatedAt() { } + + public Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 Form1099R 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 @@ -1792,16 +1946,12 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1099R.referenceId) && Objects.equals(this.tin, form1099R.tin) && Objects.equals(this.recipientName, form1099R.recipientName) && - Objects.equals(this.tinType, form1099R.tinType) && - Objects.equals(this.recipientSecondName, form1099R.recipientSecondName) && Objects.equals(this.address, form1099R.address) && Objects.equals(this.address2, form1099R.address2) && Objects.equals(this.city, form1099R.city) && Objects.equals(this.state, form1099R.state) && Objects.equals(this.zip, form1099R.zip) && Objects.equals(this.email, form1099R.email) && - Objects.equals(this.accountNumber, form1099R.accountNumber) && - Objects.equals(this.officeCode, form1099R.officeCode) && Objects.equals(this.nonUsProvince, form1099R.nonUsProvince) && Objects.equals(this.countryCode, form1099R.countryCode) && Objects.equals(this.federalEfileDate, form1099R.federalEfileDate) && @@ -1809,10 +1959,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1099R.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1099R.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1099R.tinMatch) && - Objects.equals(this.noTin, form1099R.noTin) && Objects.equals(this.addressVerification, form1099R.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099R.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1099R.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1099R.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1099R.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1099R.postalMailStatus) && @@ -1821,7 +1969,19 @@ public boolean equals(Object o) { Objects.equals(this.eDeliveryStatus, form1099R.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099R.validationErrors) && Objects.equals(this.createdAt, form1099R.createdAt) && - Objects.equals(this.updatedAt, form1099R.updatedAt)&& + Objects.equals(this.updatedAt, form1099R.updatedAt) && + Objects.equals(this.tinType, form1099R.tinType) && + Objects.equals(this.businessName, form1099R.businessName) && + Objects.equals(this.businessName2, form1099R.businessName2) && + Objects.equals(this.firstName, form1099R.firstName) && + Objects.equals(this.middleName, form1099R.middleName) && + Objects.equals(this.lastName, form1099R.lastName) && + Objects.equals(this.suffixName, form1099R.suffixName) && + Objects.equals(this.recipientSecondName, form1099R.recipientSecondName) && + Objects.equals(this.accountNumber, form1099R.accountNumber) && + Objects.equals(this.officeCode, form1099R.officeCode) && + Objects.equals(this.noTin, form1099R.noTin) && + Objects.equals(this.secondTinNotice, form1099R.secondTinNotice)&& Objects.equals(this.additionalProperties, form1099R.additionalProperties); } @@ -1831,7 +1991,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, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + 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); } private static int hashCodeNullable(JsonNullable a) { @@ -1874,16 +2034,12 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1891,10 +2047,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1904,6 +2058,18 @@ public String toString() { 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(); @@ -1936,16 +2102,12 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -1953,10 +2115,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -1966,12 +2126,23 @@ private String toIndentedString(Object o) { 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("distributionCode"); openapiRequiredFields.add("type"); - openapiRequiredFields.add("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -2044,16 +2215,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -2072,12 +2233,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } @@ -2136,6 +2291,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + 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 { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java index fd7325f..55da24d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 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 8a37e35..38efc52 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -291,73 +291,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti private String tin; public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) private String recipientName; - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - */ - @JsonAdapter(TinTypeEnum.Adapter.class) - public enum TinTypeEnum { - EIN("EIN"), - - SSN("SSN"), - - ITIN("ITIN"), - - ATIN("ATIN"); - - private String value; - - TinTypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TinTypeEnum fromValue(String value) { - for (TinTypeEnum b : TinTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - 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_RECIPIENT_SECOND_NAME = "recipientSecondName"; - @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) - private String recipientSecondName; - public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) private String address; @@ -382,14 +319,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; - public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; - @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) - private String accountNumber; - - public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; - @SerializedName(SERIALIZED_NAME_OFFICE_CODE) - private String officeCode; - public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) private String nonUsProvince; @@ -418,10 +347,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_TIN_MATCH) private Boolean tinMatch; - public static final String SERIALIZED_NAME_NO_TIN = "noTin"; - @SerializedName(SERIALIZED_NAME_NO_TIN) - private Boolean noTin; - public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) private Boolean addressVerification; @@ -430,10 +355,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) private StateAndLocalWithholding stateAndLocalWithholding; - public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; - @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) - private Boolean secondTinNotice; - public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) private Form1099StatusDetail federalEfileStatus; @@ -470,6 +391,117 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @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 Form1099W2() { } @@ -1231,63 +1263,29 @@ public void setTin(String tin) { } + @Deprecated public Form1099W2 recipientName(String recipientName) { this.recipientName = recipientName; return this; } /** - * Recipient name + * 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 Form1099W2 tinType(TinTypeEnum tinType) { - this.tinType = tinType; - return this; - } - - /** - * Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number - * @return tinType - */ - @javax.annotation.Nullable - public TinTypeEnum getTinType() { - return tinType; - } - - public void setTinType(TinTypeEnum tinType) { - this.tinType = tinType; - } - - - public Form1099W2 recipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - return this; - } - - /** - * Recipient second name - * @return recipientSecondName - */ - @javax.annotation.Nullable - public String getRecipientSecondName() { - return recipientSecondName; - } - - public void setRecipientSecondName(String recipientSecondName) { - this.recipientSecondName = recipientSecondName; - } - - public Form1099W2 address(String address) { this.address = address; return this; @@ -1402,44 +1400,6 @@ public void setEmail(String email) { } - public Form1099W2 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 Form1099W2 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 Form1099W2 nonUsProvince(String nonUsProvince) { this.nonUsProvince = nonUsProvince; return this; @@ -1573,41 +1533,22 @@ public void setTinMatch(Boolean tinMatch) { } - public Form1099W2 noTin(Boolean noTin) { - this.noTin = noTin; + public Form1099W2 addressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; return this; } /** - * No TIN indicator - * @return noTin + * Boolean indicating that address verification should be scheduled for this form + * @return addressVerification */ @javax.annotation.Nullable - public Boolean getNoTin() { - return noTin; + public Boolean getAddressVerification() { + return addressVerification; } - public void setNoTin(Boolean noTin) { - this.noTin = noTin; - } - - - public Form1099W2 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 void setAddressVerification(Boolean addressVerification) { + this.addressVerification = addressVerification; } @@ -1630,25 +1571,6 @@ public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWi } - public Form1099W2 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; - } - - /** * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) * @return federalEfileStatus @@ -1747,6 +1669,238 @@ public OffsetDateTime getUpdatedAt() { } + + public Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 Form1099W2 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 @@ -1842,16 +1996,12 @@ public boolean equals(Object o) { Objects.equals(this.referenceId, form1099W2.referenceId) && Objects.equals(this.tin, form1099W2.tin) && Objects.equals(this.recipientName, form1099W2.recipientName) && - Objects.equals(this.tinType, form1099W2.tinType) && - Objects.equals(this.recipientSecondName, form1099W2.recipientSecondName) && Objects.equals(this.address, form1099W2.address) && Objects.equals(this.address2, form1099W2.address2) && Objects.equals(this.city, form1099W2.city) && Objects.equals(this.state, form1099W2.state) && Objects.equals(this.zip, form1099W2.zip) && Objects.equals(this.email, form1099W2.email) && - Objects.equals(this.accountNumber, form1099W2.accountNumber) && - Objects.equals(this.officeCode, form1099W2.officeCode) && Objects.equals(this.nonUsProvince, form1099W2.nonUsProvince) && Objects.equals(this.countryCode, form1099W2.countryCode) && Objects.equals(this.federalEfileDate, form1099W2.federalEfileDate) && @@ -1859,10 +2009,8 @@ public boolean equals(Object o) { Objects.equals(this.stateEfileDate, form1099W2.stateEfileDate) && Objects.equals(this.recipientEdeliveryDate, form1099W2.recipientEdeliveryDate) && Objects.equals(this.tinMatch, form1099W2.tinMatch) && - Objects.equals(this.noTin, form1099W2.noTin) && Objects.equals(this.addressVerification, form1099W2.addressVerification) && Objects.equals(this.stateAndLocalWithholding, form1099W2.stateAndLocalWithholding) && - Objects.equals(this.secondTinNotice, form1099W2.secondTinNotice) && Objects.equals(this.federalEfileStatus, form1099W2.federalEfileStatus) && Objects.equals(this.stateEfileStatus, form1099W2.stateEfileStatus) && Objects.equals(this.postalMailStatus, form1099W2.postalMailStatus) && @@ -1871,7 +2019,19 @@ public boolean equals(Object o) { Objects.equals(this.eDeliveryStatus, form1099W2.eDeliveryStatus) && Objects.equals(this.validationErrors, form1099W2.validationErrors) && Objects.equals(this.createdAt, form1099W2.createdAt) && - Objects.equals(this.updatedAt, form1099W2.updatedAt)&& + Objects.equals(this.updatedAt, form1099W2.updatedAt) && + Objects.equals(this.tinType, form1099W2.tinType) && + Objects.equals(this.businessName, form1099W2.businessName) && + Objects.equals(this.businessName2, form1099W2.businessName2) && + Objects.equals(this.firstName, form1099W2.firstName) && + Objects.equals(this.middleName, form1099W2.middleName) && + Objects.equals(this.lastName, form1099W2.lastName) && + Objects.equals(this.suffixName, form1099W2.suffixName) && + Objects.equals(this.recipientSecondName, form1099W2.recipientSecondName) && + Objects.equals(this.accountNumber, form1099W2.accountNumber) && + Objects.equals(this.officeCode, form1099W2.officeCode) && + Objects.equals(this.noTin, form1099W2.noTin) && + Objects.equals(this.secondTinNotice, form1099W2.secondTinNotice)&& Objects.equals(this.additionalProperties, form1099W2.additionalProperties); } @@ -1881,7 +2041,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, wages, federalIncomeTaxWithheld, socialSecurityWages, socialSecurityTaxWithheld, medicareWages, medicareTaxWithheld, socialSecurityTips, allocatedTips, dependentCareBenefits, nonqualifiedPlansSection457, nonqualifiedPlansNotSection457, code12a, amount12a, code12b, amount12b, code12c, amount12c, code12d, amount12d, statutoryEmployeeIndicator, retirementPlanIndicator, thirdPartySickPayIndicator, thirdPartySickPayWithholding, other14a, other14b, other14c, stateAndLocalWithholdingSecondary, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, tinType, recipientSecondName, address, address2, city, state, zip, email, accountNumber, officeCode, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, noTin, addressVerification, stateAndLocalWithholding, secondTinNotice, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, additionalProperties); + return Objects.hash(employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, wages, federalIncomeTaxWithheld, socialSecurityWages, socialSecurityTaxWithheld, medicareWages, medicareTaxWithheld, socialSecurityTips, allocatedTips, dependentCareBenefits, nonqualifiedPlansSection457, nonqualifiedPlansNotSection457, code12a, amount12a, code12b, amount12b, code12c, amount12c, code12d, amount12d, statutoryEmployeeIndicator, retirementPlanIndicator, thirdPartySickPayIndicator, thirdPartySickPayWithholding, other14a, other14b, other14c, stateAndLocalWithholdingSecondary, 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) { @@ -1935,16 +2095,12 @@ public String toString() { 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(" tinType: ").append(toIndentedString(tinType)).append("\n"); - sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); @@ -1952,10 +2108,8 @@ public String toString() { 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(" noTin: ").append(toIndentedString(noTin)).append("\n"); sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); - sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).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"); @@ -1965,6 +2119,18 @@ public String toString() { 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(); @@ -1997,16 +2163,12 @@ private String toIndentedString(Object o) { openapiFields.add("referenceId"); openapiFields.add("tin"); openapiFields.add("recipientName"); - openapiFields.add("tinType"); - openapiFields.add("recipientSecondName"); openapiFields.add("address"); openapiFields.add("address2"); openapiFields.add("city"); openapiFields.add("state"); openapiFields.add("zip"); openapiFields.add("email"); - openapiFields.add("accountNumber"); - openapiFields.add("officeCode"); openapiFields.add("nonUsProvince"); openapiFields.add("countryCode"); openapiFields.add("federalEfileDate"); @@ -2014,10 +2176,8 @@ private String toIndentedString(Object o) { openapiFields.add("stateEfileDate"); openapiFields.add("recipientEdeliveryDate"); openapiFields.add("tinMatch"); - openapiFields.add("noTin"); openapiFields.add("addressVerification"); openapiFields.add("stateAndLocalWithholding"); - openapiFields.add("secondTinNotice"); openapiFields.add("federalEfileStatus"); openapiFields.add("stateEfileStatus"); openapiFields.add("postalMailStatus"); @@ -2027,11 +2187,22 @@ private String toIndentedString(Object o) { 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("recipientName"); openapiRequiredFields.add("address"); openapiRequiredFields.add("city"); openapiRequiredFields.add("countryCode"); @@ -2120,16 +2291,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); } - if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); - } - // validate the optional field `tinType` - if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { - TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); - } - if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); - } if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); } @@ -2148,12 +2309,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } - if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); - } - if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); - } if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); } @@ -2212,6 +2367,40 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti }; } } + 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 { 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 1504bce..393b06e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/GetIssuer200Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/GetIssuer200Response.java new file mode 100644 index 0000000..5b5822f --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/GetIssuer200Response.java @@ -0,0 +1,285 @@ +/* + * 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.IssuerResponse; +import Avalara.SDK.model.A1099.V2.IssuerWriteResponse; +import Avalara.SDK.model.A1099.V2.ValidationError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import Avalara.SDK.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class GetIssuer200Response extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(GetIssuer200Response.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetIssuer200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetIssuer200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterIssuerResponse = gson.getDelegateAdapter(this, TypeToken.get(IssuerResponse.class)); + final TypeAdapter adapterIssuerWriteResponse = gson.getDelegateAdapter(this, TypeToken.get(IssuerWriteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetIssuer200Response value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `IssuerResponse` + if (value.getActualInstance() instanceof IssuerResponse) { + JsonElement element = adapterIssuerResponse.toJsonTree((IssuerResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `IssuerWriteResponse` + if (value.getActualInstance() instanceof IssuerWriteResponse) { + JsonElement element = adapterIssuerWriteResponse.toJsonTree((IssuerWriteResponse)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: IssuerResponse, IssuerWriteResponse"); + } + + @Override + public GetIssuer200Response read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize IssuerResponse + try { + // validate the JSON object to see if any exception is thrown + IssuerResponse.validateJsonElement(jsonElement); + actualAdapter = adapterIssuerResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'IssuerResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for IssuerResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'IssuerResponse'", e); + } + // deserialize IssuerWriteResponse + try { + // validate the JSON object to see if any exception is thrown + IssuerWriteResponse.validateJsonElement(jsonElement); + actualAdapter = adapterIssuerWriteResponse; + match++; + log.log(Level.FINER, "Input data matches schema 'IssuerWriteResponse'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for IssuerWriteResponse failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'IssuerWriteResponse'", e); + } + + if (match == 1) { + GetIssuer200Response ret = new GetIssuer200Response(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException(String.format("Failed deserialization for GetIssuer200Response: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public GetIssuer200Response() { + super("oneOf", Boolean.FALSE); + } + + public GetIssuer200Response(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("IssuerResponse", IssuerResponse.class); + schemas.put("IssuerWriteResponse", IssuerWriteResponse.class); + } + + @Override + public Map> getSchemas() { + return GetIssuer200Response.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * IssuerResponse, IssuerWriteResponse + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof IssuerResponse) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof IssuerWriteResponse) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be IssuerResponse, IssuerWriteResponse"); + } + + /** + * Get the actual instance, which can be the following: + * IssuerResponse, IssuerWriteResponse + * + * @return The actual instance (IssuerResponse, IssuerWriteResponse) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `IssuerResponse`. If the actual instance is not `IssuerResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IssuerResponse` + * @throws ClassCastException if the instance is not `IssuerResponse` + */ + public IssuerResponse getIssuerResponse() throws ClassCastException { + return (IssuerResponse)super.getActualInstance(); + } + /** + * Get the actual instance of `IssuerWriteResponse`. If the actual instance is not `IssuerWriteResponse`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `IssuerWriteResponse` + * @throws ClassCastException if the instance is not `IssuerWriteResponse` + */ + public IssuerWriteResponse getIssuerWriteResponse() throws ClassCastException { + return (IssuerWriteResponse)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetIssuer200Response + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with IssuerResponse + try { + IssuerResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for IssuerResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with IssuerWriteResponse + try { + IssuerWriteResponse.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for IssuerWriteResponse failed with `%s`.", e.getMessage())); + // continue to the next one + } + if (validCount != 1) { + throw new IOException(String.format("The JSON string is invalid for GetIssuer200Response with oneOf schemas: IssuerResponse, IssuerWriteResponse. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + } + } + + /** + * Create an instance of GetIssuer200Response given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetIssuer200Response + * @throws IOException if the JSON string is invalid with respect to GetIssuer200Response + */ + public static GetIssuer200Response fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetIssuer200Response.class); + } + + /** + * Convert an instance of GetIssuer200Response 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/IntermediaryOrFlowThrough.java b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java index 8fdd444..466554b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java new file mode 100644 index 0000000..098f5d7 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java @@ -0,0 +1,1605 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * IrisFormBase + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class IrisFormBase { + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1099_DIV("1099-DIV"), + + _1099_INT("1099-INT"), + + _1099_K("1099-K"), + + _1099_MISC("1099-MISC"), + + _1099_NEC("1099-NEC"), + + _1099_R("1099-R"), + + W_2("W-2"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private TypeEnum type; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_ISSUER_ID = "issuerId"; + @SerializedName(SERIALIZED_NAME_ISSUER_ID) + private String issuerId; + + public static final String SERIALIZED_NAME_ISSUER_REFERENCE_ID = "issuerReferenceId"; + @SerializedName(SERIALIZED_NAME_ISSUER_REFERENCE_ID) + private String issuerReferenceId; + + public static final String SERIALIZED_NAME_ISSUER_TIN = "issuerTin"; + @SerializedName(SERIALIZED_NAME_ISSUER_TIN) + private String issuerTin; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @SerializedName(SERIALIZED_NAME_TAX_YEAR) + private Integer taxYear; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_RECIPIENT_NAME = "recipientName"; + @Deprecated + @SerializedName(SERIALIZED_NAME_RECIPIENT_NAME) + private String recipientName; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_ADDRESS2 = "address2"; + @SerializedName(SERIALIZED_NAME_ADDRESS2) + private String address2; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_NON_US_PROVINCE = "nonUsProvince"; + @SerializedName(SERIALIZED_NAME_NON_US_PROVINCE) + private String nonUsProvince; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_DATE = "federalEfileDate"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_DATE) + private LocalDate federalEfileDate; + + public static final String SERIALIZED_NAME_POSTAL_MAIL = "postalMail"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL) + private Boolean postalMail; + + public static final String SERIALIZED_NAME_STATE_EFILE_DATE = "stateEfileDate"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_DATE) + private LocalDate stateEfileDate; + + public static final String SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE = "recipientEdeliveryDate"; + @SerializedName(SERIALIZED_NAME_RECIPIENT_EDELIVERY_DATE) + private LocalDate recipientEdeliveryDate; + + public static final String SERIALIZED_NAME_TIN_MATCH = "tinMatch"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH) + private Boolean tinMatch; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION = "addressVerification"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION) + private Boolean addressVerification; + + public static final String SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING = "stateAndLocalWithholding"; + @SerializedName(SERIALIZED_NAME_STATE_AND_LOCAL_WITHHOLDING) + private StateAndLocalWithholding stateAndLocalWithholding; + + public static final String SERIALIZED_NAME_FEDERAL_EFILE_STATUS = "federalEfileStatus"; + @SerializedName(SERIALIZED_NAME_FEDERAL_EFILE_STATUS) + private Form1099StatusDetail federalEfileStatus; + + public static final String SERIALIZED_NAME_STATE_EFILE_STATUS = "stateEfileStatus"; + @SerializedName(SERIALIZED_NAME_STATE_EFILE_STATUS) + private List stateEfileStatus; + + public static final String SERIALIZED_NAME_POSTAL_MAIL_STATUS = "postalMailStatus"; + @SerializedName(SERIALIZED_NAME_POSTAL_MAIL_STATUS) + private Form1099StatusDetail postalMailStatus; + + public static final String SERIALIZED_NAME_TIN_MATCH_STATUS = "tinMatchStatus"; + @SerializedName(SERIALIZED_NAME_TIN_MATCH_STATUS) + private Form1099StatusDetail tinMatchStatus; + + public static final String SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS = "addressVerificationStatus"; + @SerializedName(SERIALIZED_NAME_ADDRESS_VERIFICATION_STATUS) + private Form1099StatusDetail addressVerificationStatus; + + public static final String SERIALIZED_NAME_E_DELIVERY_STATUS = "eDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_STATUS) + private Form1099StatusDetail eDeliveryStatus; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + /** + * Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + EIN("EIN"), + + SSN("SSN"), + + ITIN("ITIN"), + + ATIN("ATIN"), + + INDIVIDUAL("INDIVIDUAL"), + + BUSINESS("BUSINESS"), + + UNKNOWN("UNKNOWN"); + + private String value; + + TinTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TinTypeEnum fromValue(String value) { + for (TinTypeEnum b : TinTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; + @SerializedName(SERIALIZED_NAME_TIN_TYPE) + private TinTypeEnum tinType; + + public static final String SERIALIZED_NAME_BUSINESS_NAME = "businessName"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME) + private String businessName; + + public static final String SERIALIZED_NAME_BUSINESS_NAME2 = "businessName2"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME2) + private String businessName2; + + public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; + @SerializedName(SERIALIZED_NAME_FIRST_NAME) + private String firstName; + + public static final String SERIALIZED_NAME_MIDDLE_NAME = "middleName"; + @SerializedName(SERIALIZED_NAME_MIDDLE_NAME) + private String middleName; + + public static final String SERIALIZED_NAME_LAST_NAME = "lastName"; + @SerializedName(SERIALIZED_NAME_LAST_NAME) + private String lastName; + + public static final String SERIALIZED_NAME_SUFFIX_NAME = "suffixName"; + @SerializedName(SERIALIZED_NAME_SUFFIX_NAME) + private String suffixName; + + public static final String SERIALIZED_NAME_RECIPIENT_SECOND_NAME = "recipientSecondName"; + @Deprecated + @SerializedName(SERIALIZED_NAME_RECIPIENT_SECOND_NAME) + private String recipientSecondName; + + public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "accountNumber"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER) + private String accountNumber; + + public static final String SERIALIZED_NAME_OFFICE_CODE = "officeCode"; + @SerializedName(SERIALIZED_NAME_OFFICE_CODE) + private String officeCode; + + public static final String SERIALIZED_NAME_NO_TIN = "noTin"; + @SerializedName(SERIALIZED_NAME_NO_TIN) + private Boolean noTin; + + public static final String SERIALIZED_NAME_SECOND_TIN_NOTICE = "secondTinNotice"; + @SerializedName(SERIALIZED_NAME_SECOND_TIN_NOTICE) + private Boolean secondTinNotice; + + public IrisFormBase() { + } + + public IrisFormBase( + String id, + Form1099StatusDetail federalEfileStatus, + List stateEfileStatus, + Form1099StatusDetail postalMailStatus, + Form1099StatusDetail tinMatchStatus, + Form1099StatusDetail addressVerificationStatus, + Form1099StatusDetail eDeliveryStatus, + List validationErrors, + OffsetDateTime createdAt, + OffsetDateTime updatedAt + ) { + this(); + this.id = id; + this.federalEfileStatus = federalEfileStatus; + this.stateEfileStatus = stateEfileStatus; + this.postalMailStatus = postalMailStatus; + this.tinMatchStatus = tinMatchStatus; + this.addressVerificationStatus = addressVerificationStatus; + this.eDeliveryStatus = eDeliveryStatus; + this.validationErrors = validationErrors; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + + public IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase stateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + return this; + } + + /** + * State and local withholding information + * @return stateAndLocalWithholding + */ + @javax.annotation.Nullable + public StateAndLocalWithholding getStateAndLocalWithholding() { + return stateAndLocalWithholding; + } + + public void setStateAndLocalWithholding(StateAndLocalWithholding stateAndLocalWithholding) { + this.stateAndLocalWithholding = stateAndLocalWithholding; + } + + + /** + * Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) + * @return federalEfileStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getFederalEfileStatus() { + return federalEfileStatus; + } + + + + /** + * State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state + * @return stateEfileStatus + */ + @javax.annotation.Nullable + public List getStateEfileStatus() { + return stateEfileStatus; + } + + + + /** + * Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered + * @return postalMailStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getPostalMailStatus() { + return postalMailStatus; + } + + + + /** + * TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued + * @return tinMatchStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getTinMatchStatus() { + return tinMatchStatus; + } + + + + /** + * Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted + * @return addressVerificationStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail getAddressVerificationStatus() { + return addressVerificationStatus; + } + + + + /** + * EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) + * @return eDeliveryStatus + */ + @javax.annotation.Nullable + public Form1099StatusDetail geteDeliveryStatus() { + return eDeliveryStatus; + } + + + + /** + * Validation errors + * @return validationErrors + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + + + /** + * Date time when the record was created. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + + + /** + * Date time when the record was last updated. + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + + + public IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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 IrisFormBase 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IrisFormBase irisFormBase = (IrisFormBase) o; + return Objects.equals(this.type, irisFormBase.type) && + Objects.equals(this.id, irisFormBase.id) && + Objects.equals(this.issuerId, irisFormBase.issuerId) && + Objects.equals(this.issuerReferenceId, irisFormBase.issuerReferenceId) && + Objects.equals(this.issuerTin, irisFormBase.issuerTin) && + Objects.equals(this.taxYear, irisFormBase.taxYear) && + Objects.equals(this.referenceId, irisFormBase.referenceId) && + Objects.equals(this.tin, irisFormBase.tin) && + Objects.equals(this.recipientName, irisFormBase.recipientName) && + Objects.equals(this.address, irisFormBase.address) && + Objects.equals(this.address2, irisFormBase.address2) && + Objects.equals(this.city, irisFormBase.city) && + Objects.equals(this.state, irisFormBase.state) && + Objects.equals(this.zip, irisFormBase.zip) && + Objects.equals(this.email, irisFormBase.email) && + Objects.equals(this.nonUsProvince, irisFormBase.nonUsProvince) && + Objects.equals(this.countryCode, irisFormBase.countryCode) && + Objects.equals(this.federalEfileDate, irisFormBase.federalEfileDate) && + Objects.equals(this.postalMail, irisFormBase.postalMail) && + Objects.equals(this.stateEfileDate, irisFormBase.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, irisFormBase.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, irisFormBase.tinMatch) && + Objects.equals(this.addressVerification, irisFormBase.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, irisFormBase.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, irisFormBase.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, irisFormBase.stateEfileStatus) && + Objects.equals(this.postalMailStatus, irisFormBase.postalMailStatus) && + Objects.equals(this.tinMatchStatus, irisFormBase.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, irisFormBase.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, irisFormBase.eDeliveryStatus) && + Objects.equals(this.validationErrors, irisFormBase.validationErrors) && + Objects.equals(this.createdAt, irisFormBase.createdAt) && + Objects.equals(this.updatedAt, irisFormBase.updatedAt) && + Objects.equals(this.tinType, irisFormBase.tinType) && + Objects.equals(this.businessName, irisFormBase.businessName) && + Objects.equals(this.businessName2, irisFormBase.businessName2) && + Objects.equals(this.firstName, irisFormBase.firstName) && + Objects.equals(this.middleName, irisFormBase.middleName) && + Objects.equals(this.lastName, irisFormBase.lastName) && + Objects.equals(this.suffixName, irisFormBase.suffixName) && + Objects.equals(this.recipientSecondName, irisFormBase.recipientSecondName) && + Objects.equals(this.accountNumber, irisFormBase.accountNumber) && + Objects.equals(this.officeCode, irisFormBase.officeCode) && + Objects.equals(this.noTin, irisFormBase.noTin) && + Objects.equals(this.secondTinNotice, irisFormBase.secondTinNotice); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(type, 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); + } + + 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 IrisFormBase {\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("}"); + 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 IrisFormBase + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IrisFormBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in IrisFormBase is not found in the empty JSON string", IrisFormBase.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!IrisFormBase.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IrisFormBase` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : IrisFormBase.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("federalEfileStatus")); + } + if (jsonObj.get("stateEfileStatus") != null && !jsonObj.get("stateEfileStatus").isJsonNull()) { + JsonArray jsonArraystateEfileStatus = jsonObj.getAsJsonArray("stateEfileStatus"); + if (jsonArraystateEfileStatus != null) { + // ensure the json data is an array + if (!jsonObj.get("stateEfileStatus").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `stateEfileStatus` to be an array in the JSON string but got `%s`", jsonObj.get("stateEfileStatus").toString())); + } + + // validate the optional field `stateEfileStatus` (array) + for (int i = 0; i < jsonArraystateEfileStatus.size(); i++) { + StateEfileStatusDetail.validateJsonElement(jsonArraystateEfileStatus.get(i)); + }; + } + } + // validate the optional field `postalMailStatus` + if (jsonObj.get("postalMailStatus") != null && !jsonObj.get("postalMailStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("postalMailStatus")); + } + // validate the optional field `tinMatchStatus` + if (jsonObj.get("tinMatchStatus") != null && !jsonObj.get("tinMatchStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("tinMatchStatus")); + } + // validate the optional field `addressVerificationStatus` + if (jsonObj.get("addressVerificationStatus") != null && !jsonObj.get("addressVerificationStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("addressVerificationStatus")); + } + // validate the optional field `eDeliveryStatus` + if (jsonObj.get("eDeliveryStatus") != null && !jsonObj.get("eDeliveryStatus").isJsonNull()) { + Form1099StatusDetail.validateJsonElement(jsonObj.get("eDeliveryStatus")); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationError.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + if ((jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) && !jsonObj.get("tinType").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tinType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tinType").toString())); + } + // validate the optional field `tinType` + if (jsonObj.get("tinType") != null && !jsonObj.get("tinType").isJsonNull()) { + TinTypeEnum.validateJsonElement(jsonObj.get("tinType")); + } + if ((jsonObj.get("businessName") != null && !jsonObj.get("businessName").isJsonNull()) && !jsonObj.get("businessName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessName").toString())); + } + if ((jsonObj.get("businessName2") != null && !jsonObj.get("businessName2").isJsonNull()) && !jsonObj.get("businessName2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessName2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessName2").toString())); + } + if ((jsonObj.get("firstName") != null && !jsonObj.get("firstName").isJsonNull()) && !jsonObj.get("firstName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + } + if ((jsonObj.get("middleName") != null && !jsonObj.get("middleName").isJsonNull()) && !jsonObj.get("middleName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `middleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("middleName").toString())); + } + if ((jsonObj.get("lastName") != null && !jsonObj.get("lastName").isJsonNull()) && !jsonObj.get("lastName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + } + if ((jsonObj.get("suffixName") != null && !jsonObj.get("suffixName").isJsonNull()) && !jsonObj.get("suffixName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffixName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffixName").toString())); + } + if ((jsonObj.get("recipientSecondName") != null && !jsonObj.get("recipientSecondName").isJsonNull()) && !jsonObj.get("recipientSecondName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientSecondName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientSecondName").toString())); + } + if ((jsonObj.get("accountNumber") != null && !jsonObj.get("accountNumber").isJsonNull()) && !jsonObj.get("accountNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountNumber").toString())); + } + if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IrisFormBase.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IrisFormBase' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IrisFormBase.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IrisFormBase value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IrisFormBase read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of IrisFormBase given an JSON string + * + * @param jsonString JSON string + * @return An instance of IrisFormBase + * @throws IOException if the JSON string is invalid with respect to IrisFormBase + */ + public static IrisFormBase fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IrisFormBase.class); + } + + /** + * Convert an instance of IrisFormBase 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/IrsResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/IrsResponse.java index b9a7621..63a0f14 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IrsResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IrsResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerBase.java index bd41590..d59a7e7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerBase.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -58,14 +58,98 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class IssuerBase { + 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_NAME = "name"; + @Deprecated @SerializedName(SERIALIZED_NAME_NAME) private String name; public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; + @Deprecated @SerializedName(SERIALIZED_NAME_DBA_NAME) private String dbaName; + /** + * 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 { + UNKNOWN("UNKNOWN"), + + INDIVIDUAL("INDIVIDUAL"), + + BUSINESS("BUSINESS"); + + 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_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 = "suffix"; + @SerializedName(SERIALIZED_NAME_SUFFIX) + private String suffix; + public static final String SERIALIZED_NAME_TIN = "tin"; @SerializedName(SERIALIZED_NAME_TIN) private String tin; @@ -121,44 +205,185 @@ public class IssuerBase { public IssuerBase() { } + public IssuerBase 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 IssuerBase businessName2(String businessName2) { + this.businessName2 = businessName2; + return this; + } + + /** + * Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. + * @return businessName2 + */ + @javax.annotation.Nullable + public String getBusinessName2() { + return businessName2; + } + + public void setBusinessName2(String businessName2) { + this.businessName2 = businessName2; + } + + + @Deprecated public IssuerBase name(String name) { this.name = name; return this; } /** - * Legal name. Not the DBA name. + * Legal name. Not the DBA name. Deprecated alias for 'businessName'. * @return name + * @deprecated */ + @Deprecated @javax.annotation.Nullable public String getName() { return name; } + @Deprecated public void setName(String name) { this.name = name; } + @Deprecated public IssuerBase dbaName(String dbaName) { this.dbaName = dbaName; return this; } /** - * Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. + * Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. * @return dbaName + * @deprecated */ + @Deprecated @javax.annotation.Nullable public String getDbaName() { return dbaName; } + @Deprecated public void setDbaName(String dbaName) { this.dbaName = dbaName; } + public IssuerBase 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 IssuerBase 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 IssuerBase 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 IssuerBase 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 IssuerBase suffix(String suffix) { + this.suffix = suffix; + return this; + } + + /** + * Suffix name. Should only be used for individuals. + * @return suffix + */ + @javax.annotation.Nullable + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + public IssuerBase tin(String tin) { this.tin = tin; return this; @@ -416,8 +641,15 @@ public boolean equals(Object o) { return false; } IssuerBase issuerBase = (IssuerBase) o; - return Objects.equals(this.name, issuerBase.name) && + return Objects.equals(this.businessName, issuerBase.businessName) && + Objects.equals(this.businessName2, issuerBase.businessName2) && + Objects.equals(this.name, issuerBase.name) && Objects.equals(this.dbaName, issuerBase.dbaName) && + Objects.equals(this.tinType, issuerBase.tinType) && + Objects.equals(this.firstName, issuerBase.firstName) && + Objects.equals(this.middleName, issuerBase.middleName) && + Objects.equals(this.lastName, issuerBase.lastName) && + Objects.equals(this.suffix, issuerBase.suffix) && Objects.equals(this.tin, issuerBase.tin) && Objects.equals(this.referenceId, issuerBase.referenceId) && Objects.equals(this.telephone, issuerBase.telephone) && @@ -439,7 +671,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, dbaName, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling); + 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); } private static int hashCodeNullable(JsonNullable a) { @@ -453,8 +685,15 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IssuerBase {\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).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(" suffix: ").append(toIndentedString(suffix)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); @@ -490,8 +729,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); openapiFields.add("name"); openapiFields.add("dbaName"); + openapiFields.add("tinType"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffix"); openapiFields.add("tin"); openapiFields.add("referenceId"); openapiFields.add("telephone"); @@ -508,7 +754,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); + openapiRequiredFields.add("businessName"); openapiRequiredFields.add("telephone"); openapiRequiredFields.add("taxYear"); openapiRequiredFields.add("countryCode"); @@ -547,12 +793,37 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + 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("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); } + if ((jsonObj.get("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("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("suffix") != null && !jsonObj.get("suffix").isJsonNull()) && !jsonObj.get("suffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffix").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())); } diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java index 89b42d6..d73925e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -58,14 +58,98 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class IssuerRequest { + 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_NAME = "name"; + @Deprecated @SerializedName(SERIALIZED_NAME_NAME) private String name; public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; + @Deprecated @SerializedName(SERIALIZED_NAME_DBA_NAME) private String dbaName; + /** + * 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 { + UNKNOWN("UNKNOWN"), + + INDIVIDUAL("INDIVIDUAL"), + + BUSINESS("BUSINESS"); + + 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_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 = "suffix"; + @SerializedName(SERIALIZED_NAME_SUFFIX) + private String suffix; + public static final String SERIALIZED_NAME_TIN = "tin"; @SerializedName(SERIALIZED_NAME_TIN) private String tin; @@ -121,44 +205,185 @@ public class IssuerRequest { public IssuerRequest() { } + public IssuerRequest 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 IssuerRequest businessName2(String businessName2) { + this.businessName2 = businessName2; + return this; + } + + /** + * Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. + * @return businessName2 + */ + @javax.annotation.Nullable + public String getBusinessName2() { + return businessName2; + } + + public void setBusinessName2(String businessName2) { + this.businessName2 = businessName2; + } + + + @Deprecated public IssuerRequest name(String name) { this.name = name; return this; } /** - * Legal name. Not the DBA name. + * Legal name. Not the DBA name. Deprecated alias for 'businessName'. * @return name + * @deprecated */ + @Deprecated @javax.annotation.Nullable public String getName() { return name; } + @Deprecated public void setName(String name) { this.name = name; } + @Deprecated public IssuerRequest dbaName(String dbaName) { this.dbaName = dbaName; return this; } /** - * Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. + * Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. * @return dbaName + * @deprecated */ + @Deprecated @javax.annotation.Nullable public String getDbaName() { return dbaName; } + @Deprecated public void setDbaName(String dbaName) { this.dbaName = dbaName; } + public IssuerRequest 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 IssuerRequest 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 IssuerRequest 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 IssuerRequest 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 IssuerRequest suffix(String suffix) { + this.suffix = suffix; + return this; + } + + /** + * Suffix name. Should only be used for individuals. + * @return suffix + */ + @javax.annotation.Nullable + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + public IssuerRequest tin(String tin) { this.tin = tin; return this; @@ -416,8 +641,15 @@ public boolean equals(Object o) { return false; } IssuerRequest issuerRequest = (IssuerRequest) o; - return Objects.equals(this.name, issuerRequest.name) && + return Objects.equals(this.businessName, issuerRequest.businessName) && + Objects.equals(this.businessName2, issuerRequest.businessName2) && + Objects.equals(this.name, issuerRequest.name) && Objects.equals(this.dbaName, issuerRequest.dbaName) && + Objects.equals(this.tinType, issuerRequest.tinType) && + Objects.equals(this.firstName, issuerRequest.firstName) && + Objects.equals(this.middleName, issuerRequest.middleName) && + Objects.equals(this.lastName, issuerRequest.lastName) && + Objects.equals(this.suffix, issuerRequest.suffix) && Objects.equals(this.tin, issuerRequest.tin) && Objects.equals(this.referenceId, issuerRequest.referenceId) && Objects.equals(this.telephone, issuerRequest.telephone) && @@ -439,7 +671,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, dbaName, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling); + 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); } private static int hashCodeNullable(JsonNullable a) { @@ -453,8 +685,15 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IssuerRequest {\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).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(" suffix: ").append(toIndentedString(suffix)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); @@ -490,8 +729,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); openapiFields.add("name"); openapiFields.add("dbaName"); + openapiFields.add("tinType"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffix"); openapiFields.add("tin"); openapiFields.add("referenceId"); openapiFields.add("telephone"); @@ -508,7 +754,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); + openapiRequiredFields.add("businessName"); openapiRequiredFields.add("telephone"); openapiRequiredFields.add("taxYear"); openapiRequiredFields.add("countryCode"); @@ -547,12 +793,37 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + 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("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); } + if ((jsonObj.get("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("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("suffix") != null && !jsonObj.get("suffix").isJsonNull()) && !jsonObj.get("suffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffix").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())); } 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 c847cdd..95e0c7b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -59,26 +59,98 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class IssuerResponse { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_BUSINESS_NAME = "businessName"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME) + private String businessName; - public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; - @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_BUSINESS_NAME2 = "businessName2"; + @SerializedName(SERIALIZED_NAME_BUSINESS_NAME2) + private String businessName2; public static final String SERIALIZED_NAME_NAME = "name"; + @Deprecated @SerializedName(SERIALIZED_NAME_NAME) private String name; public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; + @Deprecated @SerializedName(SERIALIZED_NAME_DBA_NAME) private String dbaName; + /** + * 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 { + UNKNOWN("UNKNOWN"), + + INDIVIDUAL("INDIVIDUAL"), + + BUSINESS("BUSINESS"); + + 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_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 = "suffix"; + @SerializedName(SERIALIZED_NAME_SUFFIX) + private String suffix; + public static final String SERIALIZED_NAME_TIN = "tin"; @SerializedName(SERIALIZED_NAME_TIN) private String tin; @@ -131,104 +203,200 @@ public class IssuerResponse { @SerializedName(SERIALIZED_NAME_LAST_FILING) private Boolean lastFiling; - public IssuerResponse() { - } + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; - public IssuerResponse id(String id) { - this.id = id; - return this; - } + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; - /** - * Unique identifier set when the record is created. - * @return id - */ - @javax.annotation.Nullable - public String getId() { - return id; - } + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; - public void setId(String id) { - this.id = id; + public IssuerResponse() { } - - public IssuerResponse createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; + public IssuerResponse businessName(String businessName) { + this.businessName = businessName; return this; } /** - * Date time when the record was created. - * @return createdAt + * Business name. Required when the recipient of the form is a business; should only be used for businesses. + * @return businessName */ @javax.annotation.Nullable - public OffsetDateTime getCreatedAt() { - return createdAt; + public String getBusinessName() { + return businessName; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; + public void setBusinessName(String businessName) { + this.businessName = businessName; } - public IssuerResponse updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; + public IssuerResponse businessName2(String businessName2) { + this.businessName2 = businessName2; return this; } /** - * Date time when the record was last updated. - * @return updatedAt + * Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. + * @return businessName2 */ @javax.annotation.Nullable - public OffsetDateTime getUpdatedAt() { - return updatedAt; + public String getBusinessName2() { + return businessName2; } - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; + public void setBusinessName2(String businessName2) { + this.businessName2 = businessName2; } + @Deprecated public IssuerResponse name(String name) { this.name = name; return this; } /** - * Legal name. Not the DBA name. + * Legal name. Not the DBA name. Deprecated alias for 'businessName'. * @return name + * @deprecated */ + @Deprecated @javax.annotation.Nullable public String getName() { return name; } + @Deprecated public void setName(String name) { this.name = name; } + @Deprecated public IssuerResponse dbaName(String dbaName) { this.dbaName = dbaName; return this; } /** - * Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'. + * Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. * @return dbaName + * @deprecated */ + @Deprecated @javax.annotation.Nullable public String getDbaName() { return dbaName; } + @Deprecated public void setDbaName(String dbaName) { this.dbaName = dbaName; } + public IssuerResponse 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 IssuerResponse 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 IssuerResponse 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 IssuerResponse 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 IssuerResponse suffix(String suffix) { + this.suffix = suffix; + return this; + } + + /** + * Suffix name. Should only be used for individuals. + * @return suffix + */ + @javax.annotation.Nullable + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + public IssuerResponse tin(String tin) { this.tin = tin; return this; @@ -476,6 +644,63 @@ public void setLastFiling(Boolean lastFiling) { } + public IssuerResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public IssuerResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Date time when the record was created. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public IssuerResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Date time when the record was last updated. + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + @Override public boolean equals(Object o) { @@ -486,11 +711,15 @@ public boolean equals(Object o) { return false; } IssuerResponse issuerResponse = (IssuerResponse) o; - return Objects.equals(this.id, issuerResponse.id) && - Objects.equals(this.createdAt, issuerResponse.createdAt) && - Objects.equals(this.updatedAt, issuerResponse.updatedAt) && + return Objects.equals(this.businessName, issuerResponse.businessName) && + Objects.equals(this.businessName2, issuerResponse.businessName2) && Objects.equals(this.name, issuerResponse.name) && Objects.equals(this.dbaName, issuerResponse.dbaName) && + Objects.equals(this.tinType, issuerResponse.tinType) && + Objects.equals(this.firstName, issuerResponse.firstName) && + Objects.equals(this.middleName, issuerResponse.middleName) && + Objects.equals(this.lastName, issuerResponse.lastName) && + Objects.equals(this.suffix, issuerResponse.suffix) && Objects.equals(this.tin, issuerResponse.tin) && Objects.equals(this.referenceId, issuerResponse.referenceId) && Objects.equals(this.telephone, issuerResponse.telephone) && @@ -503,7 +732,10 @@ public boolean equals(Object o) { Objects.equals(this.zip, issuerResponse.zip) && Objects.equals(this.foreignProvince, issuerResponse.foreignProvince) && Objects.equals(this.transferAgentName, issuerResponse.transferAgentName) && - Objects.equals(this.lastFiling, issuerResponse.lastFiling); + Objects.equals(this.lastFiling, issuerResponse.lastFiling) && + Objects.equals(this.id, issuerResponse.id) && + Objects.equals(this.createdAt, issuerResponse.createdAt) && + Objects.equals(this.updatedAt, issuerResponse.updatedAt); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -512,7 +744,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, createdAt, updatedAt, name, dbaName, tin, referenceId, telephone, taxYear, countryCode, email, address, city, state, zip, foreignProvince, transferAgentName, lastFiling); + 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); } private static int hashCodeNullable(JsonNullable a) { @@ -526,11 +758,15 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IssuerResponse {\n"); - 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(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).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(" suffix: ").append(toIndentedString(suffix)).append("\n"); sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); @@ -544,6 +780,9 @@ public String toString() { sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); sb.append(" transferAgentName: ").append(toIndentedString(transferAgentName)).append("\n"); sb.append(" lastFiling: ").append(toIndentedString(lastFiling)).append("\n"); + 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("}"); return sb.toString(); } @@ -566,8 +805,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); openapiFields.add("name"); openapiFields.add("dbaName"); + openapiFields.add("tinType"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffix"); openapiFields.add("tin"); openapiFields.add("referenceId"); openapiFields.add("telephone"); @@ -581,10 +827,13 @@ private String toIndentedString(Object o) { openapiFields.add("foreignProvince"); openapiFields.add("transferAgentName"); openapiFields.add("lastFiling"); + openapiFields.add("id"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); + openapiRequiredFields.add("businessName"); openapiRequiredFields.add("telephone"); openapiRequiredFields.add("taxYear"); openapiRequiredFields.add("countryCode"); @@ -623,8 +872,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + if ((jsonObj.get("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("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())); @@ -632,6 +884,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); } + if ((jsonObj.get("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("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("suffix") != null && !jsonObj.get("suffix").isJsonNull()) && !jsonObj.get("suffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffix").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())); } @@ -665,6 +936,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("transferAgentName") != null && !jsonObj.get("transferAgentName").isJsonNull()) && !jsonObj.get("transferAgentName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `transferAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferAgentName").toString())); } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } } 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 new file mode 100644 index 0000000..065967a --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java @@ -0,0 +1,1035 @@ +/* + * 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.ValidationError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * IssuerWriteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class IssuerWriteResponse { + 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_NAME = "name"; + @Deprecated + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DBA_NAME = "dbaName"; + @Deprecated + @SerializedName(SERIALIZED_NAME_DBA_NAME) + private String dbaName; + + /** + * 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 { + UNKNOWN("UNKNOWN"), + + INDIVIDUAL("INDIVIDUAL"), + + BUSINESS("BUSINESS"); + + 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_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 = "suffix"; + @SerializedName(SERIALIZED_NAME_SUFFIX) + private String suffix; + + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public static final String SERIALIZED_NAME_TELEPHONE = "telephone"; + @SerializedName(SERIALIZED_NAME_TELEPHONE) + private String telephone; + + public static final String SERIALIZED_NAME_TAX_YEAR = "taxYear"; + @SerializedName(SERIALIZED_NAME_TAX_YEAR) + private Integer taxYear; + + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + private String countryCode; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_ADDRESS = "address"; + @SerializedName(SERIALIZED_NAME_ADDRESS) + private String address; + + public static final String SERIALIZED_NAME_CITY = "city"; + @SerializedName(SERIALIZED_NAME_CITY) + private String city; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_ZIP = "zip"; + @SerializedName(SERIALIZED_NAME_ZIP) + private String zip; + + public static final String SERIALIZED_NAME_FOREIGN_PROVINCE = "foreignProvince"; + @SerializedName(SERIALIZED_NAME_FOREIGN_PROVINCE) + private String foreignProvince; + + public static final String SERIALIZED_NAME_TRANSFER_AGENT_NAME = "transferAgentName"; + @SerializedName(SERIALIZED_NAME_TRANSFER_AGENT_NAME) + private String transferAgentName; + + public static final String SERIALIZED_NAME_LAST_FILING = "lastFiling"; + @SerializedName(SERIALIZED_NAME_LAST_FILING) + private Boolean lastFiling; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + public static final String SERIALIZED_NAME_VALIDATION_ERRORS = "validationErrors"; + @SerializedName(SERIALIZED_NAME_VALIDATION_ERRORS) + private List validationErrors; + + public IssuerWriteResponse() { + } + + public IssuerWriteResponse( + List validationErrors + ) { + this(); + this.validationErrors = validationErrors; + } + + public IssuerWriteResponse 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 IssuerWriteResponse businessName2(String businessName2) { + this.businessName2 = businessName2; + return this; + } + + /** + * Business name line 2. Should only be used for businesses. Use either this or 'transferAgentName'. + * @return businessName2 + */ + @javax.annotation.Nullable + public String getBusinessName2() { + return businessName2; + } + + public void setBusinessName2(String businessName2) { + this.businessName2 = businessName2; + } + + + @Deprecated + public IssuerWriteResponse name(String name) { + this.name = name; + return this; + } + + /** + * Legal name. Not the DBA name. Deprecated alias for 'businessName'. + * @return name + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public String getName() { + return name; + } + + @Deprecated + public void setName(String name) { + this.name = name; + } + + + @Deprecated + public IssuerWriteResponse dbaName(String dbaName) { + this.dbaName = dbaName; + return this; + } + + /** + * Doing Business As (DBA) name or continuation of a long legal name. Deprecated alias for 'businessName2'. Use either this or 'transferAgentName'. + * @return dbaName + * @deprecated + */ + @Deprecated + @javax.annotation.Nullable + public String getDbaName() { + return dbaName; + } + + @Deprecated + public void setDbaName(String dbaName) { + this.dbaName = dbaName; + } + + + public IssuerWriteResponse 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 IssuerWriteResponse 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 IssuerWriteResponse 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 IssuerWriteResponse 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 IssuerWriteResponse suffix(String suffix) { + this.suffix = suffix; + return this; + } + + /** + * Suffix name. Should only be used for individuals. + * @return suffix + */ + @javax.annotation.Nullable + public String getSuffix() { + return suffix; + } + + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + + public IssuerWriteResponse tin(String tin) { + this.tin = tin; + return this; + } + + /** + * Federal Tax Identification Number (TIN). + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public IssuerWriteResponse referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + public IssuerWriteResponse telephone(String telephone) { + this.telephone = telephone; + return this; + } + + /** + * Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries. + * @return telephone + */ + @javax.annotation.Nullable + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + + public IssuerWriteResponse taxYear(Integer taxYear) { + this.taxYear = taxYear; + return this; + } + + /** + * Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4. It's only required on creation, and cannot be modified on update. + * @return taxYear + */ + @javax.annotation.Nullable + public Integer getTaxYear() { + return taxYear; + } + + public void setTaxYear(Integer taxYear) { + this.taxYear = taxYear; + } + + + public IssuerWriteResponse 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. If there is a transfer agent, use the transfer agent's shipping address. + * @return countryCode + */ + @javax.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + + public IssuerWriteResponse email(String email) { + this.email = email; + return this; + } + + /** + * Contact email address. For recipient inquiries. Phone will be used on communications if you don't specify an email + * @return email + */ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public IssuerWriteResponse 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 IssuerWriteResponse 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 IssuerWriteResponse 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 IssuerWriteResponse 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 IssuerWriteResponse foreignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + return this; + } + + /** + * Province or region for non-US/CA addresses. + * @return foreignProvince + */ + @javax.annotation.Nullable + public String getForeignProvince() { + return foreignProvince; + } + + public void setForeignProvince(String foreignProvince) { + this.foreignProvince = foreignProvince; + } + + + public IssuerWriteResponse transferAgentName(String transferAgentName) { + this.transferAgentName = transferAgentName; + return this; + } + + /** + * Name of the transfer agent, if applicable — optional; use either this or 'dbaName'. + * @return transferAgentName + */ + @javax.annotation.Nullable + public String getTransferAgentName() { + return transferAgentName; + } + + public void setTransferAgentName(String transferAgentName) { + this.transferAgentName = transferAgentName; + } + + + public IssuerWriteResponse lastFiling(Boolean lastFiling) { + this.lastFiling = lastFiling; + return this; + } + + /** + * Indicates if this is the issuer's final year filing. + * @return lastFiling + */ + @javax.annotation.Nullable + public Boolean getLastFiling() { + return lastFiling; + } + + public void setLastFiling(Boolean lastFiling) { + this.lastFiling = lastFiling; + } + + + public IssuerWriteResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier set when the record is created. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public IssuerWriteResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Date time when the record was created. + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public IssuerWriteResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Date time when the record was last updated. + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + /** + * 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 + */ + @javax.annotation.Nullable + public List getValidationErrors() { + return validationErrors; + } + + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssuerWriteResponse issuerWriteResponse = (IssuerWriteResponse) o; + return Objects.equals(this.businessName, issuerWriteResponse.businessName) && + Objects.equals(this.businessName2, issuerWriteResponse.businessName2) && + Objects.equals(this.name, issuerWriteResponse.name) && + Objects.equals(this.dbaName, issuerWriteResponse.dbaName) && + Objects.equals(this.tinType, issuerWriteResponse.tinType) && + Objects.equals(this.firstName, issuerWriteResponse.firstName) && + Objects.equals(this.middleName, issuerWriteResponse.middleName) && + Objects.equals(this.lastName, issuerWriteResponse.lastName) && + Objects.equals(this.suffix, issuerWriteResponse.suffix) && + Objects.equals(this.tin, issuerWriteResponse.tin) && + Objects.equals(this.referenceId, issuerWriteResponse.referenceId) && + Objects.equals(this.telephone, issuerWriteResponse.telephone) && + Objects.equals(this.taxYear, issuerWriteResponse.taxYear) && + Objects.equals(this.countryCode, issuerWriteResponse.countryCode) && + Objects.equals(this.email, issuerWriteResponse.email) && + Objects.equals(this.address, issuerWriteResponse.address) && + Objects.equals(this.city, issuerWriteResponse.city) && + Objects.equals(this.state, issuerWriteResponse.state) && + Objects.equals(this.zip, issuerWriteResponse.zip) && + Objects.equals(this.foreignProvince, issuerWriteResponse.foreignProvince) && + Objects.equals(this.transferAgentName, issuerWriteResponse.transferAgentName) && + Objects.equals(this.lastFiling, issuerWriteResponse.lastFiling) && + Objects.equals(this.id, issuerWriteResponse.id) && + Objects.equals(this.createdAt, issuerWriteResponse.createdAt) && + Objects.equals(this.updatedAt, issuerWriteResponse.updatedAt) && + Objects.equals(this.validationErrors, issuerWriteResponse.validationErrors); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(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); + } + + 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 IssuerWriteResponse {\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dbaName: ").append(toIndentedString(dbaName)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).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(" suffix: ").append(toIndentedString(suffix)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" telephone: ").append(toIndentedString(telephone)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" foreignProvince: ").append(toIndentedString(foreignProvince)).append("\n"); + sb.append(" transferAgentName: ").append(toIndentedString(transferAgentName)).append("\n"); + sb.append(" lastFiling: ").append(toIndentedString(lastFiling)).append("\n"); + 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(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); + openapiFields.add("name"); + openapiFields.add("dbaName"); + openapiFields.add("tinType"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffix"); + openapiFields.add("tin"); + openapiFields.add("referenceId"); + openapiFields.add("telephone"); + openapiFields.add("taxYear"); + openapiFields.add("countryCode"); + openapiFields.add("email"); + openapiFields.add("address"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("foreignProvince"); + openapiFields.add("transferAgentName"); + openapiFields.add("lastFiling"); + openapiFields.add("id"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("validationErrors"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("businessName"); + openapiRequiredFields.add("telephone"); + openapiRequiredFields.add("taxYear"); + openapiRequiredFields.add("countryCode"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("state"); + openapiRequiredFields.add("zip"); + openapiRequiredFields.add("lastFiling"); + } + + /** + * 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 IssuerWriteResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!IssuerWriteResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in IssuerWriteResponse is not found in the empty JSON string", IssuerWriteResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!IssuerWriteResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IssuerWriteResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : IssuerWriteResponse.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("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("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("dbaName") != null && !jsonObj.get("dbaName").isJsonNull()) && !jsonObj.get("dbaName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dbaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dbaName").toString())); + } + if ((jsonObj.get("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("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("suffix") != null && !jsonObj.get("suffix").isJsonNull()) && !jsonObj.get("suffix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `suffix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("suffix").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + if ((jsonObj.get("telephone") != null && !jsonObj.get("telephone").isJsonNull()) && !jsonObj.get("telephone").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `telephone` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephone").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("foreignProvince") != null && !jsonObj.get("foreignProvince").isJsonNull()) && !jsonObj.get("foreignProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `foreignProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("foreignProvince").toString())); + } + if ((jsonObj.get("transferAgentName") != null && !jsonObj.get("transferAgentName").isJsonNull()) && !jsonObj.get("transferAgentName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `transferAgentName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferAgentName").toString())); + } + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if (jsonObj.get("validationErrors") != null && !jsonObj.get("validationErrors").isJsonNull()) { + JsonArray jsonArrayvalidationErrors = jsonObj.getAsJsonArray("validationErrors"); + if (jsonArrayvalidationErrors != null) { + // ensure the json data is an array + if (!jsonObj.get("validationErrors").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `validationErrors` to be an array in the JSON string but got `%s`", jsonObj.get("validationErrors").toString())); + } + + // validate the optional field `validationErrors` (array) + for (int i = 0; i < jsonArrayvalidationErrors.size(); i++) { + ValidationError.validateJsonElement(jsonArrayvalidationErrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IssuerWriteResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IssuerWriteResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IssuerWriteResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IssuerWriteResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IssuerWriteResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of IssuerWriteResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of IssuerWriteResponse + * @throws IOException if the JSON string is invalid with respect to IssuerWriteResponse + */ + public static IssuerWriteResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, IssuerWriteResponse.class); + } + + /** + * Convert an instance of IssuerWriteResponse 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/JobResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/JobResponse.java index cc27c28..2378039 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/JobResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/JobResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java b/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java index 8b84dd5..4653609 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java index 586a469..aa589d2 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java index a1e9d3f..5a7f732 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.java index 46c3edc..ba68241 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java index 072d6f9..cdc540b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java index 0f0d821..77e028c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchIrsResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchIrsResponse.java new file mode 100644 index 0000000..702d116 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchIrsResponse.java @@ -0,0 +1,241 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * RealTimeTinMatchIrsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class RealTimeTinMatchIrsResponse { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public RealTimeTinMatchIrsResponse() { + } + + public RealTimeTinMatchIrsResponse code(String code) { + this.code = code; + return this; + } + + /** + * The IRS response code. + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + + public RealTimeTinMatchIrsResponse description(String description) { + this.description = description; + return this; + } + + /** + * The description for the IRS response. + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RealTimeTinMatchIrsResponse realTimeTinMatchIrsResponse = (RealTimeTinMatchIrsResponse) o; + return Objects.equals(this.code, realTimeTinMatchIrsResponse.code) && + Objects.equals(this.description, realTimeTinMatchIrsResponse.description); + } + + @Override + public int hashCode() { + return Objects.hash(code, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RealTimeTinMatchIrsResponse {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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("description"); + + // 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 RealTimeTinMatchIrsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RealTimeTinMatchIrsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RealTimeTinMatchIrsResponse is not found in the empty JSON string", RealTimeTinMatchIrsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RealTimeTinMatchIrsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RealTimeTinMatchIrsResponse` 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("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RealTimeTinMatchIrsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RealTimeTinMatchIrsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RealTimeTinMatchIrsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RealTimeTinMatchIrsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RealTimeTinMatchIrsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RealTimeTinMatchIrsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RealTimeTinMatchIrsResponse + * @throws IOException if the JSON string is invalid with respect to RealTimeTinMatchIrsResponse + */ + public static RealTimeTinMatchIrsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RealTimeTinMatchIrsResponse.class); + } + + /** + * Convert an instance of RealTimeTinMatchIrsResponse 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/RealTimeTinMatchRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchRequest.java new file mode 100644 index 0000000..f94b596 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchRequest.java @@ -0,0 +1,328 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * RealTimeTinMatchRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class RealTimeTinMatchRequest { + /** + * The TIN type. + */ + @JsonAdapter(TinTypeEnum.Adapter.class) + public enum TinTypeEnum { + BUSINESS("Business"), + + INDIVIDUAL("Individual"), + + 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; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TinTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TinTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TinTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TinTypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TIN_TYPE = "tinType"; + @SerializedName(SERIALIZED_NAME_TIN_TYPE) + private TinTypeEnum tinType; + + public static final String SERIALIZED_NAME_TIN = "tin"; + @SerializedName(SERIALIZED_NAME_TIN) + private String tin; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public RealTimeTinMatchRequest() { + } + + public RealTimeTinMatchRequest tinType(TinTypeEnum tinType) { + this.tinType = tinType; + return this; + } + + /** + * The TIN type. + * @return tinType + */ + @javax.annotation.Nullable + public TinTypeEnum getTinType() { + return tinType; + } + + public void setTinType(TinTypeEnum tinType) { + this.tinType = tinType; + } + + + public RealTimeTinMatchRequest tin(String tin) { + this.tin = tin; + return this; + } + + /** + * The TIN to be submitted to TIN match. + * @return tin + */ + @javax.annotation.Nullable + public String getTin() { + return tin; + } + + public void setTin(String tin) { + this.tin = tin; + } + + + public RealTimeTinMatchRequest name(String name) { + this.name = name; + return this; + } + + /** + * The entity name to be submitted to TIN match. + * @return name + */ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RealTimeTinMatchRequest realTimeTinMatchRequest = (RealTimeTinMatchRequest) o; + return Objects.equals(this.tinType, realTimeTinMatchRequest.tinType) && + Objects.equals(this.tin, realTimeTinMatchRequest.tin) && + Objects.equals(this.name, realTimeTinMatchRequest.name); + } + + @Override + public int hashCode() { + return Objects.hash(tinType, tin, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RealTimeTinMatchRequest {\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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("tinType"); + openapiFields.add("tin"); + openapiFields.add("name"); + + // 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 RealTimeTinMatchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RealTimeTinMatchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RealTimeTinMatchRequest is not found in the empty JSON string", RealTimeTinMatchRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RealTimeTinMatchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RealTimeTinMatchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + 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("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("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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RealTimeTinMatchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RealTimeTinMatchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RealTimeTinMatchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RealTimeTinMatchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RealTimeTinMatchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RealTimeTinMatchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of RealTimeTinMatchRequest + * @throws IOException if the JSON string is invalid with respect to RealTimeTinMatchRequest + */ + public static RealTimeTinMatchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RealTimeTinMatchRequest.class); + } + + /** + * Convert an instance of RealTimeTinMatchRequest 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/RealTimeTinMatchResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchResponse.java new file mode 100644 index 0000000..9c092b3 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchResponse.java @@ -0,0 +1,243 @@ +/* + * 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.RealTimeTinMatchIrsResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * RealTimeTinMatchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class RealTimeTinMatchResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_IRS_RESPONSE = "irsResponse"; + @SerializedName(SERIALIZED_NAME_IRS_RESPONSE) + private RealTimeTinMatchIrsResponse irsResponse; + + public RealTimeTinMatchResponse() { + } + + public RealTimeTinMatchResponse status(String status) { + this.status = status; + return this; + } + + /** + * The status of the TIN match (matched or rejected). + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public RealTimeTinMatchResponse irsResponse(RealTimeTinMatchIrsResponse irsResponse) { + this.irsResponse = irsResponse; + return this; + } + + /** + * The IRS response details. + * @return irsResponse + */ + @javax.annotation.Nullable + public RealTimeTinMatchIrsResponse getIrsResponse() { + return irsResponse; + } + + public void setIrsResponse(RealTimeTinMatchIrsResponse irsResponse) { + this.irsResponse = irsResponse; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RealTimeTinMatchResponse realTimeTinMatchResponse = (RealTimeTinMatchResponse) o; + return Objects.equals(this.status, realTimeTinMatchResponse.status) && + Objects.equals(this.irsResponse, realTimeTinMatchResponse.irsResponse); + } + + @Override + public int hashCode() { + return Objects.hash(status, irsResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RealTimeTinMatchResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" irsResponse: ").append(toIndentedString(irsResponse)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("irsResponse"); + + // 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 RealTimeTinMatchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RealTimeTinMatchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in RealTimeTinMatchResponse is not found in the empty JSON string", RealTimeTinMatchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!RealTimeTinMatchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RealTimeTinMatchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `irsResponse` + if (jsonObj.get("irsResponse") != null && !jsonObj.get("irsResponse").isJsonNull()) { + RealTimeTinMatchIrsResponse.validateJsonElement(jsonObj.get("irsResponse")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RealTimeTinMatchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RealTimeTinMatchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RealTimeTinMatchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RealTimeTinMatchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RealTimeTinMatchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of RealTimeTinMatchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of RealTimeTinMatchResponse + * @throws IOException if the JSON string is invalid with respect to RealTimeTinMatchResponse + */ + public static RealTimeTinMatchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RealTimeTinMatchResponse.class); + } + + /** + * Convert an instance of RealTimeTinMatchResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java index 36d2310..f4805e7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java index c069c16..5b09822 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java index b6fbe60..4f525c0 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.java index 41c156f..3083d82 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/TinMatchStatusResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/TinMatchStatusResponse.java index e31989a..bcbc71d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/TinMatchStatusResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/TinMatchStatusResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java index 803fb91..370e632 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java index 55b5839..aa8c927 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java index 8e06ed4..58ac9ab 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -251,14 +251,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_OFFICE_CODE) private String officeCode; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -271,6 +263,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public W4FormRequest() { } @@ -374,7 +374,7 @@ public W4FormRequest tinType(String tinType) { } /** - * Tax Identification Number (TIN) type. + * 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.Nonnull @@ -653,44 +653,6 @@ public void setOfficeCode(String officeCode) { } - public W4FormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W4FormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - public W4FormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -748,6 +710,44 @@ public void setEmail(String email) { } + public W4FormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W4FormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + @Override public boolean equals(Object o) { @@ -778,11 +778,11 @@ public boolean equals(Object o) { Objects.equals(this.additionalWithheld, w4FormRequest.additionalWithheld) && Objects.equals(this.exemptFromWithholding, w4FormRequest.exemptFromWithholding) && Objects.equals(this.officeCode, w4FormRequest.officeCode) && - Objects.equals(this.eDeliveryConsentedAt, w4FormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w4FormRequest.signature) && Objects.equals(this.companyId, w4FormRequest.companyId) && Objects.equals(this.referenceId, w4FormRequest.referenceId) && - Objects.equals(this.email, w4FormRequest.email); + Objects.equals(this.email, w4FormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w4FormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w4FormRequest.signature); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -791,7 +791,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, eDeliveryConsentedAt, signature, companyId, referenceId, email); + return Objects.hash(type, employeeFirstName, employeeMiddleName, employeeLastName, employeeNameSuffix, tinType, tin, address, city, state, zip, maritalStatus, lastNameDiffers, numAllowances, otherDependents, nonJobIncome, deductions, additionalWithheld, exemptFromWithholding, officeCode, companyId, referenceId, email, eDeliveryConsentedAt, signature); } private static int hashCodeNullable(JsonNullable a) { @@ -825,11 +825,11 @@ public String toString() { sb.append(" additionalWithheld: ").append(toIndentedString(additionalWithheld)).append("\n"); sb.append(" exemptFromWithholding: ").append(toIndentedString(exemptFromWithholding)).append("\n"); sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -852,12 +852,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -942,9 +942,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("officeCode") != null && !jsonObj.get("officeCode").isJsonNull()) && !jsonObj.get("officeCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `officeCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("officeCode").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } @@ -954,6 +951,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java index 50aa2ee..84c64b3 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -353,7 +353,7 @@ public W4FormResponse tinType(String tinType) { } /** - * Tax Identification Number (TIN) type. + * 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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java index 7357e17..516fd13 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java index 94e3096..e95a25c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -1465,14 +1465,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_CAPACITY_TO_SIGN_CERTIFICATION) private Boolean capacityToSignCertification; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -1485,6 +1477,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public W8BenEFormRequest() { } @@ -3319,44 +3319,6 @@ public void setCapacityToSignCertification(Boolean capacityToSignCertification) } - public W8BenEFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8BenEFormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - public W8BenEFormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -3414,6 +3376,44 @@ public void setEmail(String email) { } + public W8BenEFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W8BenEFormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + @Override public boolean equals(Object o) { @@ -3520,11 +3520,11 @@ public boolean equals(Object o) { Objects.equals(this.substantialUsOwners, w8BenEFormRequest.substantialUsOwners) && Objects.equals(this.signerName, w8BenEFormRequest.signerName) && Objects.equals(this.capacityToSignCertification, w8BenEFormRequest.capacityToSignCertification) && - Objects.equals(this.eDeliveryConsentedAt, w8BenEFormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w8BenEFormRequest.signature) && Objects.equals(this.companyId, w8BenEFormRequest.companyId) && Objects.equals(this.referenceId, w8BenEFormRequest.referenceId) && - Objects.equals(this.email, w8BenEFormRequest.email); + Objects.equals(this.email, w8BenEFormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w8BenEFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8BenEFormRequest.signature); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -3533,7 +3533,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, giin, foreignTinNotRequired, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, treatyCountryCertification, treatyCountry, benefitLimitationCertification, benefitLimitation, qualifiedResidentStatusCertification, treatyArticle, withholdingRate, incomeType, treatyReasons, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, ownerDocumentedFfiTrustBeneficiariesCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, nonCommercialFinancialActivityCertification, internationOrganizationCertification, intergovernmentalOrganizationCertification, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exemptBeneficialOwnerOwnedInvestmentEntityCertification, territoryFinancialInstitutionCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, section501COrganizationCertification, determinationLetterDate, nonprofitOrganizationCertification, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, passiveNffeNoSubstantialUsOwnersCertification, passiveNffeSubstantialUsOwnersProvidedCertification, exceptedInterAffiliateFfiCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, substantialUsOwners, signerName, capacityToSignCertification, eDeliveryConsentedAt, signature, companyId, referenceId, email); + return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, makingTreatyClaim, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, giin, foreignTinNotRequired, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, treatyCountryCertification, treatyCountry, benefitLimitationCertification, benefitLimitation, qualifiedResidentStatusCertification, treatyArticle, withholdingRate, incomeType, treatyReasons, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, ownerDocumentedFfiTrustBeneficiariesCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, nonCommercialFinancialActivityCertification, internationOrganizationCertification, intergovernmentalOrganizationCertification, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exemptBeneficialOwnerOwnedInvestmentEntityCertification, territoryFinancialInstitutionCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, section501COrganizationCertification, determinationLetterDate, nonprofitOrganizationCertification, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, passiveNffeNoSubstantialUsOwnersCertification, passiveNffeSubstantialUsOwnersProvidedCertification, exceptedInterAffiliateFfiCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, substantialUsOwners, signerName, capacityToSignCertification, companyId, referenceId, email, eDeliveryConsentedAt, signature); } private static int hashCodeNullable(JsonNullable a) { @@ -3643,11 +3643,11 @@ public String toString() { sb.append(" substantialUsOwners: ").append(toIndentedString(substantialUsOwners)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); sb.append(" capacityToSignCertification: ").append(toIndentedString(capacityToSignCertification)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -3670,12 +3670,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -3892,9 +3892,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } @@ -3904,6 +3901,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java index 988c085..8025120 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -912,7 +912,7 @@ public W8BenEFormResponse tinType(String tinType) { } /** - * Tax Identification Number (TIN) type. + * 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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java index 70ff5d6..3e0e835 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java index 416f047..9255e5a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -2940,14 +2940,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SIGNER_NAME) private String signerName; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -2960,6 +2952,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public W8BenFormRequest() { } @@ -3437,44 +3437,6 @@ public void setSignerName(String signerName) { } - public W8BenFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8BenFormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - public W8BenFormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -3532,6 +3494,44 @@ public void setEmail(String email) { } + public W8BenFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W8BenFormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + @Override public boolean equals(Object o) { @@ -3567,11 +3567,11 @@ public boolean equals(Object o) { Objects.equals(this.withholdingRate, w8BenFormRequest.withholdingRate) && Objects.equals(this.incomeType, w8BenFormRequest.incomeType) && Objects.equals(this.signerName, w8BenFormRequest.signerName) && - Objects.equals(this.eDeliveryConsentedAt, w8BenFormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w8BenFormRequest.signature) && Objects.equals(this.companyId, w8BenFormRequest.companyId) && Objects.equals(this.referenceId, w8BenFormRequest.referenceId) && - Objects.equals(this.email, w8BenFormRequest.email); + Objects.equals(this.email, w8BenFormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w8BenFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8BenFormRequest.signature); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -3580,7 +3580,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, eDeliveryConsentedAt, signature, companyId, referenceId, email); + return Objects.hash(type, name, citizenshipCountry, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tin, foreignTinNotRequired, foreignTin, referenceNumber, birthday, treatyCountry, treatyArticle, treatyReasons, withholdingRate, incomeType, signerName, companyId, referenceId, email, eDeliveryConsentedAt, signature); } private static int hashCodeNullable(JsonNullable a) { @@ -3619,11 +3619,11 @@ public String toString() { sb.append(" withholdingRate: ").append(toIndentedString(withholdingRate)).append("\n"); sb.append(" incomeType: ").append(toIndentedString(incomeType)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -3646,12 +3646,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -3781,9 +3781,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } @@ -3793,6 +3790,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java index cab7b74..f1fb116 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -553,7 +553,7 @@ public W8BenFormResponse tinType(String tinType) { } /** - * Tax Identification Number (TIN) type. + * 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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java index 82e12ca..dbcfe25 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java index 804a6fa..f19ab69 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -842,14 +842,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_SIGNER_NAME) private String signerName; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -862,6 +854,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public W8ImyFormRequest() { } @@ -1193,7 +1193,7 @@ public W8ImyFormRequest tinType(String tinType) { } /** - * Tax Identification Number (TIN) type. Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number + * 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 Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number * @return tinType */ @javax.annotation.Nullable @@ -2992,44 +2992,6 @@ public void setSignerName(String signerName) { } - public W8ImyFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W8ImyFormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - public W8ImyFormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -3087,6 +3049,44 @@ public void setEmail(String email) { } + public W8ImyFormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W8ImyFormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + @Override public boolean equals(Object o) { @@ -3209,11 +3209,11 @@ public boolean equals(Object o) { Objects.equals(this.sponsoredDirectReportingNffeCertification, w8ImyFormRequest.sponsoredDirectReportingNffeCertification) && Objects.equals(this.directReportingNffeSponsoringEntity, w8ImyFormRequest.directReportingNffeSponsoringEntity) && Objects.equals(this.signerName, w8ImyFormRequest.signerName) && - Objects.equals(this.eDeliveryConsentedAt, w8ImyFormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w8ImyFormRequest.signature) && Objects.equals(this.companyId, w8ImyFormRequest.companyId) && Objects.equals(this.referenceId, w8ImyFormRequest.referenceId) && - Objects.equals(this.email, w8ImyFormRequest.email); + Objects.equals(this.email, w8ImyFormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w8ImyFormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w8ImyFormRequest.signature); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -3222,7 +3222,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, qualifiedIntermediaryCertification, qiPrimaryWithholdingResponsibilityCertification, qiWithholdingResponsibilityForPtpSalesCertification, qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, qiSecuritiesLenderSubstituteDividendWithholdingCertification, qiWithholdingAnd1099ReportingResponsibilityCertification, qiForm1099OrFatcaReportingResponsibilityCertification, qiOptOutOfForm1099ReportingCertification, qiWithholdingRatePoolCertification, qiIntermediaryOrFlowThroughEntityDocumentationCertification, qualifiedDerivativesDealerCertification, qddCorporation, qddPartnership, qddDisregardedEntity, nonqualifiedIntermediaryCertification, nqiWithholdingStatementTransmissionCertification, nqiWithholdingRatePoolComplianceCertification, nqiQualifiedSecuritiesLenderCertification, nqiAlternativeWithholdingStatementVerificationCertification, territoryFinancialInstitutionCertification, tfiTreatedAsUsPersonCertification, tfiWithholdingStatementTransmissionCertification, tfiTreatedAsUsPersonForPtpSalesCertification, tfiNomineeUsPersonForPtpDistributionsCertification, tfiNotNomineeForPtpDistributionsCertification, usBranchNonEffectivelyConnectedIncomeCertification, usBranchAgreementToBeTreatedAsUsPersonCertification, usBranchWithholdingStatementAndComplianceCertification, usBranchActingAsUsPersonForPtpSalesCertification, usBranchNomineeForPtpDistributionsCertification, usBranchNotNomineeForPtpDistributionsCertification, withholdingForeignPartnershipOrTrustCertification, nonwithholdingForeignEntityWithholdingStatementCertification, foreignEntityPartnerInLowerTierPartnershipCertification, foreignPartnershipAmountRealizedSection1446FCertification, foreignPartnershipModifiedAmountRealizedCertification, foreignGrantorTrustAmountRealizedAllocationCertification, alternativeWithholdingStatementRelianceCertification, npFfiWithExemptBeneficialOwnersCertification, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, foreignCentralBankOfIssueCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, signerName, eDeliveryConsentedAt, signature, companyId, referenceId, email); + return Objects.hash(type, name, citizenshipCountry, disregardedEntity, entityType, fatcaStatus, residenceAddress, residenceCity, residenceState, residenceZip, residenceCountry, residenceIsMailing, mailingAddress, mailingCity, mailingState, mailingZip, mailingCountry, tinType, tin, giin, foreignTin, referenceNumber, disregardedEntityFatcaStatus, disregardedAddress, disregardedCity, disregardedState, disregardedZip, disregardedCountry, disregardedEntityGiin, qualifiedIntermediaryCertification, qiPrimaryWithholdingResponsibilityCertification, qiWithholdingResponsibilityForPtpSalesCertification, qiNomineeWithholdingResponsibilityForPtpDistributionsCertification, qiSecuritiesLenderSubstituteDividendWithholdingCertification, qiWithholdingAnd1099ReportingResponsibilityCertification, qiForm1099OrFatcaReportingResponsibilityCertification, qiOptOutOfForm1099ReportingCertification, qiWithholdingRatePoolCertification, qiIntermediaryOrFlowThroughEntityDocumentationCertification, qualifiedDerivativesDealerCertification, qddCorporation, qddPartnership, qddDisregardedEntity, nonqualifiedIntermediaryCertification, nqiWithholdingStatementTransmissionCertification, nqiWithholdingRatePoolComplianceCertification, nqiQualifiedSecuritiesLenderCertification, nqiAlternativeWithholdingStatementVerificationCertification, territoryFinancialInstitutionCertification, tfiTreatedAsUsPersonCertification, tfiWithholdingStatementTransmissionCertification, tfiTreatedAsUsPersonForPtpSalesCertification, tfiNomineeUsPersonForPtpDistributionsCertification, tfiNotNomineeForPtpDistributionsCertification, usBranchNonEffectivelyConnectedIncomeCertification, usBranchAgreementToBeTreatedAsUsPersonCertification, usBranchWithholdingStatementAndComplianceCertification, usBranchActingAsUsPersonForPtpSalesCertification, usBranchNomineeForPtpDistributionsCertification, usBranchNotNomineeForPtpDistributionsCertification, withholdingForeignPartnershipOrTrustCertification, nonwithholdingForeignEntityWithholdingStatementCertification, foreignEntityPartnerInLowerTierPartnershipCertification, foreignPartnershipAmountRealizedSection1446FCertification, foreignPartnershipModifiedAmountRealizedCertification, foreignGrantorTrustAmountRealizedAllocationCertification, alternativeWithholdingStatementRelianceCertification, npFfiWithExemptBeneficialOwnersCertification, ffiSponsoringEntity, investmentEntityCertification, controlledForeignCorporationCertification, ownerDocumentedFfiCertification, ownerDocumentedFfiReportingStatementCertification, ownerDocumentedFfiAuditorLetterCertification, compliantNonregisteringLocalBankCertification, compliantFfiLowValueAccountsCertification, sponsoredCloselyHeldEntitySponsoringEntity, sponsoredCloselyHeldInvestmentVehicleCertification, compliantLimitedLifeDebtEntityCertification, investmentEntityNoFinancialAccountsCertification, restrictedDistributorCertification, restrictedDistributorAgreementCertification, restrictedDistributorPreexistingSalesComplianceCertification, foreignCentralBankOfIssueCertification, nonreportingIgaFfiCertification, igaCountry, igaModel, igaLegalStatusTreatment, igaFfiTrusteeOrSponsor, igaFfiTrusteeIsForeign, treatyQualifiedPensionFundCertification, qualifiedRetirementFundCertification, narrowParticipationRetirementFundCertification, section401AEquivalentPensionPlanCertification, investmentEntityForRetirementFundsCertification, exemptBeneficialOwnerSponsoredRetirementFundCertification, exceptedNonfinancialGroupEntityCertification, exceptedNonfinancialStartUpCertification, startupFormationOrResolutionDate, exceptedNonfinancialEntityInLiquidationOrBankruptcyCertification, nonfinancialEntityFilingDate, publiclyTradedNffeCertification, publiclyTradedNffeSecuritiesMarket, nffeAffiliateOfPubliclyTradedEntityCertification, publiclyTradedEntity, nffeAffiliateOfPubliclyTradedEntitySecuritiesMarket, exceptedTerritoryNffeCertification, activeNffeCertification, passiveNffeCertification, sponsoredDirectReportingNffeCertification, directReportingNffeSponsoringEntity, signerName, companyId, referenceId, email, eDeliveryConsentedAt, signature); } private static int hashCodeNullable(JsonNullable a) { @@ -3348,11 +3348,11 @@ public String toString() { sb.append(" sponsoredDirectReportingNffeCertification: ").append(toIndentedString(sponsoredDirectReportingNffeCertification)).append("\n"); sb.append(" directReportingNffeSponsoringEntity: ").append(toIndentedString(directReportingNffeSponsoringEntity)).append("\n"); sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -3375,12 +3375,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -3553,9 +3553,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("signerName") != null && !jsonObj.get("signerName").isJsonNull()) && !jsonObj.get("signerName").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `signerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signerName").toString())); } - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } @@ -3565,6 +3562,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java index 822bd9f..13e6848 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -950,7 +950,7 @@ public W8ImyFormResponse tinType(String tinType) { } /** - * Tax Identification Number (TIN) type. + * 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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java index 5009561..1f567b7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java index 60bb377..4e76513 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -59,14 +59,6 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class W9FormBaseRequest { - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - /** * The form type. */ @@ -141,6 +133,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public W9FormBaseRequest() { } @@ -151,44 +151,6 @@ public W9FormBaseRequest( this.type = type; } - public W9FormBaseRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W9FormBaseRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - /** * The form type. * @return type @@ -257,6 +219,44 @@ public void setEmail(String email) { } + public W9FormBaseRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W9FormBaseRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + @Override public boolean equals(Object o) { @@ -267,12 +267,12 @@ public boolean equals(Object o) { return false; } W9FormBaseRequest w9FormBaseRequest = (W9FormBaseRequest) o; - return Objects.equals(this.eDeliveryConsentedAt, w9FormBaseRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w9FormBaseRequest.signature) && - Objects.equals(this.type, w9FormBaseRequest.type) && + return Objects.equals(this.type, w9FormBaseRequest.type) && Objects.equals(this.companyId, w9FormBaseRequest.companyId) && Objects.equals(this.referenceId, w9FormBaseRequest.referenceId) && - Objects.equals(this.email, w9FormBaseRequest.email); + Objects.equals(this.email, w9FormBaseRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w9FormBaseRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w9FormBaseRequest.signature); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -281,7 +281,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(eDeliveryConsentedAt, signature, type, companyId, referenceId, email); + return Objects.hash(type, companyId, referenceId, email, eDeliveryConsentedAt, signature); } private static int hashCodeNullable(JsonNullable a) { @@ -295,12 +295,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class W9FormBaseRequest {\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -327,6 +327,8 @@ private String toIndentedString(Object o) { openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -353,9 +355,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } @@ -372,6 +371,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java index 3869365..b0b6318 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java index a7f7b84..21335b1 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 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 f56372b..57d8511 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -259,14 +259,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_IS1099ABLE) private Boolean is1099able; - public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; - @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) - private OffsetDateTime eDeliveryConsentedAt; - - public static final String SERIALIZED_NAME_SIGNATURE = "signature"; - @SerializedName(SERIALIZED_NAME_SIGNATURE) - private String signature; - public static final String SERIALIZED_NAME_COMPANY_ID = "companyId"; @SerializedName(SERIALIZED_NAME_COMPANY_ID) private String companyId; @@ -279,6 +271,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @SerializedName(SERIALIZED_NAME_EMAIL) private String email; + public static final String SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT = "eDeliveryConsentedAt"; + @SerializedName(SERIALIZED_NAME_E_DELIVERY_CONSENTED_AT) + private OffsetDateTime eDeliveryConsentedAt; + + public static final String SERIALIZED_NAME_SIGNATURE = "signature"; + @SerializedName(SERIALIZED_NAME_SIGNATURE) + private String signature; + public W9FormRequest() { } @@ -572,7 +572,7 @@ public W9FormRequest tinType(String tinType) { } /** - * Tax Identification Number (TIN) type. SSN/ITIN (for individuals) and EIN (for businesses). + * 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 SSN/ITIN (for individuals) and EIN (for businesses). * @return tinType */ @javax.annotation.Nonnull @@ -642,44 +642,6 @@ public void setIs1099able(Boolean is1099able) { } - public W9FormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - return this; - } - - /** - * The date when e-delivery was consented. - * @return eDeliveryConsentedAt - */ - @javax.annotation.Nullable - public OffsetDateTime geteDeliveryConsentedAt() { - return eDeliveryConsentedAt; - } - - public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { - this.eDeliveryConsentedAt = eDeliveryConsentedAt; - } - - - public W9FormRequest signature(String signature) { - this.signature = signature; - return this; - } - - /** - * The signature of the form. - * @return signature - */ - @javax.annotation.Nullable - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - public W9FormRequest companyId(String companyId) { this.companyId = companyId; return this; @@ -737,6 +699,44 @@ public void setEmail(String email) { } + public W9FormRequest eDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + return this; + } + + /** + * The date when e-delivery was consented. + * @return eDeliveryConsentedAt + */ + @javax.annotation.Nullable + public OffsetDateTime geteDeliveryConsentedAt() { + return eDeliveryConsentedAt; + } + + public void seteDeliveryConsentedAt(OffsetDateTime eDeliveryConsentedAt) { + this.eDeliveryConsentedAt = eDeliveryConsentedAt; + } + + + public W9FormRequest signature(String signature) { + this.signature = signature; + return this; + } + + /** + * The signature of the form. + * @return signature + */ + @javax.annotation.Nullable + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + @Override public boolean equals(Object o) { @@ -766,11 +766,11 @@ public boolean equals(Object o) { Objects.equals(this.tin, w9FormRequest.tin) && Objects.equals(this.backupWithholding, w9FormRequest.backupWithholding) && Objects.equals(this.is1099able, w9FormRequest.is1099able) && - Objects.equals(this.eDeliveryConsentedAt, w9FormRequest.eDeliveryConsentedAt) && - Objects.equals(this.signature, w9FormRequest.signature) && Objects.equals(this.companyId, w9FormRequest.companyId) && Objects.equals(this.referenceId, w9FormRequest.referenceId) && - Objects.equals(this.email, w9FormRequest.email); + Objects.equals(this.email, w9FormRequest.email) && + Objects.equals(this.eDeliveryConsentedAt, w9FormRequest.eDeliveryConsentedAt) && + Objects.equals(this.signature, w9FormRequest.signature); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -779,7 +779,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, eDeliveryConsentedAt, signature, companyId, referenceId, email); + return Objects.hash(type, name, businessName, businessClassification, businessOther, foreignPartnerOwnerOrBeneficiary, exemptPayeeCode, exemptFatcaCode, foreignCountryIndicator, address, foreignAddress, city, state, zip, accountNumber, tinType, tin, backupWithholding, is1099able, companyId, referenceId, email, eDeliveryConsentedAt, signature); } private static int hashCodeNullable(JsonNullable a) { @@ -812,11 +812,11 @@ public String toString() { sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); sb.append(" backupWithholding: ").append(toIndentedString(backupWithholding)).append("\n"); sb.append(" is1099able: ").append(toIndentedString(is1099able)).append("\n"); - sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); - sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append(" companyId: ").append(toIndentedString(companyId)).append("\n"); sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" eDeliveryConsentedAt: ").append(toIndentedString(eDeliveryConsentedAt)).append("\n"); + sb.append(" signature: ").append(toIndentedString(signature)).append("\n"); sb.append("}"); return sb.toString(); } @@ -839,12 +839,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("eDeliveryConsentedAt"); - openapiFields.add("signature"); openapiFields.add("type"); openapiFields.add("companyId"); openapiFields.add("referenceId"); openapiFields.add("email"); + openapiFields.add("eDeliveryConsentedAt"); + openapiFields.add("signature"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -937,9 +937,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (!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("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); - } if ((jsonObj.get("companyId") != null && !jsonObj.get("companyId").isJsonNull()) && !jsonObj.get("companyId").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `companyId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("companyId").toString())); } @@ -949,6 +946,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } + if ((jsonObj.get("signature") != null && !jsonObj.get("signature").isJsonNull()) && !jsonObj.get("signature").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `signature` to be a primitive type in the JSON string but got `%s`", jsonObj.get("signature").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java index 1b1bcd3..183680b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java @@ -8,7 +8,7 @@ * * Avalara 1099 & W-9 API Definition * - * ## Authentication #### Step 1: Generate API Credentials Generate a *client ID* and *client secret* from your [Avalara1099 account](https://sbx.track1099.com/api_tokens): *Your Profile → API*. #### Step 2: Get an Identity Token Send a `POST` request to the **Identity Token URL** with your *client ID* and *client secret* from Step 1 as form-encoded parameters: ```http POST https://identity.avalara.com/connect/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials client_id= client_secret= ``` **Body parameters** - `grant_type` — Always `client_credentials` - `client_id` — Your *client ID* from Step 1 - `client_secret` — Your *client secret* from Step 1 **Successful response** ```json { \"access_token\": \"eyJhbGci...\", \"expires_in\": 3600, \"token_type\": \"Bearer\" } ``` Use the `access_token` as a bearer token in the `Authorization` header on every A1099 API request: ```http Authorization: Bearer ``` --- For more on authenticating requests, see the [A1099 authentication guide](https://developer.avalara.com/1099-and-w-9/kny2997001535374/). --- ## 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) + * > **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 @@ -544,7 +544,7 @@ public W9FormResponse tinType(String tinType) { } /** - * Tax Identification Number (TIN) type. + * 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