diff --git a/README.md b/README.md index 810373d..964f155 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,10 @@ 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* | [**getBulkTinMatch**](docs/A1099/V2/TinMatchesApi.md#getbulktinmatch) | **GET** /tin-matches/$bulk/{id} | Get bulk TIN match details +*TinMatchesApi* | [**getBulkTinMatchResults**](docs/A1099/V2/TinMatchesApi.md#getbulktinmatchresults) | **GET** /tin-matches/$bulk/{id}/results | List bulk TIN match results *TinMatchesApi* | [**performRealTimeTinMatch**](docs/A1099/V2/TinMatchesApi.md#performrealtimetinmatch) | **POST** /tin-matches/$real-time | Perform real time TIN Match +*TinMatchesApi* | [**submitBulkTinMatch**](docs/A1099/V2/TinMatchesApi.md#submitbulktinmatch) | **POST** /tin-matches/$bulk | Submit bulk TIN match ## Documentation for Models @@ -267,6 +270,12 @@ Class | Method | HTTP request | Description ### A1099 V2 Model Documentation + - [Avalara.SDK.model.A1099.V2.BulkTinMatchAcceptedResponse](docs/A1099/V2/BulkTinMatchAcceptedResponse.md) + - [Avalara.SDK.model.A1099.V2.BulkTinMatchIrsResponse](docs/A1099/V2/BulkTinMatchIrsResponse.md) + - [Avalara.SDK.model.A1099.V2.BulkTinMatchRequest](docs/A1099/V2/BulkTinMatchRequest.md) + - [Avalara.SDK.model.A1099.V2.BulkTinMatchRequestItem](docs/A1099/V2/BulkTinMatchRequestItem.md) + - [Avalara.SDK.model.A1099.V2.BulkTinMatchResponse](docs/A1099/V2/BulkTinMatchResponse.md) + - [Avalara.SDK.model.A1099.V2.BulkTinMatchResultItemResponse](docs/A1099/V2/BulkTinMatchResultItemResponse.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) @@ -279,7 +288,9 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.Form1042S](docs/A1099/V2/Form1042S.md) - [Avalara.SDK.model.A1099.V2.Form1095B](docs/A1099/V2/Form1095B.md) - [Avalara.SDK.model.A1099.V2.Form1095C](docs/A1099/V2/Form1095C.md) + - [Avalara.SDK.model.A1099.V2.Form1098](docs/A1099/V2/Form1098.md) - [Avalara.SDK.model.A1099.V2.Form1099Base](docs/A1099/V2/Form1099Base.md) + - [Avalara.SDK.model.A1099.V2.Form1099C](docs/A1099/V2/Form1099C.md) - [Avalara.SDK.model.A1099.V2.Form1099Div](docs/A1099/V2/Form1099Div.md) - [Avalara.SDK.model.A1099.V2.Form1099Int](docs/A1099/V2/Form1099Int.md) - [Avalara.SDK.model.A1099.V2.Form1099K](docs/A1099/V2/Form1099K.md) @@ -288,6 +299,7 @@ Class | Method | HTTP request | Description - [Avalara.SDK.model.A1099.V2.Form1099Nec](docs/A1099/V2/Form1099Nec.md) - [Avalara.SDK.model.A1099.V2.Form1099Patr](docs/A1099/V2/Form1099Patr.md) - [Avalara.SDK.model.A1099.V2.Form1099R](docs/A1099/V2/Form1099R.md) + - [Avalara.SDK.model.A1099.V2.Form1099S](docs/A1099/V2/Form1099S.md) - [Avalara.SDK.model.A1099.V2.Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) - [Avalara.SDK.model.A1099.V2.Form1099W2](docs/A1099/V2/Form1099W2.md) - [Avalara.SDK.model.A1099.V2.Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) @@ -299,6 +311,7 @@ Class | Method | HTTP request | Description - [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.PaginatedQueryResultModelBulkTinMatchResultItemResponse](docs/A1099/V2/PaginatedQueryResultModelBulkTinMatchResultItemResponse.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelForm1099Base](docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md) - [Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) diff --git a/docs/A1099/V2/BulkTinMatchAcceptedResponse.md b/docs/A1099/V2/BulkTinMatchAcceptedResponse.md new file mode 100644 index 0000000..3a4cf3c --- /dev/null +++ b/docs/A1099/V2/BulkTinMatchAcceptedResponse.md @@ -0,0 +1,13 @@ + + +# BulkTinMatchAcceptedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The bulk identifier required to get the results. | [optional] | + + + diff --git a/docs/A1099/V2/BulkTinMatchIrsResponse.md b/docs/A1099/V2/BulkTinMatchIrsResponse.md new file mode 100644 index 0000000..780c4b5 --- /dev/null +++ b/docs/A1099/V2/BulkTinMatchIrsResponse.md @@ -0,0 +1,14 @@ + + +# BulkTinMatchIrsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | | [optional] | +|**description** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/BulkTinMatchRequest.md b/docs/A1099/V2/BulkTinMatchRequest.md new file mode 100644 index 0000000..bc61340 --- /dev/null +++ b/docs/A1099/V2/BulkTinMatchRequest.md @@ -0,0 +1,13 @@ + + +# BulkTinMatchRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**items** | [**List<BulkTinMatchRequestItem>**](BulkTinMatchRequestItem.md) | Collection of TINs to be submitted to TIN match. | [optional] | + + + diff --git a/docs/A1099/V2/BulkTinMatchRequestItem.md b/docs/A1099/V2/BulkTinMatchRequestItem.md new file mode 100644 index 0000000..39d376a --- /dev/null +++ b/docs/A1099/V2/BulkTinMatchRequestItem.md @@ -0,0 +1,26 @@ + + +# BulkTinMatchRequestItem + + +## 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] | +|**referenceId** | **String** | The reference identifier for the TIN to be submitted. | [optional] | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| BUSINESS | "Business" | +| INDIVIDUAL | "Individual" | +| UNKNOWN | "Unknown" | + + + diff --git a/docs/A1099/V2/BulkTinMatchResponse.md b/docs/A1099/V2/BulkTinMatchResponse.md new file mode 100644 index 0000000..3f33a68 --- /dev/null +++ b/docs/A1099/V2/BulkTinMatchResponse.md @@ -0,0 +1,17 @@ + + +# BulkTinMatchResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**status** | **String** | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**resultsUrl** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/BulkTinMatchResultItemResponse.md b/docs/A1099/V2/BulkTinMatchResultItemResponse.md new file mode 100644 index 0000000..8b3256e --- /dev/null +++ b/docs/A1099/V2/BulkTinMatchResultItemResponse.md @@ -0,0 +1,15 @@ + + +# BulkTinMatchResultItemResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | | [optional] | +|**irsResponse** | [**BulkTinMatchIrsResponse**](BulkTinMatchIrsResponse.md) | | [optional] | +|**referenceId** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index 101536d..ed14842 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -49,7 +49,7 @@ public class Example { CompaniesW9Api apiInstance = new CompaniesW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "a6a6ff01-3320-4e78-b395-fba7d4a82be8"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1c77f22b-8eec-4a7f-ba13-3598178037e4"; // 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 = "394fd272-5b46-4dd8-9f4d-fa3687176455"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "e3c39765-db00-449a-b3b4-9110dbe6b231"; // 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 = "a2153a47-55d5-4573-9bf2-c280e1edec2c"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "22ad4154-895e-4047-b394-665a56c4af95"; // 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 = "a15988e6-52f6-4890-9c78-db2f0530d800"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "80446dbd-be15-490e-b9e5-6a24f4dc6467"; // 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 = "3ed0b33d-ac1c-4cf4-9bfc-db7796038ee8"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "55adbfc0-219c-4c8f-b5df-e4cf25fe5e35"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . CompanyRequest companyRequest = new CompanyRequest(); // CompanyRequest | The updated company data try { diff --git a/docs/A1099/V2/Form1042S.md b/docs/A1099/V2/Form1042S.md index 17400b9..952402d 100644 --- a/docs/A1099/V2/Form1042S.md +++ b/docs/A1099/V2/Form1042S.md @@ -350,6 +350,8 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -357,6 +359,7 @@ Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1095B.md b/docs/A1099/V2/Form1095B.md index 4dc6d89..ef009b5 100644 --- a/docs/A1099/V2/Form1095B.md +++ b/docs/A1099/V2/Form1095B.md @@ -73,6 +73,8 @@ Form 1095-B: Health Coverage | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -80,6 +82,7 @@ Form 1095-B: Health Coverage | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1095C.md b/docs/A1099/V2/Form1095C.md index 60e716f..c738c4c 100644 --- a/docs/A1099/V2/Form1095C.md +++ b/docs/A1099/V2/Form1095C.md @@ -81,6 +81,8 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -88,6 +90,7 @@ Form 1095-C: Employer-Provided Health Insurance Offer and Coverage | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1098.md b/docs/A1099/V2/Form1098.md new file mode 100644 index 0000000..3ccf6ce --- /dev/null +++ b/docs/A1099/V2/Form1098.md @@ -0,0 +1,104 @@ + + +# Form1098 + +Form 1098: Mortgage Interest Statement The recipient is the borrower and the issuer is the lender, with one form per mortgage. *Required:* Mortgage Interest Received unless Other is given (otherwise at least one amount must be above zero), and exactly one of Address or Description of Property and the same-address indicator. Limits: Address or Description of Property and Other, 39 characters each; Mortgage Origination Date, at most 45 years before the tax year; Mortgage Acquisition Date, within the tax year; Number of Properties, 2 to 9999 (empty for one). Form 1098 has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**mortgageInterestReceived** | **Double** | Mortgage interest received from payer(s)/borrower(s) | [optional] | +|**outstandingMortgagePrincipal** | **Double** | Outstanding mortgage principal | [optional] | +|**mortgageOriginationDate** | **LocalDate** | Mortgage origination date | [optional] | +|**refundOfOverpaidInterest** | **Double** | Refund of overpaid interest | [optional] | +|**mortgageInsurancePremiums** | **Double** | Mortgage insurance premiums | [optional] | +|**pointsPaidOnPurchaseOfPrincipalResidence** | **Double** | Points paid on purchase of principal residence | [optional] | +|**propertyAddressSameAsBorrowerIndicator** | **Boolean** | If checked, the property securing the mortgage is at the borrower's address | [optional] | +|**propertyAddressOrDescription** | **String** | Address or description of property securing mortgage (up to 39 characters) | [optional] | +|**numberOfPropertiesSecuringMortgage** | **Integer** | Number of properties securing the mortgage, if more than one | [optional] | +|**otherInformation** | **String** | Other (up to 39 characters), such as real estate taxes or insurance paid from escrow | [optional] | +|**mortgageAcquisitionDate** | **LocalDate** | Mortgage acquisition date, if the mortgage was acquired during the tax year | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type. | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms via $bulk-upsert | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms via $bulk-upsert | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. | [optional] | +|**firstName** | **String** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**middleName** | **String** | Middle name. Should only be used for individuals. | [optional] | +|**lastName** | **String** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**suffixName** | **String** | Suffix name. Should only be used for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_INT | "1099-INT" | +| _1099_K | "1099-K" | +| _1099_MISC | "1099-MISC" | +| _1099_NEC | "1099-NEC" | +| _1099_PATR | "1099-PATR" | +| _1099_R | "1099-R" | +| _1099_S | "1099-S" | +| W_2 | "W-2" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/Form1099Base.md b/docs/A1099/V2/Form1099Base.md index 27d1056..3fc009e 100644 --- a/docs/A1099/V2/Form1099Base.md +++ b/docs/A1099/V2/Form1099Base.md @@ -51,6 +51,8 @@ | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -58,6 +60,7 @@ | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099C.md b/docs/A1099/V2/Form1099C.md new file mode 100644 index 0000000..0ed8178 --- /dev/null +++ b/docs/A1099/V2/Form1099C.md @@ -0,0 +1,116 @@ + + +# Form1099C + +Form 1099-C: Cancellation of Debt *Required:* Date of Identifiable Event, Amount of Debt Discharged and Debt Description. The IRS also requires the Identifiable Event Code. The Debt Description is limited to 39 characters. Form 1099-C has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dateOfIdentifiableEvent** | **LocalDate** | Date of identifiable event | | +|**amountOfDebtDischarged** | **Double** | Amount of debt discharged | | +|**interestIncludedInDebtDischarged** | **Double** | Interest, if included in the amount of debt discharged | [optional] | +|**debtDescription** | **String** | Debt description (up to 39 characters) | | +|**debtorPersonallyLiableIndicator** | **Boolean** | If checked, the debtor was personally liable for repayment of the debt | [optional] | +|**identifiableEventCode** | [**IdentifiableEventCodeEnum**](#IdentifiableEventCodeEnum) | Identifiable event code. * `A` - Bankruptcy * `B` - Other judicial debt relief * `C` - Statute of limitations or expiration of deficiency period * `D` - Foreclosure election * `E` - Debt relief from probate or similar proceeding * `F` - By agreement * `G` - Decision or policy to discontinue collection * `H` - Other actual discharge before identifiable event * `I` - Deprecated; retired by the IRS in 2016 and folded into `H`. Only valid for prior tax years. | | +|**fairMarketValueOfProperty** | **Double** | Fair market value of property | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type. | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms via $bulk-upsert | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms via $bulk-upsert | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. | [optional] | +|**firstName** | **String** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**middleName** | **String** | Middle name. Should only be used for individuals. | [optional] | +|**lastName** | **String** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**suffixName** | **String** | Suffix name. Should only be used for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | + + + +## Enum: IdentifiableEventCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | +| H | "H" | +| I | "I" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_INT | "1099-INT" | +| _1099_K | "1099-K" | +| _1099_MISC | "1099-MISC" | +| _1099_NEC | "1099-NEC" | +| _1099_PATR | "1099-PATR" | +| _1099_R | "1099-R" | +| _1099_S | "1099-S" | +| 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/Form1099Div.md b/docs/A1099/V2/Form1099Div.md index 108fdae..7c9fce6 100644 --- a/docs/A1099/V2/Form1099Div.md +++ b/docs/A1099/V2/Form1099Div.md @@ -82,6 +82,8 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -89,6 +91,7 @@ Form 1099-DIV: Dividends and Distributions *At least one of the f | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Int.md b/docs/A1099/V2/Form1099Int.md index 47a8aaf..bea183a 100644 --- a/docs/A1099/V2/Form1099Int.md +++ b/docs/A1099/V2/Form1099Int.md @@ -78,6 +78,8 @@ Form 1099-INT: Interest Imcome *At least one of the following amo | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -85,6 +87,7 @@ Form 1099-INT: Interest Imcome *At least one of the following amo | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099K.md b/docs/A1099/V2/Form1099K.md index 3bf9f30..d9501bd 100644 --- a/docs/A1099/V2/Form1099K.md +++ b/docs/A1099/V2/Form1099K.md @@ -101,6 +101,8 @@ Form 1099-K: Payment Card and Third Party Network Transactions | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -108,6 +110,7 @@ Form 1099-K: Payment Card and Third Party Network Transactions | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099ListRequest.md b/docs/A1099/V2/Form1099ListRequest.md index 766fd90..878695c 100644 --- a/docs/A1099/V2/Form1099ListRequest.md +++ b/docs/A1099/V2/Form1099ListRequest.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | Available form types: * `1042-S` * `1095-B` * `1095-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `W-2` | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `W-2` | [optional] | |**forms** | [**List<Get1099Form200Response>**](Get1099Form200Response.md) | | [optional] | @@ -19,6 +19,8 @@ | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -26,6 +28,7 @@ | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Misc.md b/docs/A1099/V2/Form1099Misc.md index fcfa119..caa341f 100644 --- a/docs/A1099/V2/Form1099Misc.md +++ b/docs/A1099/V2/Form1099Misc.md @@ -78,6 +78,8 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -85,6 +87,7 @@ Form 1099-MISC: Miscellaneous Income *At least one of the following amounts m | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Nec.md b/docs/A1099/V2/Form1099Nec.md index a556556..64a0400 100644 --- a/docs/A1099/V2/Form1099Nec.md +++ b/docs/A1099/V2/Form1099Nec.md @@ -67,6 +67,8 @@ Form 1099-NEC: Nonemployee Compensation | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -74,6 +76,7 @@ Form 1099-NEC: Nonemployee Compensation | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099Patr.md b/docs/A1099/V2/Form1099Patr.md index d7e86b3..92376ce 100644 --- a/docs/A1099/V2/Form1099Patr.md +++ b/docs/A1099/V2/Form1099Patr.md @@ -76,6 +76,8 @@ Form 1099-PATR: Taxable Distributions Received From Cooperatives | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -83,6 +85,7 @@ Form 1099-PATR: Taxable Distributions Received From Cooperatives | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099R.md b/docs/A1099/V2/Form1099R.md index 5fac075..619dcab 100644 --- a/docs/A1099/V2/Form1099R.md +++ b/docs/A1099/V2/Form1099R.md @@ -156,6 +156,8 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -163,6 +165,7 @@ Form 1099-R: Distributions From Pensions, Annuities, Retirement or Profit-Sharin | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Form1099S.md b/docs/A1099/V2/Form1099S.md new file mode 100644 index 0000000..3afc625 --- /dev/null +++ b/docs/A1099/V2/Form1099S.md @@ -0,0 +1,99 @@ + + +# Form1099S + +Form 1099-S: Proceeds From Real Estate Transactions The recipient is the transferor (seller) and the issuer is the filer (settlement agent). *Required:* Date of Closing, Address or Legal Description, and, unless the transferor received property or services, Gross Proceeds, with Gross Proceeds plus Buyer's Part of Real Estate Tax above zero. The Date of Closing must fall in the tax year or the ten years before it. The Address or Legal Description is limited to 39 characters. Form 1099-S has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**dateOfClosing** | **LocalDate** | Date of closing | | +|**grossProceeds** | **Double** | Gross proceeds (the total gross proceeds, from tax year 2026 labeled Box 2a) | [optional] | +|**propertyAddressOrLegalDescription** | **String** | Address or legal description of the property, including city, state and ZIP code (up to 39 characters) | | +|**transferorReceivedPropertyOrServicesIndicator** | **Boolean** | If checked, the transferor received or will receive property or services as part of the consideration | [optional] | +|**transferorIsForeignPersonIndicator** | **Boolean** | If checked, the transferor is a foreign person (nonresident alien, foreign partnership, foreign estate or foreign trust) | [optional] | +|**buyersPartOfRealEstateTax** | **Double** | Buyer's part of real estate tax | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Form type. | | +|**id** | **String** | Form ID. Unique identifier set when the record is created. | [optional] [readonly] | +|**issuerId** | **String** | Issuer ID - only required when creating forms | [optional] | +|**issuerReferenceId** | **String** | Issuer Reference ID - only required when creating forms via $bulk-upsert | [optional] | +|**issuerTin** | **String** | Issuer TIN - readonly | [optional] | +|**taxYear** | **Integer** | Tax Year - only required when creating forms via $bulk-upsert | [optional] | +|**referenceId** | **String** | Internal reference ID. Never shown to any agency or recipient. | [optional] | +|**tin** | **String** | Recipient's Federal Tax Identification Number (TIN). | [optional] | +|**recipientName** | **String** | DEPRECATED: Use `businessName` for businesses; use `firstName`, `middleName`, `lastName`, and `suffixName` for individuals. | [optional] | +|**address** | **String** | Address. | | +|**address2** | **String** | Address line 2. | [optional] | +|**city** | **String** | City. | | +|**state** | **String** | Two-letter US state or Canadian province code (required for US/CA addresses). | [optional] | +|**zip** | **String** | ZIP/postal code. | [optional] | +|**email** | **String** | Recipient's Contact email address. | [optional] | +|**nonUsProvince** | **String** | Province or region for non-US/CA addresses. | [optional] | +|**countryCode** | **String** | Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. | | +|**federalEfileDate** | **LocalDate** | Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**postalMail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +|**stateEfileDate** | **LocalDate** | Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**recipientEdeliveryDate** | **LocalDate** | Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled. | [optional] | +|**tinMatch** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +|**addressVerification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +|**stateAndLocalWithholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | State and local withholding information | [optional] | +|**federalEfileStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states) | [optional] [readonly] | +|**stateEfileStatus** | [**List<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state | [optional] [readonly] | +|**postalMailStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered | [optional] [readonly] | +|**tinMatchStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued | [optional] [readonly] | +|**addressVerificationStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted | [optional] [readonly] | +|**eDeliveryStatus** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend) | [optional] [readonly] | +|**validationErrors** | [**List<ValidationError>**](ValidationError.md) | Validation errors | [optional] [readonly] | +|**createdAt** | **OffsetDateTime** | Date time when the record was created. | [optional] [readonly] | +|**updatedAt** | **OffsetDateTime** | Date time when the record was last updated. | [optional] [readonly] | +|**tinType** | [**TinTypeEnum**](#TinTypeEnum) | Recipient classification. The platform is transitioning from tax identifier classifications to recipient entity classifications. New values represent recipient entity types and should be preferred. Deprecated values represent identifier formats and remain supported for backward compatibility only. Available values: - INDIVIDUAL: Recipient is an individual - BUSINESS: Recipient is a business - UNKNOWN: Recipient classification is unknown - EIN: (Deprecated - use BUSINESS) Employer Identification Number - SSN: (Deprecated - use INDIVIDUAL) Social Security Number - ITIN: (Deprecated - use INDIVIDUAL) Individual Taxpayer Identification Number - ATIN: (Deprecated - use INDIVIDUAL) Adoption Taxpayer Identification Number | [optional] | +|**businessName** | **String** | Business name. Required when the recipient of the form is a business; should only be used for businesses. | [optional] | +|**businessName2** | **String** | Business name line 2. Should only be used for businesses. | [optional] | +|**firstName** | **String** | First name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**middleName** | **String** | Middle name. Should only be used for individuals. | [optional] | +|**lastName** | **String** | Last name. Required when the recipient of the form is an individual; should only be used for individuals. | [optional] | +|**suffixName** | **String** | Suffix name. Should only be used for individuals. | [optional] | +|**recipientSecondName** | **String** | DEPRECATED: Use `businessName2` instead. | [optional] | +|**accountNumber** | **String** | Account number | [optional] | +|**officeCode** | **String** | Office code | [optional] | +|**noTin** | **Boolean** | No TIN indicator | [optional] | +|**secondTinNotice** | **Boolean** | Second TIN notice | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| _1042_S | "1042-S" | +| _1095_B | "1095-B" | +| _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | +| _1099_DIV | "1099-DIV" | +| _1099_INT | "1099-INT" | +| _1099_K | "1099-K" | +| _1099_MISC | "1099-MISC" | +| _1099_NEC | "1099-NEC" | +| _1099_PATR | "1099-PATR" | +| _1099_R | "1099-R" | +| _1099_S | "1099-S" | +| W_2 | "W-2" | + + + +## Enum: TinTypeEnum + +| Name | Value | +|---- | -----| +| EIN | "EIN" | +| SSN | "SSN" | +| ITIN | "ITIN" | +| ATIN | "ATIN" | +| INDIVIDUAL | "INDIVIDUAL" | +| BUSINESS | "BUSINESS" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/A1099/V2/Form1099W2.md b/docs/A1099/V2/Form1099W2.md index bdc9572..c35f45c 100644 --- a/docs/A1099/V2/Form1099W2.md +++ b/docs/A1099/V2/Form1099W2.md @@ -94,6 +94,8 @@ Form W-2: Wage and Tax Statement. | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -101,6 +103,7 @@ Form W-2: Wage and Tax Statement. | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index bd7a804..231526e 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -20,7 +20,7 @@ Method | HTTP request | Description Create or update multiple 1099/1095/W2/1042S forms -This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. +This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. **Recipient Name Splitting:** When the account's \"Split individual recipient names\" opt-in setting is enabled (Account Settings page), this only applies to the deprecated identifier-format tinType values (SSN/ITIN/ATIN/EIN): - For the deprecated individual-type values (SSN/ITIN/ATIN) where only the legacy `recipientName` is provided, the API automatically splits `recipientName` into `firstName`, `middleName`, `lastName`, and `suffixName` before persisting. - For the deprecated `EIN` value, `recipientName` is not split and is routed directly to `businessName`. To enable or disable this behavior, the account owner can toggle \"Split individual recipient names on API submissions\" on the Account Settings page. ### Example @@ -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 = "6627a0c7-bb12-4635-a6c1-4ed0a47025b2"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b2de6e01-aadd-47fd-8444-2b3e2e1d5364"; // 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 = "b7ae861c-748e-4beb-905a-23aa9a8de53b"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d83705fa-e06e-473d-a99b-18e1c24e1ade"; // 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 = "4d3d01b9-704d-4ece-b9e4-e8a08f0e4632"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "3b67737d-1e33-4b9c-b91a-a346ef3ff731"; // 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 = "5c54b9db-a216-4b2f-b99a-d462ed919919"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "59489a73-7ddd-4b4c-aa87-e18e1042713f"; // 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 = "47a1d2f5-fa5a-4f7f-8666-898ec3187379"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "85a9b19b-0ed5-476c-bb11-e365b8b14794"; // 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 = "a6799653-d5d4-41a1-bc1c-e57835067aa4"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "13e97284-a7a9-4e94-92e4-cd3e69c6b967"; // 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 = "4bea2d70-6fa5-4abd-9806-092513a95c09"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d5ff1333-2e20-4ba6-b169-c1bac004c84d"; // 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 0474ab5..c1ae13f 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -53,7 +53,7 @@ public class Example { FormsW9Api apiInstance = new FormsW9Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "b4e7a6bd-3cf3-42b3-b4d1-85e75a36551f"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "5cf8f8de-3979-4627-a7c4-5b8d8c6d7a49"; // 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 = "25133801-8936-44a6-98f5-b428d3f1641e"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1476e915-dd01-4011-8afd-ccc6415b1e52"; // 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 = "b74d3de7-4369-404c-a15d-908739fcfd25"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "59f9ef43-cd2f-4894-8d01-94f56745f69d"; // 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 = "e443fee3-1400-4fc8-b2fe-5c5f2d67188f"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "7a8bb9d5-649c-4116-8271-9cfa594e8d5b"; // 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 = "2e3f783a-26b4-45d6-9974-cfcdea77dba7"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "0e6d22cd-02e3-45c0-8e6e-f62c30551679"; // 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 = "3b5e8acc-77ca-435a-abbc-deba7135f40b"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "6c3ae581-579d-430f-aa93-ee73aaee98d4"; // 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 = "a42cbc86-5ba8-433d-ba44-58235e240d18"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "4e134168-0dcc-4032-bcde-3fbe7416e054"; // 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 = "af1dfcf6-b1fb-4956-ba5b-a76a698d7f66"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "daa7e447-c721-4de0-8cb4-d4f22795c550"; // 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 = "20e8951d-b7e8-4941-be1f-3b9ef04ebdcc"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "d4069119-7297-4cb1-9671-6667d031f729"; // 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 6c32caa..43e0f10 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -86,6 +86,24 @@ |**planStartMonth** | [**PlanStartMonthEnum**](#PlanStartMonthEnum) | Plan start month. The calendar month during which the plan year begins of the health plan in which the employee is offered coverage (or would be offered coverage if the employee were eligible to participate in the plan). Available values: - 00: None - 01: January - 02: February - 03: March - 04: April - 05: May - 06: June - 07: July - 08: August - 09: September - 10: October - 11: November - 12: December | | |**employerProvidedSiCoverage** | **Boolean** | Employer provided self-insured coverage | [optional] | |**offerAndCoverages** | [**List<OfferAndCoverage>**](OfferAndCoverage.md) | Offer and coverage information | | +|**mortgageInterestReceived** | **Double** | Mortgage interest received from payer(s)/borrower(s) | [optional] | +|**outstandingMortgagePrincipal** | **Double** | Outstanding mortgage principal | [optional] | +|**mortgageOriginationDate** | **LocalDate** | Mortgage origination date | [optional] | +|**refundOfOverpaidInterest** | **Double** | Refund of overpaid interest | [optional] | +|**mortgageInsurancePremiums** | **Double** | Mortgage insurance premiums | [optional] | +|**pointsPaidOnPurchaseOfPrincipalResidence** | **Double** | Points paid on purchase of principal residence | [optional] | +|**propertyAddressSameAsBorrowerIndicator** | **Boolean** | If checked, the property securing the mortgage is at the borrower's address | [optional] | +|**propertyAddressOrDescription** | **String** | Address or description of property securing mortgage (up to 39 characters) | [optional] | +|**numberOfPropertiesSecuringMortgage** | **Integer** | Number of properties securing the mortgage, if more than one | [optional] | +|**otherInformation** | **String** | Other (up to 39 characters), such as real estate taxes or insurance paid from escrow | [optional] | +|**mortgageAcquisitionDate** | **LocalDate** | Mortgage acquisition date, if the mortgage was acquired during the tax year | [optional] | +|**dateOfIdentifiableEvent** | **LocalDate** | Date of identifiable event | | +|**amountOfDebtDischarged** | **Double** | Amount of debt discharged | | +|**interestIncludedInDebtDischarged** | **Double** | Interest, if included in the amount of debt discharged | [optional] | +|**debtDescription** | **String** | Debt description (up to 39 characters) | | +|**debtorPersonallyLiableIndicator** | **Boolean** | If checked, the debtor was personally liable for repayment of the debt | [optional] | +|**identifiableEventCode** | [**IdentifiableEventCodeEnum**](#IdentifiableEventCodeEnum) | Identifiable event code. * `A` - Bankruptcy * `B` - Other judicial debt relief * `C` - Statute of limitations or expiration of deficiency period * `D` - Foreclosure election * `E` - Debt relief from probate or similar proceeding * `F` - By agreement * `G` - Decision or policy to discontinue collection * `H` - Other actual discharge before identifiable event * `I` - Deprecated; retired by the IRS in 2016 and folded into `H`. Only valid for prior tax years. | | +|**fairMarketValueOfProperty** | **Double** | Fair market value of property | [optional] | |**totalOrdinaryDividends** | **Double** | Total ordinary dividends | [optional] | |**qualifiedDividends** | **Double** | Qualified dividends | [optional] | |**totalCapitalGainDistributions** | **Double** | Total capital gain distributions | [optional] | @@ -179,6 +197,12 @@ |**amountAllocableToIrrWithin5Years** | **Double** | Amount allocable to IRR within 5 years | [optional] | |**firstYearOfDesignatedRothContribution** | **String** | First year of designated Roth contribution | [optional] | |**dateOfPayment** | **LocalDate** | Date of payment | [optional] | +|**dateOfClosing** | **LocalDate** | Date of closing | | +|**grossProceeds** | **Double** | Gross proceeds (the total gross proceeds, from tax year 2026 labeled Box 2a) | [optional] | +|**propertyAddressOrLegalDescription** | **String** | Address or legal description of the property, including city, state and ZIP code (up to 39 characters) | | +|**transferorReceivedPropertyOrServicesIndicator** | **Boolean** | If checked, the transferor received or will receive property or services as part of the consideration | [optional] | +|**transferorIsForeignPersonIndicator** | **Boolean** | If checked, the transferor is a foreign person (nonresident alien, foreign partnership, foreign estate or foreign trust) | [optional] | +|**buyersPartOfRealEstateTax** | **Double** | Buyer's part of real estate tax | [optional] | |**wages** | **Double** | Wages, tips, other compensation. | [optional] | |**socialSecurityWages** | **Double** | Social security wages. | [optional] | |**socialSecurityTaxWithheld** | **Double** | Social security tax withheld. | [optional] | @@ -478,6 +502,8 @@ | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -485,6 +511,7 @@ | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | @@ -537,6 +564,22 @@ +## Enum: IdentifiableEventCodeEnum + +| Name | Value | +|---- | -----| +| A | "A" | +| B | "B" | +| C | "C" | +| D | "D" | +| E | "E" | +| F | "F" | +| G | "G" | +| H | "H" | +| I | "I" | + + + ## Enum: FilerTypeEnum | Name | Value | diff --git a/docs/A1099/V2/IrisFormBase.md b/docs/A1099/V2/IrisFormBase.md index cbbb929..b8e2328 100644 --- a/docs/A1099/V2/IrisFormBase.md +++ b/docs/A1099/V2/IrisFormBase.md @@ -62,6 +62,8 @@ | _1042_S | "1042-S" | | _1095_B | "1095-B" | | _1095_C | "1095-C" | +| _1098 | "1098" | +| _1099_C | "1099-C" | | _1099_DIV | "1099-DIV" | | _1099_INT | "1099-INT" | | _1099_K | "1099-K" | @@ -69,6 +71,7 @@ | _1099_NEC | "1099-NEC" | | _1099_PATR | "1099-PATR" | | _1099_R | "1099-R" | +| _1099_S | "1099-S" | | W_2 | "W-2" | diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index e2edde9..ecc9773 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -49,7 +49,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "1516e2f1-02f3-43af-afd4-392db3192b04"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "020085b2-ced8-4d4e-8d8e-aac8901ba664"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IssuerRequest issuerRequest = new IssuerRequest(); // IssuerRequest | The issuer to create try { @@ -136,7 +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 = "56cf179b-af17-4c42-8061-a8491fb9c4e9"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "eeca9729-5b2f-4ba1-a3c7-bf49c3705b52"; // 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 = "a908e994-d311-4d60-9820-9b0739828e8a"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "1ba68926-014a-4e57-ac33-5120f7d67ad5"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { IssuerResponse result = apiInstance.getIssuer(id, avalaraVersion, xCorrelationId, xAvalaraClient); @@ -312,7 +312,7 @@ public class Example { String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. Boolean count = true; // Boolean | If true, return the global count of elements in the collection. Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - String xCorrelationId = "149439c7-4a09-460d-9d0d-ef39ae99864d"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "0b7d8a8b-c34a-48e3-bf9e-86c475547496"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . try { PaginatedQueryResultModelIssuerResponse result = apiInstance.getIssuers(avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); @@ -405,7 +405,7 @@ public class Example { Issuers1099Api apiInstance = new Issuers1099Api(apiClient); String id = "id_example"; // String | Id of the issuer to update String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "d8e70cf2-9795-4468-a7e2-16b1e6faac48"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "5dcb2f2c-e12d-4e11-aeaa-dfbd23bbe954"; // String | Unique correlation Id in a GUID format String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . IssuerRequest issuerRequest = new IssuerRequest(); // IssuerRequest | The issuer to update try { diff --git a/docs/A1099/V2/JobsApi.md b/docs/A1099/V2/JobsApi.md index 974f90a..bc361b7 100644 --- a/docs/A1099/V2/JobsApi.md +++ b/docs/A1099/V2/JobsApi.md @@ -46,7 +46,7 @@ public class Example { JobsApi apiInstance = new JobsApi(apiClient); String id = "id_example"; // String | Job id obtained from other API responses, like `/1099/bulk-upsert`. String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "29e0724f-104f-4657-9374-7e8dc99054ef"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "b87aeebf-8db8-476b-b885-0e27d598bbfa"; // 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/PaginatedQueryResultModelBulkTinMatchResultItemResponse.md b/docs/A1099/V2/PaginatedQueryResultModelBulkTinMatchResultItemResponse.md new file mode 100644 index 0000000..e1f1c5f --- /dev/null +++ b/docs/A1099/V2/PaginatedQueryResultModelBulkTinMatchResultItemResponse.md @@ -0,0 +1,16 @@ + + +# PaginatedQueryResultModelBulkTinMatchResultItemResponse + +Generic paginated model to wrap query response data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**atRecordsetCount** | **Integer** | | [optional] | +|**value** | [**List<BulkTinMatchResultItemResponse>**](BulkTinMatchResultItemResponse.md) | | [optional] | +|**atNextLink** | **String** | | [optional] | + + + diff --git a/docs/A1099/V2/TinMatchesApi.md b/docs/A1099/V2/TinMatchesApi.md index 181459e..53fff37 100644 --- a/docs/A1099/V2/TinMatchesApi.md +++ b/docs/A1099/V2/TinMatchesApi.md @@ -4,10 +4,194 @@ All URIs are relative to *https://api.sbx.avalara.com/avalara1099* Method | HTTP request | Description ------------- | ------------- | ------------- +[**getBulkTinMatch**](TinMatchesApi.md#getBulkTinMatch) | **GET** /tin-matches/$bulk/{id} | Get bulk TIN match details +[**getBulkTinMatchResults**](TinMatchesApi.md#getBulkTinMatchResults) | **GET** /tin-matches/$bulk/{id}/results | List bulk TIN match results [**performRealTimeTinMatch**](TinMatchesApi.md#performRealTimeTinMatch) | **POST** /tin-matches/$real-time | Perform real time TIN Match +[**submitBulkTinMatch**](TinMatchesApi.md#submitBulkTinMatch) | **POST** /tin-matches/$bulk | Submit bulk TIN match +## getBulkTinMatch + +> BulkTinMatchResponse getBulkTinMatch(id, avalaraVersion, xCorrelationId, xAvalaraClient) + +Get bulk TIN match details + +### 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 id = "id_example"; // String | The bulk ID + String avalaraVersion = "2.0.0"; // String | API version + String xCorrelationId = "df30781a-da37-45b3-be01-d835e5d0ad8b"; // String | Unique correlation Id in a GUID format + String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . + try { + BulkTinMatchResponse result = apiInstance.getBulkTinMatch(id, avalaraVersion, xCorrelationId, xAvalaraClient); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TinMatchesApi#getBulkTinMatch"); + 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 +------------- | ------------- | ------------- | ------------- + **id** | **String**| The bulk ID | + **avalaraVersion** | **String**| API version | + **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] + **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] + +### Return type + +[**BulkTinMatchResponse**](BulkTinMatchResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Bulk TIN match details | - | +| **401** | Authentication failed | - | +| **404** | Bulk not found | - | + + +## getBulkTinMatchResults + +> PaginatedQueryResultModelBulkTinMatchResultItemResponse getBulkTinMatchResults(id, avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient) + +List bulk TIN match results + +### 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 id = "id_example"; // String | The bulk ID + String avalaraVersion = "2.0.0"; // String | API version + String $filter = "$filter_example"; // String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. + Integer $top = 56; // Integer | If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. + Integer $skip = 56; // Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. + String $orderBy = "$orderBy_example"; // String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. + Boolean count = true; // Boolean | If true, return the global count of elements in the collection. + Boolean countOnly = true; // Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. + String xCorrelationId = "98367ed4-44bb-4254-a388-ec2e63ac293e"; // String | Unique correlation Id in a GUID format + String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . + try { + PaginatedQueryResultModelBulkTinMatchResultItemResponse result = apiInstance.getBulkTinMatchResults(id, avalaraVersion, $filter, $top, $skip, $orderBy, count, countOnly, xCorrelationId, xAvalaraClient); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TinMatchesApi#getBulkTinMatchResults"); + 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 +------------- | ------------- | ------------- | ------------- + **id** | **String**| The bulk ID | + **avalaraVersion** | **String**| API version | + **$filter** | **String**| A filter statement to identify specific records to retrieve. For more information on filtering, see <a href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</a>. | [optional] + **$top** | **Integer**| If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. | [optional] + **$skip** | **Integer**| If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. | [optional] + **$orderBy** | **String**| A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. | [optional] + **count** | **Boolean**| If true, return the global count of elements in the collection. | [optional] + **countOnly** | **Boolean**| If true, return ONLY the global count of elements in the collection. It only applies when count=true. | [optional] + **xCorrelationId** | **String**| Unique correlation Id in a GUID format | [optional] + **xAvalaraClient** | **String**| Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . | [optional] + +### Return type + +[**PaginatedQueryResultModelBulkTinMatchResultItemResponse**](PaginatedQueryResultModelBulkTinMatchResultItemResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | List of TIN match responses | - | +| **400** | Bad request (e.g., invalid sort key) | - | +| **401** | Authentication failed | - | +| **404** | Bulk not found | - | + + ## performRealTimeTinMatch > RealTimeTinMatchResponse performRealTimeTinMatch(avalaraVersion, xCorrelationId, xAvalaraClient, realTimeTinMatchRequest) @@ -45,7 +229,7 @@ public class Example { TinMatchesApi apiInstance = new TinMatchesApi(apiClient); String avalaraVersion = "2.0.0"; // String | API version - String xCorrelationId = "a4f97e62-2087-4274-b92f-39377f73fb20"; // String | Unique correlation Id in a GUID format + String xCorrelationId = "7d625954-787a-4153-8365-45cef8288be1"; // 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 { @@ -96,3 +280,87 @@ Name | Type | Description | Notes | **403** | Authorization failed (lack of permissions or product not purchased) | - | | **503** | IRS Service is not available. Client should retry later. | - | + +## submitBulkTinMatch + +> BulkTinMatchAcceptedResponse submitBulkTinMatch(avalaraVersion, xCorrelationId, xAvalaraClient, bulkTinMatchRequest) + +Submit bulk 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 = "3f051c64-117a-46f1-b9b5-324064394c6a"; // String | Unique correlation Id in a GUID format + String xAvalaraClient = "Swagger UI; 22.1.0"; // String | Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . + BulkTinMatchRequest bulkTinMatchRequest = new BulkTinMatchRequest(); // BulkTinMatchRequest | Required TIN collection to perform bulk TIN match + try { + BulkTinMatchAcceptedResponse result = apiInstance.submitBulkTinMatch(avalaraVersion, xCorrelationId, xAvalaraClient, bulkTinMatchRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TinMatchesApi#submitBulkTinMatch"); + 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] + **bulkTinMatchRequest** | [**BulkTinMatchRequest**](BulkTinMatchRequest.md)| Required TIN collection to perform bulk TIN match | [optional] + +### Return type + +[**BulkTinMatchAcceptedResponse**](BulkTinMatchAcceptedResponse.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 | +|-------------|-------------|------------------| +| **202** | Accepted submission, indicating it will be processed later and where to get results from | - | +| **400** | Bad request (e.g. invalid field values) | - | +| **401** | Authentication failed | - | + diff --git a/docs/EInvoicing/V1/CodeListsApi.md b/docs/EInvoicing/V1/CodeListsApi.md index 7b32f1c..f5da58c 100644 --- a/docs/EInvoicing/V1/CodeListsApi.md +++ b/docs/EInvoicing/V1/CodeListsApi.md @@ -49,8 +49,8 @@ public class Example { String codelistId = "ab123343-3432-423c-ac3f-53453scs9999"; // String | System-generated unique identifier of the code list definition. Typically a UUID used to reference this code list internally or via APIs. String countryCode = "FR"; // String | Two-letter ISO 3166-1 alpha-2 country code indicating the jurisdiction this code list applies to. String xAvalaraClient = "John's E-Invoicing-API Client"; // String | Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). - LocalDate effectiveDate = LocalDate.parse("Tue Dec 31 16:00:00 PST 2024"); // LocalDate | Filter code list versions by effective date. Returns versions that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. - LocalDate sunsetDate = LocalDate.parse("Wed Dec 30 16:00:00 PST 2026"); // LocalDate | Filter code list versions by sunset date. Returns versions that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired versions are returned. + LocalDate effectiveDate = LocalDate.parse("Wed Jan 01 00:00:00 UTC 2025"); // LocalDate | Filter code list versions by effective date. Returns versions that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. + LocalDate sunsetDate = LocalDate.parse("Thu Dec 31 00:00:00 UTC 2026"); // LocalDate | Filter code list versions by sunset date. Returns versions that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired versions are returned. try { CodeListResponse result = apiInstance.getCodeList(avalaraVersion, codelistId, countryCode, xAvalaraClient, effectiveDate, sunsetDate); System.out.println(result); @@ -140,8 +140,8 @@ public class Example { String avalaraVersion = "1.6"; // String | Header that specifies the API version to use (for example \"1.6\"). String countryCode = "FR"; // String | Two-letter ISO 3166-1 alpha-2 country code indicating the jurisdiction for which code lists should be returned. String xAvalaraClient = "John's E-Invoicing-API Client"; // String | Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). - LocalDate effectiveDate = LocalDate.parse("Tue Dec 31 16:00:00 PST 2024"); // LocalDate | Filter code lists by effective date. Returns code lists that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. - LocalDate sunsetDate = LocalDate.parse("Wed Dec 30 16:00:00 PST 2026"); // LocalDate | Filter code lists by sunset date. Returns code lists that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired code lists are returned. + LocalDate effectiveDate = LocalDate.parse("Wed Jan 01 00:00:00 UTC 2025"); // LocalDate | Filter code lists by effective date. Returns code lists that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. + LocalDate sunsetDate = LocalDate.parse("Thu Dec 31 00:00:00 UTC 2026"); // LocalDate | Filter code lists by sunset date. Returns code lists that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired code lists are returned. String $count = "true"; // String | When set to true, the response body also includes the count of items in the collection. String $countOnly = "false"; // String | When set to true, the response returns only the count of items in the collection. Integer $top = 56; // Integer | The number of items to include in the result. diff --git a/pom.xml b/pom.xml index 2e9d8cd..0748d01 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ avalara-sdk jar avalara-sdk - 26.9.0 + 26.9.1 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 d56003a..016a1a3 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/CompaniesW9Api.java @@ -1,1095 +1,1095 @@ -/* - * 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.CompanyRequest; -import Avalara.SDK.model.A1099.V2.CompanyResponse; -import Avalara.SDK.model.A1099.V2.ErrorResponse; -import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelCompanyResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CompaniesW9Api { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CompaniesW9Api(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 createCompany - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
- */ - public okhttp3.Call createCompanyCall(CreateCompanyRequest 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.getCompanyRequest(); - - // create path and map variables - String localVarPath = "/w9/companies"; - - 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 createCompanyValidateBeforeCall(CreateCompanyRequest 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 createCompany(Async)"); - } - - - okhttp3.Call localVarCall = createCompanyCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Create a company - * Create a company. - * @param requestOptions Object which represents the options available for a given API/request - * @return CompanyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
- */ - public CompanyResponse createCompany(CreateCompanyRequest requestParameters) throws ApiException { - ApiResponse localVarResp = createCompanyWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Create a company - * Create a company. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CompanyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
- */ - public ApiResponse createCompanyWithHttpInfo(CreateCompanyRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = createCompanyValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a company (asynchronously) - * Create a company. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
- */ - public okhttp3.Call createCompanyAsync(CreateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createCompanyValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the CreateCompany 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 companyRequest The company to create (optional) - */ - public class CreateCompanyRequest { - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private CompanyRequest companyRequest; - - public CreateCompanyRequest () { - } - - 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 CompanyRequest getCompanyRequest() { return companyRequest; } - public void setCompanyRequest(CompanyRequest companyRequest) { this.companyRequest = companyRequest; } - } - - /** - * Getter function to instantiate Request class - * @returns CreateCompanyRequest - */ - public CreateCompanyRequest getCreateCompanyRequest() { - return this.new CreateCompanyRequest(); - } - - /** - * Build call for deleteCompany - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
409 Company can't be deleted since it still have forms associated with it. -
500 An error happened while attempting to delete the company. -
- */ - public okhttp3.Call deleteCompanyCall(DeleteCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/companies/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCompanyValidateBeforeCall(DeleteCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling deleteCompany(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteCompany(Async)"); - } - - - okhttp3.Call localVarCall = deleteCompanyCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Delete a company - * Delete a company. - * @param requestOptions Object which represents the options available for a given API/request - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
409 Company can't be deleted since it still have forms associated with it. -
500 An error happened while attempting to delete the company. -
- */ - public void deleteCompany(DeleteCompanyRequest requestParameters) throws ApiException { - deleteCompanyWithHttpInfo(requestParameters); - } - - /** - * Delete a company - * Delete a company. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
409 Company can't be deleted since it still have forms associated with it. -
500 An error happened while attempting to delete the company. -
- */ - public ApiResponse deleteCompanyWithHttpInfo(DeleteCompanyRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = deleteCompanyValidateBeforeCall(requestParameters, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete a company (asynchronously) - * Delete a company. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
409 Company can't be deleted since it still have forms associated with it. -
500 An error happened while attempting to delete the company. -
- */ - public okhttp3.Call deleteCompanyAsync(DeleteCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteCompanyValidateBeforeCall(requestParameters, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Represents the Request object for the DeleteCompany API - * - * @param id The company to delete - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class DeleteCompanyRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public DeleteCompanyRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns DeleteCompanyRequest - */ - public DeleteCompanyRequest getDeleteCompanyRequest() { - return this.new DeleteCompanyRequest(); - } - - /** - * Build call for getCompanies - * @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 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
- */ - public okhttp3.Call getCompaniesCall(GetCompaniesRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/companies"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.get$filter() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); - } - - if (requestParameters.get$top() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); - } - - if (requestParameters.get$skip() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); - } - - if (requestParameters.get$orderBy() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); - } - - if (requestParameters.getCount() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); - } - - if (requestParameters.getCountOnly() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getCompaniesValidateBeforeCall(GetCompaniesRequest 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 getCompanies(Async)"); - } - - - okhttp3.Call localVarCall = getCompaniesCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * List companies - * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". - * @param requestOptions Object which represents the options available for a given API/request - * @return PaginatedQueryResultModelCompanyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
- */ - public PaginatedQueryResultModelCompanyResponse getCompanies(GetCompaniesRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getCompaniesWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * List companies - * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<PaginatedQueryResultModelCompanyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
- */ - public ApiResponse getCompaniesWithHttpInfo(GetCompaniesRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getCompaniesValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List companies (asynchronously) - * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". - * @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 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
- */ - public okhttp3.Call getCompaniesAsync(GetCompaniesRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getCompaniesValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetCompanies API - * - * @param avalaraVersion API version - * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) - * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) - * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) - * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) - * @param count If true, return the global count of elements in the collection. (optional) - * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class GetCompaniesRequest { - private String avalaraVersion; - private String $filter; - private Integer $top; - private Integer $skip; - private String $orderBy; - private Boolean count; - private Boolean countOnly; - private String xCorrelationId; - private String xAvalaraClient; - - public GetCompaniesRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String get$filter() { return $filter; } - public void set$filter(String $filter) { this.$filter = $filter; } - public Integer get$top() { return $top; } - public void set$top(Integer $top) { this.$top = $top; } - public Integer get$skip() { return $skip; } - public void set$skip(Integer $skip) { this.$skip = $skip; } - public String get$orderBy() { return $orderBy; } - public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } - public Boolean getCount() { return count; } - public void setCount(Boolean count) { this.count = count; } - public Boolean getCountOnly() { return countOnly; } - public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns GetCompaniesRequest - */ - public GetCompaniesRequest getGetCompaniesRequest() { - return this.new GetCompaniesRequest(); - } - - /** - * Build call for getCompany - * @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 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
500 Server Error -
401 Authentication failed -
- */ - public okhttp3.Call getCompanyCall(GetCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/companies/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getCompanyValidateBeforeCall(GetCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getCompany(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getCompany(Async)"); - } - - - okhttp3.Call localVarCall = getCompanyCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Retrieve a company - * Retrieve a company. - * @param requestOptions Object which represents the options available for a given API/request - * @return CompanyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
500 Server Error -
401 Authentication failed -
- */ - public CompanyResponse getCompany(GetCompanyRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getCompanyWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Retrieve a company - * Retrieve a company. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CompanyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
500 Server Error -
401 Authentication failed -
- */ - public ApiResponse getCompanyWithHttpInfo(GetCompanyRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getCompanyValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a company (asynchronously) - * Retrieve a company. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @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 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
500 Server Error -
401 Authentication failed -
- */ - public okhttp3.Call getCompanyAsync(GetCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getCompanyValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetCompany API - * - * @param id Id of the company - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class GetCompanyRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public GetCompanyRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns GetCompanyRequest - */ - public GetCompanyRequest getGetCompanyRequest() { - return this.new GetCompanyRequest(); - } - - /** - * Build call for updateCompany - * @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 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
404 Company not found -
- */ - public okhttp3.Call updateCompanyCall(UpdateCompanyRequest 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.getCompanyRequest(); - - // create path and map variables - String localVarPath = "/w9/companies/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateCompanyValidateBeforeCall(UpdateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling updateCompany(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling updateCompany(Async)"); - } - - - okhttp3.Call localVarCall = updateCompanyCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Update a company - * Update a company. - * @param requestOptions Object which represents the options available for a given API/request - * @return CompanyResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
404 Company not found -
- */ - public CompanyResponse updateCompany(UpdateCompanyRequest requestParameters) throws ApiException { - ApiResponse localVarResp = updateCompanyWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Update a company - * Update a company. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CompanyResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
404 Company not found -
- */ - public ApiResponse updateCompanyWithHttpInfo(UpdateCompanyRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = updateCompanyValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a company (asynchronously) - * Update a company. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @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 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
404 Company not found -
- */ - public okhttp3.Call updateCompanyAsync(UpdateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateCompanyValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the UpdateCompany API - * - * @param id The ID of the company to update - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param companyRequest The updated company data (optional) - */ - public class UpdateCompanyRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private CompanyRequest companyRequest; - - public UpdateCompanyRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - 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 CompanyRequest getCompanyRequest() { return companyRequest; } - public void setCompanyRequest(CompanyRequest companyRequest) { this.companyRequest = companyRequest; } - } - - /** - * Getter function to instantiate Request class - * @returns UpdateCompanyRequest - */ - public UpdateCompanyRequest getUpdateCompanyRequest() { - return this.new UpdateCompanyRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * 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.CompanyRequest; +import Avalara.SDK.model.A1099.V2.CompanyResponse; +import Avalara.SDK.model.A1099.V2.ErrorResponse; +import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelCompanyResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CompaniesW9Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public CompaniesW9Api(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 createCompany + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ */ + public okhttp3.Call createCompanyCall(CreateCompanyRequest 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.getCompanyRequest(); + + // create path and map variables + String localVarPath = "/w9/companies"; + + 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 createCompanyValidateBeforeCall(CreateCompanyRequest 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 createCompany(Async)"); + } + + + okhttp3.Call localVarCall = createCompanyCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Create a company + * Create a company. + * @param requestOptions Object which represents the options available for a given API/request + * @return CompanyResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ */ + public CompanyResponse createCompany(CreateCompanyRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createCompanyWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Create a company + * Create a company. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CompanyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ */ + public ApiResponse createCompanyWithHttpInfo(CreateCompanyRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = createCompanyValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a company (asynchronously) + * Create a company. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Created company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
+ */ + public okhttp3.Call createCompanyAsync(CreateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createCompanyValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the CreateCompany 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 companyRequest The company to create (optional) + */ + public class CreateCompanyRequest { + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private CompanyRequest companyRequest; + + public CreateCompanyRequest () { + } + + 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 CompanyRequest getCompanyRequest() { return companyRequest; } + public void setCompanyRequest(CompanyRequest companyRequest) { this.companyRequest = companyRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns CreateCompanyRequest + */ + public CreateCompanyRequest getCreateCompanyRequest() { + return this.new CreateCompanyRequest(); + } + + /** + * Build call for deleteCompany + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
409 Company can't be deleted since it still have forms associated with it. -
500 An error happened while attempting to delete the company. -
+ */ + public okhttp3.Call deleteCompanyCall(DeleteCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/companies/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteCompanyValidateBeforeCall(DeleteCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling deleteCompany(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteCompany(Async)"); + } + + + okhttp3.Call localVarCall = deleteCompanyCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Delete a company + * Delete a company. + * @param requestOptions Object which represents the options available for a given API/request + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
409 Company can't be deleted since it still have forms associated with it. -
500 An error happened while attempting to delete the company. -
+ */ + public void deleteCompany(DeleteCompanyRequest requestParameters) throws ApiException { + deleteCompanyWithHttpInfo(requestParameters); + } + + /** + * Delete a company + * Delete a company. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
409 Company can't be deleted since it still have forms associated with it. -
500 An error happened while attempting to delete the company. -
+ */ + public ApiResponse deleteCompanyWithHttpInfo(DeleteCompanyRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = deleteCompanyValidateBeforeCall(requestParameters, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a company (asynchronously) + * Delete a company. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Company deleted -
401 Authentication failed. -
404 Company was not found or your user does not have to permission to delete it. -
409 Company can't be deleted since it still have forms associated with it. -
500 An error happened while attempting to delete the company. -
+ */ + public okhttp3.Call deleteCompanyAsync(DeleteCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCompanyValidateBeforeCall(requestParameters, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Represents the Request object for the DeleteCompany API + * + * @param id The company to delete + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class DeleteCompanyRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public DeleteCompanyRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns DeleteCompanyRequest + */ + public DeleteCompanyRequest getDeleteCompanyRequest() { + return this.new DeleteCompanyRequest(); + } + + /** + * Build call for getCompanies + * @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 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
+ */ + public okhttp3.Call getCompaniesCall(GetCompaniesRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/companies"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.get$filter() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); + } + + if (requestParameters.get$top() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); + } + + if (requestParameters.get$skip() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); + } + + if (requestParameters.get$orderBy() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); + } + + if (requestParameters.getCount() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); + } + + if (requestParameters.getCountOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCompaniesValidateBeforeCall(GetCompaniesRequest 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 getCompanies(Async)"); + } + + + okhttp3.Call localVarCall = getCompaniesCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * List companies + * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". + * @param requestOptions Object which represents the options available for a given API/request + * @return PaginatedQueryResultModelCompanyResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
+ */ + public PaginatedQueryResultModelCompanyResponse getCompanies(GetCompaniesRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getCompaniesWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * List companies + * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<PaginatedQueryResultModelCompanyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
+ */ + public ApiResponse getCompaniesWithHttpInfo(GetCompaniesRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getCompaniesValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List companies (asynchronously) + * List existing companies. Filterable/Sortable fields are: \"name\", \"referenceId\", \"group.name\", \"createdAt\" and \"updatedAt\". + * @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 List of companies -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
+ */ + public okhttp3.Call getCompaniesAsync(GetCompaniesRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCompaniesValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetCompanies API + * + * @param avalaraVersion API version + * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) + * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) + * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) + * @param count If true, return the global count of elements in the collection. (optional) + * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetCompaniesRequest { + private String avalaraVersion; + private String $filter; + private Integer $top; + private Integer $skip; + private String $orderBy; + private Boolean count; + private Boolean countOnly; + private String xCorrelationId; + private String xAvalaraClient; + + public GetCompaniesRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String get$filter() { return $filter; } + public void set$filter(String $filter) { this.$filter = $filter; } + public Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } + public String get$orderBy() { return $orderBy; } + public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } + public Boolean getCount() { return count; } + public void setCount(Boolean count) { this.count = count; } + public Boolean getCountOnly() { return countOnly; } + public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetCompaniesRequest + */ + public GetCompaniesRequest getGetCompaniesRequest() { + return this.new GetCompaniesRequest(); + } + + /** + * Build call for getCompany + * @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 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
500 Server Error -
401 Authentication failed -
+ */ + public okhttp3.Call getCompanyCall(GetCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/companies/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCompanyValidateBeforeCall(GetCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getCompany(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getCompany(Async)"); + } + + + okhttp3.Call localVarCall = getCompanyCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Retrieve a company + * Retrieve a company. + * @param requestOptions Object which represents the options available for a given API/request + * @return CompanyResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
500 Server Error -
401 Authentication failed -
+ */ + public CompanyResponse getCompany(GetCompanyRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getCompanyWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Retrieve a company + * Retrieve a company. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CompanyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
500 Server Error -
401 Authentication failed -
+ */ + public ApiResponse getCompanyWithHttpInfo(GetCompanyRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getCompanyValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a company (asynchronously) + * Retrieve a company. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @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 Single company -
400 Bad request (e.g., invalid sort key) -
404 Company not found -
500 Server Error -
401 Authentication failed -
+ */ + public okhttp3.Call getCompanyAsync(GetCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCompanyValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetCompany API + * + * @param id Id of the company + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetCompanyRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public GetCompanyRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetCompanyRequest + */ + public GetCompanyRequest getGetCompanyRequest() { + return this.new GetCompanyRequest(); + } + + /** + * Build call for updateCompany + * @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 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
404 Company not found -
+ */ + public okhttp3.Call updateCompanyCall(UpdateCompanyRequest 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.getCompanyRequest(); + + // create path and map variables + String localVarPath = "/w9/companies/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateCompanyValidateBeforeCall(UpdateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling updateCompany(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling updateCompany(Async)"); + } + + + okhttp3.Call localVarCall = updateCompanyCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Update a company + * Update a company. + * @param requestOptions Object which represents the options available for a given API/request + * @return CompanyResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
404 Company not found -
+ */ + public CompanyResponse updateCompany(UpdateCompanyRequest requestParameters) throws ApiException { + ApiResponse localVarResp = updateCompanyWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Update a company + * Update a company. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CompanyResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
404 Company not found -
+ */ + public ApiResponse updateCompanyWithHttpInfo(UpdateCompanyRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = updateCompanyValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a company (asynchronously) + * Update a company. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @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 Updated company -
400 Bad request (e.g., model validation failed) -
401 Authentication failed -
404 Company not found -
+ */ + public okhttp3.Call updateCompanyAsync(UpdateCompanyRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateCompanyValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the UpdateCompany API + * + * @param id The ID of the company to update + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + * @param companyRequest The updated company data (optional) + */ + public class UpdateCompanyRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private CompanyRequest companyRequest; + + public UpdateCompanyRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + 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 CompanyRequest getCompanyRequest() { return companyRequest; } + public void setCompanyRequest(CompanyRequest companyRequest) { this.companyRequest = companyRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns UpdateCompanyRequest + */ + public UpdateCompanyRequest getUpdateCompanyRequest() { + return this.new UpdateCompanyRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 16e2a7e..851d189 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Forms1099Api.java @@ -1,1515 +1,1515 @@ -/* - * 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 java.io.File; -import Avalara.SDK.model.A1099.V2.Form1099ListRequest; -import Avalara.SDK.model.A1099.V2.Get1099Form200Response; -import Avalara.SDK.model.A1099.V2.JobResponse; -import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelForm1099Base; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class Forms1099Api { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public Forms1099Api(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 bulkUpsert1099Forms - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call bulkUpsert1099FormsCall(BulkUpsert1099FormsRequest 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.getForm1099ListRequest(); - - // create path and map variables - String localVarPath = "/1099/forms/$bulk-upsert"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getDryRun() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", requestParameters.getDryRun())); - } - - 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 bulkUpsert1099FormsValidateBeforeCall(BulkUpsert1099FormsRequest 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 bulkUpsert1099Forms(Async)"); - } - - - okhttp3.Call localVarCall = bulkUpsert1099FormsCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Create or update multiple 1099/1095/W2/1042S forms - * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. - * @param requestOptions Object which represents the options available for a given API/request - * @return JobResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public JobResponse bulkUpsert1099Forms(BulkUpsert1099FormsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = bulkUpsert1099FormsWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Create or update multiple 1099/1095/W2/1042S forms - * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<JobResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public ApiResponse bulkUpsert1099FormsWithHttpInfo(BulkUpsert1099FormsRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = bulkUpsert1099FormsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create or update multiple 1099/1095/W2/1042S forms (asynchronously) - * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call bulkUpsert1099FormsAsync(BulkUpsert1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = bulkUpsert1099FormsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the BulkUpsert1099Forms API - * - * @param avalaraVersion API version - * @param dryRun 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 (optional, default to false) - * @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 form1099ListRequest (optional) - */ - public class BulkUpsert1099FormsRequest { - private String avalaraVersion; - private Boolean dryRun; - private String xCorrelationId; - private String xAvalaraClient; - private Form1099ListRequest form1099ListRequest; - - public BulkUpsert1099FormsRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public Boolean getDryRun() { return dryRun; } - public void setDryRun(Boolean dryRun) { this.dryRun = dryRun; } - 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 Form1099ListRequest getForm1099ListRequest() { return form1099ListRequest; } - public void setForm1099ListRequest(Form1099ListRequest form1099ListRequest) { this.form1099ListRequest = form1099ListRequest; } - } - - /** - * Getter function to instantiate Request class - * @returns BulkUpsert1099FormsRequest - */ - public BulkUpsert1099FormsRequest getBulkUpsert1099FormsRequest() { - return this.new BulkUpsert1099FormsRequest(); - } - - /** - * Build call for create1099Form - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 Created -
400 Bad Request -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call create1099FormCall(Create1099FormRequest 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.getGet1099Form200Response(); - - // create path and map variables - String localVarPath = "/1099/forms"; - - 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 create1099FormValidateBeforeCall(Create1099FormRequest 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 create1099Form(Async)"); - } - - - okhttp3.Call localVarCall = create1099FormCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Create a 1099/1095/W2/1042S form - * Create a 1099/1095/W2/1042S form. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. - * @param requestOptions Object which represents the options available for a given API/request - * @return Get1099Form200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 Created -
400 Bad Request -
500 Server Error -
401 Unauthorized -
- */ - public Get1099Form200Response create1099Form(Create1099FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = create1099FormWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Create a 1099/1095/W2/1042S form - * Create a 1099/1095/W2/1042S form. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Get1099Form200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 Created -
400 Bad Request -
500 Server Error -
401 Unauthorized -
- */ - public ApiResponse create1099FormWithHttpInfo(Create1099FormRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = create1099FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a 1099/1095/W2/1042S form (asynchronously) - * Create a 1099/1095/W2/1042S form. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 Created -
400 Bad Request -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call create1099FormAsync(Create1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = create1099FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the Create1099Form 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 get1099Form200Response (optional) - */ - public class Create1099FormRequest { - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private Get1099Form200Response get1099Form200Response; - - public Create1099FormRequest () { - } - - 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 Get1099Form200Response getGet1099Form200Response() { return get1099Form200Response; } - public void setGet1099Form200Response(Get1099Form200Response get1099Form200Response) { this.get1099Form200Response = get1099Form200Response; } - } - - /** - * Getter function to instantiate Request class - * @returns Create1099FormRequest - */ - public Create1099FormRequest getCreate1099FormRequest() { - return this.new Create1099FormRequest(); - } - - /** - * Build call for delete1099Form - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
422 Client Error -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call delete1099FormCall(Delete1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/1099/forms/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call delete1099FormValidateBeforeCall(Delete1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling delete1099Form(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling delete1099Form(Async)"); - } - - - okhttp3.Call localVarCall = delete1099FormCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Delete a 1099/1095/W2/1042S form - * Delete a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
422 Client Error -
500 Server Error -
401 Unauthorized -
- */ - public void delete1099Form(Delete1099FormRequest requestParameters) throws ApiException { - delete1099FormWithHttpInfo(requestParameters); - } - - /** - * Delete a 1099/1095/W2/1042S form - * Delete a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
422 Client Error -
500 Server Error -
401 Unauthorized -
- */ - public ApiResponse delete1099FormWithHttpInfo(Delete1099FormRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = delete1099FormValidateBeforeCall(requestParameters, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete a 1099/1095/W2/1042S form (asynchronously) - * Delete a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
422 Client Error -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call delete1099FormAsync(Delete1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = delete1099FormValidateBeforeCall(requestParameters, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Represents the Request object for the Delete1099Form API - * - * @param id The unique identifier of the desired form to delete. - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class Delete1099FormRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public Delete1099FormRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns Delete1099FormRequest - */ - public Delete1099FormRequest getDelete1099FormRequest() { - return this.new Delete1099FormRequest(); - } - - /** - * Build call for get1099Form - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call get1099FormCall(Get1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/1099/forms/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call get1099FormValidateBeforeCall(Get1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling get1099Form(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling get1099Form(Async)"); - } - - - okhttp3.Call localVarCall = get1099FormCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Retrieve a 1099/1095/W2/1042S form - * Retrieve a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @return Get1099Form200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public Get1099Form200Response get1099Form(Get1099FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = get1099FormWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Retrieve a 1099/1095/W2/1042S form - * Retrieve a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Get1099Form200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public ApiResponse get1099FormWithHttpInfo(Get1099FormRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = get1099FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a 1099/1095/W2/1042S form (asynchronously) - * Retrieve a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call get1099FormAsync(Get1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = get1099FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the Get1099Form API - * - * @param id - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class Get1099FormRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public Get1099FormRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns Get1099FormRequest - */ - public Get1099FormRequest getGet1099FormRequest() { - return this.new Get1099FormRequest(); - } - - /** - * Build call for get1099FormPdf - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call get1099FormPdfCall(Get1099FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/1099/forms/{id}/pdf" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getMarkEdelivered() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("markEdelivered", requestParameters.getMarkEdelivered())); - } - - 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/pdf", "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call get1099FormPdfValidateBeforeCall(Get1099FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling get1099FormPdf(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling get1099FormPdf(Async)"); - } - - - okhttp3.Call localVarCall = get1099FormPdfCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Retrieve the PDF file for a 1099/1095/W2/1042S form - * Retrieve the PDF file for a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public File get1099FormPdf(Get1099FormPdfRequest requestParameters) throws ApiException { - ApiResponse localVarResp = get1099FormPdfWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Retrieve the PDF file for a 1099/1095/W2/1042S form - * Retrieve the PDF file for a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public ApiResponse get1099FormPdfWithHttpInfo(Get1099FormPdfRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = get1099FormPdfValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve the PDF file for a 1099/1095/W2/1042S form (asynchronously) - * Retrieve the PDF file for a 1099/1095/W2/1042S form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call get1099FormPdfAsync(Get1099FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = get1099FormPdfValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the Get1099FormPdf API - * - * @param id The ID of the form - * @param avalaraVersion API version - * @param markEdelivered Optional boolean that if set indicates that the form should be marked as having been successfully edelivered (optional) - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class Get1099FormPdfRequest { - private String id; - private String avalaraVersion; - private Boolean markEdelivered; - private String xCorrelationId; - private String xAvalaraClient; - - public Get1099FormPdfRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public Boolean getMarkEdelivered() { return markEdelivered; } - public void setMarkEdelivered(Boolean markEdelivered) { this.markEdelivered = markEdelivered; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns Get1099FormPdfRequest - */ - public Get1099FormPdfRequest getGet1099FormPdfRequest() { - return this.new Get1099FormPdfRequest(); - } - - /** - * Build call for list1099Forms - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call list1099FormsCall(List1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/1099/forms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.get$filter() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); - } - - if (requestParameters.get$top() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); - } - - if (requestParameters.get$skip() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); - } - - if (requestParameters.get$orderBy() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); - } - - if (requestParameters.getCount() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); - } - - if (requestParameters.getCountOnly() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call list1099FormsValidateBeforeCall(List1099FormsRequest 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 list1099Forms(Async)"); - } - - - okhttp3.Call localVarCall = list1099FormsCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * List 1099/1095/W2/1042S forms - * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. - * @param requestOptions Object which represents the options available for a given API/request - * @return PaginatedQueryResultModelForm1099Base - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public PaginatedQueryResultModelForm1099Base list1099Forms(List1099FormsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = list1099FormsWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * List 1099/1095/W2/1042S forms - * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<PaginatedQueryResultModelForm1099Base> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public ApiResponse list1099FormsWithHttpInfo(List1099FormsRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = list1099FormsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List 1099/1095/W2/1042S forms (asynchronously) - * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call list1099FormsAsync(List1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = list1099FormsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the List1099Forms API - * - * @param avalaraVersion API version - * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) - * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) - * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) - * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) - * @param count If true, return the global count of elements in the collection. (optional) - * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class List1099FormsRequest { - private String avalaraVersion; - private String $filter; - private Integer $top; - private Integer $skip; - private String $orderBy; - private Boolean count; - private Boolean countOnly; - private String xCorrelationId; - private String xAvalaraClient; - - public List1099FormsRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String get$filter() { return $filter; } - public void set$filter(String $filter) { this.$filter = $filter; } - public Integer get$top() { return $top; } - public void set$top(Integer $top) { this.$top = $top; } - public Integer get$skip() { return $skip; } - public void set$skip(Integer $skip) { this.$skip = $skip; } - public String get$orderBy() { return $orderBy; } - public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } - public Boolean getCount() { return count; } - public void setCount(Boolean count) { this.count = count; } - public Boolean getCountOnly() { return countOnly; } - public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns List1099FormsRequest - */ - public List1099FormsRequest getList1099FormsRequest() { - return this.new List1099FormsRequest(); - } - - /** - * Build call for update1099Form - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call update1099FormCall(Update1099FormRequest 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.getGet1099Form200Response(); - - // create path and map variables - String localVarPath = "/1099/forms/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call update1099FormValidateBeforeCall(Update1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling update1099Form(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling update1099Form(Async)"); - } - - - okhttp3.Call localVarCall = update1099FormCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Update a 1099/1095/W2/1042S form - * Update a 1099/1095/W2/1042S form. **Date Update Rules:** Possible to update scheduled dates (same validation rules apply). Cannot change from scheduled to unscheduled status - must delete form and create new one. If dates are between current date and blackout period, scheduled to that date. If dates are in past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. - * @param requestOptions Object which represents the options available for a given API/request - * @return Get1099Form200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public Get1099Form200Response update1099Form(Update1099FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = update1099FormWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Update a 1099/1095/W2/1042S form - * Update a 1099/1095/W2/1042S form. **Date Update Rules:** Possible to update scheduled dates (same validation rules apply). Cannot change from scheduled to unscheduled status - must delete form and create new one. If dates are between current date and blackout period, scheduled to that date. If dates are in past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Get1099Form200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public ApiResponse update1099FormWithHttpInfo(Update1099FormRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = update1099FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a 1099/1095/W2/1042S form (asynchronously) - * Update a 1099/1095/W2/1042S form. **Date Update Rules:** Possible to update scheduled dates (same validation rules apply). Cannot change from scheduled to unscheduled status - must delete form and create new one. If dates are between current date and blackout period, scheduled to that date. If dates are in past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call update1099FormAsync(Update1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = update1099FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the Update1099Form API - * - * @param id - * @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 get1099Form200Response (optional) - */ - public class Update1099FormRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private Get1099Form200Response get1099Form200Response; - - public Update1099FormRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - 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 Get1099Form200Response getGet1099Form200Response() { return get1099Form200Response; } - public void setGet1099Form200Response(Get1099Form200Response get1099Form200Response) { this.get1099Form200Response = get1099Form200Response; } - } - - /** - * Getter function to instantiate Request class - * @returns Update1099FormRequest - */ - public Update1099FormRequest getUpdate1099FormRequest() { - return this.new Update1099FormRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * 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 java.io.File; +import Avalara.SDK.model.A1099.V2.Form1099ListRequest; +import Avalara.SDK.model.A1099.V2.Get1099Form200Response; +import Avalara.SDK.model.A1099.V2.JobResponse; +import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelForm1099Base; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class Forms1099Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public Forms1099Api(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 bulkUpsert1099Forms + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call bulkUpsert1099FormsCall(BulkUpsert1099FormsRequest 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.getForm1099ListRequest(); + + // create path and map variables + String localVarPath = "/1099/forms/$bulk-upsert"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getDryRun() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("dryRun", requestParameters.getDryRun())); + } + + 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 bulkUpsert1099FormsValidateBeforeCall(BulkUpsert1099FormsRequest 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 bulkUpsert1099Forms(Async)"); + } + + + okhttp3.Call localVarCall = bulkUpsert1099FormsCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Create or update multiple 1099/1095/W2/1042S forms + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. **Recipient Name Splitting:** When the account's \"Split individual recipient names\" opt-in setting is enabled (Account Settings page), this only applies to the deprecated identifier-format tinType values (SSN/ITIN/ATIN/EIN): - For the deprecated individual-type values (SSN/ITIN/ATIN) where only the legacy `recipientName` is provided, the API automatically splits `recipientName` into `firstName`, `middleName`, `lastName`, and `suffixName` before persisting. - For the deprecated `EIN` value, `recipientName` is not split and is routed directly to `businessName`. To enable or disable this behavior, the account owner can toggle \"Split individual recipient names on API submissions\" on the Account Settings page. + * @param requestOptions Object which represents the options available for a given API/request + * @return JobResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public JobResponse bulkUpsert1099Forms(BulkUpsert1099FormsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = bulkUpsert1099FormsWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Create or update multiple 1099/1095/W2/1042S forms + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. **Recipient Name Splitting:** When the account's \"Split individual recipient names\" opt-in setting is enabled (Account Settings page), this only applies to the deprecated identifier-format tinType values (SSN/ITIN/ATIN/EIN): - For the deprecated individual-type values (SSN/ITIN/ATIN) where only the legacy `recipientName` is provided, the API automatically splits `recipientName` into `firstName`, `middleName`, `lastName`, and `suffixName` before persisting. - For the deprecated `EIN` value, `recipientName` is not split and is routed directly to `businessName`. To enable or disable this behavior, the account owner can toggle \"Split individual recipient names on API submissions\" on the Account Settings page. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<JobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public ApiResponse bulkUpsert1099FormsWithHttpInfo(BulkUpsert1099FormsRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = bulkUpsert1099FormsValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create or update multiple 1099/1095/W2/1042S forms (asynchronously) + * This endpoint allows you to create or update multiple 1099/1095/W2/1042S forms. Maximum of 5000 forms can be processed in a single bulk request. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. **Recipient Name Splitting:** When the account's \"Split individual recipient names\" opt-in setting is enabled (Account Settings page), this only applies to the deprecated identifier-format tinType values (SSN/ITIN/ATIN/EIN): - For the deprecated individual-type values (SSN/ITIN/ATIN) where only the legacy `recipientName` is provided, the API automatically splits `recipientName` into `firstName`, `middleName`, `lastName`, and `suffixName` before persisting. - For the deprecated `EIN` value, `recipientName` is not split and is routed directly to `businessName`. To enable or disable this behavior, the account owner can toggle \"Split individual recipient names on API submissions\" on the Account Settings page. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call bulkUpsert1099FormsAsync(BulkUpsert1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkUpsert1099FormsValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the BulkUpsert1099Forms API + * + * @param avalaraVersion API version + * @param dryRun 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 (optional, default to false) + * @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 form1099ListRequest (optional) + */ + public class BulkUpsert1099FormsRequest { + private String avalaraVersion; + private Boolean dryRun; + private String xCorrelationId; + private String xAvalaraClient; + private Form1099ListRequest form1099ListRequest; + + public BulkUpsert1099FormsRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public Boolean getDryRun() { return dryRun; } + public void setDryRun(Boolean dryRun) { this.dryRun = dryRun; } + 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 Form1099ListRequest getForm1099ListRequest() { return form1099ListRequest; } + public void setForm1099ListRequest(Form1099ListRequest form1099ListRequest) { this.form1099ListRequest = form1099ListRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns BulkUpsert1099FormsRequest + */ + public BulkUpsert1099FormsRequest getBulkUpsert1099FormsRequest() { + return this.new BulkUpsert1099FormsRequest(); + } + + /** + * Build call for create1099Form + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Created -
400 Bad Request -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call create1099FormCall(Create1099FormRequest 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.getGet1099Form200Response(); + + // create path and map variables + String localVarPath = "/1099/forms"; + + 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 create1099FormValidateBeforeCall(Create1099FormRequest 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 create1099Form(Async)"); + } + + + okhttp3.Call localVarCall = create1099FormCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Create a 1099/1095/W2/1042S form + * Create a 1099/1095/W2/1042S form. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. + * @param requestOptions Object which represents the options available for a given API/request + * @return Get1099Form200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Created -
400 Bad Request -
500 Server Error -
401 Unauthorized -
+ */ + public Get1099Form200Response create1099Form(Create1099FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = create1099FormWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Create a 1099/1095/W2/1042S form + * Create a 1099/1095/W2/1042S form. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Get1099Form200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Created -
400 Bad Request -
500 Server Error -
401 Unauthorized -
+ */ + public ApiResponse create1099FormWithHttpInfo(Create1099FormRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = create1099FormValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a 1099/1095/W2/1042S form (asynchronously) + * Create a 1099/1095/W2/1042S form. **Date Scheduling Rules:** If federalEfileDate, stateEfileDate, or recipientEdeliveryDate are between current date and beginning of blackout period, scheduled to that date. If dates are in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. Set dates to null to leave unscheduled. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Created -
400 Bad Request -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call create1099FormAsync(Create1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = create1099FormValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the Create1099Form 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 get1099Form200Response (optional) + */ + public class Create1099FormRequest { + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private Get1099Form200Response get1099Form200Response; + + public Create1099FormRequest () { + } + + 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 Get1099Form200Response getGet1099Form200Response() { return get1099Form200Response; } + public void setGet1099Form200Response(Get1099Form200Response get1099Form200Response) { this.get1099Form200Response = get1099Form200Response; } + } + + /** + * Getter function to instantiate Request class + * @returns Create1099FormRequest + */ + public Create1099FormRequest getCreate1099FormRequest() { + return this.new Create1099FormRequest(); + } + + /** + * Build call for delete1099Form + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
422 Client Error -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call delete1099FormCall(Delete1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/1099/forms/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call delete1099FormValidateBeforeCall(Delete1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling delete1099Form(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling delete1099Form(Async)"); + } + + + okhttp3.Call localVarCall = delete1099FormCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Delete a 1099/1095/W2/1042S form + * Delete a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
422 Client Error -
500 Server Error -
401 Unauthorized -
+ */ + public void delete1099Form(Delete1099FormRequest requestParameters) throws ApiException { + delete1099FormWithHttpInfo(requestParameters); + } + + /** + * Delete a 1099/1095/W2/1042S form + * Delete a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
422 Client Error -
500 Server Error -
401 Unauthorized -
+ */ + public ApiResponse delete1099FormWithHttpInfo(Delete1099FormRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = delete1099FormValidateBeforeCall(requestParameters, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a 1099/1095/W2/1042S form (asynchronously) + * Delete a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 No Content -
400 Bad Request -
404 Not Found -
422 Client Error -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call delete1099FormAsync(Delete1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = delete1099FormValidateBeforeCall(requestParameters, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Represents the Request object for the Delete1099Form API + * + * @param id The unique identifier of the desired form to delete. + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class Delete1099FormRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public Delete1099FormRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns Delete1099FormRequest + */ + public Delete1099FormRequest getDelete1099FormRequest() { + return this.new Delete1099FormRequest(); + } + + /** + * Build call for get1099Form + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call get1099FormCall(Get1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/1099/forms/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call get1099FormValidateBeforeCall(Get1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling get1099Form(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling get1099Form(Async)"); + } + + + okhttp3.Call localVarCall = get1099FormCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Retrieve a 1099/1095/W2/1042S form + * Retrieve a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @return Get1099Form200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public Get1099Form200Response get1099Form(Get1099FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = get1099FormWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Retrieve a 1099/1095/W2/1042S form + * Retrieve a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Get1099Form200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public ApiResponse get1099FormWithHttpInfo(Get1099FormRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = get1099FormValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a 1099/1095/W2/1042S form (asynchronously) + * Retrieve a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call get1099FormAsync(Get1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = get1099FormValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the Get1099Form API + * + * @param id + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class Get1099FormRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public Get1099FormRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns Get1099FormRequest + */ + public Get1099FormRequest getGet1099FormRequest() { + return this.new Get1099FormRequest(); + } + + /** + * Build call for get1099FormPdf + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call get1099FormPdfCall(Get1099FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/1099/forms/{id}/pdf" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getMarkEdelivered() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("markEdelivered", requestParameters.getMarkEdelivered())); + } + + 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/pdf", "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call get1099FormPdfValidateBeforeCall(Get1099FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling get1099FormPdf(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling get1099FormPdf(Async)"); + } + + + okhttp3.Call localVarCall = get1099FormPdfCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Retrieve the PDF file for a 1099/1095/W2/1042S form + * Retrieve the PDF file for a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public File get1099FormPdf(Get1099FormPdfRequest requestParameters) throws ApiException { + ApiResponse localVarResp = get1099FormPdfWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Retrieve the PDF file for a 1099/1095/W2/1042S form + * Retrieve the PDF file for a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public ApiResponse get1099FormPdfWithHttpInfo(Get1099FormPdfRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = get1099FormPdfValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve the PDF file for a 1099/1095/W2/1042S form (asynchronously) + * Retrieve the PDF file for a 1099/1095/W2/1042S form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call get1099FormPdfAsync(Get1099FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = get1099FormPdfValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the Get1099FormPdf API + * + * @param id The ID of the form + * @param avalaraVersion API version + * @param markEdelivered Optional boolean that if set indicates that the form should be marked as having been successfully edelivered (optional) + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class Get1099FormPdfRequest { + private String id; + private String avalaraVersion; + private Boolean markEdelivered; + private String xCorrelationId; + private String xAvalaraClient; + + public Get1099FormPdfRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public Boolean getMarkEdelivered() { return markEdelivered; } + public void setMarkEdelivered(Boolean markEdelivered) { this.markEdelivered = markEdelivered; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns Get1099FormPdfRequest + */ + public Get1099FormPdfRequest getGet1099FormPdfRequest() { + return this.new Get1099FormPdfRequest(); + } + + /** + * Build call for list1099Forms + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call list1099FormsCall(List1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/1099/forms"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.get$filter() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); + } + + if (requestParameters.get$top() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); + } + + if (requestParameters.get$skip() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); + } + + if (requestParameters.get$orderBy() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); + } + + if (requestParameters.getCount() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); + } + + if (requestParameters.getCountOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call list1099FormsValidateBeforeCall(List1099FormsRequest 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 list1099Forms(Async)"); + } + + + okhttp3.Call localVarCall = list1099FormsCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * List 1099/1095/W2/1042S forms + * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. + * @param requestOptions Object which represents the options available for a given API/request + * @return PaginatedQueryResultModelForm1099Base + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public PaginatedQueryResultModelForm1099Base list1099Forms(List1099FormsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = list1099FormsWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * List 1099/1095/W2/1042S forms + * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<PaginatedQueryResultModelForm1099Base> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public ApiResponse list1099FormsWithHttpInfo(List1099FormsRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = list1099FormsValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List 1099/1095/W2/1042S forms (asynchronously) + * List 1099/1095/W2/1042S forms. Collections support filtering only on certain fields. An attempt to filter on an unsupported field will receive a 400 Bad Request response. Supported filtering fields are as follows: - issuerId - issuerReferenceId - taxYear - addressVerificationStatus - possible values are: unknown, pending, failed, incomplete, unchanged, verified - createdAt - edeliveryStatus - possible values are: sent, unscheduled, bad_verify, bad_verify_limit, scheduled, bounced, accepted - email - federalEfileStatus - possible values are: unscheduled, scheduled, sent, corrected_scheduled, accepted, corrected, corrected_accepted, held - recipientName - mailStatus - possible values are: sent, unscheduled, pending, delivered - referenceId - tinMatchStatus - possible values are: none, pending, matched, failed - type - possible values are: 940, 941, 943, 944, 945, 1042, 1042-S, 1095-B, 1095-C, 1097-BTC, 1098, 1098-C, 1098-E, 1098-Q, 1098-T, 3921, 3922, 5498, 5498-ESA, 5498-SA, 1099-MISC, 1099-A, 1099-B, 1099-C, 1099-CAP, 1099-DIV, 1099-G, 1099-INT, 1099-K, 1099-LS, 1099-LTC, 1099-NEC, 1099-OID, 1099-PATR, 1099-Q, 1099-R, 1099-S, 1099-SA, T4A, W-2, W-2G, 1099-HC - updatedAt - validity - possible values are: true, false For more information on filtering, see <see href=\"https://developer.avalara.com/avatax/filtering-in-rest/\">Filtering in REST</see>. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call list1099FormsAsync(List1099FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = list1099FormsValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the List1099Forms API + * + * @param avalaraVersion API version + * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) + * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) + * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) + * @param count If true, return the global count of elements in the collection. (optional) + * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class List1099FormsRequest { + private String avalaraVersion; + private String $filter; + private Integer $top; + private Integer $skip; + private String $orderBy; + private Boolean count; + private Boolean countOnly; + private String xCorrelationId; + private String xAvalaraClient; + + public List1099FormsRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String get$filter() { return $filter; } + public void set$filter(String $filter) { this.$filter = $filter; } + public Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } + public String get$orderBy() { return $orderBy; } + public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } + public Boolean getCount() { return count; } + public void setCount(Boolean count) { this.count = count; } + public Boolean getCountOnly() { return countOnly; } + public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns List1099FormsRequest + */ + public List1099FormsRequest getList1099FormsRequest() { + return this.new List1099FormsRequest(); + } + + /** + * Build call for update1099Form + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call update1099FormCall(Update1099FormRequest 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.getGet1099Form200Response(); + + // create path and map variables + String localVarPath = "/1099/forms/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call update1099FormValidateBeforeCall(Update1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling update1099Form(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling update1099Form(Async)"); + } + + + okhttp3.Call localVarCall = update1099FormCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Update a 1099/1095/W2/1042S form + * Update a 1099/1095/W2/1042S form. **Date Update Rules:** Possible to update scheduled dates (same validation rules apply). Cannot change from scheduled to unscheduled status - must delete form and create new one. If dates are between current date and blackout period, scheduled to that date. If dates are in past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. + * @param requestOptions Object which represents the options available for a given API/request + * @return Get1099Form200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public Get1099Form200Response update1099Form(Update1099FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = update1099FormWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Update a 1099/1095/W2/1042S form + * Update a 1099/1095/W2/1042S form. **Date Update Rules:** Possible to update scheduled dates (same validation rules apply). Cannot change from scheduled to unscheduled status - must delete form and create new one. If dates are between current date and blackout period, scheduled to that date. If dates are in past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Get1099Form200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public ApiResponse update1099FormWithHttpInfo(Update1099FormRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = update1099FormValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a 1099/1095/W2/1042S form (asynchronously) + * Update a 1099/1095/W2/1042S form. **Date Update Rules:** Possible to update scheduled dates (same validation rules apply). Cannot change from scheduled to unscheduled status - must delete form and create new one. If dates are between current date and blackout period, scheduled to that date. If dates are in past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. StateEfileDate must be on or after federalEfileDate. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call update1099FormAsync(Update1099FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = update1099FormValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the Update1099Form API + * + * @param id + * @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 get1099Form200Response (optional) + */ + public class Update1099FormRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private Get1099Form200Response get1099Form200Response; + + public Update1099FormRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + 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 Get1099Form200Response getGet1099Form200Response() { return get1099Form200Response; } + public void setGet1099Form200Response(Get1099Form200Response get1099Form200Response) { this.get1099Form200Response = get1099Form200Response; } + } + + /** + * Getter function to instantiate Request class + * @returns Update1099FormRequest + */ + public Update1099FormRequest getUpdate1099FormRequest() { + return this.new Update1099FormRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 581f408..8b478e3 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/FormsW9Api.java @@ -1,1847 +1,1847 @@ -/* - * 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.CreateAndSendW9FormEmailRequest; -import Avalara.SDK.model.A1099.V2.CreateW9Form201Response; -import Avalara.SDK.model.A1099.V2.CreateW9FormRequest; -import Avalara.SDK.model.A1099.V2.ErrorResponse; -import java.io.File; -import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelW9FormBaseResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class FormsW9Api { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public FormsW9Api(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 createAndSendW9FormEmail - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
- */ - public okhttp3.Call createAndSendW9FormEmailCall(CreateAndSendW9FormEmailRequest 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.getCreateAndSendW9FormEmailRequest(); - - // create path and map variables - String localVarPath = "/w9/forms/$create-and-send-email"; - - 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 createAndSendW9FormEmailValidateBeforeCall(CreateAndSendW9FormEmailRequest 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 createAndSendW9FormEmail(Async)"); - } - - - okhttp3.Call localVarCall = createAndSendW9FormEmailCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Create a minimal W9/W4/W8 form and sends the e-mail request - * Create a minimal W9/W4/W8 form and sends the e-mail request. - * @param requestOptions Object which represents the options available for a given API/request - * @return CreateW9Form201Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
- */ - public CreateW9Form201Response createAndSendW9FormEmail(CreateAndSendW9FormEmailRequest requestParameters) throws ApiException { - ApiResponse localVarResp = createAndSendW9FormEmailWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Create a minimal W9/W4/W8 form and sends the e-mail request - * Create a minimal W9/W4/W8 form and sends the e-mail request. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CreateW9Form201Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
- */ - public ApiResponse createAndSendW9FormEmailWithHttpInfo(CreateAndSendW9FormEmailRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = createAndSendW9FormEmailValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a minimal W9/W4/W8 form and sends the e-mail request (asynchronously) - * Create a minimal W9/W4/W8 form and sends the e-mail request. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
- */ - public okhttp3.Call createAndSendW9FormEmailAsync(CreateAndSendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createAndSendW9FormEmailValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the CreateAndSendW9FormEmail 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 createAndSendW9FormEmailRequest Form to be created (optional) - */ - public class CreateAndSendW9FormEmailRequest { - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest; - - public CreateAndSendW9FormEmailRequest () { - } - - 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 CreateAndSendW9FormEmailRequest getCreateAndSendW9FormEmailRequest() { return createAndSendW9FormEmailRequest; } - public void setCreateAndSendW9FormEmailRequest(CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest) { this.createAndSendW9FormEmailRequest = createAndSendW9FormEmailRequest; } - } - - /** - * Getter function to instantiate Request class - * @returns CreateAndSendW9FormEmailRequest - */ - public CreateAndSendW9FormEmailRequest getCreateAndSendW9FormEmailRequest() { - return this.new CreateAndSendW9FormEmailRequest(); - } - - /** - * Build call for createW9Form - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
- */ - public okhttp3.Call createW9FormCall(CreateW9FormRequest 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.getCreateW9FormRequest(); - - // create path and map variables - String localVarPath = "/w9/forms"; - - 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 createW9FormValidateBeforeCall(CreateW9FormRequest 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 createW9Form(Async)"); - } - - - okhttp3.Call localVarCall = createW9FormCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Create a W9/W4/W8 form - * Create a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return CreateW9Form201Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
- */ - public CreateW9Form201Response createW9Form(CreateW9FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = createW9FormWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Create a W9/W4/W8 form - * Create a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CreateW9Form201Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
- */ - public ApiResponse createW9FormWithHttpInfo(CreateW9FormRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = createW9FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a W9/W4/W8 form (asynchronously) - * Create a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
- */ - public okhttp3.Call createW9FormAsync(CreateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createW9FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the CreateW9Form 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 createW9FormRequest Form to be created (optional) - */ - public class CreateW9FormRequest { - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private CreateW9FormRequest createW9FormRequest; - - public CreateW9FormRequest () { - } - - 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 CreateW9FormRequest getCreateW9FormRequest() { return createW9FormRequest; } - public void setCreateW9FormRequest(CreateW9FormRequest createW9FormRequest) { this.createW9FormRequest = createW9FormRequest; } - } - - /** - * Getter function to instantiate Request class - * @returns CreateW9FormRequest - */ - public CreateW9FormRequest getCreateW9FormRequest() { - return this.new CreateW9FormRequest(); - } - - /** - * Build call for deleteW9Form - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call deleteW9FormCall(DeleteW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/forms/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteW9FormValidateBeforeCall(DeleteW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling deleteW9Form(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteW9Form(Async)"); - } - - - okhttp3.Call localVarCall = deleteW9FormCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Delete a W9/W4/W8 form - * Delete a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public void deleteW9Form(DeleteW9FormRequest requestParameters) throws ApiException { - deleteW9FormWithHttpInfo(requestParameters); - } - - /** - * Delete a W9/W4/W8 form - * Delete a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public ApiResponse deleteW9FormWithHttpInfo(DeleteW9FormRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = deleteW9FormValidateBeforeCall(requestParameters, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete a W9/W4/W8 form (asynchronously) - * Delete a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call deleteW9FormAsync(DeleteW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteW9FormValidateBeforeCall(requestParameters, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Represents the Request object for the DeleteW9Form API - * - * @param id ID of the form to delete - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class DeleteW9FormRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public DeleteW9FormRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns DeleteW9FormRequest - */ - public DeleteW9FormRequest getDeleteW9FormRequest() { - return this.new DeleteW9FormRequest(); - } - - /** - * Build call for getW9Form - * @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 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call getW9FormCall(GetW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/forms/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getW9FormValidateBeforeCall(GetW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getW9Form(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getW9Form(Async)"); - } - - - okhttp3.Call localVarCall = getW9FormCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Retrieve a W9/W4/W8 form - * Retrieve a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return CreateW9Form201Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public CreateW9Form201Response getW9Form(GetW9FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getW9FormWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Retrieve a W9/W4/W8 form - * Retrieve a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CreateW9Form201Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public ApiResponse getW9FormWithHttpInfo(GetW9FormRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getW9FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a W9/W4/W8 form (asynchronously) - * Retrieve a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @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 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call getW9FormAsync(GetW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getW9FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetW9Form API - * - * @param id ID of the form - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class GetW9FormRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public GetW9FormRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns GetW9FormRequest - */ - public GetW9FormRequest getGetW9FormRequest() { - return this.new GetW9FormRequest(); - } - - /** - * Build call for getW9FormPdf - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call getW9FormPdfCall(GetW9FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/forms/{id}/pdf" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.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/pdf", "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getW9FormPdfValidateBeforeCall(GetW9FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getW9FormPdf(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getW9FormPdf(Async)"); - } - - - okhttp3.Call localVarCall = getW9FormPdfCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Download the PDF for a W9/W4/W8 form. - * Returns the PDF file for a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return File - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
401 Unauthorized -
404 Not Found -
- */ - public File getW9FormPdf(GetW9FormPdfRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getW9FormPdfWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Download the PDF for a W9/W4/W8 form. - * Returns the PDF file for a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<File> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
401 Unauthorized -
404 Not Found -
- */ - public ApiResponse getW9FormPdfWithHttpInfo(GetW9FormPdfRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getW9FormPdfValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Download the PDF for a W9/W4/W8 form. (asynchronously) - * Returns the PDF file for a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
401 Unauthorized -
404 Not Found -
- */ - public okhttp3.Call getW9FormPdfAsync(GetW9FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getW9FormPdfValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetW9FormPdf API - * - * @param id Id of the form - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class GetW9FormPdfRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public GetW9FormPdfRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns GetW9FormPdfRequest - */ - public GetW9FormPdfRequest getGetW9FormPdfRequest() { - return this.new GetW9FormPdfRequest(); - } - - /** - * Build call for listW9Forms - * @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 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public okhttp3.Call listW9FormsCall(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/forms"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.get$filter() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); - } - - if (requestParameters.get$top() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); - } - - if (requestParameters.get$skip() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); - } - - if (requestParameters.get$orderBy() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); - } - - if (requestParameters.getCount() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); - } - - if (requestParameters.getCountOnly() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listW9FormsValidateBeforeCall(ListW9FormsRequest 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 listW9Forms(Async)"); - } - - - okhttp3.Call localVarCall = listW9FormsCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * List W9/W4/W8 forms - * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". - * @param requestOptions Object which represents the options available for a given API/request - * @return PaginatedQueryResultModelW9FormBaseResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public PaginatedQueryResultModelW9FormBaseResponse listW9Forms(ListW9FormsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = listW9FormsWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * List W9/W4/W8 forms - * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<PaginatedQueryResultModelW9FormBaseResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public ApiResponse listW9FormsWithHttpInfo(ListW9FormsRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = listW9FormsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List W9/W4/W8 forms (asynchronously) - * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @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 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public okhttp3.Call listW9FormsAsync(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listW9FormsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the ListW9Forms API - * - * @param avalaraVersion API version - * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) - * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) - * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) - * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) - * @param count If true, return the global count of elements in the collection. (optional) - * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class ListW9FormsRequest { - private String avalaraVersion; - private String $filter; - private Integer $top; - private Integer $skip; - private String $orderBy; - private Boolean count; - private Boolean countOnly; - private String xCorrelationId; - private String xAvalaraClient; - - public ListW9FormsRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String get$filter() { return $filter; } - public void set$filter(String $filter) { this.$filter = $filter; } - public Integer get$top() { return $top; } - public void set$top(Integer $top) { this.$top = $top; } - public Integer get$skip() { return $skip; } - public void set$skip(Integer $skip) { this.$skip = $skip; } - public String get$orderBy() { return $orderBy; } - public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } - public Boolean getCount() { return count; } - public void setCount(Boolean count) { this.count = count; } - public Boolean getCountOnly() { return countOnly; } - public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns ListW9FormsRequest - */ - public ListW9FormsRequest getListW9FormsRequest() { - return this.new ListW9FormsRequest(); - } - - /** - * Build call for sendW9FormEmail - * @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 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call sendW9FormEmailCall(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/forms/{id}/$send-email" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call sendW9FormEmailValidateBeforeCall(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling sendW9FormEmail(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling sendW9FormEmail(Async)"); - } - - - okhttp3.Call localVarCall = sendW9FormEmailCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. - * @param requestOptions Object which represents the options available for a given API/request - * @return CreateW9Form201Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public CreateW9Form201Response sendW9FormEmail(SendW9FormEmailRequest requestParameters) throws ApiException { - ApiResponse localVarResp = sendW9FormEmailWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CreateW9Form201Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public ApiResponse sendW9FormEmailWithHttpInfo(SendW9FormEmailRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = sendW9FormEmailValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form (asynchronously) - * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. - * @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 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call sendW9FormEmailAsync(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = sendW9FormEmailValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the SendW9FormEmail API - * - * @param id The ID of the W9/W4/W8 form. - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class SendW9FormEmailRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public SendW9FormEmailRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns SendW9FormEmailRequest - */ - public SendW9FormEmailRequest getSendW9FormEmailRequest() { - return this.new SendW9FormEmailRequest(); - } - - /** - * Build call for updateW9Form - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call updateW9FormCall(UpdateW9FormRequest 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.getCreateW9FormRequest(); - - // create path and map variables - String localVarPath = "/w9/forms/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateW9FormValidateBeforeCall(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling updateW9Form(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling updateW9Form(Async)"); - } - - - okhttp3.Call localVarCall = updateW9FormCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Update a W9/W4/W8 form - * Update a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return CreateW9Form201Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public CreateW9Form201Response updateW9Form(UpdateW9FormRequest requestParameters) throws ApiException { - ApiResponse localVarResp = updateW9FormWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Update a W9/W4/W8 form - * Update a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CreateW9Form201Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public ApiResponse updateW9FormWithHttpInfo(UpdateW9FormRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = updateW9FormValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a W9/W4/W8 form (asynchronously) - * Update a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call updateW9FormAsync(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateW9FormValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the UpdateW9Form API - * - * @param id ID of the form to update - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param createW9FormRequest Form to be updated (optional) - */ - public class UpdateW9FormRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private CreateW9FormRequest createW9FormRequest; - - public UpdateW9FormRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - 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 CreateW9FormRequest getCreateW9FormRequest() { return createW9FormRequest; } - public void setCreateW9FormRequest(CreateW9FormRequest createW9FormRequest) { this.createW9FormRequest = createW9FormRequest; } - } - - /** - * Getter function to instantiate Request class - * @returns UpdateW9FormRequest - */ - public UpdateW9FormRequest getUpdateW9FormRequest() { - return this.new UpdateW9FormRequest(); - } - - /** - * Build call for uploadW9Files - * @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 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call uploadW9FilesCall(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/w9/forms/{id}/attachment" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.get_file() != null) { - localVarFormParams.put("file", requestParameters.get_file()); - } - - 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 = { - "multipart/form-data" - }; - 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 uploadW9FilesValidateBeforeCall(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling uploadW9Files(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling uploadW9Files(Async)"); - } - - - okhttp3.Call localVarCall = uploadW9FilesCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Replace the PDF file for a W9/W4/W8 form - * Replaces the PDF file for a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @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 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public void uploadW9Files(UploadW9FilesRequest requestParameters) throws ApiException { - uploadW9FilesWithHttpInfo(requestParameters); - } - - /** - * Replace the PDF file for a W9/W4/W8 form - * Replaces the PDF file for a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public ApiResponse uploadW9FilesWithHttpInfo(UploadW9FilesRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = uploadW9FilesValidateBeforeCall(requestParameters, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Replace the PDF file for a W9/W4/W8 form (asynchronously) - * Replaces the PDF file for a W9/W4/W8 form. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @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 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
404 W9/W4/W8 form not found -
- */ - public okhttp3.Call uploadW9FilesAsync(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = uploadW9FilesValidateBeforeCall(requestParameters, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Represents the Request object for the UploadW9Files API - * - * @param id Id of the form - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param _file (optional) - */ - public class UploadW9FilesRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private File _file; - - public UploadW9FilesRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - 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 File get_file() { return _file; } - public void set_file(File _file) { this._file = _file; } - } - - /** - * Getter function to instantiate Request class - * @returns UploadW9FilesRequest - */ - public UploadW9FilesRequest getUploadW9FilesRequest() { - return this.new UploadW9FilesRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * 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.CreateAndSendW9FormEmailRequest; +import Avalara.SDK.model.A1099.V2.CreateW9Form201Response; +import Avalara.SDK.model.A1099.V2.CreateW9FormRequest; +import Avalara.SDK.model.A1099.V2.ErrorResponse; +import java.io.File; +import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelW9FormBaseResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class FormsW9Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public FormsW9Api(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 createAndSendW9FormEmail + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ */ + public okhttp3.Call createAndSendW9FormEmailCall(CreateAndSendW9FormEmailRequest 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.getCreateAndSendW9FormEmailRequest(); + + // create path and map variables + String localVarPath = "/w9/forms/$create-and-send-email"; + + 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 createAndSendW9FormEmailValidateBeforeCall(CreateAndSendW9FormEmailRequest 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 createAndSendW9FormEmail(Async)"); + } + + + okhttp3.Call localVarCall = createAndSendW9FormEmailCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Create a minimal W9/W4/W8 form and sends the e-mail request + * Create a minimal W9/W4/W8 form and sends the e-mail request. + * @param requestOptions Object which represents the options available for a given API/request + * @return CreateW9Form201Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ */ + public CreateW9Form201Response createAndSendW9FormEmail(CreateAndSendW9FormEmailRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createAndSendW9FormEmailWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Create a minimal W9/W4/W8 form and sends the e-mail request + * Create a minimal W9/W4/W8 form and sends the e-mail request. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CreateW9Form201Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ */ + public ApiResponse createAndSendW9FormEmailWithHttpInfo(CreateAndSendW9FormEmailRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = createAndSendW9FormEmailValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a minimal W9/W4/W8 form and sends the e-mail request (asynchronously) + * Create a minimal W9/W4/W8 form and sends the e-mail request. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g. Unknown form type: W10\") -
401 Authentication failed -
+ */ + public okhttp3.Call createAndSendW9FormEmailAsync(CreateAndSendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAndSendW9FormEmailValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the CreateAndSendW9FormEmail 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 createAndSendW9FormEmailRequest Form to be created (optional) + */ + public class CreateAndSendW9FormEmailRequest { + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest; + + public CreateAndSendW9FormEmailRequest () { + } + + 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 CreateAndSendW9FormEmailRequest getCreateAndSendW9FormEmailRequest() { return createAndSendW9FormEmailRequest; } + public void setCreateAndSendW9FormEmailRequest(CreateAndSendW9FormEmailRequest createAndSendW9FormEmailRequest) { this.createAndSendW9FormEmailRequest = createAndSendW9FormEmailRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns CreateAndSendW9FormEmailRequest + */ + public CreateAndSendW9FormEmailRequest getCreateAndSendW9FormEmailRequest() { + return this.new CreateAndSendW9FormEmailRequest(); + } + + /** + * Build call for createW9Form + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ */ + public okhttp3.Call createW9FormCall(CreateW9FormRequest 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.getCreateW9FormRequest(); + + // create path and map variables + String localVarPath = "/w9/forms"; + + 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 createW9FormValidateBeforeCall(CreateW9FormRequest 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 createW9Form(Async)"); + } + + + okhttp3.Call localVarCall = createW9FormCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Create a W9/W4/W8 form + * Create a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return CreateW9Form201Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ */ + public CreateW9Form201Response createW9Form(CreateW9FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createW9FormWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Create a W9/W4/W8 form + * Create a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CreateW9Form201Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ */ + public ApiResponse createW9FormWithHttpInfo(CreateW9FormRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = createW9FormValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a W9/W4/W8 form (asynchronously) + * Create a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 The created W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
+ */ + public okhttp3.Call createW9FormAsync(CreateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createW9FormValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the CreateW9Form 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 createW9FormRequest Form to be created (optional) + */ + public class CreateW9FormRequest { + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private CreateW9FormRequest createW9FormRequest; + + public CreateW9FormRequest () { + } + + 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 CreateW9FormRequest getCreateW9FormRequest() { return createW9FormRequest; } + public void setCreateW9FormRequest(CreateW9FormRequest createW9FormRequest) { this.createW9FormRequest = createW9FormRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns CreateW9FormRequest + */ + public CreateW9FormRequest getCreateW9FormRequest() { + return this.new CreateW9FormRequest(); + } + + /** + * Build call for deleteW9Form + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call deleteW9FormCall(DeleteW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/forms/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteW9FormValidateBeforeCall(DeleteW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling deleteW9Form(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteW9Form(Async)"); + } + + + okhttp3.Call localVarCall = deleteW9FormCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Delete a W9/W4/W8 form + * Delete a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public void deleteW9Form(DeleteW9FormRequest requestParameters) throws ApiException { + deleteW9FormWithHttpInfo(requestParameters); + } + + /** + * Delete a W9/W4/W8 form + * Delete a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public ApiResponse deleteW9FormWithHttpInfo(DeleteW9FormRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = deleteW9FormValidateBeforeCall(requestParameters, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a W9/W4/W8 form (asynchronously) + * Delete a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Empty response -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call deleteW9FormAsync(DeleteW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteW9FormValidateBeforeCall(requestParameters, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Represents the Request object for the DeleteW9Form API + * + * @param id ID of the form to delete + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class DeleteW9FormRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public DeleteW9FormRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns DeleteW9FormRequest + */ + public DeleteW9FormRequest getDeleteW9FormRequest() { + return this.new DeleteW9FormRequest(); + } + + /** + * Build call for getW9Form + * @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 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call getW9FormCall(GetW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/forms/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getW9FormValidateBeforeCall(GetW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getW9Form(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getW9Form(Async)"); + } + + + okhttp3.Call localVarCall = getW9FormCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Retrieve a W9/W4/W8 form + * Retrieve a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return CreateW9Form201Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public CreateW9Form201Response getW9Form(GetW9FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getW9FormWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Retrieve a W9/W4/W8 form + * Retrieve a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CreateW9Form201Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public ApiResponse getW9FormWithHttpInfo(GetW9FormRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getW9FormValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a W9/W4/W8 form (asynchronously) + * Retrieve a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @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 W9/W4/W8 form with id -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call getW9FormAsync(GetW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getW9FormValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetW9Form API + * + * @param id ID of the form + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetW9FormRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public GetW9FormRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetW9FormRequest + */ + public GetW9FormRequest getGetW9FormRequest() { + return this.new GetW9FormRequest(); + } + + /** + * Build call for getW9FormPdf + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
401 Unauthorized -
404 Not Found -
+ */ + public okhttp3.Call getW9FormPdfCall(GetW9FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/forms/{id}/pdf" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.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/pdf", "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getW9FormPdfValidateBeforeCall(GetW9FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getW9FormPdf(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getW9FormPdf(Async)"); + } + + + okhttp3.Call localVarCall = getW9FormPdfCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Download the PDF for a W9/W4/W8 form. + * Returns the PDF file for a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return File + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
401 Unauthorized -
404 Not Found -
+ */ + public File getW9FormPdf(GetW9FormPdfRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getW9FormPdfWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Download the PDF for a W9/W4/W8 form. + * Returns the PDF file for a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<File> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
401 Unauthorized -
404 Not Found -
+ */ + public ApiResponse getW9FormPdfWithHttpInfo(GetW9FormPdfRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getW9FormPdfValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Download the PDF for a W9/W4/W8 form. (asynchronously) + * Returns the PDF file for a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
401 Unauthorized -
404 Not Found -
+ */ + public okhttp3.Call getW9FormPdfAsync(GetW9FormPdfRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getW9FormPdfValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetW9FormPdf API + * + * @param id Id of the form + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetW9FormPdfRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public GetW9FormPdfRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetW9FormPdfRequest + */ + public GetW9FormPdfRequest getGetW9FormPdfRequest() { + return this.new GetW9FormPdfRequest(); + } + + /** + * Build call for listW9Forms + * @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 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public okhttp3.Call listW9FormsCall(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/forms"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.get$filter() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); + } + + if (requestParameters.get$top() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); + } + + if (requestParameters.get$skip() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); + } + + if (requestParameters.get$orderBy() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); + } + + if (requestParameters.getCount() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); + } + + if (requestParameters.getCountOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listW9FormsValidateBeforeCall(ListW9FormsRequest 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 listW9Forms(Async)"); + } + + + okhttp3.Call localVarCall = listW9FormsCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * List W9/W4/W8 forms + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". + * @param requestOptions Object which represents the options available for a given API/request + * @return PaginatedQueryResultModelW9FormBaseResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public PaginatedQueryResultModelW9FormBaseResponse listW9Forms(ListW9FormsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = listW9FormsWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * List W9/W4/W8 forms + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<PaginatedQueryResultModelW9FormBaseResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public ApiResponse listW9FormsWithHttpInfo(ListW9FormsRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = listW9FormsValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List W9/W4/W8 forms (asynchronously) + * List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @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 list -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public okhttp3.Call listW9FormsAsync(ListW9FormsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listW9FormsValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the ListW9Forms API + * + * @param avalaraVersion API version + * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) + * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) + * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) + * @param count If true, return the global count of elements in the collection. (optional) + * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class ListW9FormsRequest { + private String avalaraVersion; + private String $filter; + private Integer $top; + private Integer $skip; + private String $orderBy; + private Boolean count; + private Boolean countOnly; + private String xCorrelationId; + private String xAvalaraClient; + + public ListW9FormsRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String get$filter() { return $filter; } + public void set$filter(String $filter) { this.$filter = $filter; } + public Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } + public String get$orderBy() { return $orderBy; } + public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } + public Boolean getCount() { return count; } + public void setCount(Boolean count) { this.count = count; } + public Boolean getCountOnly() { return countOnly; } + public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns ListW9FormsRequest + */ + public ListW9FormsRequest getListW9FormsRequest() { + return this.new ListW9FormsRequest(); + } + + /** + * Build call for sendW9FormEmail + * @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 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call sendW9FormEmailCall(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/forms/{id}/$send-email" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call sendW9FormEmailValidateBeforeCall(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling sendW9FormEmail(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling sendW9FormEmail(Async)"); + } + + + okhttp3.Call localVarCall = sendW9FormEmailCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. + * @param requestOptions Object which represents the options available for a given API/request + * @return CreateW9Form201Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public CreateW9Form201Response sendW9FormEmail(SendW9FormEmailRequest requestParameters) throws ApiException { + ApiResponse localVarResp = sendW9FormEmailWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CreateW9Form201Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public ApiResponse sendW9FormEmailWithHttpInfo(SendW9FormEmailRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = sendW9FormEmailValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form (asynchronously) + * Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form. If the form is not in 'Requested' status, it will either use an existing descendant form in 'Requested' status or create a new minimal form and send the email request. + * @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 Email sent using existing form (form was already in 'Requested' status or descendant found) -
201 Email sent using newly created minimal form -
400 Bad request (e.g., missing vendor e-mail) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call sendW9FormEmailAsync(SendW9FormEmailRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = sendW9FormEmailValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the SendW9FormEmail API + * + * @param id The ID of the W9/W4/W8 form. + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class SendW9FormEmailRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public SendW9FormEmailRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns SendW9FormEmailRequest + */ + public SendW9FormEmailRequest getSendW9FormEmailRequest() { + return this.new SendW9FormEmailRequest(); + } + + /** + * Build call for updateW9Form + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call updateW9FormCall(UpdateW9FormRequest 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.getCreateW9FormRequest(); + + // create path and map variables + String localVarPath = "/w9/forms/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateW9FormValidateBeforeCall(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling updateW9Form(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling updateW9Form(Async)"); + } + + + okhttp3.Call localVarCall = updateW9FormCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Update a W9/W4/W8 form + * Update a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return CreateW9Form201Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public CreateW9Form201Response updateW9Form(UpdateW9FormRequest requestParameters) throws ApiException { + ApiResponse localVarResp = updateW9FormWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Update a W9/W4/W8 form + * Update a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CreateW9Form201Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public ApiResponse updateW9FormWithHttpInfo(UpdateW9FormRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = updateW9FormValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a W9/W4/W8 form (asynchronously) + * Update a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 The updated W9/W4/W8 form -
400 Bad request (e.g., missing required field) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call updateW9FormAsync(UpdateW9FormRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateW9FormValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the UpdateW9Form API + * + * @param id ID of the form to update + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + * @param createW9FormRequest Form to be updated (optional) + */ + public class UpdateW9FormRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private CreateW9FormRequest createW9FormRequest; + + public UpdateW9FormRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + 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 CreateW9FormRequest getCreateW9FormRequest() { return createW9FormRequest; } + public void setCreateW9FormRequest(CreateW9FormRequest createW9FormRequest) { this.createW9FormRequest = createW9FormRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns UpdateW9FormRequest + */ + public UpdateW9FormRequest getUpdateW9FormRequest() { + return this.new UpdateW9FormRequest(); + } + + /** + * Build call for uploadW9Files + * @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 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call uploadW9FilesCall(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/w9/forms/{id}/attachment" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.get_file() != null) { + localVarFormParams.put("file", requestParameters.get_file()); + } + + 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 = { + "multipart/form-data" + }; + 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 uploadW9FilesValidateBeforeCall(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling uploadW9Files(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling uploadW9Files(Async)"); + } + + + okhttp3.Call localVarCall = uploadW9FilesCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Replace the PDF file for a W9/W4/W8 form + * Replaces the PDF file for a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @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 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public void uploadW9Files(UploadW9FilesRequest requestParameters) throws ApiException { + uploadW9FilesWithHttpInfo(requestParameters); + } + + /** + * Replace the PDF file for a W9/W4/W8 form + * Replaces the PDF file for a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public ApiResponse uploadW9FilesWithHttpInfo(UploadW9FilesRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = uploadW9FilesValidateBeforeCall(requestParameters, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Replace the PDF file for a W9/W4/W8 form (asynchronously) + * Replaces the PDF file for a W9/W4/W8 form. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @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 -
400 Bad request (e.g., only .pdf files are allowed.) -
401 Authentication failed -
404 W9/W4/W8 form not found -
+ */ + public okhttp3.Call uploadW9FilesAsync(UploadW9FilesRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = uploadW9FilesValidateBeforeCall(requestParameters, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Represents the Request object for the UploadW9Files API + * + * @param id Id of the form + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + * @param _file (optional) + */ + public class UploadW9FilesRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private File _file; + + public UploadW9FilesRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + 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 File get_file() { return _file; } + public void set_file(File _file) { this._file = _file; } + } + + /** + * Getter function to instantiate Request class + * @returns UploadW9FilesRequest + */ + public UploadW9FilesRequest getUploadW9FilesRequest() { + return this.new UploadW9FilesRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 569fd32..8ef9cb8 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/Issuers1099Api.java @@ -1,1084 +1,1084 @@ -/* - * 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.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; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class Issuers1099Api { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public Issuers1099Api(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 createIssuer - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public okhttp3.Call createIssuerCall(CreateIssuerRequest 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.getIssuerRequest(); - - // create path and map variables - String localVarPath = "/1099/issuers"; - - 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 createIssuerValidateBeforeCall(CreateIssuerRequest 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 createIssuer(Async)"); - } - - - okhttp3.Call localVarCall = createIssuerCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * 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 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
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public IssuerWriteResponse createIssuer(CreateIssuerRequest requestParameters) throws ApiException { - ApiResponse localVarResp = createIssuerWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * 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<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
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public ApiResponse createIssuerWithHttpInfo(CreateIssuerRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = createIssuerValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an issuer (asynchronously) - * Create an issuer (also known as a Payer). - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public okhttp3.Call createIssuerAsync(CreateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createIssuerValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the CreateIssuer 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 issuerRequest The issuer to create (optional) - */ - public class CreateIssuerRequest { - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private IssuerRequest issuerRequest; - - public CreateIssuerRequest () { - } - - 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 IssuerRequest getIssuerRequest() { return issuerRequest; } - public void setIssuerRequest(IssuerRequest issuerRequest) { this.issuerRequest = issuerRequest; } - } - - /** - * Getter function to instantiate Request class - * @returns CreateIssuerRequest - */ - public CreateIssuerRequest getCreateIssuerRequest() { - return this.new CreateIssuerRequest(); - } - - /** - * Build call for deleteIssuer - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public okhttp3.Call deleteIssuerCall(DeleteIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/1099/issuers/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteIssuerValidateBeforeCall(DeleteIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling deleteIssuer(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteIssuer(Async)"); - } - - - okhttp3.Call localVarCall = deleteIssuerCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Delete an issuer - * Delete an issuer (also known as a Payer). - * @param requestOptions Object which represents the options available for a given API/request - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public void deleteIssuer(DeleteIssuerRequest requestParameters) throws ApiException { - deleteIssuerWithHttpInfo(requestParameters); - } - - /** - * Delete an issuer - * Delete an issuer (also known as a Payer). - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public ApiResponse deleteIssuerWithHttpInfo(DeleteIssuerRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = deleteIssuerValidateBeforeCall(requestParameters, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete an issuer (asynchronously) - * Delete an issuer (also known as a Payer). - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public okhttp3.Call deleteIssuerAsync(DeleteIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteIssuerValidateBeforeCall(requestParameters, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Represents the Request object for the DeleteIssuer API - * - * @param id Id of the issuer to delete - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class DeleteIssuerRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public DeleteIssuerRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns DeleteIssuerRequest - */ - public DeleteIssuerRequest getDeleteIssuerRequest() { - return this.new DeleteIssuerRequest(); - } - - /** - * Build call for getIssuer - * @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 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public okhttp3.Call getIssuerCall(GetIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/1099/issuers/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getIssuerValidateBeforeCall(GetIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getIssuer(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getIssuer(Async)"); - } - - - okhttp3.Call localVarCall = getIssuerCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Retrieve an issuer - * Retrieve an issuer (also known as a Payer). - * @param requestOptions Object which represents the options available for a given API/request - * @return IssuerResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public IssuerResponse getIssuer(GetIssuerRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getIssuerWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Retrieve an issuer - * Retrieve an issuer (also known as a Payer). - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<IssuerResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public ApiResponse getIssuerWithHttpInfo(GetIssuerRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getIssuerValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve an issuer (asynchronously) - * Retrieve an issuer (also known as a Payer). - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @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 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
- */ - public okhttp3.Call getIssuerAsync(GetIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getIssuerValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetIssuer API - * - * @param id Id of the issuer to retrieve - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class GetIssuerRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public GetIssuerRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns GetIssuerRequest - */ - public GetIssuerRequest getGetIssuerRequest() { - return this.new GetIssuerRequest(); - } - - /** - * Build call for getIssuers - * @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 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
- */ - public okhttp3.Call getIssuersCall(GetIssuersRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/1099/issuers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.get$filter() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); - } - - if (requestParameters.get$top() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); - } - - if (requestParameters.get$skip() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); - } - - if (requestParameters.get$orderBy() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); - } - - if (requestParameters.getCount() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); - } - - if (requestParameters.getCountOnly() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getIssuersValidateBeforeCall(GetIssuersRequest 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 getIssuers(Async)"); - } - - - okhttp3.Call localVarCall = getIssuersCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * List issuers - * 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 - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
- */ - public PaginatedQueryResultModelIssuerResponse getIssuers(GetIssuersRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getIssuersWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * List issuers - * 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 - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
- */ - public ApiResponse getIssuersWithHttpInfo(GetIssuersRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getIssuersValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List issuers (asynchronously) - * 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 - * @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 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
- */ - public okhttp3.Call getIssuersAsync(GetIssuersRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getIssuersValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetIssuers API - * - * @param avalaraVersion API version - * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) - * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) - * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) - * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) - * @param count If true, return the global count of elements in the collection. (optional) - * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class GetIssuersRequest { - private String avalaraVersion; - private String $filter; - private Integer $top; - private Integer $skip; - private String $orderBy; - private Boolean count; - private Boolean countOnly; - private String xCorrelationId; - private String xAvalaraClient; - - public GetIssuersRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String get$filter() { return $filter; } - public void set$filter(String $filter) { this.$filter = $filter; } - public Integer get$top() { return $top; } - public void set$top(Integer $top) { this.$top = $top; } - public Integer get$skip() { return $skip; } - public void set$skip(Integer $skip) { this.$skip = $skip; } - public String get$orderBy() { return $orderBy; } - public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } - public Boolean getCount() { return count; } - public void setCount(Boolean count) { this.count = count; } - public Boolean getCountOnly() { return countOnly; } - public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns GetIssuersRequest - */ - public GetIssuersRequest getGetIssuersRequest() { - return this.new GetIssuersRequest(); - } - - /** - * Build call for updateIssuer - * @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 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 -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
- */ - public okhttp3.Call updateIssuerCall(UpdateIssuerRequest 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.getIssuerRequest(); - - // create path and map variables - String localVarPath = "/1099/issuers/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateIssuerValidateBeforeCall(UpdateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling updateIssuer(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling updateIssuer(Async)"); - } - - - okhttp3.Call localVarCall = updateIssuerCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Update an issuer - * 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. 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 -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
- */ - 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). 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<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. 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 -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
- */ - public ApiResponse updateIssuerWithHttpInfo(UpdateIssuerRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = updateIssuerValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update an issuer (asynchronously) - * 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 - * @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 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 -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
- */ - public okhttp3.Call updateIssuerAsync(UpdateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateIssuerValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the UpdateIssuer API - * - * @param id Id of the issuer to update - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - * @param issuerRequest The issuer to update (optional) - */ - public class UpdateIssuerRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - private IssuerRequest issuerRequest; - - public UpdateIssuerRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - 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 IssuerRequest getIssuerRequest() { return issuerRequest; } - public void setIssuerRequest(IssuerRequest issuerRequest) { this.issuerRequest = issuerRequest; } - } - - /** - * Getter function to instantiate Request class - * @returns UpdateIssuerRequest - */ - public UpdateIssuerRequest getUpdateIssuerRequest() { - return this.new UpdateIssuerRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * 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.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; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class Issuers1099Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public Issuers1099Api(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 createIssuer + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public okhttp3.Call createIssuerCall(CreateIssuerRequest 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.getIssuerRequest(); + + // create path and map variables + String localVarPath = "/1099/issuers"; + + 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 createIssuerValidateBeforeCall(CreateIssuerRequest 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 createIssuer(Async)"); + } + + + okhttp3.Call localVarCall = createIssuerCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * 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 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
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public IssuerWriteResponse createIssuer(CreateIssuerRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createIssuerWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * 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<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
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public ApiResponse createIssuerWithHttpInfo(CreateIssuerRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = createIssuerValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create an issuer (asynchronously) + * Create an issuer (also known as a Payer). + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 Created issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public okhttp3.Call createIssuerAsync(CreateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createIssuerValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the CreateIssuer 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 issuerRequest The issuer to create (optional) + */ + public class CreateIssuerRequest { + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private IssuerRequest issuerRequest; + + public CreateIssuerRequest () { + } + + 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 IssuerRequest getIssuerRequest() { return issuerRequest; } + public void setIssuerRequest(IssuerRequest issuerRequest) { this.issuerRequest = issuerRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns CreateIssuerRequest + */ + public CreateIssuerRequest getCreateIssuerRequest() { + return this.new CreateIssuerRequest(); + } + + /** + * Build call for deleteIssuer + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public okhttp3.Call deleteIssuerCall(DeleteIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/1099/issuers/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteIssuerValidateBeforeCall(DeleteIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling deleteIssuer(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteIssuer(Async)"); + } + + + okhttp3.Call localVarCall = deleteIssuerCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Delete an issuer + * Delete an issuer (also known as a Payer). + * @param requestOptions Object which represents the options available for a given API/request + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public void deleteIssuer(DeleteIssuerRequest requestParameters) throws ApiException { + deleteIssuerWithHttpInfo(requestParameters); + } + + /** + * Delete an issuer + * Delete an issuer (also known as a Payer). + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public ApiResponse deleteIssuerWithHttpInfo(DeleteIssuerRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = deleteIssuerValidateBeforeCall(requestParameters, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete an issuer (asynchronously) + * Delete an issuer (also known as a Payer). + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Empty response -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public okhttp3.Call deleteIssuerAsync(DeleteIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteIssuerValidateBeforeCall(requestParameters, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Represents the Request object for the DeleteIssuer API + * + * @param id Id of the issuer to delete + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class DeleteIssuerRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public DeleteIssuerRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns DeleteIssuerRequest + */ + public DeleteIssuerRequest getDeleteIssuerRequest() { + return this.new DeleteIssuerRequest(); + } + + /** + * Build call for getIssuer + * @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 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public okhttp3.Call getIssuerCall(GetIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/1099/issuers/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getIssuerValidateBeforeCall(GetIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getIssuer(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getIssuer(Async)"); + } + + + okhttp3.Call localVarCall = getIssuerCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Retrieve an issuer + * Retrieve an issuer (also known as a Payer). + * @param requestOptions Object which represents the options available for a given API/request + * @return IssuerResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public IssuerResponse getIssuer(GetIssuerRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getIssuerWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Retrieve an issuer + * Retrieve an issuer (also known as a Payer). + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<IssuerResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public ApiResponse getIssuerWithHttpInfo(GetIssuerRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getIssuerValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve an issuer (asynchronously) + * Retrieve an issuer (also known as a Payer). + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @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 Single issuer -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
+ */ + public okhttp3.Call getIssuerAsync(GetIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getIssuerValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetIssuer API + * + * @param id Id of the issuer to retrieve + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetIssuerRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public GetIssuerRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetIssuerRequest + */ + public GetIssuerRequest getGetIssuerRequest() { + return this.new GetIssuerRequest(); + } + + /** + * Build call for getIssuers + * @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 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
+ */ + public okhttp3.Call getIssuersCall(GetIssuersRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/1099/issuers"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.get$filter() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); + } + + if (requestParameters.get$top() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); + } + + if (requestParameters.get$skip() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); + } + + if (requestParameters.get$orderBy() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); + } + + if (requestParameters.getCount() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); + } + + if (requestParameters.getCountOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getIssuersValidateBeforeCall(GetIssuersRequest 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 getIssuers(Async)"); + } + + + okhttp3.Call localVarCall = getIssuersCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * List issuers + * 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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
+ */ + public PaginatedQueryResultModelIssuerResponse getIssuers(GetIssuersRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getIssuersWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * List issuers + * 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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
+ */ + public ApiResponse getIssuersWithHttpInfo(GetIssuersRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getIssuersValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List issuers (asynchronously) + * 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 + * @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 List of issuers -
400 Bad request (e.g., invalid sort key) -
404 Not Found -
500 Server Error -
401 Authentication failed -
+ */ + public okhttp3.Call getIssuersAsync(GetIssuersRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getIssuersValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetIssuers API + * + * @param avalaraVersion API version + * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) + * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) + * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) + * @param count If true, return the global count of elements in the collection. (optional) + * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetIssuersRequest { + private String avalaraVersion; + private String $filter; + private Integer $top; + private Integer $skip; + private String $orderBy; + private Boolean count; + private Boolean countOnly; + private String xCorrelationId; + private String xAvalaraClient; + + public GetIssuersRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String get$filter() { return $filter; } + public void set$filter(String $filter) { this.$filter = $filter; } + public Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } + public String get$orderBy() { return $orderBy; } + public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } + public Boolean getCount() { return count; } + public void setCount(Boolean count) { this.count = count; } + public Boolean getCountOnly() { return countOnly; } + public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetIssuersRequest + */ + public GetIssuersRequest getGetIssuersRequest() { + return this.new GetIssuersRequest(); + } + + /** + * Build call for updateIssuer + * @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 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 -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
+ */ + public okhttp3.Call updateIssuerCall(UpdateIssuerRequest 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.getIssuerRequest(); + + // create path and map variables + String localVarPath = "/1099/issuers/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateIssuerValidateBeforeCall(UpdateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling updateIssuer(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling updateIssuer(Async)"); + } + + + okhttp3.Call localVarCall = updateIssuerCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Update an issuer + * 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. 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 -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
+ */ + 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). 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<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. 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 -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
+ */ + public ApiResponse updateIssuerWithHttpInfo(UpdateIssuerRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = updateIssuerValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update an issuer (asynchronously) + * 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 + * @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 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 -
403 Caller does not have access to this issuer. -
404 Issuer not found. -
+ */ + public okhttp3.Call updateIssuerAsync(UpdateIssuerRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateIssuerValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the UpdateIssuer API + * + * @param id Id of the issuer to update + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + * @param issuerRequest The issuer to update (optional) + */ + public class UpdateIssuerRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private IssuerRequest issuerRequest; + + public UpdateIssuerRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + 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 IssuerRequest getIssuerRequest() { return issuerRequest; } + public void setIssuerRequest(IssuerRequest issuerRequest) { this.issuerRequest = issuerRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns UpdateIssuerRequest + */ + public UpdateIssuerRequest getUpdateIssuerRequest() { + return this.new UpdateIssuerRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 2e82181..e604dbb 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/JobsApi.java @@ -1,281 +1,281 @@ -/* - * 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.JobResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class JobsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public JobsApi(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 getJob - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call getJobCall(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/jobs/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationId() != null) { - localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getJobValidateBeforeCall(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.id' is set - if (requestParameters.getId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getJob(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getJob(Async)"); - } - - - okhttp3.Call localVarCall = getJobCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Retrieves information about the job - * Retrieves information about the job - * @param requestOptions Object which represents the options available for a given API/request - * @return JobResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public JobResponse getJob(GetJobRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getJobWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Retrieves information about the job - * Retrieves information about the job - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<JobResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public ApiResponse getJobWithHttpInfo(GetJobRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getJobValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieves information about the job (asynchronously) - * Retrieves information about the job - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
- */ - public okhttp3.Call getJobAsync(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getJobValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetJob API - * - * @param id Job id obtained from other API responses, like `/1099/bulk-upsert`. - * @param avalaraVersion API version - * @param xCorrelationId Unique correlation Id in a GUID format (optional) - * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) - */ - public class GetJobRequest { - private String id; - private String avalaraVersion; - private String xCorrelationId; - private String xAvalaraClient; - - public GetJobRequest () { - } - - public String getId() { return id; } - public void setId(String id) { this.id = id; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationId() { return xCorrelationId; } - public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns GetJobRequest - */ - public GetJobRequest getGetJobRequest() { - return this.new GetJobRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * 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.JobResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class JobsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public JobsApi(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 getJob + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call getJobCall(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getJobValidateBeforeCall(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getJob(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getJob(Async)"); + } + + + okhttp3.Call localVarCall = getJobCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Retrieves information about the job + * Retrieves information about the job + * @param requestOptions Object which represents the options available for a given API/request + * @return JobResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public JobResponse getJob(GetJobRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getJobWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Retrieves information about the job + * Retrieves information about the job + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<JobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public ApiResponse getJobWithHttpInfo(GetJobRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getJobValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieves information about the job (asynchronously) + * Retrieves information about the job + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
500 Server Error -
401 Unauthorized -
+ */ + public okhttp3.Call getJobAsync(GetJobRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getJobValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetJob API + * + * @param id Job id obtained from other API responses, like `/1099/bulk-upsert`. + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetJobRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public GetJobRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetJobRequest + */ + public GetJobRequest getGetJobRequest() { + return this.new GetJobRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + diff --git a/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java b/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java index 184167c..e0a525b 100644 --- a/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java +++ b/src/main/java/Avalara/SDK/api/A1099/V2/TinMatchesApi.java @@ -1,280 +1,900 @@ -/* - * 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.9.0"); - } -} - +/* + * 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.BulkTinMatchAcceptedResponse; +import Avalara.SDK.model.A1099.V2.BulkTinMatchRequest; +import Avalara.SDK.model.A1099.V2.BulkTinMatchResponse; +import Avalara.SDK.model.A1099.V2.ErrorResponse; +import Avalara.SDK.model.A1099.V2.PaginatedQueryResultModelBulkTinMatchResultItemResponse; +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 getBulkTinMatch + * @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 Bulk TIN match details -
401 Authentication failed -
404 Bulk not found -
+ */ + public okhttp3.Call getBulkTinMatchCall(GetBulkTinMatchRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/tin-matches/$bulk/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getBulkTinMatchValidateBeforeCall(GetBulkTinMatchRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getBulkTinMatch(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getBulkTinMatch(Async)"); + } + + + okhttp3.Call localVarCall = getBulkTinMatchCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Get bulk TIN match details + * + * @param requestOptions Object which represents the options available for a given API/request + * @return BulkTinMatchResponse + * @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 Bulk TIN match details -
401 Authentication failed -
404 Bulk not found -
+ */ + public BulkTinMatchResponse getBulkTinMatch(GetBulkTinMatchRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getBulkTinMatchWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Get bulk TIN match details + * + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<BulkTinMatchResponse> + * @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 Bulk TIN match details -
401 Authentication failed -
404 Bulk not found -
+ */ + public ApiResponse getBulkTinMatchWithHttpInfo(GetBulkTinMatchRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getBulkTinMatchValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get bulk TIN match details (asynchronously) + * + * @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 Bulk TIN match details -
401 Authentication failed -
404 Bulk not found -
+ */ + public okhttp3.Call getBulkTinMatchAsync(GetBulkTinMatchRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getBulkTinMatchValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetBulkTinMatch API + * + * @param id The bulk ID + * @param avalaraVersion API version + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetBulkTinMatchRequest { + private String id; + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + + public GetBulkTinMatchRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetBulkTinMatchRequest + */ + public GetBulkTinMatchRequest getGetBulkTinMatchRequest() { + return this.new GetBulkTinMatchRequest(); + } + + /** + * Build call for getBulkTinMatchResults + * @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 List of TIN match responses -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
404 Bulk not found -
+ */ + public okhttp3.Call getBulkTinMatchResultsCall(GetBulkTinMatchResultsRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/tin-matches/$bulk/{id}/results" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(requestParameters.id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.get$filter() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); + } + + if (requestParameters.get$top() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); + } + + if (requestParameters.get$skip() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); + } + + if (requestParameters.get$orderBy() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderBy", requestParameters.get$orderBy())); + } + + if (requestParameters.getCount() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); + } + + if (requestParameters.getCountOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationId() != null) { + localVarHeaderParams.put("X-Correlation-Id", localVarApiClient.parameterToString(requestParameters.getXCorrelationId())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.A1099); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getBulkTinMatchResultsValidateBeforeCall(GetBulkTinMatchResultsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.id' is set + if (requestParameters.getId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.id' when calling getBulkTinMatchResults(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getBulkTinMatchResults(Async)"); + } + + + okhttp3.Call localVarCall = getBulkTinMatchResultsCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * List bulk TIN match results + * + * @param requestOptions Object which represents the options available for a given API/request + * @return PaginatedQueryResultModelBulkTinMatchResultItemResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 List of TIN match responses -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
404 Bulk not found -
+ */ + public PaginatedQueryResultModelBulkTinMatchResultItemResponse getBulkTinMatchResults(GetBulkTinMatchResultsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getBulkTinMatchResultsWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * List bulk TIN match results + * + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<PaginatedQueryResultModelBulkTinMatchResultItemResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 List of TIN match responses -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
404 Bulk not found -
+ */ + public ApiResponse getBulkTinMatchResultsWithHttpInfo(GetBulkTinMatchResultsRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getBulkTinMatchResultsValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List bulk TIN match results (asynchronously) + * + * @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 List of TIN match responses -
400 Bad request (e.g., invalid sort key) -
401 Authentication failed -
404 Bulk not found -
+ */ + public okhttp3.Call getBulkTinMatchResultsAsync(GetBulkTinMatchResultsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getBulkTinMatchResultsValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetBulkTinMatchResults API + * + * @param id The bulk ID + * @param avalaraVersion API version + * @param $filter A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. (optional) + * @param $top If zero or greater than 1000, return at most 1000 results. Otherwise, return this number of results. Used with skip to provide pagination for large datasets. (optional) + * @param $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) + * @param $orderBy A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) + * @param count If true, return the global count of elements in the collection. (optional) + * @param countOnly If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) + * @param xCorrelationId Unique correlation Id in a GUID format (optional) + * @param xAvalaraClient Identifies the software you are using to call this API. For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . (optional) + */ + public class GetBulkTinMatchResultsRequest { + private String id; + private String avalaraVersion; + private String $filter; + private Integer $top; + private Integer $skip; + private String $orderBy; + private Boolean count; + private Boolean countOnly; + private String xCorrelationId; + private String xAvalaraClient; + + public GetBulkTinMatchResultsRequest () { + } + + public String getId() { return id; } + public void setId(String id) { this.id = id; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "2.0"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String get$filter() { return $filter; } + public void set$filter(String $filter) { this.$filter = $filter; } + public Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } + public String get$orderBy() { return $orderBy; } + public void set$orderBy(String $orderBy) { this.$orderBy = $orderBy; } + public Boolean getCount() { return count; } + public void setCount(Boolean count) { this.count = count; } + public Boolean getCountOnly() { return countOnly; } + public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } + public String getXCorrelationId() { return xCorrelationId; } + public void setXCorrelationId(String xCorrelationId) { this.xCorrelationId = xCorrelationId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetBulkTinMatchResultsRequest + */ + public GetBulkTinMatchResultsRequest getGetBulkTinMatchResultsRequest() { + return this.new GetBulkTinMatchResultsRequest(); + } + + /** + * 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(); + } + + /** + * Build call for submitBulkTinMatch + * @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
202 Accepted submission, indicating it will be processed later and where to get results from -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
+ */ + public okhttp3.Call submitBulkTinMatchCall(SubmitBulkTinMatchRequest 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.getBulkTinMatchRequest(); + + // create path and map variables + String localVarPath = "/tin-matches/$bulk"; + + 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 submitBulkTinMatchValidateBeforeCall(SubmitBulkTinMatchRequest 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 submitBulkTinMatch(Async)"); + } + + + okhttp3.Call localVarCall = submitBulkTinMatchCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Submit bulk TIN match + * + * @param requestOptions Object which represents the options available for a given API/request + * @return BulkTinMatchAcceptedResponse + * @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
202 Accepted submission, indicating it will be processed later and where to get results from -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
+ */ + public BulkTinMatchAcceptedResponse submitBulkTinMatch(SubmitBulkTinMatchRequest requestParameters) throws ApiException { + ApiResponse localVarResp = submitBulkTinMatchWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Submit bulk TIN match + * + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<BulkTinMatchAcceptedResponse> + * @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
202 Accepted submission, indicating it will be processed later and where to get results from -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
+ */ + public ApiResponse submitBulkTinMatchWithHttpInfo(SubmitBulkTinMatchRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = submitBulkTinMatchValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Submit bulk TIN match (asynchronously) + * + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
202 Accepted submission, indicating it will be processed later and where to get results from -
400 Bad request (e.g. invalid field values) -
401 Authentication failed -
+ */ + public okhttp3.Call submitBulkTinMatchAsync(SubmitBulkTinMatchRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = submitBulkTinMatchValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the SubmitBulkTinMatch 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 bulkTinMatchRequest Required TIN collection to perform bulk TIN match (optional) + */ + public class SubmitBulkTinMatchRequest { + private String avalaraVersion; + private String xCorrelationId; + private String xAvalaraClient; + private BulkTinMatchRequest bulkTinMatchRequest; + + public SubmitBulkTinMatchRequest () { + } + + 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 BulkTinMatchRequest getBulkTinMatchRequest() { return bulkTinMatchRequest; } + public void setBulkTinMatchRequest(BulkTinMatchRequest bulkTinMatchRequest) { this.bulkTinMatchRequest = bulkTinMatchRequest; } + } + + /** + * Getter function to instantiate Request class + * @returns SubmitBulkTinMatchRequest + */ + public SubmitBulkTinMatchRequest getSubmitBulkTinMatchRequest() { + return this.new SubmitBulkTinMatchRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 a9e4239..8373898 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/CodeListsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/CodeListsApi.java @@ -1,543 +1,543 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.api.EInvoicing.V1; - -import Avalara.SDK.ApiCallback; -import Avalara.SDK.ApiClient; -import Avalara.SDK.ApiException; -import Avalara.SDK.ApiResponse; -import Avalara.SDK.Configuration; -import Avalara.SDK.Pair; -import Avalara.SDK.ProgressRequestBody; -import Avalara.SDK.ProgressResponseBody; -import Avalara.SDK.AvalaraMicroservice; - - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; -import java.util.*; - - -import Avalara.SDK.model.EInvoicing.V1.BadRequest; -import Avalara.SDK.model.EInvoicing.V1.CodeListListResponse; -import Avalara.SDK.model.EInvoicing.V1.CodeListResponse; -import Avalara.SDK.model.EInvoicing.V1.ForbiddenError; -import java.time.LocalDate; -import Avalara.SDK.model.EInvoicing.V1.NotFoundError; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class CodeListsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public CodeListsApi(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 getCodeList - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Code list not found. -
- */ - public okhttp3.Call getCodeListCall(GetCodeListRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/codelists/{codelistId}" - .replaceAll("\\{" + "codelistId" + "\\}", localVarApiClient.escapeString(requestParameters.codelistId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getCountryCode() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("countryCode", requestParameters.getCountryCode())); - } - - if (requestParameters.getEffectiveDate() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("effectiveDate", requestParameters.getEffectiveDate())); - } - - if (requestParameters.getSunsetDate() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sunsetDate", requestParameters.getSunsetDate())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getCodeListValidateBeforeCall(GetCodeListRequest 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 getCodeList(Async)"); - } - - // verify the required parameter 'requestParameters.codelistId' is set - if (requestParameters.getCodelistId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.codelistId' when calling getCodeList(Async)"); - } - - // verify the required parameter 'requestParameters.countryCode' is set - if (requestParameters.getCountryCode() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.countryCode' when calling getCodeList(Async)"); - } - - - okhttp3.Call localVarCall = getCodeListCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Retrieves a code list by ID for a specific country - * A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions.<br><br>Code Lists are versioned, and each version may have defined effective and sunset dates to ensure that the correct set of allowable values is applied according to regulatory or jurisdictional requirements.<br><br>By default, the API returns only non-expired code list versions (versions where the sunset date has not passed). To retrieve expired versions or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters. - * @param requestOptions Object which represents the options available for a given API/request - * @return CodeListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Code list not found. -
- */ - public CodeListResponse getCodeList(GetCodeListRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getCodeListWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Retrieves a code list by ID for a specific country - * A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions.<br><br>Code Lists are versioned, and each version may have defined effective and sunset dates to ensure that the correct set of allowable values is applied according to regulatory or jurisdictional requirements.<br><br>By default, the API returns only non-expired code list versions (versions where the sunset date has not passed). To retrieve expired versions or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CodeListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Code list not found. -
- */ - public ApiResponse getCodeListWithHttpInfo(GetCodeListRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getCodeListValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieves a code list by ID for a specific country (asynchronously) - * A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions.<br><br>Code Lists are versioned, and each version may have defined effective and sunset dates to ensure that the correct set of allowable values is applied according to regulatory or jurisdictional requirements.<br><br>By default, the API returns only non-expired code list versions (versions where the sunset date has not passed). To retrieve expired versions or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Code list not found. -
- */ - public okhttp3.Call getCodeListAsync(GetCodeListRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getCodeListValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetCodeList API - * - * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). - * @param codelistId System-generated unique identifier of the code list definition. Typically a UUID used to reference this code list internally or via APIs. - * @param countryCode Two-letter ISO 3166-1 alpha-2 country code indicating the jurisdiction this code list applies to. - * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) - * @param effectiveDate Filter code list versions by effective date. Returns versions that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. (optional) - * @param sunsetDate Filter code list versions by sunset date. Returns versions that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired versions are returned. (optional) - */ - public class GetCodeListRequest { - private String avalaraVersion; - private String codelistId; - private String countryCode; - private String xAvalaraClient; - private LocalDate effectiveDate; - private LocalDate sunsetDate; - - public GetCodeListRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getCodelistId() { return codelistId; } - public void setCodelistId(String codelistId) { this.codelistId = codelistId; } - public String getCountryCode() { return countryCode; } - public void setCountryCode(String countryCode) { this.countryCode = countryCode; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public LocalDate getEffectiveDate() { return effectiveDate; } - public void setEffectiveDate(LocalDate effectiveDate) { this.effectiveDate = effectiveDate; } - public LocalDate getSunsetDate() { return sunsetDate; } - public void setSunsetDate(LocalDate sunsetDate) { this.sunsetDate = sunsetDate; } - } - - /** - * Getter function to instantiate Request class - * @returns GetCodeListRequest - */ - public GetCodeListRequest getGetCodeListRequest() { - return this.new GetCodeListRequest(); - } - - /** - * Build call for getCodeListList - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
- */ - public okhttp3.Call getCodeListListCall(GetCodeListListRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/codelists"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getCountryCode() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("countryCode", requestParameters.getCountryCode())); - } - - if (requestParameters.getEffectiveDate() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("effectiveDate", requestParameters.getEffectiveDate())); - } - - if (requestParameters.getSunsetDate() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("sunsetDate", requestParameters.getSunsetDate())); - } - - if (requestParameters.get$count() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$count", requestParameters.get$count())); - } - - if (requestParameters.get$countOnly() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$countOnly", requestParameters.get$countOnly())); - } - - if (requestParameters.get$top() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); - } - - if (requestParameters.get$skip() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getCodeListListValidateBeforeCall(GetCodeListListRequest 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 getCodeListList(Async)"); - } - - // verify the required parameter 'requestParameters.countryCode' is set - if (requestParameters.getCountryCode() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.countryCode' when calling getCodeListList(Async)"); - } - - - okhttp3.Call localVarCall = getCodeListListCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Returns a list of code lists for a specific country - * Get a list of code lists on the Avalara E-Invoicing platform for the specified country. By default, the API returns only non-expired code lists (code lists where the sunset date has not passed). To retrieve expired code lists or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters.<br><br>A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions. - * @param requestOptions Object which represents the options available for a given API/request - * @return CodeListListResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
- */ - public CodeListListResponse getCodeListList(GetCodeListListRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getCodeListListWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Returns a list of code lists for a specific country - * Get a list of code lists on the Avalara E-Invoicing platform for the specified country. By default, the API returns only non-expired code lists (code lists where the sunset date has not passed). To retrieve expired code lists or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters.<br><br>A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<CodeListListResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
- */ - public ApiResponse getCodeListListWithHttpInfo(GetCodeListListRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getCodeListListValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Returns a list of code lists for a specific country (asynchronously) - * Get a list of code lists on the Avalara E-Invoicing platform for the specified country. By default, the API returns only non-expired code lists (code lists where the sunset date has not passed). To retrieve expired code lists or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters.<br><br>A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
- */ - public okhttp3.Call getCodeListListAsync(GetCodeListListRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getCodeListListValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetCodeListList API - * - * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). - * @param countryCode Two-letter ISO 3166-1 alpha-2 country code indicating the jurisdiction for which code lists should be returned. - * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) - * @param effectiveDate Filter code lists by effective date. Returns code lists that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. (optional) - * @param sunsetDate Filter code lists by sunset date. Returns code lists that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired code lists are returned. (optional) - * @param $count When set to true, the response body also includes the count of items in the collection. (optional) - * @param $countOnly When set to true, the response returns only the count of items in the collection. (optional) - * @param $top The number of items to include in the result. (optional) - * @param $skip The number of items to skip in the result. (optional) - */ - public class GetCodeListListRequest { - private String avalaraVersion; - private String countryCode; - private String xAvalaraClient; - private LocalDate effectiveDate; - private LocalDate sunsetDate; - private String $count; - private String $countOnly; - private Integer $top; - private Integer $skip; - - public GetCodeListListRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getCountryCode() { return countryCode; } - public void setCountryCode(String countryCode) { this.countryCode = countryCode; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public LocalDate getEffectiveDate() { return effectiveDate; } - public void setEffectiveDate(LocalDate effectiveDate) { this.effectiveDate = effectiveDate; } - public LocalDate getSunsetDate() { return sunsetDate; } - public void setSunsetDate(LocalDate sunsetDate) { this.sunsetDate = sunsetDate; } - public String get$count() { return $count; } - public void set$count(String $count) { this.$count = $count; } - public String get$countOnly() { return $countOnly; } - public void set$countOnly(String $countOnly) { this.$countOnly = $countOnly; } - public Integer get$top() { return $top; } - public void set$top(Integer $top) { this.$top = $top; } - public Integer get$skip() { return $skip; } - public void set$skip(Integer $skip) { this.$skip = $skip; } - } - - /** - * Getter function to instantiate Request class - * @returns GetCodeListListRequest - */ - public GetCodeListListRequest getGetCodeListListRequest() { - return this.new GetCodeListListRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.api.EInvoicing.V1; + +import Avalara.SDK.ApiCallback; +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.ApiResponse; +import Avalara.SDK.Configuration; +import Avalara.SDK.Pair; +import Avalara.SDK.ProgressRequestBody; +import Avalara.SDK.ProgressResponseBody; +import Avalara.SDK.AvalaraMicroservice; + + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; +import java.util.*; + + +import Avalara.SDK.model.EInvoicing.V1.BadRequest; +import Avalara.SDK.model.EInvoicing.V1.CodeListListResponse; +import Avalara.SDK.model.EInvoicing.V1.CodeListResponse; +import Avalara.SDK.model.EInvoicing.V1.ForbiddenError; +import java.time.LocalDate; +import Avalara.SDK.model.EInvoicing.V1.NotFoundError; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CodeListsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public CodeListsApi(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 getCodeList + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Code list not found. -
+ */ + public okhttp3.Call getCodeListCall(GetCodeListRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/codelists/{codelistId}" + .replaceAll("\\{" + "codelistId" + "\\}", localVarApiClient.escapeString(requestParameters.codelistId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getCountryCode() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countryCode", requestParameters.getCountryCode())); + } + + if (requestParameters.getEffectiveDate() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("effectiveDate", requestParameters.getEffectiveDate())); + } + + if (requestParameters.getSunsetDate() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sunsetDate", requestParameters.getSunsetDate())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCodeListValidateBeforeCall(GetCodeListRequest 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 getCodeList(Async)"); + } + + // verify the required parameter 'requestParameters.codelistId' is set + if (requestParameters.getCodelistId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.codelistId' when calling getCodeList(Async)"); + } + + // verify the required parameter 'requestParameters.countryCode' is set + if (requestParameters.getCountryCode() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.countryCode' when calling getCodeList(Async)"); + } + + + okhttp3.Call localVarCall = getCodeListCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Retrieves a code list by ID for a specific country + * A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions.<br><br>Code Lists are versioned, and each version may have defined effective and sunset dates to ensure that the correct set of allowable values is applied according to regulatory or jurisdictional requirements.<br><br>By default, the API returns only non-expired code list versions (versions where the sunset date has not passed). To retrieve expired versions or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters. + * @param requestOptions Object which represents the options available for a given API/request + * @return CodeListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Code list not found. -
+ */ + public CodeListResponse getCodeList(GetCodeListRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getCodeListWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Retrieves a code list by ID for a specific country + * A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions.<br><br>Code Lists are versioned, and each version may have defined effective and sunset dates to ensure that the correct set of allowable values is applied according to regulatory or jurisdictional requirements.<br><br>By default, the API returns only non-expired code list versions (versions where the sunset date has not passed). To retrieve expired versions or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CodeListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Code list not found. -
+ */ + public ApiResponse getCodeListWithHttpInfo(GetCodeListRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getCodeListValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieves a code list by ID for a specific country (asynchronously) + * A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions.<br><br>Code Lists are versioned, and each version may have defined effective and sunset dates to ensure that the correct set of allowable values is applied according to regulatory or jurisdictional requirements.<br><br>By default, the API returns only non-expired code list versions (versions where the sunset date has not passed). To retrieve expired versions or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Code list not found. -
+ */ + public okhttp3.Call getCodeListAsync(GetCodeListRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCodeListValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetCodeList API + * + * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). + * @param codelistId System-generated unique identifier of the code list definition. Typically a UUID used to reference this code list internally or via APIs. + * @param countryCode Two-letter ISO 3166-1 alpha-2 country code indicating the jurisdiction this code list applies to. + * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) + * @param effectiveDate Filter code list versions by effective date. Returns versions that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. (optional) + * @param sunsetDate Filter code list versions by sunset date. Returns versions that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired versions are returned. (optional) + */ + public class GetCodeListRequest { + private String avalaraVersion; + private String codelistId; + private String countryCode; + private String xAvalaraClient; + private LocalDate effectiveDate; + private LocalDate sunsetDate; + + public GetCodeListRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getCodelistId() { return codelistId; } + public void setCodelistId(String codelistId) { this.codelistId = codelistId; } + public String getCountryCode() { return countryCode; } + public void setCountryCode(String countryCode) { this.countryCode = countryCode; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public LocalDate getEffectiveDate() { return effectiveDate; } + public void setEffectiveDate(LocalDate effectiveDate) { this.effectiveDate = effectiveDate; } + public LocalDate getSunsetDate() { return sunsetDate; } + public void setSunsetDate(LocalDate sunsetDate) { this.sunsetDate = sunsetDate; } + } + + /** + * Getter function to instantiate Request class + * @returns GetCodeListRequest + */ + public GetCodeListRequest getGetCodeListRequest() { + return this.new GetCodeListRequest(); + } + + /** + * Build call for getCodeListList + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
+ */ + public okhttp3.Call getCodeListListCall(GetCodeListListRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/codelists"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getCountryCode() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countryCode", requestParameters.getCountryCode())); + } + + if (requestParameters.getEffectiveDate() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("effectiveDate", requestParameters.getEffectiveDate())); + } + + if (requestParameters.getSunsetDate() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("sunsetDate", requestParameters.getSunsetDate())); + } + + if (requestParameters.get$count() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$count", requestParameters.get$count())); + } + + if (requestParameters.get$countOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$countOnly", requestParameters.get$countOnly())); + } + + if (requestParameters.get$top() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); + } + + if (requestParameters.get$skip() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCodeListListValidateBeforeCall(GetCodeListListRequest 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 getCodeListList(Async)"); + } + + // verify the required parameter 'requestParameters.countryCode' is set + if (requestParameters.getCountryCode() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.countryCode' when calling getCodeListList(Async)"); + } + + + okhttp3.Call localVarCall = getCodeListListCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Returns a list of code lists for a specific country + * Get a list of code lists on the Avalara E-Invoicing platform for the specified country. By default, the API returns only non-expired code lists (code lists where the sunset date has not passed). To retrieve expired code lists or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters.<br><br>A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions. + * @param requestOptions Object which represents the options available for a given API/request + * @return CodeListListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
+ */ + public CodeListListResponse getCodeListList(GetCodeListListRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getCodeListListWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Returns a list of code lists for a specific country + * Get a list of code lists on the Avalara E-Invoicing platform for the specified country. By default, the API returns only non-expired code lists (code lists where the sunset date has not passed). To retrieve expired code lists or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters.<br><br>A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<CodeListListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
+ */ + public ApiResponse getCodeListListWithHttpInfo(GetCodeListListRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getCodeListListValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns a list of code lists for a specific country (asynchronously) + * Get a list of code lists on the Avalara E-Invoicing platform for the specified country. By default, the API returns only non-expired code lists (code lists where the sunset date has not passed). To retrieve expired code lists or filter by specific date ranges, use the <code>effectiveDate</code> and <code>sunsetDate</code> query parameters.<br><br>A Code List is a controlled set of predefined, standardized values used to populate specific fields in electronic documents (such as e-invoices). Each code has a stable, machine-readable identifier and a human-readable description. Code Lists are typically based on global standards (e.g., UN/CEFACT, ISO, EN16931) and may include jurisdiction-specific extensions or restrictions. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
+ */ + public okhttp3.Call getCodeListListAsync(GetCodeListListRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getCodeListListValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetCodeListList API + * + * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). + * @param countryCode Two-letter ISO 3166-1 alpha-2 country code indicating the jurisdiction for which code lists should be returned. + * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) + * @param effectiveDate Filter code lists by effective date. Returns code lists that are effective on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, defaults to the current date. sunsetDate is required when effectiveDate is provided. (optional) + * @param sunsetDate Filter code lists by sunset date. Returns code lists that have not yet sunset on or before this date. Format: YYYY-MM-DD (ISO 8601). If not specified, only non-expired code lists are returned. (optional) + * @param $count When set to true, the response body also includes the count of items in the collection. (optional) + * @param $countOnly When set to true, the response returns only the count of items in the collection. (optional) + * @param $top The number of items to include in the result. (optional) + * @param $skip The number of items to skip in the result. (optional) + */ + public class GetCodeListListRequest { + private String avalaraVersion; + private String countryCode; + private String xAvalaraClient; + private LocalDate effectiveDate; + private LocalDate sunsetDate; + private String $count; + private String $countOnly; + private Integer $top; + private Integer $skip; + + public GetCodeListListRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getCountryCode() { return countryCode; } + public void setCountryCode(String countryCode) { this.countryCode = countryCode; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public LocalDate getEffectiveDate() { return effectiveDate; } + public void setEffectiveDate(LocalDate effectiveDate) { this.effectiveDate = effectiveDate; } + public LocalDate getSunsetDate() { return sunsetDate; } + public void setSunsetDate(LocalDate sunsetDate) { this.sunsetDate = sunsetDate; } + public String get$count() { return $count; } + public void set$count(String $count) { this.$count = $count; } + public String get$countOnly() { return $countOnly; } + public void set$countOnly(String $countOnly) { this.$countOnly = $countOnly; } + public Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } + } + + /** + * Getter function to instantiate Request class + * @returns GetCodeListListRequest + */ + public GetCodeListListRequest getGetCodeListListRequest() { + return this.new GetCodeListListRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 6217670..ab1bf16 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DataInputFieldsApi.java @@ -294,7 +294,7 @@ public GetDataInputFieldsRequest getGetDataInputFieldsRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); + this.localVarApiClient.setSdkVersion("26.9.1"); } } 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 25bfa08..e5ce1b4 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java @@ -1113,7 +1113,7 @@ public SubmitDocumentRequest getSubmitDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); + this.localVarApiClient.setSdkVersion("26.9.1"); } } 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 dc64994..044e623 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java @@ -300,7 +300,7 @@ public SubmitInteropDocumentRequest getSubmitInteropDocumentRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); + this.localVarApiClient.setSdkVersion("26.9.1"); } } 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 88753a4..7773861 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/MandatesApi.java @@ -521,7 +521,7 @@ public GetMandatesRequest getGetMandatesRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); + this.localVarApiClient.setSdkVersion("26.9.1"); } } 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 4a5a2c1..426aa84 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/ReportsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/ReportsApi.java @@ -1,711 +1,711 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.api.EInvoicing.V1; - -import Avalara.SDK.ApiCallback; -import Avalara.SDK.ApiClient; -import Avalara.SDK.ApiException; -import Avalara.SDK.ApiResponse; -import Avalara.SDK.Configuration; -import Avalara.SDK.Pair; -import Avalara.SDK.ProgressRequestBody; -import Avalara.SDK.ProgressResponseBody; -import Avalara.SDK.AvalaraMicroservice; - - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; -import java.util.*; - - -import Avalara.SDK.model.EInvoicing.V1.BadRequest; -import Avalara.SDK.model.EInvoicing.V1.ForbiddenError; -import Avalara.SDK.model.EInvoicing.V1.NotFoundError; -import Avalara.SDK.model.EInvoicing.V1.ReportDownloadResponse; -import Avalara.SDK.model.EInvoicing.V1.ReportItem; -import Avalara.SDK.model.EInvoicing.V1.ReportListResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ReportsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ReportsApi(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 downloadReport - * @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 Returns a pre-signed URL to download the report. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found or not yet available for download. -
- */ - public okhttp3.Call downloadReportCall(DownloadReportRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/reports/{reportId}/$download" - .replaceAll("\\{" + "reportId" + "\\}", localVarApiClient.escapeString(requestParameters.reportId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - if (requestParameters.getXCorrelationID() != null) { - localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call downloadReportValidateBeforeCall(DownloadReportRequest 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 downloadReport(Async)"); - } - - // verify the required parameter 'requestParameters.reportId' is set - if (requestParameters.getReportId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.reportId' when calling downloadReport(Async)"); - } - - - okhttp3.Call localVarCall = downloadReportCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Returns a pre-signed download URL for a report - * Returns a pre-signed URL to download the report file when it is available. If the report has not yet been generated, a 404 (not found) is returned. - * @param requestOptions Object which represents the options available for a given API/request - * @return ReportDownloadResponse - * @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 Returns a pre-signed URL to download the report. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found or not yet available for download. -
- */ - public ReportDownloadResponse downloadReport(DownloadReportRequest requestParameters) throws ApiException { - ApiResponse localVarResp = downloadReportWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Returns a pre-signed download URL for a report - * Returns a pre-signed URL to download the report file when it is available. If the report has not yet been generated, a 404 (not found) is returned. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<ReportDownloadResponse> - * @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 Returns a pre-signed URL to download the report. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found or not yet available for download. -
- */ - public ApiResponse downloadReportWithHttpInfo(DownloadReportRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = downloadReportValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Returns a pre-signed download URL for a report (asynchronously) - * Returns a pre-signed URL to download the report file when it is available. If the report has not yet been generated, a 404 (not found) is returned. - * @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 Returns a pre-signed URL to download the report. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found or not yet available for download. -
- */ - public okhttp3.Call downloadReportAsync(DownloadReportRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = downloadReportValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the DownloadReport API - * - * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). - * @param reportId The unique ID for this report as returned in a GET /reports response. - * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) - * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) - */ - public class DownloadReportRequest { - private String avalaraVersion; - private String reportId; - private String xAvalaraClient; - private String xCorrelationID; - - public DownloadReportRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getReportId() { return reportId; } - public void setReportId(String reportId) { this.reportId = reportId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public String getXCorrelationID() { return xCorrelationID; } - public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } - } - - /** - * Getter function to instantiate Request class - * @returns DownloadReportRequest - */ - public DownloadReportRequest getDownloadReportRequest() { - return this.new DownloadReportRequest(); - } - - /** - * Build call for getReportById - * @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 Report found and returned successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found. -
- */ - public okhttp3.Call getReportByIdCall(GetReportByIdRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/reports/{reportId}/status" - .replaceAll("\\{" + "reportId" + "\\}", localVarApiClient.escapeString(requestParameters.reportId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - if (requestParameters.getXCorrelationID() != null) { - localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getReportByIdValidateBeforeCall(GetReportByIdRequest 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 getReportById(Async)"); - } - - // verify the required parameter 'requestParameters.reportId' is set - if (requestParameters.getReportId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.reportId' when calling getReportById(Async)"); - } - - - okhttp3.Call localVarCall = getReportByIdCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Retrieves a report by its unique ID - * Retrieves a specific report by its unique identifier. Returns complete report details including metadata, status, and associated information. - * @param requestOptions Object which represents the options available for a given API/request - * @return ReportItem - * @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 Report found and returned successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found. -
- */ - public ReportItem getReportById(GetReportByIdRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getReportByIdWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Retrieves a report by its unique ID - * Retrieves a specific report by its unique identifier. Returns complete report details including metadata, status, and associated information. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<ReportItem> - * @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 Report found and returned successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found. -
- */ - public ApiResponse getReportByIdWithHttpInfo(GetReportByIdRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getReportByIdValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieves a report by its unique ID (asynchronously) - * Retrieves a specific report by its unique identifier. Returns complete report details including metadata, status, and associated information. - * @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 Report found and returned successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found. -
- */ - public okhttp3.Call getReportByIdAsync(GetReportByIdRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getReportByIdValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetReportById API - * - * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). - * @param reportId The unique ID for this report as returned in a GET /reports response. - * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) - * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) - */ - public class GetReportByIdRequest { - private String avalaraVersion; - private String reportId; - private String xAvalaraClient; - private String xCorrelationID; - - public GetReportByIdRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getReportId() { return reportId; } - public void setReportId(String reportId) { this.reportId = reportId; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public String getXCorrelationID() { return xCorrelationID; } - public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } - } - - /** - * Getter function to instantiate Request class - * @returns GetReportByIdRequest - */ - public GetReportByIdRequest getGetReportByIdRequest() { - return this.new GetReportByIdRequest(); - } - - /** - * Build call for getReports - * @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 Reports retrieved successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
- */ - public okhttp3.Call getReportsCall(GetReportsRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/reports"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.get$filter() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); - } - - if (requestParameters.get$top() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); - } - - if (requestParameters.get$skip() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); - } - - if (requestParameters.get$count() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$count", requestParameters.get$count())); - } - - if (requestParameters.get$countOnly() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$countOnly", requestParameters.get$countOnly())); - } - - if (requestParameters.get$orderby() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderby", requestParameters.get$orderby())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - if (requestParameters.getXCorrelationID() != null) { - localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getReportsValidateBeforeCall(GetReportsRequest 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 getReports(Async)"); - } - - - okhttp3.Call localVarCall = getReportsCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Returns a list of reports - * Retrieves all reports with optional filtering, paging, and sorting. Results are filtered by tenant. Supports OData-style filtering using the $filter parameter. Use $top and $skip for paging; when more results exist, the response includes @nextLink to fetch the next page. Default sort order is by report generation date (descending). - * @param requestOptions Object which represents the options available for a given API/request - * @return ReportListResponse - * @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 Reports retrieved successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
- */ - public ReportListResponse getReports(GetReportsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getReportsWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Returns a list of reports - * Retrieves all reports with optional filtering, paging, and sorting. Results are filtered by tenant. Supports OData-style filtering using the $filter parameter. Use $top and $skip for paging; when more results exist, the response includes @nextLink to fetch the next page. Default sort order is by report generation date (descending). - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<ReportListResponse> - * @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 Reports retrieved successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
- */ - public ApiResponse getReportsWithHttpInfo(GetReportsRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getReportsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Returns a list of reports (asynchronously) - * Retrieves all reports with optional filtering, paging, and sorting. Results are filtered by tenant. Supports OData-style filtering using the $filter parameter. Use $top and $skip for paging; when more results exist, the response includes @nextLink to fetch the next page. Default sort order is by report generation date (descending). - * @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 Reports retrieved successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
- */ - public okhttp3.Call getReportsAsync(GetReportsRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getReportsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetReports API - * - * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). - * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) - * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) - * @param $filter OData-style filter expression. Supports operators: eq, ne, gt, ge, lt, le, like, ilike, contains. Examples: status eq 'COMPLETED', reportGenerateDate gt '2025-11-01', transactionIds contains 'TXN-2025-001' (optional) - * @param $top The number of items to include in the result. (optional) - * @param $skip The number of items to skip in the result. (optional) - * @param $count When set to true, the response body also includes the count of items in the collection. (optional) - * @param $countOnly When set to true, the response returns only the count of items in the collection. (optional) - * @param $orderby OData-style orderby expression. Format: 'field asc' or 'field desc'. Default: reportGenerateDate desc (optional, default to reportGenerateDate desc) - */ - public class GetReportsRequest { - private String avalaraVersion; - private String xAvalaraClient; - private String xCorrelationID; - private String $filter; - private Integer $top; - private Integer $skip; - private String $count; - private String $countOnly; - private String $orderby; - - public GetReportsRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public String getXCorrelationID() { return xCorrelationID; } - public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } - public String get$filter() { return $filter; } - public void set$filter(String $filter) { this.$filter = $filter; } - public Integer get$top() { return $top; } - public void set$top(Integer $top) { this.$top = $top; } - public Integer get$skip() { return $skip; } - public void set$skip(Integer $skip) { this.$skip = $skip; } - public String get$count() { return $count; } - public void set$count(String $count) { this.$count = $count; } - public String get$countOnly() { return $countOnly; } - public void set$countOnly(String $countOnly) { this.$countOnly = $countOnly; } - public String get$orderby() { return $orderby; } - public void set$orderby(String $orderby) { this.$orderby = $orderby; } - } - - /** - * Getter function to instantiate Request class - * @returns GetReportsRequest - */ - public GetReportsRequest getGetReportsRequest() { - return this.new GetReportsRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.api.EInvoicing.V1; + +import Avalara.SDK.ApiCallback; +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.ApiResponse; +import Avalara.SDK.Configuration; +import Avalara.SDK.Pair; +import Avalara.SDK.ProgressRequestBody; +import Avalara.SDK.ProgressResponseBody; +import Avalara.SDK.AvalaraMicroservice; + + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; +import java.util.*; + + +import Avalara.SDK.model.EInvoicing.V1.BadRequest; +import Avalara.SDK.model.EInvoicing.V1.ForbiddenError; +import Avalara.SDK.model.EInvoicing.V1.NotFoundError; +import Avalara.SDK.model.EInvoicing.V1.ReportDownloadResponse; +import Avalara.SDK.model.EInvoicing.V1.ReportItem; +import Avalara.SDK.model.EInvoicing.V1.ReportListResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ReportsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public ReportsApi(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 downloadReport + * @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 Returns a pre-signed URL to download the report. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found or not yet available for download. -
+ */ + public okhttp3.Call downloadReportCall(DownloadReportRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/reports/{reportId}/$download" + .replaceAll("\\{" + "reportId" + "\\}", localVarApiClient.escapeString(requestParameters.reportId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call downloadReportValidateBeforeCall(DownloadReportRequest 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 downloadReport(Async)"); + } + + // verify the required parameter 'requestParameters.reportId' is set + if (requestParameters.getReportId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.reportId' when calling downloadReport(Async)"); + } + + + okhttp3.Call localVarCall = downloadReportCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Returns a pre-signed download URL for a report + * Returns a pre-signed URL to download the report file when it is available. If the report has not yet been generated, a 404 (not found) is returned. + * @param requestOptions Object which represents the options available for a given API/request + * @return ReportDownloadResponse + * @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 Returns a pre-signed URL to download the report. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found or not yet available for download. -
+ */ + public ReportDownloadResponse downloadReport(DownloadReportRequest requestParameters) throws ApiException { + ApiResponse localVarResp = downloadReportWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Returns a pre-signed download URL for a report + * Returns a pre-signed URL to download the report file when it is available. If the report has not yet been generated, a 404 (not found) is returned. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<ReportDownloadResponse> + * @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 Returns a pre-signed URL to download the report. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found or not yet available for download. -
+ */ + public ApiResponse downloadReportWithHttpInfo(DownloadReportRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = downloadReportValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns a pre-signed download URL for a report (asynchronously) + * Returns a pre-signed URL to download the report file when it is available. If the report has not yet been generated, a 404 (not found) is returned. + * @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 Returns a pre-signed URL to download the report. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found or not yet available for download. -
+ */ + public okhttp3.Call downloadReportAsync(DownloadReportRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = downloadReportValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the DownloadReport API + * + * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). + * @param reportId The unique ID for this report as returned in a GET /reports response. + * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) + * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) + */ + public class DownloadReportRequest { + private String avalaraVersion; + private String reportId; + private String xAvalaraClient; + private String xCorrelationID; + + public DownloadReportRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getReportId() { return reportId; } + public void setReportId(String reportId) { this.reportId = reportId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + } + + /** + * Getter function to instantiate Request class + * @returns DownloadReportRequest + */ + public DownloadReportRequest getDownloadReportRequest() { + return this.new DownloadReportRequest(); + } + + /** + * Build call for getReportById + * @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 Report found and returned successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found. -
+ */ + public okhttp3.Call getReportByIdCall(GetReportByIdRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/reports/{reportId}/status" + .replaceAll("\\{" + "reportId" + "\\}", localVarApiClient.escapeString(requestParameters.reportId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getReportByIdValidateBeforeCall(GetReportByIdRequest 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 getReportById(Async)"); + } + + // verify the required parameter 'requestParameters.reportId' is set + if (requestParameters.getReportId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.reportId' when calling getReportById(Async)"); + } + + + okhttp3.Call localVarCall = getReportByIdCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Retrieves a report by its unique ID + * Retrieves a specific report by its unique identifier. Returns complete report details including metadata, status, and associated information. + * @param requestOptions Object which represents the options available for a given API/request + * @return ReportItem + * @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 Report found and returned successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found. -
+ */ + public ReportItem getReportById(GetReportByIdRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getReportByIdWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Retrieves a report by its unique ID + * Retrieves a specific report by its unique identifier. Returns complete report details including metadata, status, and associated information. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<ReportItem> + * @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 Report found and returned successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found. -
+ */ + public ApiResponse getReportByIdWithHttpInfo(GetReportByIdRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getReportByIdValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieves a report by its unique ID (asynchronously) + * Retrieves a specific report by its unique identifier. Returns complete report details including metadata, status, and associated information. + * @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 Report found and returned successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
404 Report not found. -
+ */ + public okhttp3.Call getReportByIdAsync(GetReportByIdRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getReportByIdValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetReportById API + * + * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). + * @param reportId The unique ID for this report as returned in a GET /reports response. + * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) + * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) + */ + public class GetReportByIdRequest { + private String avalaraVersion; + private String reportId; + private String xAvalaraClient; + private String xCorrelationID; + + public GetReportByIdRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getReportId() { return reportId; } + public void setReportId(String reportId) { this.reportId = reportId; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + } + + /** + * Getter function to instantiate Request class + * @returns GetReportByIdRequest + */ + public GetReportByIdRequest getGetReportByIdRequest() { + return this.new GetReportByIdRequest(); + } + + /** + * Build call for getReports + * @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 Reports retrieved successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
+ */ + public okhttp3.Call getReportsCall(GetReportsRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/reports"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.get$filter() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter())); + } + + if (requestParameters.get$top() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); + } + + if (requestParameters.get$skip() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); + } + + if (requestParameters.get$count() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$count", requestParameters.get$count())); + } + + if (requestParameters.get$countOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$countOnly", requestParameters.get$countOnly())); + } + + if (requestParameters.get$orderby() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$orderby", requestParameters.get$orderby())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getReportsValidateBeforeCall(GetReportsRequest 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 getReports(Async)"); + } + + + okhttp3.Call localVarCall = getReportsCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Returns a list of reports + * Retrieves all reports with optional filtering, paging, and sorting. Results are filtered by tenant. Supports OData-style filtering using the $filter parameter. Use $top and $skip for paging; when more results exist, the response includes @nextLink to fetch the next page. Default sort order is by report generation date (descending). + * @param requestOptions Object which represents the options available for a given API/request + * @return ReportListResponse + * @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 Reports retrieved successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
+ */ + public ReportListResponse getReports(GetReportsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getReportsWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Returns a list of reports + * Retrieves all reports with optional filtering, paging, and sorting. Results are filtered by tenant. Supports OData-style filtering using the $filter parameter. Use $top and $skip for paging; when more results exist, the response includes @nextLink to fetch the next page. Default sort order is by report generation date (descending). + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<ReportListResponse> + * @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 Reports retrieved successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
+ */ + public ApiResponse getReportsWithHttpInfo(GetReportsRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getReportsValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns a list of reports (asynchronously) + * Retrieves all reports with optional filtering, paging, and sorting. Results are filtered by tenant. Supports OData-style filtering using the $filter parameter. Use $top and $skip for paging; when more results exist, the response includes @nextLink to fetch the next page. Default sort order is by report generation date (descending). + * @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 Reports retrieved successfully. -
400 Bad request. -
401 Unauthorized. -
403 Forbidden. -
+ */ + public okhttp3.Call getReportsAsync(GetReportsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getReportsValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetReports API + * + * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). + * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) + * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) + * @param $filter OData-style filter expression. Supports operators: eq, ne, gt, ge, lt, le, like, ilike, contains. Examples: status eq 'COMPLETED', reportGenerateDate gt '2025-11-01', transactionIds contains 'TXN-2025-001' (optional) + * @param $top The number of items to include in the result. (optional) + * @param $skip The number of items to skip in the result. (optional) + * @param $count When set to true, the response body also includes the count of items in the collection. (optional) + * @param $countOnly When set to true, the response returns only the count of items in the collection. (optional) + * @param $orderby OData-style orderby expression. Format: 'field asc' or 'field desc'. Default: reportGenerateDate desc (optional, default to reportGenerateDate desc) + */ + public class GetReportsRequest { + private String avalaraVersion; + private String xAvalaraClient; + private String xCorrelationID; + private String $filter; + private Integer $top; + private Integer $skip; + private String $count; + private String $countOnly; + private String $orderby; + + public GetReportsRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + public String get$filter() { return $filter; } + public void set$filter(String $filter) { this.$filter = $filter; } + public Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } + public String get$count() { return $count; } + public void set$count(String $count) { this.$count = $count; } + public String get$countOnly() { return $countOnly; } + public void set$countOnly(String $countOnly) { this.$countOnly = $countOnly; } + public String get$orderby() { return $orderby; } + public void set$orderby(String $orderby) { this.$orderby = $orderby; } + } + + /** + * Getter function to instantiate Request class + * @returns GetReportsRequest + */ + public GetReportsRequest getGetReportsRequest() { + return this.new GetReportsRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 8522400..59f582e 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/SubscriptionsApi.java @@ -1,879 +1,879 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.api.EInvoicing.V1; - -import Avalara.SDK.ApiCallback; -import Avalara.SDK.ApiClient; -import Avalara.SDK.ApiException; -import Avalara.SDK.ApiResponse; -import Avalara.SDK.Configuration; -import Avalara.SDK.Pair; -import Avalara.SDK.ProgressRequestBody; -import Avalara.SDK.ProgressResponseBody; -import Avalara.SDK.AvalaraMicroservice; - - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; -import java.util.*; - - -import Avalara.SDK.model.EInvoicing.V1.SubscriptionDetail; -import Avalara.SDK.model.EInvoicing.V1.SubscriptionListResponse; -import Avalara.SDK.model.EInvoicing.V1.SubscriptionRegistration; -import Avalara.SDK.model.EInvoicing.V1.SuccessResponse; -import Avalara.SDK.model.EInvoicing.V1.WebhooksErrorResponse; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class SubscriptionsApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public SubscriptionsApi(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 createWebhookSubscription - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 Subscription created successfully. Returns the created SubscriptionDetail object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
400 Bad request. The request payload is invalid or contains missing required fields. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public okhttp3.Call createWebhookSubscriptionCall(CreateWebhookSubscriptionRequest 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.getSubscriptionRegistration(); - - // create path and map variables - String localVarPath = "/einvoicing/webhooks/subscriptions"; - - 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" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(CreateWebhookSubscriptionRequest 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 createWebhookSubscription(Async)"); - } - - // verify the required parameter 'requestParameters.subscriptionRegistration' is set - if (requestParameters.getSubscriptionRegistration() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.subscriptionRegistration' when calling createWebhookSubscription(Async)"); - } - - - okhttp3.Call localVarCall = createWebhookSubscriptionCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Create a subscription to events - * Create a new webhook subscription and return the created subscription details. - * @param requestOptions Object which represents the options available for a given API/request - * @return SuccessResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 Subscription created successfully. Returns the created SubscriptionDetail object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
400 Bad request. The request payload is invalid or contains missing required fields. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public SuccessResponse createWebhookSubscription(CreateWebhookSubscriptionRequest requestParameters) throws ApiException { - ApiResponse localVarResp = createWebhookSubscriptionWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Create a subscription to events - * Create a new webhook subscription and return the created subscription details. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<SuccessResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 Subscription created successfully. Returns the created SubscriptionDetail object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
400 Bad request. The request payload is invalid or contains missing required fields. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public ApiResponse createWebhookSubscriptionWithHttpInfo(CreateWebhookSubscriptionRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a subscription to events (asynchronously) - * Create a new webhook subscription and return the created subscription details. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 Subscription created successfully. Returns the created SubscriptionDetail object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
400 Bad request. The request payload is invalid or contains missing required fields. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public okhttp3.Call createWebhookSubscriptionAsync(CreateWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the CreateWebhookSubscription API - * - * @param avalaraVersion The version of the API to use, e.g., \"1.6\". - * @param subscriptionRegistration - * @param xCorrelationID A unique identifier for tracking the request and its response (optional) - * @param xAvalaraClient Client application identification (optional) - */ - public class CreateWebhookSubscriptionRequest { - private String avalaraVersion; - private SubscriptionRegistration subscriptionRegistration; - private String xCorrelationID; - private String xAvalaraClient; - - public CreateWebhookSubscriptionRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public SubscriptionRegistration getSubscriptionRegistration() { return subscriptionRegistration; } - public void setSubscriptionRegistration(SubscriptionRegistration subscriptionRegistration) { this.subscriptionRegistration = subscriptionRegistration; } - public String getXCorrelationID() { return xCorrelationID; } - public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns CreateWebhookSubscriptionRequest - */ - public CreateWebhookSubscriptionRequest getCreateWebhookSubscriptionRequest() { - return this.new CreateWebhookSubscriptionRequest(); - } - - /** - * Build call for deleteWebhookSubscription - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Subscription deleted successfully. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public okhttp3.Call deleteWebhookSubscriptionCall(DeleteWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/webhooks/subscriptions/{subscriptionId}" - .replaceAll("\\{" + "subscriptionId" + "\\}", localVarApiClient.escapeString(requestParameters.subscriptionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationID() != null) { - localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(DeleteWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.subscriptionId' is set - if (requestParameters.getSubscriptionId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.subscriptionId' when calling deleteWebhookSubscription(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteWebhookSubscription(Async)"); - } - - - okhttp3.Call localVarCall = deleteWebhookSubscriptionCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Unsubscribe from events - * Delete the specified webhook subscription. - * @param requestOptions Object which represents the options available for a given API/request - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Subscription deleted successfully. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public void deleteWebhookSubscription(DeleteWebhookSubscriptionRequest requestParameters) throws ApiException { - deleteWebhookSubscriptionWithHttpInfo(requestParameters); - } - - /** - * Unsubscribe from events - * Delete the specified webhook subscription. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Subscription deleted successfully. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public ApiResponse deleteWebhookSubscriptionWithHttpInfo(DeleteWebhookSubscriptionRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(requestParameters, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Unsubscribe from events (asynchronously) - * Delete the specified webhook subscription. - * @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
204 Subscription deleted successfully. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public okhttp3.Call deleteWebhookSubscriptionAsync(DeleteWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(requestParameters, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Represents the Request object for the DeleteWebhookSubscription API - * - * @param subscriptionId Unique identifier of the subscription. - * @param avalaraVersion The version of the API to use, e.g., \"1.6\". - * @param xCorrelationID A unique identifier for tracking the request and its response (optional) - * @param xAvalaraClient Client application identification (optional) - */ - public class DeleteWebhookSubscriptionRequest { - private String subscriptionId; - private String avalaraVersion; - private String xCorrelationID; - private String xAvalaraClient; - - public DeleteWebhookSubscriptionRequest () { - } - - public String getSubscriptionId() { return subscriptionId; } - public void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationID() { return xCorrelationID; } - public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns DeleteWebhookSubscriptionRequest - */ - public DeleteWebhookSubscriptionRequest getDeleteWebhookSubscriptionRequest() { - return this.new DeleteWebhookSubscriptionRequest(); - } - - /** - * Build call for getWebhookSubscription - * @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 Returns the SubscriptionDetail object for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public okhttp3.Call getWebhookSubscriptionCall(GetWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/webhooks/subscriptions/{subscriptionId}" - .replaceAll("\\{" + "subscriptionId" + "\\}", localVarApiClient.escapeString(requestParameters.subscriptionId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationID() != null) { - localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getWebhookSubscriptionValidateBeforeCall(GetWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.subscriptionId' is set - if (requestParameters.getSubscriptionId() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.subscriptionId' when calling getWebhookSubscription(Async)"); - } - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getWebhookSubscription(Async)"); - } - - - okhttp3.Call localVarCall = getWebhookSubscriptionCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Get details of a subscription - * Retrieve details of a specific subscription. - * @param requestOptions Object which represents the options available for a given API/request - * @return SubscriptionDetail - * @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 Returns the SubscriptionDetail object for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public SubscriptionDetail getWebhookSubscription(GetWebhookSubscriptionRequest requestParameters) throws ApiException { - ApiResponse localVarResp = getWebhookSubscriptionWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Get details of a subscription - * Retrieve details of a specific subscription. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<SubscriptionDetail> - * @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 Returns the SubscriptionDetail object for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public ApiResponse getWebhookSubscriptionWithHttpInfo(GetWebhookSubscriptionRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = getWebhookSubscriptionValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get details of a subscription (asynchronously) - * Retrieve details of a specific subscription. - * @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 Returns the SubscriptionDetail object for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public okhttp3.Call getWebhookSubscriptionAsync(GetWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getWebhookSubscriptionValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the GetWebhookSubscription API - * - * @param subscriptionId Unique identifier of the subscription. - * @param avalaraVersion The version of the API to use, e.g., \"1.6\". - * @param xCorrelationID A unique identifier for tracking the request and its response (optional) - * @param xAvalaraClient Client application identification (optional) - */ - public class GetWebhookSubscriptionRequest { - private String subscriptionId; - private String avalaraVersion; - private String xCorrelationID; - private String xAvalaraClient; - - public GetWebhookSubscriptionRequest () { - } - - public String getSubscriptionId() { return subscriptionId; } - public void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getXCorrelationID() { return xCorrelationID; } - public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - } - - /** - * Getter function to instantiate Request class - * @returns GetWebhookSubscriptionRequest - */ - public GetWebhookSubscriptionRequest getGetWebhookSubscriptionRequest() { - return this.new GetWebhookSubscriptionRequest(); - } - - /** - * Build call for listWebhookSubscriptions - * @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 Returns a list of webhook subscriptions in a SubscriptionListResponse object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
500 Internal server error. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public okhttp3.Call listWebhookSubscriptionsCall(ListWebhookSubscriptionsRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/webhooks/subscriptions"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.get$top() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); - } - - if (requestParameters.get$skip() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); - } - - if (requestParameters.getCount() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); - } - - if (requestParameters.getCountOnly() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXCorrelationID() != null) { - localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(ListWebhookSubscriptionsRequest 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 listWebhookSubscriptions(Async)"); - } - - - okhttp3.Call localVarCall = listWebhookSubscriptionsCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * List all subscriptions - * Retrieve a list of webhook subscriptions. - * @param requestOptions Object which represents the options available for a given API/request - * @return SubscriptionListResponse - * @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 Returns a list of webhook subscriptions in a SubscriptionListResponse object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
500 Internal server error. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public SubscriptionListResponse listWebhookSubscriptions(ListWebhookSubscriptionsRequest requestParameters) throws ApiException { - ApiResponse localVarResp = listWebhookSubscriptionsWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * List all subscriptions - * Retrieve a list of webhook subscriptions. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<SubscriptionListResponse> - * @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 Returns a list of webhook subscriptions in a SubscriptionListResponse object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
500 Internal server error. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public ApiResponse listWebhookSubscriptionsWithHttpInfo(ListWebhookSubscriptionsRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = listWebhookSubscriptionsValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List all subscriptions (asynchronously) - * Retrieve a list of webhook subscriptions. - * @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 Returns a list of webhook subscriptions in a SubscriptionListResponse object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
500 Internal server error. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
- */ - public okhttp3.Call listWebhookSubscriptionsAsync(ListWebhookSubscriptionsRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = listWebhookSubscriptionsValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the ListWebhookSubscriptions API - * - * @param avalaraVersion The version of the API to use, e.g., \"1.6\". - * @param xCorrelationID A unique identifier for tracking the request and its response (optional) - * @param xAvalaraClient Client application identification (optional) - * @param $top The number of items to include in the result. (optional) - * @param $skip The number of items to skip in the result. (optional) - * @param count Whether to include the total count of records in the result. (optional) - * @param countOnly Whether to return only the count of records, without the list of records. (optional) - */ - public class ListWebhookSubscriptionsRequest { - private String avalaraVersion; - private String xCorrelationID; - private String xAvalaraClient; - private Integer $top; - private Integer $skip; - private Boolean count; - private Boolean countOnly; - - public ListWebhookSubscriptionsRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - 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 Integer get$top() { return $top; } - public void set$top(Integer $top) { this.$top = $top; } - public Integer get$skip() { return $skip; } - public void set$skip(Integer $skip) { this.$skip = $skip; } - public Boolean getCount() { return count; } - public void setCount(Boolean count) { this.count = count; } - public Boolean getCountOnly() { return countOnly; } - public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } - } - - /** - * Getter function to instantiate Request class - * @returns ListWebhookSubscriptionsRequest - */ - public ListWebhookSubscriptionsRequest getListWebhookSubscriptionsRequest() { - return this.new ListWebhookSubscriptionsRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.api.EInvoicing.V1; + +import Avalara.SDK.ApiCallback; +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.ApiResponse; +import Avalara.SDK.Configuration; +import Avalara.SDK.Pair; +import Avalara.SDK.ProgressRequestBody; +import Avalara.SDK.ProgressResponseBody; +import Avalara.SDK.AvalaraMicroservice; + + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; +import java.util.*; + + +import Avalara.SDK.model.EInvoicing.V1.SubscriptionDetail; +import Avalara.SDK.model.EInvoicing.V1.SubscriptionListResponse; +import Avalara.SDK.model.EInvoicing.V1.SubscriptionRegistration; +import Avalara.SDK.model.EInvoicing.V1.SuccessResponse; +import Avalara.SDK.model.EInvoicing.V1.WebhooksErrorResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class SubscriptionsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public SubscriptionsApi(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 createWebhookSubscription + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Subscription created successfully. Returns the created SubscriptionDetail object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
400 Bad request. The request payload is invalid or contains missing required fields. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public okhttp3.Call createWebhookSubscriptionCall(CreateWebhookSubscriptionRequest 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.getSubscriptionRegistration(); + + // create path and map variables + String localVarPath = "/einvoicing/webhooks/subscriptions"; + + 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" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(CreateWebhookSubscriptionRequest 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 createWebhookSubscription(Async)"); + } + + // verify the required parameter 'requestParameters.subscriptionRegistration' is set + if (requestParameters.getSubscriptionRegistration() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.subscriptionRegistration' when calling createWebhookSubscription(Async)"); + } + + + okhttp3.Call localVarCall = createWebhookSubscriptionCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Create a subscription to events + * Create a new webhook subscription and return the created subscription details. + * @param requestOptions Object which represents the options available for a given API/request + * @return SuccessResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Subscription created successfully. Returns the created SubscriptionDetail object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
400 Bad request. The request payload is invalid or contains missing required fields. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public SuccessResponse createWebhookSubscription(CreateWebhookSubscriptionRequest requestParameters) throws ApiException { + ApiResponse localVarResp = createWebhookSubscriptionWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Create a subscription to events + * Create a new webhook subscription and return the created subscription details. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<SuccessResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Subscription created successfully. Returns the created SubscriptionDetail object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
400 Bad request. The request payload is invalid or contains missing required fields. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public ApiResponse createWebhookSubscriptionWithHttpInfo(CreateWebhookSubscriptionRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a subscription to events (asynchronously) + * Create a new webhook subscription and return the created subscription details. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
201 Subscription created successfully. Returns the created SubscriptionDetail object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
400 Bad request. The request payload is invalid or contains missing required fields. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public okhttp3.Call createWebhookSubscriptionAsync(CreateWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the CreateWebhookSubscription API + * + * @param avalaraVersion The version of the API to use, e.g., \"1.6\". + * @param subscriptionRegistration + * @param xCorrelationID A unique identifier for tracking the request and its response (optional) + * @param xAvalaraClient Client application identification (optional) + */ + public class CreateWebhookSubscriptionRequest { + private String avalaraVersion; + private SubscriptionRegistration subscriptionRegistration; + private String xCorrelationID; + private String xAvalaraClient; + + public CreateWebhookSubscriptionRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public SubscriptionRegistration getSubscriptionRegistration() { return subscriptionRegistration; } + public void setSubscriptionRegistration(SubscriptionRegistration subscriptionRegistration) { this.subscriptionRegistration = subscriptionRegistration; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns CreateWebhookSubscriptionRequest + */ + public CreateWebhookSubscriptionRequest getCreateWebhookSubscriptionRequest() { + return this.new CreateWebhookSubscriptionRequest(); + } + + /** + * Build call for deleteWebhookSubscription + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 Subscription deleted successfully. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public okhttp3.Call deleteWebhookSubscriptionCall(DeleteWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/webhooks/subscriptions/{subscriptionId}" + .replaceAll("\\{" + "subscriptionId" + "\\}", localVarApiClient.escapeString(requestParameters.subscriptionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(DeleteWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.subscriptionId' is set + if (requestParameters.getSubscriptionId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.subscriptionId' when calling deleteWebhookSubscription(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling deleteWebhookSubscription(Async)"); + } + + + okhttp3.Call localVarCall = deleteWebhookSubscriptionCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Unsubscribe from events + * Delete the specified webhook subscription. + * @param requestOptions Object which represents the options available for a given API/request + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 Subscription deleted successfully. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public void deleteWebhookSubscription(DeleteWebhookSubscriptionRequest requestParameters) throws ApiException { + deleteWebhookSubscriptionWithHttpInfo(requestParameters); + } + + /** + * Unsubscribe from events + * Delete the specified webhook subscription. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
204 Subscription deleted successfully. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public ApiResponse deleteWebhookSubscriptionWithHttpInfo(DeleteWebhookSubscriptionRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(requestParameters, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Unsubscribe from events (asynchronously) + * Delete the specified webhook subscription. + * @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
204 Subscription deleted successfully. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public okhttp3.Call deleteWebhookSubscriptionAsync(DeleteWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(requestParameters, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Represents the Request object for the DeleteWebhookSubscription API + * + * @param subscriptionId Unique identifier of the subscription. + * @param avalaraVersion The version of the API to use, e.g., \"1.6\". + * @param xCorrelationID A unique identifier for tracking the request and its response (optional) + * @param xAvalaraClient Client application identification (optional) + */ + public class DeleteWebhookSubscriptionRequest { + private String subscriptionId; + private String avalaraVersion; + private String xCorrelationID; + private String xAvalaraClient; + + public DeleteWebhookSubscriptionRequest () { + } + + public String getSubscriptionId() { return subscriptionId; } + public void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns DeleteWebhookSubscriptionRequest + */ + public DeleteWebhookSubscriptionRequest getDeleteWebhookSubscriptionRequest() { + return this.new DeleteWebhookSubscriptionRequest(); + } + + /** + * Build call for getWebhookSubscription + * @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 Returns the SubscriptionDetail object for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public okhttp3.Call getWebhookSubscriptionCall(GetWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/webhooks/subscriptions/{subscriptionId}" + .replaceAll("\\{" + "subscriptionId" + "\\}", localVarApiClient.escapeString(requestParameters.subscriptionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getWebhookSubscriptionValidateBeforeCall(GetWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.subscriptionId' is set + if (requestParameters.getSubscriptionId() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.subscriptionId' when calling getWebhookSubscription(Async)"); + } + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getWebhookSubscription(Async)"); + } + + + okhttp3.Call localVarCall = getWebhookSubscriptionCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Get details of a subscription + * Retrieve details of a specific subscription. + * @param requestOptions Object which represents the options available for a given API/request + * @return SubscriptionDetail + * @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 Returns the SubscriptionDetail object for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public SubscriptionDetail getWebhookSubscription(GetWebhookSubscriptionRequest requestParameters) throws ApiException { + ApiResponse localVarResp = getWebhookSubscriptionWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Get details of a subscription + * Retrieve details of a specific subscription. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<SubscriptionDetail> + * @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 Returns the SubscriptionDetail object for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public ApiResponse getWebhookSubscriptionWithHttpInfo(GetWebhookSubscriptionRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = getWebhookSubscriptionValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get details of a subscription (asynchronously) + * Retrieve details of a specific subscription. + * @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 Returns the SubscriptionDetail object for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
404 Subscription not found for the specified subscriptionId. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public okhttp3.Call getWebhookSubscriptionAsync(GetWebhookSubscriptionRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getWebhookSubscriptionValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the GetWebhookSubscription API + * + * @param subscriptionId Unique identifier of the subscription. + * @param avalaraVersion The version of the API to use, e.g., \"1.6\". + * @param xCorrelationID A unique identifier for tracking the request and its response (optional) + * @param xAvalaraClient Client application identification (optional) + */ + public class GetWebhookSubscriptionRequest { + private String subscriptionId; + private String avalaraVersion; + private String xCorrelationID; + private String xAvalaraClient; + + public GetWebhookSubscriptionRequest () { + } + + public String getSubscriptionId() { return subscriptionId; } + public void setSubscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; } + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + } + + /** + * Getter function to instantiate Request class + * @returns GetWebhookSubscriptionRequest + */ + public GetWebhookSubscriptionRequest getGetWebhookSubscriptionRequest() { + return this.new GetWebhookSubscriptionRequest(); + } + + /** + * Build call for listWebhookSubscriptions + * @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 Returns a list of webhook subscriptions in a SubscriptionListResponse object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
500 Internal server error. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public okhttp3.Call listWebhookSubscriptionsCall(ListWebhookSubscriptionsRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/webhooks/subscriptions"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.get$top() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top())); + } + + if (requestParameters.get$skip() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip())); + } + + if (requestParameters.getCount() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("count", requestParameters.getCount())); + } + + if (requestParameters.getCountOnly() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countOnly", requestParameters.getCountOnly())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(ListWebhookSubscriptionsRequest 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 listWebhookSubscriptions(Async)"); + } + + + okhttp3.Call localVarCall = listWebhookSubscriptionsCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * List all subscriptions + * Retrieve a list of webhook subscriptions. + * @param requestOptions Object which represents the options available for a given API/request + * @return SubscriptionListResponse + * @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 Returns a list of webhook subscriptions in a SubscriptionListResponse object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
500 Internal server error. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public SubscriptionListResponse listWebhookSubscriptions(ListWebhookSubscriptionsRequest requestParameters) throws ApiException { + ApiResponse localVarResp = listWebhookSubscriptionsWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * List all subscriptions + * Retrieve a list of webhook subscriptions. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<SubscriptionListResponse> + * @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 Returns a list of webhook subscriptions in a SubscriptionListResponse object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
500 Internal server error. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public ApiResponse listWebhookSubscriptionsWithHttpInfo(ListWebhookSubscriptionsRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = listWebhookSubscriptionsValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all subscriptions (asynchronously) + * Retrieve a list of webhook subscriptions. + * @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 Returns a list of webhook subscriptions in a SubscriptionListResponse object. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
401 Unauthorized. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
403 Forbidden. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
500 Internal server error. * X-Correlation-ID - Correlation ID from the request, or a new one if not provided in request
+ */ + public okhttp3.Call listWebhookSubscriptionsAsync(ListWebhookSubscriptionsRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listWebhookSubscriptionsValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the ListWebhookSubscriptions API + * + * @param avalaraVersion The version of the API to use, e.g., \"1.6\". + * @param xCorrelationID A unique identifier for tracking the request and its response (optional) + * @param xAvalaraClient Client application identification (optional) + * @param $top The number of items to include in the result. (optional) + * @param $skip The number of items to skip in the result. (optional) + * @param count Whether to include the total count of records in the result. (optional) + * @param countOnly Whether to return only the count of records, without the list of records. (optional) + */ + public class ListWebhookSubscriptionsRequest { + private String avalaraVersion; + private String xCorrelationID; + private String xAvalaraClient; + private Integer $top; + private Integer $skip; + private Boolean count; + private Boolean countOnly; + + public ListWebhookSubscriptionsRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + 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 Integer get$top() { return $top; } + public void set$top(Integer $top) { this.$top = $top; } + public Integer get$skip() { return $skip; } + public void set$skip(Integer $skip) { this.$skip = $skip; } + public Boolean getCount() { return count; } + public void setCount(Boolean count) { this.count = count; } + public Boolean getCountOnly() { return countOnly; } + public void setCountOnly(Boolean countOnly) { this.countOnly = countOnly; } + } + + /** + * Getter function to instantiate Request class + * @returns ListWebhookSubscriptionsRequest + */ + public ListWebhookSubscriptionsRequest getListWebhookSubscriptionsRequest() { + return this.new ListWebhookSubscriptionsRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 03956ec..975c9d8 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TaxIdentifiersApi.java @@ -1,495 +1,495 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java - */ - -package Avalara.SDK.api.EInvoicing.V1; - -import Avalara.SDK.ApiCallback; -import Avalara.SDK.ApiClient; -import Avalara.SDK.ApiException; -import Avalara.SDK.ApiResponse; -import Avalara.SDK.Configuration; -import Avalara.SDK.Pair; -import Avalara.SDK.ProgressRequestBody; -import Avalara.SDK.ProgressResponseBody; -import Avalara.SDK.AvalaraMicroservice; - - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; -import java.util.*; - - -import Avalara.SDK.model.EInvoicing.V1.ErrorResponse; -import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierRequest; -import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierResponse; -import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierSchemaByCountry200Response; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class TaxIdentifiersApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public TaxIdentifiersApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - SetConfiguration(apiClient); - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for taxIdentifierSchemaByCountry - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Returns an object containing countryCode, schemaType, and schema. The schema property contains a JSON Schema (Draft-07) used to validate tax identifier requests or responses for the specified country. * X-Correlation-ID -
400 Invalid request * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
- */ - public okhttp3.Call taxIdentifierSchemaByCountryCall(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/einvoicing/tax-identifiers/schema"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getCountryCode() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("countryCode", requestParameters.getCountryCode())); - } - - if (requestParameters.getType() != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", requestParameters.getType())); - } - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - if (requestParameters.getXCorrelationID() != null) { - localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call taxIdentifierSchemaByCountryValidateBeforeCall(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling taxIdentifierSchemaByCountry(Async)"); - } - - // verify the required parameter 'requestParameters.countryCode' is set - if (requestParameters.getCountryCode() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.countryCode' when calling taxIdentifierSchemaByCountry(Async)"); - } - - - okhttp3.Call localVarCall = taxIdentifierSchemaByCountryCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Returns the tax identifier request and response schema for a specific country. - * Returns the tax identifier request and response schema for a specific country. - * @param requestOptions Object which represents the options available for a given API/request - * @return TaxIdentifierSchemaByCountry200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Returns an object containing countryCode, schemaType, and schema. The schema property contains a JSON Schema (Draft-07) used to validate tax identifier requests or responses for the specified country. * X-Correlation-ID -
400 Invalid request * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
- */ - public TaxIdentifierSchemaByCountry200Response taxIdentifierSchemaByCountry(TaxIdentifierSchemaByCountryRequest requestParameters) throws ApiException { - ApiResponse localVarResp = taxIdentifierSchemaByCountryWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Returns the tax identifier request and response schema for a specific country. - * Returns the tax identifier request and response schema for a specific country. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<TaxIdentifierSchemaByCountry200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 Returns an object containing countryCode, schemaType, and schema. The schema property contains a JSON Schema (Draft-07) used to validate tax identifier requests or responses for the specified country. * X-Correlation-ID -
400 Invalid request * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
- */ - public ApiResponse taxIdentifierSchemaByCountryWithHttpInfo(TaxIdentifierSchemaByCountryRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = taxIdentifierSchemaByCountryValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Returns the tax identifier request and response schema for a specific country. (asynchronously) - * Returns the tax identifier request and response schema for a specific country. - * @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 Returns an object containing countryCode, schemaType, and schema. The schema property contains a JSON Schema (Draft-07) used to validate tax identifier requests or responses for the specified country. * X-Correlation-ID -
400 Invalid request * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
- */ - public okhttp3.Call taxIdentifierSchemaByCountryAsync(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = taxIdentifierSchemaByCountryValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the TaxIdentifierSchemaByCountry API - * - * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). - * @param countryCode Two-letter ISO 3166 country code for which to retrieve the schema (for example \"DE\"). - * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) - * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) - * @param type Specifies which schema to return: \"request\" to receive the request validation schema or \"response\" to receive the response validation schema. (optional) - */ - public class TaxIdentifierSchemaByCountryRequest { - private String avalaraVersion; - private String countryCode; - private String xAvalaraClient; - private String xCorrelationID; - private String type; - - public TaxIdentifierSchemaByCountryRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public String getCountryCode() { return countryCode; } - public void setCountryCode(String countryCode) { this.countryCode = countryCode; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public String getXCorrelationID() { return xCorrelationID; } - public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } - public String getType() { return type; } - public void setType(String type) { this.type = type; } - } - - /** - * Getter function to instantiate Request class - * @returns TaxIdentifierSchemaByCountryRequest - */ - public TaxIdentifierSchemaByCountryRequest getTaxIdentifierSchemaByCountryRequest() { - return this.new TaxIdentifierSchemaByCountryRequest(); - } - - /** - * Build call for validateTaxIdentifier - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
200 Validation completed. Returns a TaxIdentifierResponse object that includes countryCode and a value object with identifierType, identifier, and optional extensions when available. * X-Correlation-ID -
400 Bad request. The request is invalid or contains missing or incorrect parameters. * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
429 Rate limit exceeded. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
- */ - public okhttp3.Call validateTaxIdentifierCall(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - //OAuth2 Scopes - String requiredScopes = ""; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = requestParameters.getTaxIdentifierRequest(); - - // create path and map variables - String localVarPath = "/einvoicing/tax-identifiers/validate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (requestParameters.getAvalaraVersion() != null) { - localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); - } - - if (requestParameters.getXAvalaraClient() != null) { - localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); - } - - if (requestParameters.getXCorrelationID() != null) { - localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call validateTaxIdentifierValidateBeforeCall(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'requestParameters.avalaraVersion' is set - if (requestParameters.getAvalaraVersion() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling validateTaxIdentifier(Async)"); - } - - // verify the required parameter 'requestParameters.taxIdentifierRequest' is set - if (requestParameters.getTaxIdentifierRequest() == null) { - throw new ApiException("Missing the required parameter 'requestParameters.taxIdentifierRequest' when calling validateTaxIdentifier(Async)"); - } - - - okhttp3.Call localVarCall = validateTaxIdentifierCall(requestParameters, _callback); - return localVarCall; - - } - - /** - * Validates a tax identifier. - * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. - * @param requestOptions Object which represents the options available for a given API/request - * @return TaxIdentifierResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
200 Validation completed. Returns a TaxIdentifierResponse object that includes countryCode and a value object with identifierType, identifier, and optional extensions when available. * X-Correlation-ID -
400 Bad request. The request is invalid or contains missing or incorrect parameters. * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
429 Rate limit exceeded. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
- */ - public TaxIdentifierResponse validateTaxIdentifier(ValidateTaxIdentifierRequest requestParameters) throws ApiException { - ApiResponse localVarResp = validateTaxIdentifierWithHttpInfo(requestParameters); - return localVarResp.getData(); - } - - /** - * Validates a tax identifier. - * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. - * @param requestOptions Object which represents the options available for a given API/request - * @return ApiResponse<TaxIdentifierResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
200 Validation completed. Returns a TaxIdentifierResponse object that includes countryCode and a value object with identifierType, identifier, and optional extensions when available. * X-Correlation-ID -
400 Bad request. The request is invalid or contains missing or incorrect parameters. * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
429 Rate limit exceeded. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
- */ - public ApiResponse validateTaxIdentifierWithHttpInfo(ValidateTaxIdentifierRequest requestParameters) throws ApiException { - okhttp3.Call localVarCall = validateTaxIdentifierValidateBeforeCall(requestParameters, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Validates a tax identifier. (asynchronously) - * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. - * @param requestOptions Object which represents the options available for a given API/request - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - - -
Status Code Description Response Headers
200 Validation completed. Returns a TaxIdentifierResponse object that includes countryCode and a value object with identifierType, identifier, and optional extensions when available. * X-Correlation-ID -
400 Bad request. The request is invalid or contains missing or incorrect parameters. * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
429 Rate limit exceeded. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
- */ - public okhttp3.Call validateTaxIdentifierAsync(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = validateTaxIdentifierValidateBeforeCall(requestParameters, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Represents the Request object for the ValidateTaxIdentifier API - * - * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). - * @param taxIdentifierRequest - * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) - * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) - */ - public class ValidateTaxIdentifierRequest { - private String avalaraVersion; - private TaxIdentifierRequest taxIdentifierRequest; - private String xAvalaraClient; - private String xCorrelationID; - - public ValidateTaxIdentifierRequest () { - } - - public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } - public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } - public TaxIdentifierRequest getTaxIdentifierRequest() { return taxIdentifierRequest; } - public void setTaxIdentifierRequest(TaxIdentifierRequest taxIdentifierRequest) { this.taxIdentifierRequest = taxIdentifierRequest; } - public String getXAvalaraClient() { return xAvalaraClient; } - public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } - public String getXCorrelationID() { return xCorrelationID; } - public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } - } - - /** - * Getter function to instantiate Request class - * @returns ValidateTaxIdentifierRequest - */ - public ValidateTaxIdentifierRequest getValidateTaxIdentifierRequest() { - return this.new ValidateTaxIdentifierRequest(); - } - - private void SetConfiguration(ApiClient client) { - if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); - } -} - +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.api.EInvoicing.V1; + +import Avalara.SDK.ApiCallback; +import Avalara.SDK.ApiClient; +import Avalara.SDK.ApiException; +import Avalara.SDK.ApiResponse; +import Avalara.SDK.Configuration; +import Avalara.SDK.Pair; +import Avalara.SDK.ProgressRequestBody; +import Avalara.SDK.ProgressResponseBody; +import Avalara.SDK.AvalaraMicroservice; + + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; +import java.util.*; + + +import Avalara.SDK.model.EInvoicing.V1.ErrorResponse; +import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierRequest; +import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierResponse; +import Avalara.SDK.model.EInvoicing.V1.TaxIdentifierSchemaByCountry200Response; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class TaxIdentifiersApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public TaxIdentifiersApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + SetConfiguration(apiClient); + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for taxIdentifierSchemaByCountry + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Returns an object containing countryCode, schemaType, and schema. The schema property contains a JSON Schema (Draft-07) used to validate tax identifier requests or responses for the specified country. * X-Correlation-ID -
400 Invalid request * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
+ */ + public okhttp3.Call taxIdentifierSchemaByCountryCall(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/einvoicing/tax-identifiers/schema"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getCountryCode() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("countryCode", requestParameters.getCountryCode())); + } + + if (requestParameters.getType() != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", requestParameters.getType())); + } + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call taxIdentifierSchemaByCountryValidateBeforeCall(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling taxIdentifierSchemaByCountry(Async)"); + } + + // verify the required parameter 'requestParameters.countryCode' is set + if (requestParameters.getCountryCode() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.countryCode' when calling taxIdentifierSchemaByCountry(Async)"); + } + + + okhttp3.Call localVarCall = taxIdentifierSchemaByCountryCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Returns the tax identifier request and response schema for a specific country. + * Returns the tax identifier request and response schema for a specific country. + * @param requestOptions Object which represents the options available for a given API/request + * @return TaxIdentifierSchemaByCountry200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Returns an object containing countryCode, schemaType, and schema. The schema property contains a JSON Schema (Draft-07) used to validate tax identifier requests or responses for the specified country. * X-Correlation-ID -
400 Invalid request * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
+ */ + public TaxIdentifierSchemaByCountry200Response taxIdentifierSchemaByCountry(TaxIdentifierSchemaByCountryRequest requestParameters) throws ApiException { + ApiResponse localVarResp = taxIdentifierSchemaByCountryWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Returns the tax identifier request and response schema for a specific country. + * Returns the tax identifier request and response schema for a specific country. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<TaxIdentifierSchemaByCountry200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 Returns an object containing countryCode, schemaType, and schema. The schema property contains a JSON Schema (Draft-07) used to validate tax identifier requests or responses for the specified country. * X-Correlation-ID -
400 Invalid request * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
+ */ + public ApiResponse taxIdentifierSchemaByCountryWithHttpInfo(TaxIdentifierSchemaByCountryRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = taxIdentifierSchemaByCountryValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Returns the tax identifier request and response schema for a specific country. (asynchronously) + * Returns the tax identifier request and response schema for a specific country. + * @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 Returns an object containing countryCode, schemaType, and schema. The schema property contains a JSON Schema (Draft-07) used to validate tax identifier requests or responses for the specified country. * X-Correlation-ID -
400 Invalid request * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
+ */ + public okhttp3.Call taxIdentifierSchemaByCountryAsync(TaxIdentifierSchemaByCountryRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = taxIdentifierSchemaByCountryValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the TaxIdentifierSchemaByCountry API + * + * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). + * @param countryCode Two-letter ISO 3166 country code for which to retrieve the schema (for example \"DE\"). + * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) + * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) + * @param type Specifies which schema to return: \"request\" to receive the request validation schema or \"response\" to receive the response validation schema. (optional) + */ + public class TaxIdentifierSchemaByCountryRequest { + private String avalaraVersion; + private String countryCode; + private String xAvalaraClient; + private String xCorrelationID; + private String type; + + public TaxIdentifierSchemaByCountryRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public String getCountryCode() { return countryCode; } + public void setCountryCode(String countryCode) { this.countryCode = countryCode; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + public String getType() { return type; } + public void setType(String type) { this.type = type; } + } + + /** + * Getter function to instantiate Request class + * @returns TaxIdentifierSchemaByCountryRequest + */ + public TaxIdentifierSchemaByCountryRequest getTaxIdentifierSchemaByCountryRequest() { + return this.new TaxIdentifierSchemaByCountryRequest(); + } + + /** + * Build call for validateTaxIdentifier + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 Validation completed. Returns a TaxIdentifierResponse object that includes countryCode and a value object with identifierType, identifier, and optional extensions when available. * X-Correlation-ID -
400 Bad request. The request is invalid or contains missing or incorrect parameters. * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
429 Rate limit exceeded. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
+ */ + public okhttp3.Call validateTaxIdentifierCall(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { + String basePath = null; + + // Operation Servers + String[] localBasePaths = new String[] { }; + + //OAuth2 Scopes + String requiredScopes = ""; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = requestParameters.getTaxIdentifierRequest(); + + // create path and map variables + String localVarPath = "/einvoicing/tax-identifiers/validate"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (requestParameters.getAvalaraVersion() != null) { + localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion())); + } + + if (requestParameters.getXAvalaraClient() != null) { + localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient())); + } + + if (requestParameters.getXCorrelationID() != null) { + localVarHeaderParams.put("X-Correlation-ID", localVarApiClient.parameterToString(requestParameters.getXCorrelationID())); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null && !localVarHeaderParams.containsKey("Accept")) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { "OAuth", "Bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call validateTaxIdentifierValidateBeforeCall(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'requestParameters.avalaraVersion' is set + if (requestParameters.getAvalaraVersion() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling validateTaxIdentifier(Async)"); + } + + // verify the required parameter 'requestParameters.taxIdentifierRequest' is set + if (requestParameters.getTaxIdentifierRequest() == null) { + throw new ApiException("Missing the required parameter 'requestParameters.taxIdentifierRequest' when calling validateTaxIdentifier(Async)"); + } + + + okhttp3.Call localVarCall = validateTaxIdentifierCall(requestParameters, _callback); + return localVarCall; + + } + + /** + * Validates a tax identifier. + * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. + * @param requestOptions Object which represents the options available for a given API/request + * @return TaxIdentifierResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 Validation completed. Returns a TaxIdentifierResponse object that includes countryCode and a value object with identifierType, identifier, and optional extensions when available. * X-Correlation-ID -
400 Bad request. The request is invalid or contains missing or incorrect parameters. * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
429 Rate limit exceeded. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
+ */ + public TaxIdentifierResponse validateTaxIdentifier(ValidateTaxIdentifierRequest requestParameters) throws ApiException { + ApiResponse localVarResp = validateTaxIdentifierWithHttpInfo(requestParameters); + return localVarResp.getData(); + } + + /** + * Validates a tax identifier. + * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. + * @param requestOptions Object which represents the options available for a given API/request + * @return ApiResponse<TaxIdentifierResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 Validation completed. Returns a TaxIdentifierResponse object that includes countryCode and a value object with identifierType, identifier, and optional extensions when available. * X-Correlation-ID -
400 Bad request. The request is invalid or contains missing or incorrect parameters. * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
429 Rate limit exceeded. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
+ */ + public ApiResponse validateTaxIdentifierWithHttpInfo(ValidateTaxIdentifierRequest requestParameters) throws ApiException { + okhttp3.Call localVarCall = validateTaxIdentifierValidateBeforeCall(requestParameters, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Validates a tax identifier. (asynchronously) + * This endpoint verifies whether a given tax identifier is valid and properly formatted according to the rules of the applicable country or tax system. + * @param requestOptions Object which represents the options available for a given API/request + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 Validation completed. Returns a TaxIdentifierResponse object that includes countryCode and a value object with identifierType, identifier, and optional extensions when available. * X-Correlation-ID -
400 Bad request. The request is invalid or contains missing or incorrect parameters. * X-Correlation-ID -
401 Unauthorized. * X-Correlation-ID -
403 Forbidden. * X-Correlation-ID -
429 Rate limit exceeded. * X-Correlation-ID -
500 Internal server error. * X-Correlation-ID -
+ */ + public okhttp3.Call validateTaxIdentifierAsync(ValidateTaxIdentifierRequest requestParameters, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = validateTaxIdentifierValidateBeforeCall(requestParameters, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Represents the Request object for the ValidateTaxIdentifier API + * + * @param avalaraVersion Header that specifies the API version to use (for example \"1.6\"). + * @param taxIdentifierRequest + * @param xAvalaraClient Optional header for a client identifier string used for diagnostics (for example \"Fingerprint\"). (optional) + * @param xCorrelationID Optional correlation identifier provided by the caller to trace the call (for example \"f3f0d19a-01a1-4748-8a58-f000d0424f43\"). (optional) + */ + public class ValidateTaxIdentifierRequest { + private String avalaraVersion; + private TaxIdentifierRequest taxIdentifierRequest; + private String xAvalaraClient; + private String xCorrelationID; + + public ValidateTaxIdentifierRequest () { + } + + public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.6"; } + public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; } + public TaxIdentifierRequest getTaxIdentifierRequest() { return taxIdentifierRequest; } + public void setTaxIdentifierRequest(TaxIdentifierRequest taxIdentifierRequest) { this.taxIdentifierRequest = taxIdentifierRequest; } + public String getXAvalaraClient() { return xAvalaraClient; } + public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; } + public String getXCorrelationID() { return xCorrelationID; } + public void setXCorrelationID(String xCorrelationID) { this.xCorrelationID = xCorrelationID; } + } + + /** + * Getter function to instantiate Request class + * @returns ValidateTaxIdentifierRequest + */ + public ValidateTaxIdentifierRequest getValidateTaxIdentifierRequest() { + return this.new ValidateTaxIdentifierRequest(); + } + + private void SetConfiguration(ApiClient client) { + if (client == null) throw new MissingFormatArgumentException("client"); + this.localVarApiClient.setSdkVersion("26.9.1"); + } +} + 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 e693055..a48595a 100644 --- a/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java +++ b/src/main/java/Avalara/SDK/api/EInvoicing/V1/TradingPartnersApi.java @@ -1993,7 +1993,7 @@ public UpdateTradingPartnerRequest getUpdateTradingPartnerRequest() { private void SetConfiguration(ApiClient client) { if (client == null) throw new MissingFormatArgumentException("client"); - this.localVarApiClient.setSdkVersion("26.9.0"); + this.localVarApiClient.setSdkVersion("26.9.1"); } } 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 0759a2e..f139e3d 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/AbstractOpenApiSchema.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchAcceptedResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchAcceptedResponse.java new file mode 100644 index 0000000..0750404 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchAcceptedResponse.java @@ -0,0 +1,212 @@ +/* + * 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; + +/** + * BulkTinMatchAcceptedResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class BulkTinMatchAcceptedResponse { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public BulkTinMatchAcceptedResponse() { + } + + public BulkTinMatchAcceptedResponse id(String id) { + this.id = id; + return this; + } + + /** + * The bulk identifier required to get the results. + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkTinMatchAcceptedResponse bulkTinMatchAcceptedResponse = (BulkTinMatchAcceptedResponse) o; + return Objects.equals(this.id, bulkTinMatchAcceptedResponse.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkTinMatchAcceptedResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + + // 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 BulkTinMatchAcceptedResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BulkTinMatchAcceptedResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BulkTinMatchAcceptedResponse is not found in the empty JSON string", BulkTinMatchAcceptedResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BulkTinMatchAcceptedResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BulkTinMatchAcceptedResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BulkTinMatchAcceptedResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BulkTinMatchAcceptedResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BulkTinMatchAcceptedResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BulkTinMatchAcceptedResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BulkTinMatchAcceptedResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BulkTinMatchAcceptedResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BulkTinMatchAcceptedResponse + * @throws IOException if the JSON string is invalid with respect to BulkTinMatchAcceptedResponse + */ + public static BulkTinMatchAcceptedResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BulkTinMatchAcceptedResponse.class); + } + + /** + * Convert an instance of BulkTinMatchAcceptedResponse 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/BulkTinMatchIrsResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchIrsResponse.java new file mode 100644 index 0000000..9fd0656 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchIrsResponse.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; + +/** + * BulkTinMatchIrsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class BulkTinMatchIrsResponse { + 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 BulkTinMatchIrsResponse() { + } + + public BulkTinMatchIrsResponse code(String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + + public BulkTinMatchIrsResponse description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @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; + } + BulkTinMatchIrsResponse bulkTinMatchIrsResponse = (BulkTinMatchIrsResponse) o; + return Objects.equals(this.code, bulkTinMatchIrsResponse.code) && + Objects.equals(this.description, bulkTinMatchIrsResponse.description); + } + + @Override + public int hashCode() { + return Objects.hash(code, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkTinMatchIrsResponse {\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 BulkTinMatchIrsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BulkTinMatchIrsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BulkTinMatchIrsResponse is not found in the empty JSON string", BulkTinMatchIrsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BulkTinMatchIrsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BulkTinMatchIrsResponse` 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 (!BulkTinMatchIrsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BulkTinMatchIrsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BulkTinMatchIrsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BulkTinMatchIrsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BulkTinMatchIrsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BulkTinMatchIrsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BulkTinMatchIrsResponse + * @throws IOException if the JSON string is invalid with respect to BulkTinMatchIrsResponse + */ + public static BulkTinMatchIrsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BulkTinMatchIrsResponse.class); + } + + /** + * Convert an instance of BulkTinMatchIrsResponse 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/BulkTinMatchRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchRequest.java new file mode 100644 index 0000000..024a062 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchRequest.java @@ -0,0 +1,234 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 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.BulkTinMatchRequestItem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * BulkTinMatchRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class BulkTinMatchRequest { + public static final String SERIALIZED_NAME_ITEMS = "items"; + @SerializedName(SERIALIZED_NAME_ITEMS) + private List items; + + public BulkTinMatchRequest() { + } + + public BulkTinMatchRequest items(List items) { + this.items = items; + return this; + } + + public BulkTinMatchRequest addItemsItem(BulkTinMatchRequestItem itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * Collection of TINs to be submitted to TIN match. + * @return items + */ + @javax.annotation.Nullable + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkTinMatchRequest bulkTinMatchRequest = (BulkTinMatchRequest) o; + return Objects.equals(this.items, bulkTinMatchRequest.items); + } + + @Override + public int hashCode() { + return Objects.hash(items); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkTinMatchRequest {\n"); + sb.append(" items: ").append(toIndentedString(items)).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("items"); + + // 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 BulkTinMatchRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BulkTinMatchRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BulkTinMatchRequest is not found in the empty JSON string", BulkTinMatchRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BulkTinMatchRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BulkTinMatchRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + if (jsonArrayitems != null) { + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); + } + + // validate the optional field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + BulkTinMatchRequestItem.validateJsonElement(jsonArrayitems.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BulkTinMatchRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BulkTinMatchRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BulkTinMatchRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BulkTinMatchRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BulkTinMatchRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BulkTinMatchRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of BulkTinMatchRequest + * @throws IOException if the JSON string is invalid with respect to BulkTinMatchRequest + */ + public static BulkTinMatchRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BulkTinMatchRequest.class); + } + + /** + * Convert an instance of BulkTinMatchRequest 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/BulkTinMatchRequestItem.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchRequestItem.java new file mode 100644 index 0000000..ad9d354 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchRequestItem.java @@ -0,0 +1,357 @@ +/* + * 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; + +/** + * BulkTinMatchRequestItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class BulkTinMatchRequestItem { + /** + * 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 static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public BulkTinMatchRequestItem() { + } + + public BulkTinMatchRequestItem 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 BulkTinMatchRequestItem 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 BulkTinMatchRequestItem 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; + } + + + public BulkTinMatchRequestItem referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * The reference identifier for the TIN to be submitted. + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkTinMatchRequestItem bulkTinMatchRequestItem = (BulkTinMatchRequestItem) o; + return Objects.equals(this.tinType, bulkTinMatchRequestItem.tinType) && + Objects.equals(this.tin, bulkTinMatchRequestItem.tin) && + Objects.equals(this.name, bulkTinMatchRequestItem.name) && + Objects.equals(this.referenceId, bulkTinMatchRequestItem.referenceId); + } + + @Override + public int hashCode() { + return Objects.hash(tinType, tin, name, referenceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkTinMatchRequestItem {\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(" referenceId: ").append(toIndentedString(referenceId)).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"); + openapiFields.add("referenceId"); + + // 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 BulkTinMatchRequestItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BulkTinMatchRequestItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BulkTinMatchRequestItem is not found in the empty JSON string", BulkTinMatchRequestItem.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BulkTinMatchRequestItem.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BulkTinMatchRequestItem` 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())); + } + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BulkTinMatchRequestItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BulkTinMatchRequestItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BulkTinMatchRequestItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BulkTinMatchRequestItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BulkTinMatchRequestItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BulkTinMatchRequestItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of BulkTinMatchRequestItem + * @throws IOException if the JSON string is invalid with respect to BulkTinMatchRequestItem + */ + public static BulkTinMatchRequestItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BulkTinMatchRequestItem.class); + } + + /** + * Convert an instance of BulkTinMatchRequestItem 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/BulkTinMatchResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchResponse.java new file mode 100644 index 0000000..80983a0 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchResponse.java @@ -0,0 +1,323 @@ +/* + * 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.time.OffsetDateTime; +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; + +/** + * BulkTinMatchResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class BulkTinMatchResponse { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_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_RESULTS_URL = "resultsUrl"; + @SerializedName(SERIALIZED_NAME_RESULTS_URL) + private String resultsUrl; + + public BulkTinMatchResponse() { + } + + public BulkTinMatchResponse id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + */ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public BulkTinMatchResponse status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public BulkTinMatchResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + */ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public BulkTinMatchResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + */ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + public BulkTinMatchResponse resultsUrl(String resultsUrl) { + this.resultsUrl = resultsUrl; + return this; + } + + /** + * Get resultsUrl + * @return resultsUrl + */ + @javax.annotation.Nullable + public String getResultsUrl() { + return resultsUrl; + } + + public void setResultsUrl(String resultsUrl) { + this.resultsUrl = resultsUrl; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkTinMatchResponse bulkTinMatchResponse = (BulkTinMatchResponse) o; + return Objects.equals(this.id, bulkTinMatchResponse.id) && + Objects.equals(this.status, bulkTinMatchResponse.status) && + Objects.equals(this.createdAt, bulkTinMatchResponse.createdAt) && + Objects.equals(this.updatedAt, bulkTinMatchResponse.updatedAt) && + Objects.equals(this.resultsUrl, bulkTinMatchResponse.resultsUrl); + } + + @Override + public int hashCode() { + return Objects.hash(id, status, createdAt, updatedAt, resultsUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BulkTinMatchResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" resultsUrl: ").append(toIndentedString(resultsUrl)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("resultsUrl"); + + // 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 BulkTinMatchResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BulkTinMatchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BulkTinMatchResponse is not found in the empty JSON string", BulkTinMatchResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BulkTinMatchResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BulkTinMatchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + if ((jsonObj.get("resultsUrl") != null && !jsonObj.get("resultsUrl").isJsonNull()) && !jsonObj.get("resultsUrl").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `resultsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("resultsUrl").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BulkTinMatchResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BulkTinMatchResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BulkTinMatchResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BulkTinMatchResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BulkTinMatchResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BulkTinMatchResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BulkTinMatchResponse + * @throws IOException if the JSON string is invalid with respect to BulkTinMatchResponse + */ + public static BulkTinMatchResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BulkTinMatchResponse.class); + } + + /** + * Convert an instance of BulkTinMatchResponse 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/BulkTinMatchResultItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchResultItemResponse.java new file mode 100644 index 0000000..ffb945c --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/BulkTinMatchResultItemResponse.java @@ -0,0 +1,284 @@ +/* + * 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.BulkTinMatchIrsResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * BulkTinMatchResultItemResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class BulkTinMatchResultItemResponse { + 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 BulkTinMatchIrsResponse irsResponse; + + public static final String SERIALIZED_NAME_REFERENCE_ID = "referenceId"; + @SerializedName(SERIALIZED_NAME_REFERENCE_ID) + private String referenceId; + + public BulkTinMatchResultItemResponse() { + } + + public BulkTinMatchResultItemResponse status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + + public BulkTinMatchResultItemResponse irsResponse(BulkTinMatchIrsResponse irsResponse) { + this.irsResponse = irsResponse; + return this; + } + + /** + * Get irsResponse + * @return irsResponse + */ + @javax.annotation.Nullable + public BulkTinMatchIrsResponse getIrsResponse() { + return irsResponse; + } + + public void setIrsResponse(BulkTinMatchIrsResponse irsResponse) { + this.irsResponse = irsResponse; + } + + + public BulkTinMatchResultItemResponse referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * @return referenceId + */ + @javax.annotation.Nullable + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BulkTinMatchResultItemResponse bulkTinMatchResultItemResponse = (BulkTinMatchResultItemResponse) o; + return Objects.equals(this.status, bulkTinMatchResultItemResponse.status) && + Objects.equals(this.irsResponse, bulkTinMatchResultItemResponse.irsResponse) && + Objects.equals(this.referenceId, bulkTinMatchResultItemResponse.referenceId); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, irsResponse, referenceId); + } + + 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 BulkTinMatchResultItemResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" irsResponse: ").append(toIndentedString(irsResponse)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).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"); + openapiFields.add("referenceId"); + + // 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 BulkTinMatchResultItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BulkTinMatchResultItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BulkTinMatchResultItemResponse is not found in the empty JSON string", BulkTinMatchResultItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!BulkTinMatchResultItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BulkTinMatchResultItemResponse` 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()) { + BulkTinMatchIrsResponse.validateJsonElement(jsonObj.get("irsResponse")); + } + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BulkTinMatchResultItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BulkTinMatchResultItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BulkTinMatchResultItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BulkTinMatchResultItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public BulkTinMatchResultItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BulkTinMatchResultItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BulkTinMatchResultItemResponse + * @throws IOException if the JSON string is invalid with respect to BulkTinMatchResultItemResponse + */ + public static BulkTinMatchResultItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BulkTinMatchResultItemResponse.class); + } + + /** + * Convert an instance of BulkTinMatchResultItemResponse 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/CompanyRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java index fb940e5..3a8f2fb 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 303b998..a30543a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CompanyResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 826dc7e..152bf83 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CoveredIndividual.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 e1ffb5f..73ecdb7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateAndSendW9FormEmailRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 1fae59f..7d71c69 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9Form201Response.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 8df43c6..492c421 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/CreateW9FormRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 7e7628b..769ba66 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/EntryStatusResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 24803d0..9afa4b9 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 db64c3b..4708990 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ErrorResponseItem.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 4ee7021..5d3d132 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1042S.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -973,6 +973,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -987,6 +991,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java index 047c02a..883ddc9 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095B.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -168,6 +168,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -182,6 +186,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java index 1c2c77a..3b7c483 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1095C.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -189,6 +189,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -203,6 +207,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java new file mode 100644 index 0000000..d3d6e27 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1098.java @@ -0,0 +1,1975 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * Form 1098: Mortgage Interest Statement The recipient is the borrower and the issuer is the lender, with one form per mortgage. *Required:* Mortgage Interest Received unless Other is given (otherwise at least one amount must be above zero), and exactly one of Address or Description of Property and the same-address indicator. Limits: Address or Description of Property and Other, 39 characters each; Mortgage Origination Date, at most 45 years before the tax year; Mortgage Acquisition Date, within the tax year; Number of Properties, 2 to 9999 (empty for one). Form 1098 has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1098 { + public static final String SERIALIZED_NAME_MORTGAGE_INTEREST_RECEIVED = "mortgageInterestReceived"; + @SerializedName(SERIALIZED_NAME_MORTGAGE_INTEREST_RECEIVED) + private Double mortgageInterestReceived; + + public static final String SERIALIZED_NAME_OUTSTANDING_MORTGAGE_PRINCIPAL = "outstandingMortgagePrincipal"; + @SerializedName(SERIALIZED_NAME_OUTSTANDING_MORTGAGE_PRINCIPAL) + private Double outstandingMortgagePrincipal; + + public static final String SERIALIZED_NAME_MORTGAGE_ORIGINATION_DATE = "mortgageOriginationDate"; + @SerializedName(SERIALIZED_NAME_MORTGAGE_ORIGINATION_DATE) + private LocalDate mortgageOriginationDate; + + public static final String SERIALIZED_NAME_REFUND_OF_OVERPAID_INTEREST = "refundOfOverpaidInterest"; + @SerializedName(SERIALIZED_NAME_REFUND_OF_OVERPAID_INTEREST) + private Double refundOfOverpaidInterest; + + public static final String SERIALIZED_NAME_MORTGAGE_INSURANCE_PREMIUMS = "mortgageInsurancePremiums"; + @SerializedName(SERIALIZED_NAME_MORTGAGE_INSURANCE_PREMIUMS) + private Double mortgageInsurancePremiums; + + public static final String SERIALIZED_NAME_POINTS_PAID_ON_PURCHASE_OF_PRINCIPAL_RESIDENCE = "pointsPaidOnPurchaseOfPrincipalResidence"; + @SerializedName(SERIALIZED_NAME_POINTS_PAID_ON_PURCHASE_OF_PRINCIPAL_RESIDENCE) + private Double pointsPaidOnPurchaseOfPrincipalResidence; + + public static final String SERIALIZED_NAME_PROPERTY_ADDRESS_SAME_AS_BORROWER_INDICATOR = "propertyAddressSameAsBorrowerIndicator"; + @SerializedName(SERIALIZED_NAME_PROPERTY_ADDRESS_SAME_AS_BORROWER_INDICATOR) + private Boolean propertyAddressSameAsBorrowerIndicator; + + public static final String SERIALIZED_NAME_PROPERTY_ADDRESS_OR_DESCRIPTION = "propertyAddressOrDescription"; + @SerializedName(SERIALIZED_NAME_PROPERTY_ADDRESS_OR_DESCRIPTION) + private String propertyAddressOrDescription; + + public static final String SERIALIZED_NAME_NUMBER_OF_PROPERTIES_SECURING_MORTGAGE = "numberOfPropertiesSecuringMortgage"; + @SerializedName(SERIALIZED_NAME_NUMBER_OF_PROPERTIES_SECURING_MORTGAGE) + private Integer numberOfPropertiesSecuringMortgage; + + public static final String SERIALIZED_NAME_OTHER_INFORMATION = "otherInformation"; + @SerializedName(SERIALIZED_NAME_OTHER_INFORMATION) + private String otherInformation; + + public static final String SERIALIZED_NAME_MORTGAGE_ACQUISITION_DATE = "mortgageAcquisitionDate"; + @SerializedName(SERIALIZED_NAME_MORTGAGE_ACQUISITION_DATE) + private LocalDate mortgageAcquisitionDate; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_INT("1099-INT"), + + _1099_K("1099-K"), + + _1099_MISC("1099-MISC"), + + _1099_NEC("1099-NEC"), + + _1099_PATR("1099-PATR"), + + _1099_R("1099-R"), + + _1099_S("1099-S"), + + 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 Form1098() { + } + + public Form1098( + 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 Form1098 mortgageInterestReceived(Double mortgageInterestReceived) { + this.mortgageInterestReceived = mortgageInterestReceived; + return this; + } + + /** + * Mortgage interest received from payer(s)/borrower(s) + * @return mortgageInterestReceived + */ + @javax.annotation.Nullable + public Double getMortgageInterestReceived() { + return mortgageInterestReceived; + } + + public void setMortgageInterestReceived(Double mortgageInterestReceived) { + this.mortgageInterestReceived = mortgageInterestReceived; + } + + + public Form1098 outstandingMortgagePrincipal(Double outstandingMortgagePrincipal) { + this.outstandingMortgagePrincipal = outstandingMortgagePrincipal; + return this; + } + + /** + * Outstanding mortgage principal + * @return outstandingMortgagePrincipal + */ + @javax.annotation.Nullable + public Double getOutstandingMortgagePrincipal() { + return outstandingMortgagePrincipal; + } + + public void setOutstandingMortgagePrincipal(Double outstandingMortgagePrincipal) { + this.outstandingMortgagePrincipal = outstandingMortgagePrincipal; + } + + + public Form1098 mortgageOriginationDate(LocalDate mortgageOriginationDate) { + this.mortgageOriginationDate = mortgageOriginationDate; + return this; + } + + /** + * Mortgage origination date + * @return mortgageOriginationDate + */ + @javax.annotation.Nullable + public LocalDate getMortgageOriginationDate() { + return mortgageOriginationDate; + } + + public void setMortgageOriginationDate(LocalDate mortgageOriginationDate) { + this.mortgageOriginationDate = mortgageOriginationDate; + } + + + public Form1098 refundOfOverpaidInterest(Double refundOfOverpaidInterest) { + this.refundOfOverpaidInterest = refundOfOverpaidInterest; + return this; + } + + /** + * Refund of overpaid interest + * @return refundOfOverpaidInterest + */ + @javax.annotation.Nullable + public Double getRefundOfOverpaidInterest() { + return refundOfOverpaidInterest; + } + + public void setRefundOfOverpaidInterest(Double refundOfOverpaidInterest) { + this.refundOfOverpaidInterest = refundOfOverpaidInterest; + } + + + public Form1098 mortgageInsurancePremiums(Double mortgageInsurancePremiums) { + this.mortgageInsurancePremiums = mortgageInsurancePremiums; + return this; + } + + /** + * Mortgage insurance premiums + * @return mortgageInsurancePremiums + */ + @javax.annotation.Nullable + public Double getMortgageInsurancePremiums() { + return mortgageInsurancePremiums; + } + + public void setMortgageInsurancePremiums(Double mortgageInsurancePremiums) { + this.mortgageInsurancePremiums = mortgageInsurancePremiums; + } + + + public Form1098 pointsPaidOnPurchaseOfPrincipalResidence(Double pointsPaidOnPurchaseOfPrincipalResidence) { + this.pointsPaidOnPurchaseOfPrincipalResidence = pointsPaidOnPurchaseOfPrincipalResidence; + return this; + } + + /** + * Points paid on purchase of principal residence + * @return pointsPaidOnPurchaseOfPrincipalResidence + */ + @javax.annotation.Nullable + public Double getPointsPaidOnPurchaseOfPrincipalResidence() { + return pointsPaidOnPurchaseOfPrincipalResidence; + } + + public void setPointsPaidOnPurchaseOfPrincipalResidence(Double pointsPaidOnPurchaseOfPrincipalResidence) { + this.pointsPaidOnPurchaseOfPrincipalResidence = pointsPaidOnPurchaseOfPrincipalResidence; + } + + + public Form1098 propertyAddressSameAsBorrowerIndicator(Boolean propertyAddressSameAsBorrowerIndicator) { + this.propertyAddressSameAsBorrowerIndicator = propertyAddressSameAsBorrowerIndicator; + return this; + } + + /** + * If checked, the property securing the mortgage is at the borrower's address + * @return propertyAddressSameAsBorrowerIndicator + */ + @javax.annotation.Nullable + public Boolean getPropertyAddressSameAsBorrowerIndicator() { + return propertyAddressSameAsBorrowerIndicator; + } + + public void setPropertyAddressSameAsBorrowerIndicator(Boolean propertyAddressSameAsBorrowerIndicator) { + this.propertyAddressSameAsBorrowerIndicator = propertyAddressSameAsBorrowerIndicator; + } + + + public Form1098 propertyAddressOrDescription(String propertyAddressOrDescription) { + this.propertyAddressOrDescription = propertyAddressOrDescription; + return this; + } + + /** + * Address or description of property securing mortgage (up to 39 characters) + * @return propertyAddressOrDescription + */ + @javax.annotation.Nullable + public String getPropertyAddressOrDescription() { + return propertyAddressOrDescription; + } + + public void setPropertyAddressOrDescription(String propertyAddressOrDescription) { + this.propertyAddressOrDescription = propertyAddressOrDescription; + } + + + public Form1098 numberOfPropertiesSecuringMortgage(Integer numberOfPropertiesSecuringMortgage) { + this.numberOfPropertiesSecuringMortgage = numberOfPropertiesSecuringMortgage; + return this; + } + + /** + * Number of properties securing the mortgage, if more than one + * @return numberOfPropertiesSecuringMortgage + */ + @javax.annotation.Nullable + public Integer getNumberOfPropertiesSecuringMortgage() { + return numberOfPropertiesSecuringMortgage; + } + + public void setNumberOfPropertiesSecuringMortgage(Integer numberOfPropertiesSecuringMortgage) { + this.numberOfPropertiesSecuringMortgage = numberOfPropertiesSecuringMortgage; + } + + + public Form1098 otherInformation(String otherInformation) { + this.otherInformation = otherInformation; + return this; + } + + /** + * Other (up to 39 characters), such as real estate taxes or insurance paid from escrow + * @return otherInformation + */ + @javax.annotation.Nullable + public String getOtherInformation() { + return otherInformation; + } + + public void setOtherInformation(String otherInformation) { + this.otherInformation = otherInformation; + } + + + public Form1098 mortgageAcquisitionDate(LocalDate mortgageAcquisitionDate) { + this.mortgageAcquisitionDate = mortgageAcquisitionDate; + return this; + } + + /** + * Mortgage acquisition date, if the mortgage was acquired during the tax year + * @return mortgageAcquisitionDate + */ + @javax.annotation.Nullable + public LocalDate getMortgageAcquisitionDate() { + return mortgageAcquisitionDate; + } + + public void setMortgageAcquisitionDate(LocalDate mortgageAcquisitionDate) { + this.mortgageAcquisitionDate = mortgageAcquisitionDate; + } + + + public Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 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 Form1098 secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Second TIN notice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Form1098 instance itself + */ + public Form1098 putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1098 form1098 = (Form1098) o; + return Objects.equals(this.mortgageInterestReceived, form1098.mortgageInterestReceived) && + Objects.equals(this.outstandingMortgagePrincipal, form1098.outstandingMortgagePrincipal) && + Objects.equals(this.mortgageOriginationDate, form1098.mortgageOriginationDate) && + Objects.equals(this.refundOfOverpaidInterest, form1098.refundOfOverpaidInterest) && + Objects.equals(this.mortgageInsurancePremiums, form1098.mortgageInsurancePremiums) && + Objects.equals(this.pointsPaidOnPurchaseOfPrincipalResidence, form1098.pointsPaidOnPurchaseOfPrincipalResidence) && + Objects.equals(this.propertyAddressSameAsBorrowerIndicator, form1098.propertyAddressSameAsBorrowerIndicator) && + Objects.equals(this.propertyAddressOrDescription, form1098.propertyAddressOrDescription) && + Objects.equals(this.numberOfPropertiesSecuringMortgage, form1098.numberOfPropertiesSecuringMortgage) && + Objects.equals(this.otherInformation, form1098.otherInformation) && + Objects.equals(this.mortgageAcquisitionDate, form1098.mortgageAcquisitionDate) && + Objects.equals(this.type, form1098.type) && + Objects.equals(this.id, form1098.id) && + Objects.equals(this.issuerId, form1098.issuerId) && + Objects.equals(this.issuerReferenceId, form1098.issuerReferenceId) && + Objects.equals(this.issuerTin, form1098.issuerTin) && + Objects.equals(this.taxYear, form1098.taxYear) && + Objects.equals(this.referenceId, form1098.referenceId) && + Objects.equals(this.tin, form1098.tin) && + Objects.equals(this.recipientName, form1098.recipientName) && + Objects.equals(this.address, form1098.address) && + Objects.equals(this.address2, form1098.address2) && + Objects.equals(this.city, form1098.city) && + Objects.equals(this.state, form1098.state) && + Objects.equals(this.zip, form1098.zip) && + Objects.equals(this.email, form1098.email) && + Objects.equals(this.nonUsProvince, form1098.nonUsProvince) && + Objects.equals(this.countryCode, form1098.countryCode) && + Objects.equals(this.federalEfileDate, form1098.federalEfileDate) && + Objects.equals(this.postalMail, form1098.postalMail) && + Objects.equals(this.stateEfileDate, form1098.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1098.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1098.tinMatch) && + Objects.equals(this.addressVerification, form1098.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1098.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form1098.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1098.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1098.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1098.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1098.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1098.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1098.validationErrors) && + Objects.equals(this.createdAt, form1098.createdAt) && + Objects.equals(this.updatedAt, form1098.updatedAt) && + Objects.equals(this.tinType, form1098.tinType) && + Objects.equals(this.businessName, form1098.businessName) && + Objects.equals(this.businessName2, form1098.businessName2) && + Objects.equals(this.firstName, form1098.firstName) && + Objects.equals(this.middleName, form1098.middleName) && + Objects.equals(this.lastName, form1098.lastName) && + Objects.equals(this.suffixName, form1098.suffixName) && + Objects.equals(this.recipientSecondName, form1098.recipientSecondName) && + Objects.equals(this.accountNumber, form1098.accountNumber) && + Objects.equals(this.officeCode, form1098.officeCode) && + Objects.equals(this.noTin, form1098.noTin) && + Objects.equals(this.secondTinNotice, form1098.secondTinNotice)&& + Objects.equals(this.additionalProperties, form1098.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(mortgageInterestReceived, outstandingMortgagePrincipal, mortgageOriginationDate, refundOfOverpaidInterest, mortgageInsurancePremiums, pointsPaidOnPurchaseOfPrincipalResidence, propertyAddressSameAsBorrowerIndicator, propertyAddressOrDescription, numberOfPropertiesSecuringMortgage, otherInformation, mortgageAcquisitionDate, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, address, address2, city, state, zip, email, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, addressVerification, stateAndLocalWithholding, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, tinType, businessName, businessName2, firstName, middleName, lastName, suffixName, recipientSecondName, accountNumber, officeCode, noTin, secondTinNotice, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Form1098 {\n"); + sb.append(" mortgageInterestReceived: ").append(toIndentedString(mortgageInterestReceived)).append("\n"); + sb.append(" outstandingMortgagePrincipal: ").append(toIndentedString(outstandingMortgagePrincipal)).append("\n"); + sb.append(" mortgageOriginationDate: ").append(toIndentedString(mortgageOriginationDate)).append("\n"); + sb.append(" refundOfOverpaidInterest: ").append(toIndentedString(refundOfOverpaidInterest)).append("\n"); + sb.append(" mortgageInsurancePremiums: ").append(toIndentedString(mortgageInsurancePremiums)).append("\n"); + sb.append(" pointsPaidOnPurchaseOfPrincipalResidence: ").append(toIndentedString(pointsPaidOnPurchaseOfPrincipalResidence)).append("\n"); + sb.append(" propertyAddressSameAsBorrowerIndicator: ").append(toIndentedString(propertyAddressSameAsBorrowerIndicator)).append("\n"); + sb.append(" propertyAddressOrDescription: ").append(toIndentedString(propertyAddressOrDescription)).append("\n"); + sb.append(" numberOfPropertiesSecuringMortgage: ").append(toIndentedString(numberOfPropertiesSecuringMortgage)).append("\n"); + sb.append(" otherInformation: ").append(toIndentedString(otherInformation)).append("\n"); + sb.append(" mortgageAcquisitionDate: ").append(toIndentedString(mortgageAcquisitionDate)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" middleName: ").append(toIndentedString(middleName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" suffixName: ").append(toIndentedString(suffixName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("id"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("referenceId"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("tinType"); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffixName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("address"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("countryCode"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to Form1098 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1098.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1098 is not found in the empty JSON string", Form1098.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1098.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("propertyAddressOrDescription") != null && !jsonObj.get("propertyAddressOrDescription").isJsonNull()) && !jsonObj.get("propertyAddressOrDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `propertyAddressOrDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propertyAddressOrDescription").toString())); + } + if ((jsonObj.get("otherInformation") != null && !jsonObj.get("otherInformation").isJsonNull()) && !jsonObj.get("otherInformation").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `otherInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("otherInformation").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + 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 (!Form1098.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1098' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1098.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1098 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Form1098 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form1098 instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1098 given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1098 + * @throws IOException if the JSON string is invalid with respect to Form1098 + */ + public static Form1098 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1098.class); + } + + /** + * Convert an instance of Form1098 to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java index d356c3c..58820d1 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Base.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -77,6 +77,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -91,6 +95,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java new file mode 100644 index 0000000..f7a3ede --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099C.java @@ -0,0 +1,1947 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * Form 1099-C: Cancellation of Debt *Required:* Date of Identifiable Event, Amount of Debt Discharged and Debt Description. The IRS also requires the Identifiable Event Code. The Debt Description is limited to 39 characters. Form 1099-C has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099C { + public static final String SERIALIZED_NAME_DATE_OF_IDENTIFIABLE_EVENT = "dateOfIdentifiableEvent"; + @SerializedName(SERIALIZED_NAME_DATE_OF_IDENTIFIABLE_EVENT) + private LocalDate dateOfIdentifiableEvent; + + public static final String SERIALIZED_NAME_AMOUNT_OF_DEBT_DISCHARGED = "amountOfDebtDischarged"; + @SerializedName(SERIALIZED_NAME_AMOUNT_OF_DEBT_DISCHARGED) + private Double amountOfDebtDischarged; + + public static final String SERIALIZED_NAME_INTEREST_INCLUDED_IN_DEBT_DISCHARGED = "interestIncludedInDebtDischarged"; + @SerializedName(SERIALIZED_NAME_INTEREST_INCLUDED_IN_DEBT_DISCHARGED) + private Double interestIncludedInDebtDischarged; + + public static final String SERIALIZED_NAME_DEBT_DESCRIPTION = "debtDescription"; + @SerializedName(SERIALIZED_NAME_DEBT_DESCRIPTION) + private String debtDescription; + + public static final String SERIALIZED_NAME_DEBTOR_PERSONALLY_LIABLE_INDICATOR = "debtorPersonallyLiableIndicator"; + @SerializedName(SERIALIZED_NAME_DEBTOR_PERSONALLY_LIABLE_INDICATOR) + private Boolean debtorPersonallyLiableIndicator; + + /** + * Identifiable event code. * `A` - Bankruptcy * `B` - Other judicial debt relief * `C` - Statute of limitations or expiration of deficiency period * `D` - Foreclosure election * `E` - Debt relief from probate or similar proceeding * `F` - By agreement * `G` - Decision or policy to discontinue collection * `H` - Other actual discharge before identifiable event * `I` - Deprecated; retired by the IRS in 2016 and folded into `H`. Only valid for prior tax years. + */ + @JsonAdapter(IdentifiableEventCodeEnum.Adapter.class) + public enum IdentifiableEventCodeEnum { + A("A"), + + B("B"), + + C("C"), + + D("D"), + + E("E"), + + F("F"), + + G("G"), + + H("H"), + + I("I"); + + private String value; + + IdentifiableEventCodeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IdentifiableEventCodeEnum fromValue(String value) { + for (IdentifiableEventCodeEnum b : IdentifiableEventCodeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final IdentifiableEventCodeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IdentifiableEventCodeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IdentifiableEventCodeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IdentifiableEventCodeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IDENTIFIABLE_EVENT_CODE = "identifiableEventCode"; + @SerializedName(SERIALIZED_NAME_IDENTIFIABLE_EVENT_CODE) + private IdentifiableEventCodeEnum identifiableEventCode; + + public static final String SERIALIZED_NAME_FAIR_MARKET_VALUE_OF_PROPERTY = "fairMarketValueOfProperty"; + @SerializedName(SERIALIZED_NAME_FAIR_MARKET_VALUE_OF_PROPERTY) + private Double fairMarketValueOfProperty; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_INT("1099-INT"), + + _1099_K("1099-K"), + + _1099_MISC("1099-MISC"), + + _1099_NEC("1099-NEC"), + + _1099_PATR("1099-PATR"), + + _1099_R("1099-R"), + + _1099_S("1099-S"), + + 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 Form1099C() { + } + + public Form1099C( + 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 Form1099C dateOfIdentifiableEvent(LocalDate dateOfIdentifiableEvent) { + this.dateOfIdentifiableEvent = dateOfIdentifiableEvent; + return this; + } + + /** + * Date of identifiable event + * @return dateOfIdentifiableEvent + */ + @javax.annotation.Nullable + public LocalDate getDateOfIdentifiableEvent() { + return dateOfIdentifiableEvent; + } + + public void setDateOfIdentifiableEvent(LocalDate dateOfIdentifiableEvent) { + this.dateOfIdentifiableEvent = dateOfIdentifiableEvent; + } + + + public Form1099C amountOfDebtDischarged(Double amountOfDebtDischarged) { + this.amountOfDebtDischarged = amountOfDebtDischarged; + return this; + } + + /** + * Amount of debt discharged + * @return amountOfDebtDischarged + */ + @javax.annotation.Nullable + public Double getAmountOfDebtDischarged() { + return amountOfDebtDischarged; + } + + public void setAmountOfDebtDischarged(Double amountOfDebtDischarged) { + this.amountOfDebtDischarged = amountOfDebtDischarged; + } + + + public Form1099C interestIncludedInDebtDischarged(Double interestIncludedInDebtDischarged) { + this.interestIncludedInDebtDischarged = interestIncludedInDebtDischarged; + return this; + } + + /** + * Interest, if included in the amount of debt discharged + * @return interestIncludedInDebtDischarged + */ + @javax.annotation.Nullable + public Double getInterestIncludedInDebtDischarged() { + return interestIncludedInDebtDischarged; + } + + public void setInterestIncludedInDebtDischarged(Double interestIncludedInDebtDischarged) { + this.interestIncludedInDebtDischarged = interestIncludedInDebtDischarged; + } + + + public Form1099C debtDescription(String debtDescription) { + this.debtDescription = debtDescription; + return this; + } + + /** + * Debt description (up to 39 characters) + * @return debtDescription + */ + @javax.annotation.Nullable + public String getDebtDescription() { + return debtDescription; + } + + public void setDebtDescription(String debtDescription) { + this.debtDescription = debtDescription; + } + + + public Form1099C debtorPersonallyLiableIndicator(Boolean debtorPersonallyLiableIndicator) { + this.debtorPersonallyLiableIndicator = debtorPersonallyLiableIndicator; + return this; + } + + /** + * If checked, the debtor was personally liable for repayment of the debt + * @return debtorPersonallyLiableIndicator + */ + @javax.annotation.Nullable + public Boolean getDebtorPersonallyLiableIndicator() { + return debtorPersonallyLiableIndicator; + } + + public void setDebtorPersonallyLiableIndicator(Boolean debtorPersonallyLiableIndicator) { + this.debtorPersonallyLiableIndicator = debtorPersonallyLiableIndicator; + } + + + public Form1099C identifiableEventCode(IdentifiableEventCodeEnum identifiableEventCode) { + this.identifiableEventCode = identifiableEventCode; + return this; + } + + /** + * Identifiable event code. * `A` - Bankruptcy * `B` - Other judicial debt relief * `C` - Statute of limitations or expiration of deficiency period * `D` - Foreclosure election * `E` - Debt relief from probate or similar proceeding * `F` - By agreement * `G` - Decision or policy to discontinue collection * `H` - Other actual discharge before identifiable event * `I` - Deprecated; retired by the IRS in 2016 and folded into `H`. Only valid for prior tax years. + * @return identifiableEventCode + */ + @javax.annotation.Nullable + public IdentifiableEventCodeEnum getIdentifiableEventCode() { + return identifiableEventCode; + } + + public void setIdentifiableEventCode(IdentifiableEventCodeEnum identifiableEventCode) { + this.identifiableEventCode = identifiableEventCode; + } + + + public Form1099C fairMarketValueOfProperty(Double fairMarketValueOfProperty) { + this.fairMarketValueOfProperty = fairMarketValueOfProperty; + return this; + } + + /** + * Fair market value of property + * @return fairMarketValueOfProperty + */ + @javax.annotation.Nullable + public Double getFairMarketValueOfProperty() { + return fairMarketValueOfProperty; + } + + public void setFairMarketValueOfProperty(Double fairMarketValueOfProperty) { + this.fairMarketValueOfProperty = fairMarketValueOfProperty; + } + + + public Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C 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 Form1099C secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Second TIN notice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Form1099C instance itself + */ + public Form1099C putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099C form1099C = (Form1099C) o; + return Objects.equals(this.dateOfIdentifiableEvent, form1099C.dateOfIdentifiableEvent) && + Objects.equals(this.amountOfDebtDischarged, form1099C.amountOfDebtDischarged) && + Objects.equals(this.interestIncludedInDebtDischarged, form1099C.interestIncludedInDebtDischarged) && + Objects.equals(this.debtDescription, form1099C.debtDescription) && + Objects.equals(this.debtorPersonallyLiableIndicator, form1099C.debtorPersonallyLiableIndicator) && + Objects.equals(this.identifiableEventCode, form1099C.identifiableEventCode) && + Objects.equals(this.fairMarketValueOfProperty, form1099C.fairMarketValueOfProperty) && + Objects.equals(this.type, form1099C.type) && + Objects.equals(this.id, form1099C.id) && + Objects.equals(this.issuerId, form1099C.issuerId) && + Objects.equals(this.issuerReferenceId, form1099C.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099C.issuerTin) && + Objects.equals(this.taxYear, form1099C.taxYear) && + Objects.equals(this.referenceId, form1099C.referenceId) && + Objects.equals(this.tin, form1099C.tin) && + Objects.equals(this.recipientName, form1099C.recipientName) && + Objects.equals(this.address, form1099C.address) && + Objects.equals(this.address2, form1099C.address2) && + Objects.equals(this.city, form1099C.city) && + Objects.equals(this.state, form1099C.state) && + Objects.equals(this.zip, form1099C.zip) && + Objects.equals(this.email, form1099C.email) && + Objects.equals(this.nonUsProvince, form1099C.nonUsProvince) && + Objects.equals(this.countryCode, form1099C.countryCode) && + Objects.equals(this.federalEfileDate, form1099C.federalEfileDate) && + Objects.equals(this.postalMail, form1099C.postalMail) && + Objects.equals(this.stateEfileDate, form1099C.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099C.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099C.tinMatch) && + Objects.equals(this.addressVerification, form1099C.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099C.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form1099C.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099C.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099C.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099C.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099C.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099C.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1099C.validationErrors) && + Objects.equals(this.createdAt, form1099C.createdAt) && + Objects.equals(this.updatedAt, form1099C.updatedAt) && + Objects.equals(this.tinType, form1099C.tinType) && + Objects.equals(this.businessName, form1099C.businessName) && + Objects.equals(this.businessName2, form1099C.businessName2) && + Objects.equals(this.firstName, form1099C.firstName) && + Objects.equals(this.middleName, form1099C.middleName) && + Objects.equals(this.lastName, form1099C.lastName) && + Objects.equals(this.suffixName, form1099C.suffixName) && + Objects.equals(this.recipientSecondName, form1099C.recipientSecondName) && + Objects.equals(this.accountNumber, form1099C.accountNumber) && + Objects.equals(this.officeCode, form1099C.officeCode) && + Objects.equals(this.noTin, form1099C.noTin) && + Objects.equals(this.secondTinNotice, form1099C.secondTinNotice)&& + Objects.equals(this.additionalProperties, form1099C.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(dateOfIdentifiableEvent, amountOfDebtDischarged, interestIncludedInDebtDischarged, debtDescription, debtorPersonallyLiableIndicator, identifiableEventCode, fairMarketValueOfProperty, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, address, address2, city, state, zip, email, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, addressVerification, stateAndLocalWithholding, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, tinType, businessName, businessName2, firstName, middleName, lastName, suffixName, recipientSecondName, accountNumber, officeCode, noTin, secondTinNotice, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Form1099C {\n"); + sb.append(" dateOfIdentifiableEvent: ").append(toIndentedString(dateOfIdentifiableEvent)).append("\n"); + sb.append(" amountOfDebtDischarged: ").append(toIndentedString(amountOfDebtDischarged)).append("\n"); + sb.append(" interestIncludedInDebtDischarged: ").append(toIndentedString(interestIncludedInDebtDischarged)).append("\n"); + sb.append(" debtDescription: ").append(toIndentedString(debtDescription)).append("\n"); + sb.append(" debtorPersonallyLiableIndicator: ").append(toIndentedString(debtorPersonallyLiableIndicator)).append("\n"); + sb.append(" identifiableEventCode: ").append(toIndentedString(identifiableEventCode)).append("\n"); + sb.append(" fairMarketValueOfProperty: ").append(toIndentedString(fairMarketValueOfProperty)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" middleName: ").append(toIndentedString(middleName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" suffixName: ").append(toIndentedString(suffixName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("id"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("referenceId"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("tinType"); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffixName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("dateOfIdentifiableEvent"); + openapiRequiredFields.add("amountOfDebtDischarged"); + openapiRequiredFields.add("debtDescription"); + openapiRequiredFields.add("identifiableEventCode"); + 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 Form1099C + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099C.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099C is not found in the empty JSON string", Form1099C.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099C.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("debtDescription") != null && !jsonObj.get("debtDescription").isJsonNull()) && !jsonObj.get("debtDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `debtDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("debtDescription").toString())); + } + if ((jsonObj.get("identifiableEventCode") != null && !jsonObj.get("identifiableEventCode").isJsonNull()) && !jsonObj.get("identifiableEventCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `identifiableEventCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identifiableEventCode").toString())); + } + // validate the required field `identifiableEventCode` + IdentifiableEventCodeEnum.validateJsonElement(jsonObj.get("identifiableEventCode")); + 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 (!Form1099C.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099C' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099C.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099C value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Form1099C read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form1099C instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099C given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099C + * @throws IOException if the JSON string is invalid with respect to Form1099C + */ + public static Form1099C fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099C.class); + } + + /** + * Convert an instance of Form1099C 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/Form1099Div.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java index dd797ee..cf8cdf3 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Div.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -153,6 +153,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -167,6 +171,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java index fc13e7a..0f7bbc5 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Int.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -137,6 +137,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -151,6 +155,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java index 4b484a2..3be160a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099K.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -261,6 +261,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -275,6 +279,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java index 02336c1..bbb4bb8 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099ListRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -61,7 +61,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") public class Form1099ListRequest { /** - * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `W-2` + * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `W-2` */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { @@ -71,6 +71,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -85,6 +89,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; @@ -147,7 +153,7 @@ public Form1099ListRequest type(TypeEnum type) { } /** - * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `W-2` + * Available form types: * `1042-S` * `1095-B` * `1095-C` * `1098` * `1099-C` * `1099-DIV` * `1099-INT` * `1099-K` * `1099-MISC` * `1099-NEC` * `1099-PATR` * `1099-R` * `1099-S` * `W-2` * @return type */ @javax.annotation.Nullable diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java index db01bb9..fad3c01 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Misc.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -137,6 +137,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -151,6 +155,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java index 0c470cb..c20804f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Nec.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -93,6 +93,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -107,6 +111,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java index 83353c1..cff3b92 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099Patr.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -129,6 +129,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -143,6 +147,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java index 9e3310f..8947b69 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099R.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -371,6 +371,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -385,6 +389,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java new file mode 100644 index 0000000..0aa70c9 --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099S.java @@ -0,0 +1,1849 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **Note:** You must have an active Avalara 1099 & W-9 subscription to authenticate and use these APIs. If you don't have a subscription, please contact our [Sales team](https://www.avalara.com/us/en/products/1099/request-a-demo.html). ## Authentication The Avalara 1099 & W-9 API uses **Bearer Token Authentication**. To authenticate, acquire a bearer token using a **Client ID** and **Client Secret** that you generate in the Avalara 1099 & W-9 web application. The sample cURL commands below use **production** URLs. For **sandbox**, replace them with the sandbox URLs listed in the Sandbox Environment table. ### Option 1 — Client ID and Client Secret (recommended) **Step 1: Create API credentials in the Avalara 1099 & W-9 web app** For a full walkthrough, see the [Avalara 1099 & W-9 integration guide](https://developer.avalara.com/products/avalara-1099-and-w9/integration-guides/1099-and-w-9/siu2796410674799/). > **Note:** To enable credential creation you must first enter a valid company address in **Account Settings > Account** and enable two-factor authentication in **Account Settings > Security**. 1. In Avalara 1099 & W-9, open **Account Settings** (gear icon, top-right of any page) and select **API**. 2. Click **Create new credentials** (a valid company address and 2FA are required). 3. Copy your **Client Id** and **Client Secret** securely — they will not be shown again after you leave the screen. **Step 2: Request a bearer token** ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{client_id}}' \\ --data-urlencode 'client_secret={{client_secret}}' ``` ### Option 2 — Account ID and License Key If your organization already uses other Avalara products (AvaTax, CertCapture) and has access to the logged-in area of Avalara.com, you can generate the bearer token using your **Account ID** and **License Key**. > **Note:** If you already have a license key for other Avalara products you can reuse it. Generating a new key will reset any previously created key. 1. Log in to Avalara.com. 2. Go to **Settings → License and API Keys**. 3. Click **Generate New Key**. 4. Note your **Account ID** from the Account menu. ```bash curl -X POST 'https://identity.avalara.com/connect/token' \\ --header 'Content-Type: application/x-www-form-urlencoded' \\ --data-urlencode 'grant_type=client_credentials' \\ --data-urlencode 'client_id={{accountId}}' \\ --data-urlencode 'client_secret={{licenseKey}}' ``` ### Using and renewing the bearer token Include the token in the `Authorization` header on every request: ```http Authorization: Bearer {access_token} ``` Tokens expire after the number of seconds in the `expires_in` field of the token response. Your integration must renew the token before it expires. **Example token response** ```json { \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI...\", \"expires_in\": 3600, \"token_type\": \"Bearer\", \"scope\": \"avatax_api iam-ds\" } ``` ### Sandbox Environment Use the same steps as production, replacing the base URLs: | Purpose | Production | Sandbox | | --- | --- | --- | | Account & License Key management (web) | `https://www.avalara.com` | `https://sandbox.admin.avalara.com` | | Account & License Key management (API) | `https://rest.avatax.com` | `https://sandbox-rest.avatax.com` | | Token generation | `https://identity.avalara.com` | `https://ai-sbx.avlr.sh` | ## Environments #### Production - **Avalara 1099 API URL:** [`https://api.avalara.com/avalara1099`](https://api.avalara.com/avalara1099) - **Identity Token URL:** [`https://identity.avalara.com/connect/token`](https://identity.avalara.com/connect/token) #### Sandbox - **Avalara 1099 API URL:** [`https://api.sbx.avalara.com/avalara1099`](https://api.sbx.avalara.com/avalara1099) - **Identity Token URL:** [`https://ai-sbx.avlr.sh/connect/token`](https://ai-sbx.avlr.sh/connect/token) --- ## API & SDK Documentation [Avalara 1099 API Reference](https://developer.avalara.com/api-reference/avalara1099/avalara1099/) [Avalara SDKs](https://developer.avalara.com/sdk/) [Swagger](https://api.avalara.com/avalara1099/swagger/index.html?api-version=2.0) + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java + */ + +package Avalara.SDK.model.A1099.V2; + +import java.util.Objects; +import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; +import Avalara.SDK.model.A1099.V2.StateAndLocalWithholding; +import Avalara.SDK.model.A1099.V2.StateEfileStatusDetail; +import Avalara.SDK.model.A1099.V2.ValidationError; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * Form 1099-S: Proceeds From Real Estate Transactions The recipient is the transferor (seller) and the issuer is the filer (settlement agent). *Required:* Date of Closing, Address or Legal Description, and, unless the transferor received property or services, Gross Proceeds, with Gross Proceeds plus Buyer's Part of Real Estate Tax above zero. The Date of Closing must fall in the tax year or the ten years before it. The Address or Legal Description is limited to 39 characters. Form 1099-S has no state or local boxes, so `stateAndLocalWithholding` is discarded and reads back as `null`. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class Form1099S { + public static final String SERIALIZED_NAME_DATE_OF_CLOSING = "dateOfClosing"; + @SerializedName(SERIALIZED_NAME_DATE_OF_CLOSING) + private LocalDate dateOfClosing; + + public static final String SERIALIZED_NAME_GROSS_PROCEEDS = "grossProceeds"; + @SerializedName(SERIALIZED_NAME_GROSS_PROCEEDS) + private Double grossProceeds; + + public static final String SERIALIZED_NAME_PROPERTY_ADDRESS_OR_LEGAL_DESCRIPTION = "propertyAddressOrLegalDescription"; + @SerializedName(SERIALIZED_NAME_PROPERTY_ADDRESS_OR_LEGAL_DESCRIPTION) + private String propertyAddressOrLegalDescription; + + public static final String SERIALIZED_NAME_TRANSFEROR_RECEIVED_PROPERTY_OR_SERVICES_INDICATOR = "transferorReceivedPropertyOrServicesIndicator"; + @SerializedName(SERIALIZED_NAME_TRANSFEROR_RECEIVED_PROPERTY_OR_SERVICES_INDICATOR) + private Boolean transferorReceivedPropertyOrServicesIndicator; + + public static final String SERIALIZED_NAME_TRANSFEROR_IS_FOREIGN_PERSON_INDICATOR = "transferorIsForeignPersonIndicator"; + @SerializedName(SERIALIZED_NAME_TRANSFEROR_IS_FOREIGN_PERSON_INDICATOR) + private Boolean transferorIsForeignPersonIndicator; + + public static final String SERIALIZED_NAME_BUYERS_PART_OF_REAL_ESTATE_TAX = "buyersPartOfRealEstateTax"; + @SerializedName(SERIALIZED_NAME_BUYERS_PART_OF_REAL_ESTATE_TAX) + private Double buyersPartOfRealEstateTax; + + /** + * Form type. + */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + _1042_S("1042-S"), + + _1095_B("1095-B"), + + _1095_C("1095-C"), + + _1098("1098"), + + _1099_C("1099-C"), + + _1099_DIV("1099-DIV"), + + _1099_INT("1099-INT"), + + _1099_K("1099-K"), + + _1099_MISC("1099-MISC"), + + _1099_NEC("1099-NEC"), + + _1099_PATR("1099-PATR"), + + _1099_R("1099-R"), + + _1099_S("1099-S"), + + 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 Form1099S() { + } + + public Form1099S( + 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 Form1099S dateOfClosing(LocalDate dateOfClosing) { + this.dateOfClosing = dateOfClosing; + return this; + } + + /** + * Date of closing + * @return dateOfClosing + */ + @javax.annotation.Nullable + public LocalDate getDateOfClosing() { + return dateOfClosing; + } + + public void setDateOfClosing(LocalDate dateOfClosing) { + this.dateOfClosing = dateOfClosing; + } + + + public Form1099S grossProceeds(Double grossProceeds) { + this.grossProceeds = grossProceeds; + return this; + } + + /** + * Gross proceeds (the total gross proceeds, from tax year 2026 labeled Box 2a) + * @return grossProceeds + */ + @javax.annotation.Nullable + public Double getGrossProceeds() { + return grossProceeds; + } + + public void setGrossProceeds(Double grossProceeds) { + this.grossProceeds = grossProceeds; + } + + + public Form1099S propertyAddressOrLegalDescription(String propertyAddressOrLegalDescription) { + this.propertyAddressOrLegalDescription = propertyAddressOrLegalDescription; + return this; + } + + /** + * Address or legal description of the property, including city, state and ZIP code (up to 39 characters) + * @return propertyAddressOrLegalDescription + */ + @javax.annotation.Nullable + public String getPropertyAddressOrLegalDescription() { + return propertyAddressOrLegalDescription; + } + + public void setPropertyAddressOrLegalDescription(String propertyAddressOrLegalDescription) { + this.propertyAddressOrLegalDescription = propertyAddressOrLegalDescription; + } + + + public Form1099S transferorReceivedPropertyOrServicesIndicator(Boolean transferorReceivedPropertyOrServicesIndicator) { + this.transferorReceivedPropertyOrServicesIndicator = transferorReceivedPropertyOrServicesIndicator; + return this; + } + + /** + * If checked, the transferor received or will receive property or services as part of the consideration + * @return transferorReceivedPropertyOrServicesIndicator + */ + @javax.annotation.Nullable + public Boolean getTransferorReceivedPropertyOrServicesIndicator() { + return transferorReceivedPropertyOrServicesIndicator; + } + + public void setTransferorReceivedPropertyOrServicesIndicator(Boolean transferorReceivedPropertyOrServicesIndicator) { + this.transferorReceivedPropertyOrServicesIndicator = transferorReceivedPropertyOrServicesIndicator; + } + + + public Form1099S transferorIsForeignPersonIndicator(Boolean transferorIsForeignPersonIndicator) { + this.transferorIsForeignPersonIndicator = transferorIsForeignPersonIndicator; + return this; + } + + /** + * If checked, the transferor is a foreign person (nonresident alien, foreign partnership, foreign estate or foreign trust) + * @return transferorIsForeignPersonIndicator + */ + @javax.annotation.Nullable + public Boolean getTransferorIsForeignPersonIndicator() { + return transferorIsForeignPersonIndicator; + } + + public void setTransferorIsForeignPersonIndicator(Boolean transferorIsForeignPersonIndicator) { + this.transferorIsForeignPersonIndicator = transferorIsForeignPersonIndicator; + } + + + public Form1099S buyersPartOfRealEstateTax(Double buyersPartOfRealEstateTax) { + this.buyersPartOfRealEstateTax = buyersPartOfRealEstateTax; + return this; + } + + /** + * Buyer's part of real estate tax + * @return buyersPartOfRealEstateTax + */ + @javax.annotation.Nullable + public Double getBuyersPartOfRealEstateTax() { + return buyersPartOfRealEstateTax; + } + + public void setBuyersPartOfRealEstateTax(Double buyersPartOfRealEstateTax) { + this.buyersPartOfRealEstateTax = buyersPartOfRealEstateTax; + } + + + public Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S 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 Form1099S secondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + return this; + } + + /** + * Second TIN notice + * @return secondTinNotice + */ + @javax.annotation.Nullable + public Boolean getSecondTinNotice() { + return secondTinNotice; + } + + public void setSecondTinNotice(Boolean secondTinNotice) { + this.secondTinNotice = secondTinNotice; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the Form1099S instance itself + */ + public Form1099S putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Form1099S form1099S = (Form1099S) o; + return Objects.equals(this.dateOfClosing, form1099S.dateOfClosing) && + Objects.equals(this.grossProceeds, form1099S.grossProceeds) && + Objects.equals(this.propertyAddressOrLegalDescription, form1099S.propertyAddressOrLegalDescription) && + Objects.equals(this.transferorReceivedPropertyOrServicesIndicator, form1099S.transferorReceivedPropertyOrServicesIndicator) && + Objects.equals(this.transferorIsForeignPersonIndicator, form1099S.transferorIsForeignPersonIndicator) && + Objects.equals(this.buyersPartOfRealEstateTax, form1099S.buyersPartOfRealEstateTax) && + Objects.equals(this.type, form1099S.type) && + Objects.equals(this.id, form1099S.id) && + Objects.equals(this.issuerId, form1099S.issuerId) && + Objects.equals(this.issuerReferenceId, form1099S.issuerReferenceId) && + Objects.equals(this.issuerTin, form1099S.issuerTin) && + Objects.equals(this.taxYear, form1099S.taxYear) && + Objects.equals(this.referenceId, form1099S.referenceId) && + Objects.equals(this.tin, form1099S.tin) && + Objects.equals(this.recipientName, form1099S.recipientName) && + Objects.equals(this.address, form1099S.address) && + Objects.equals(this.address2, form1099S.address2) && + Objects.equals(this.city, form1099S.city) && + Objects.equals(this.state, form1099S.state) && + Objects.equals(this.zip, form1099S.zip) && + Objects.equals(this.email, form1099S.email) && + Objects.equals(this.nonUsProvince, form1099S.nonUsProvince) && + Objects.equals(this.countryCode, form1099S.countryCode) && + Objects.equals(this.federalEfileDate, form1099S.federalEfileDate) && + Objects.equals(this.postalMail, form1099S.postalMail) && + Objects.equals(this.stateEfileDate, form1099S.stateEfileDate) && + Objects.equals(this.recipientEdeliveryDate, form1099S.recipientEdeliveryDate) && + Objects.equals(this.tinMatch, form1099S.tinMatch) && + Objects.equals(this.addressVerification, form1099S.addressVerification) && + Objects.equals(this.stateAndLocalWithholding, form1099S.stateAndLocalWithholding) && + Objects.equals(this.federalEfileStatus, form1099S.federalEfileStatus) && + Objects.equals(this.stateEfileStatus, form1099S.stateEfileStatus) && + Objects.equals(this.postalMailStatus, form1099S.postalMailStatus) && + Objects.equals(this.tinMatchStatus, form1099S.tinMatchStatus) && + Objects.equals(this.addressVerificationStatus, form1099S.addressVerificationStatus) && + Objects.equals(this.eDeliveryStatus, form1099S.eDeliveryStatus) && + Objects.equals(this.validationErrors, form1099S.validationErrors) && + Objects.equals(this.createdAt, form1099S.createdAt) && + Objects.equals(this.updatedAt, form1099S.updatedAt) && + Objects.equals(this.tinType, form1099S.tinType) && + Objects.equals(this.businessName, form1099S.businessName) && + Objects.equals(this.businessName2, form1099S.businessName2) && + Objects.equals(this.firstName, form1099S.firstName) && + Objects.equals(this.middleName, form1099S.middleName) && + Objects.equals(this.lastName, form1099S.lastName) && + Objects.equals(this.suffixName, form1099S.suffixName) && + Objects.equals(this.recipientSecondName, form1099S.recipientSecondName) && + Objects.equals(this.accountNumber, form1099S.accountNumber) && + Objects.equals(this.officeCode, form1099S.officeCode) && + Objects.equals(this.noTin, form1099S.noTin) && + Objects.equals(this.secondTinNotice, form1099S.secondTinNotice)&& + Objects.equals(this.additionalProperties, form1099S.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(dateOfClosing, grossProceeds, propertyAddressOrLegalDescription, transferorReceivedPropertyOrServicesIndicator, transferorIsForeignPersonIndicator, buyersPartOfRealEstateTax, type, id, issuerId, issuerReferenceId, issuerTin, taxYear, referenceId, tin, recipientName, address, address2, city, state, zip, email, nonUsProvince, countryCode, federalEfileDate, postalMail, stateEfileDate, recipientEdeliveryDate, tinMatch, addressVerification, stateAndLocalWithholding, federalEfileStatus, stateEfileStatus, postalMailStatus, tinMatchStatus, addressVerificationStatus, eDeliveryStatus, validationErrors, createdAt, updatedAt, tinType, businessName, businessName2, firstName, middleName, lastName, suffixName, recipientSecondName, accountNumber, officeCode, noTin, secondTinNotice, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Form1099S {\n"); + sb.append(" dateOfClosing: ").append(toIndentedString(dateOfClosing)).append("\n"); + sb.append(" grossProceeds: ").append(toIndentedString(grossProceeds)).append("\n"); + sb.append(" propertyAddressOrLegalDescription: ").append(toIndentedString(propertyAddressOrLegalDescription)).append("\n"); + sb.append(" transferorReceivedPropertyOrServicesIndicator: ").append(toIndentedString(transferorReceivedPropertyOrServicesIndicator)).append("\n"); + sb.append(" transferorIsForeignPersonIndicator: ").append(toIndentedString(transferorIsForeignPersonIndicator)).append("\n"); + sb.append(" buyersPartOfRealEstateTax: ").append(toIndentedString(buyersPartOfRealEstateTax)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" issuerId: ").append(toIndentedString(issuerId)).append("\n"); + sb.append(" issuerReferenceId: ").append(toIndentedString(issuerReferenceId)).append("\n"); + sb.append(" issuerTin: ").append(toIndentedString(issuerTin)).append("\n"); + sb.append(" taxYear: ").append(toIndentedString(taxYear)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).append("\n"); + sb.append(" tin: ").append(toIndentedString(tin)).append("\n"); + sb.append(" recipientName: ").append(toIndentedString(recipientName)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" address2: ").append(toIndentedString(address2)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" zip: ").append(toIndentedString(zip)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" nonUsProvince: ").append(toIndentedString(nonUsProvince)).append("\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" federalEfileDate: ").append(toIndentedString(federalEfileDate)).append("\n"); + sb.append(" postalMail: ").append(toIndentedString(postalMail)).append("\n"); + sb.append(" stateEfileDate: ").append(toIndentedString(stateEfileDate)).append("\n"); + sb.append(" recipientEdeliveryDate: ").append(toIndentedString(recipientEdeliveryDate)).append("\n"); + sb.append(" tinMatch: ").append(toIndentedString(tinMatch)).append("\n"); + sb.append(" addressVerification: ").append(toIndentedString(addressVerification)).append("\n"); + sb.append(" stateAndLocalWithholding: ").append(toIndentedString(stateAndLocalWithholding)).append("\n"); + sb.append(" federalEfileStatus: ").append(toIndentedString(federalEfileStatus)).append("\n"); + sb.append(" stateEfileStatus: ").append(toIndentedString(stateEfileStatus)).append("\n"); + sb.append(" postalMailStatus: ").append(toIndentedString(postalMailStatus)).append("\n"); + sb.append(" tinMatchStatus: ").append(toIndentedString(tinMatchStatus)).append("\n"); + sb.append(" addressVerificationStatus: ").append(toIndentedString(addressVerificationStatus)).append("\n"); + sb.append(" eDeliveryStatus: ").append(toIndentedString(eDeliveryStatus)).append("\n"); + sb.append(" validationErrors: ").append(toIndentedString(validationErrors)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" tinType: ").append(toIndentedString(tinType)).append("\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" businessName2: ").append(toIndentedString(businessName2)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" middleName: ").append(toIndentedString(middleName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" suffixName: ").append(toIndentedString(suffixName)).append("\n"); + sb.append(" recipientSecondName: ").append(toIndentedString(recipientSecondName)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" officeCode: ").append(toIndentedString(officeCode)).append("\n"); + sb.append(" noTin: ").append(toIndentedString(noTin)).append("\n"); + sb.append(" secondTinNotice: ").append(toIndentedString(secondTinNotice)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("id"); + openapiFields.add("issuerId"); + openapiFields.add("issuerReferenceId"); + openapiFields.add("issuerTin"); + openapiFields.add("taxYear"); + openapiFields.add("referenceId"); + openapiFields.add("tin"); + openapiFields.add("recipientName"); + openapiFields.add("address"); + openapiFields.add("address2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("email"); + openapiFields.add("nonUsProvince"); + openapiFields.add("countryCode"); + openapiFields.add("federalEfileDate"); + openapiFields.add("postalMail"); + openapiFields.add("stateEfileDate"); + openapiFields.add("recipientEdeliveryDate"); + openapiFields.add("tinMatch"); + openapiFields.add("addressVerification"); + openapiFields.add("stateAndLocalWithholding"); + openapiFields.add("federalEfileStatus"); + openapiFields.add("stateEfileStatus"); + openapiFields.add("postalMailStatus"); + openapiFields.add("tinMatchStatus"); + openapiFields.add("addressVerificationStatus"); + openapiFields.add("eDeliveryStatus"); + openapiFields.add("validationErrors"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + openapiFields.add("tinType"); + openapiFields.add("businessName"); + openapiFields.add("businessName2"); + openapiFields.add("firstName"); + openapiFields.add("middleName"); + openapiFields.add("lastName"); + openapiFields.add("suffixName"); + openapiFields.add("recipientSecondName"); + openapiFields.add("accountNumber"); + openapiFields.add("officeCode"); + openapiFields.add("noTin"); + openapiFields.add("secondTinNotice"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("dateOfClosing"); + openapiRequiredFields.add("propertyAddressOrLegalDescription"); + 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 Form1099S + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!Form1099S.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in Form1099S is not found in the empty JSON string", Form1099S.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : Form1099S.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("propertyAddressOrLegalDescription") != null && !jsonObj.get("propertyAddressOrLegalDescription").isJsonNull()) && !jsonObj.get("propertyAddressOrLegalDescription").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `propertyAddressOrLegalDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("propertyAddressOrLegalDescription").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + } + if ((jsonObj.get("issuerId") != null && !jsonObj.get("issuerId").isJsonNull()) && !jsonObj.get("issuerId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerId").toString())); + } + if ((jsonObj.get("issuerReferenceId") != null && !jsonObj.get("issuerReferenceId").isJsonNull()) && !jsonObj.get("issuerReferenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerReferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerReferenceId").toString())); + } + if ((jsonObj.get("issuerTin") != null && !jsonObj.get("issuerTin").isJsonNull()) && !jsonObj.get("issuerTin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `issuerTin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("issuerTin").toString())); + } + if ((jsonObj.get("referenceId") != null && !jsonObj.get("referenceId").isJsonNull()) && !jsonObj.get("referenceId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `referenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("referenceId").toString())); + } + if ((jsonObj.get("tin") != null && !jsonObj.get("tin").isJsonNull()) && !jsonObj.get("tin").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tin` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tin").toString())); + } + if ((jsonObj.get("recipientName") != null && !jsonObj.get("recipientName").isJsonNull()) && !jsonObj.get("recipientName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `recipientName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recipientName").toString())); + } + if ((jsonObj.get("address") != null && !jsonObj.get("address").isJsonNull()) && !jsonObj.get("address").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address").toString())); + } + if ((jsonObj.get("address2") != null && !jsonObj.get("address2").isJsonNull()) && !jsonObj.get("address2").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `address2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("address2").toString())); + } + if ((jsonObj.get("city") != null && !jsonObj.get("city").isJsonNull()) && !jsonObj.get("city").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + } + if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + } + if ((jsonObj.get("zip") != null && !jsonObj.get("zip").isJsonNull()) && !jsonObj.get("zip").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if ((jsonObj.get("nonUsProvince") != null && !jsonObj.get("nonUsProvince").isJsonNull()) && !jsonObj.get("nonUsProvince").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nonUsProvince` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nonUsProvince").toString())); + } + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("countryCode").toString())); + } + // validate the optional field `stateAndLocalWithholding` + if (jsonObj.get("stateAndLocalWithholding") != null && !jsonObj.get("stateAndLocalWithholding").isJsonNull()) { + StateAndLocalWithholding.validateJsonElement(jsonObj.get("stateAndLocalWithholding")); + } + // validate the optional field `federalEfileStatus` + if (jsonObj.get("federalEfileStatus") != null && !jsonObj.get("federalEfileStatus").isJsonNull()) { + 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 (!Form1099S.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Form1099S' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Form1099S.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Form1099S value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public Form1099S read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + Form1099S instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of Form1099S given an JSON string + * + * @param jsonString JSON string + * @return An instance of Form1099S + * @throws IOException if the JSON string is invalid with respect to Form1099S + */ + public static Form1099S fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, Form1099S.class); + } + + /** + * Convert an instance of Form1099S to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java index 55da24d..27adf1b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099StatusDetail.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 2507bd5..1783de6 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Form1099W2.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -201,6 +201,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -215,6 +219,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java index 5a1e73b..4287bd7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/Get1099Form200Response.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -24,6 +24,8 @@ import Avalara.SDK.model.A1099.V2.Form1042S; import Avalara.SDK.model.A1099.V2.Form1095B; import Avalara.SDK.model.A1099.V2.Form1095C; +import Avalara.SDK.model.A1099.V2.Form1098; +import Avalara.SDK.model.A1099.V2.Form1099C; import Avalara.SDK.model.A1099.V2.Form1099Div; import Avalara.SDK.model.A1099.V2.Form1099Int; import Avalara.SDK.model.A1099.V2.Form1099K; @@ -31,6 +33,7 @@ import Avalara.SDK.model.A1099.V2.Form1099Nec; import Avalara.SDK.model.A1099.V2.Form1099Patr; import Avalara.SDK.model.A1099.V2.Form1099R; +import Avalara.SDK.model.A1099.V2.Form1099S; import Avalara.SDK.model.A1099.V2.Form1099StatusDetail; import Avalara.SDK.model.A1099.V2.Form1099W2; import Avalara.SDK.model.A1099.V2.IntermediaryOrFlowThrough; @@ -102,6 +105,8 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterForm1042S = gson.getDelegateAdapter(this, TypeToken.get(Form1042S.class)); final TypeAdapter adapterForm1095B = gson.getDelegateAdapter(this, TypeToken.get(Form1095B.class)); final TypeAdapter adapterForm1095C = gson.getDelegateAdapter(this, TypeToken.get(Form1095C.class)); + final TypeAdapter adapterForm1098 = gson.getDelegateAdapter(this, TypeToken.get(Form1098.class)); + final TypeAdapter adapterForm1099C = gson.getDelegateAdapter(this, TypeToken.get(Form1099C.class)); final TypeAdapter adapterForm1099Div = gson.getDelegateAdapter(this, TypeToken.get(Form1099Div.class)); final TypeAdapter adapterForm1099Int = gson.getDelegateAdapter(this, TypeToken.get(Form1099Int.class)); final TypeAdapter adapterForm1099K = gson.getDelegateAdapter(this, TypeToken.get(Form1099K.class)); @@ -109,6 +114,7 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter adapterForm1099Nec = gson.getDelegateAdapter(this, TypeToken.get(Form1099Nec.class)); final TypeAdapter adapterForm1099Patr = gson.getDelegateAdapter(this, TypeToken.get(Form1099Patr.class)); final TypeAdapter adapterForm1099R = gson.getDelegateAdapter(this, TypeToken.get(Form1099R.class)); + final TypeAdapter adapterForm1099S = gson.getDelegateAdapter(this, TypeToken.get(Form1099S.class)); final TypeAdapter adapterForm1099W2 = gson.getDelegateAdapter(this, TypeToken.get(Form1099W2.class)); return (TypeAdapter) new TypeAdapter() { @@ -137,6 +143,18 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1098` + if (value.getActualInstance() instanceof Form1098) { + JsonElement element = adapterForm1098.toJsonTree((Form1098)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `Form1099C` + if (value.getActualInstance() instanceof Form1099C) { + JsonElement element = adapterForm1099C.toJsonTree((Form1099C)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099Div` if (value.getActualInstance() instanceof Form1099Div) { JsonElement element = adapterForm1099Div.toJsonTree((Form1099Div)value.getActualInstance()); @@ -179,13 +197,19 @@ public void write(JsonWriter out, Get1099Form200Response value) throws IOExcepti elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `Form1099S` + if (value.getActualInstance() instanceof Form1099S) { + JsonElement element = adapterForm1099S.toJsonTree((Form1099S)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } // check if the actual instance is of the type `Form1099W2` if (value.getActualInstance() instanceof Form1099W2) { JsonElement element = adapterForm1099W2.toJsonTree((Form1099W2)value.getActualInstance()); elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099W2"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2"); } @Override @@ -233,6 +257,30 @@ public Get1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1095C failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1095C'", e); } + // deserialize Form1098 + try { + // validate the JSON object to see if any exception is thrown + Form1098.validateJsonElement(jsonElement); + actualAdapter = adapterForm1098; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1098'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1098 failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1098'", e); + } + // deserialize Form1099C + try { + // validate the JSON object to see if any exception is thrown + Form1099C.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099C; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099C'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099C failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099C'", e); + } // deserialize Form1099Div try { // validate the JSON object to see if any exception is thrown @@ -317,6 +365,18 @@ public Get1099Form200Response read(JsonReader in) throws IOException { errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'Form1099R'", e); } + // deserialize Form1099S + try { + // validate the JSON object to see if any exception is thrown + Form1099S.validateJsonElement(jsonElement); + actualAdapter = adapterForm1099S; + match++; + log.log(Level.FINER, "Input data matches schema 'Form1099S'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format("Deserialization for Form1099S failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'Form1099S'", e); + } // deserialize Form1099W2 try { // validate the JSON object to see if any exception is thrown @@ -358,6 +418,8 @@ public Get1099Form200Response(Object o) { schemas.put("Form1042S", Form1042S.class); schemas.put("Form1095B", Form1095B.class); schemas.put("Form1095C", Form1095C.class); + schemas.put("Form1098", Form1098.class); + schemas.put("Form1099C", Form1099C.class); schemas.put("Form1099Div", Form1099Div.class); schemas.put("Form1099Int", Form1099Int.class); schemas.put("Form1099K", Form1099K.class); @@ -365,6 +427,7 @@ public Get1099Form200Response(Object o) { schemas.put("Form1099Nec", Form1099Nec.class); schemas.put("Form1099Patr", Form1099Patr.class); schemas.put("Form1099R", Form1099R.class); + schemas.put("Form1099S", Form1099S.class); schemas.put("Form1099W2", Form1099W2.class); } @@ -376,7 +439,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099W2 + * Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2 * * It could be an instance of the 'oneOf' schemas. */ @@ -397,6 +460,16 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1098) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof Form1099C) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099Div) { super.setActualInstance(instance); return; @@ -432,19 +505,24 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof Form1099S) { + super.setActualInstance(instance); + return; + } + if (instance instanceof Form1099W2) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099W2"); + throw new RuntimeException("Invalid instance type. Must be Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2"); } /** * Get the actual instance, which can be the following: - * Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099W2 + * Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2 * - * @return The actual instance (Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099W2) + * @return The actual instance (Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2) */ @SuppressWarnings("unchecked") @Override @@ -482,6 +560,26 @@ public Form1095B getForm1095B() throws ClassCastException { public Form1095C getForm1095C() throws ClassCastException { return (Form1095C)super.getActualInstance(); } + /** + * Get the actual instance of `Form1098`. If the actual instance is not `Form1098`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1098` + * @throws ClassCastException if the instance is not `Form1098` + */ + public Form1098 getForm1098() throws ClassCastException { + return (Form1098)super.getActualInstance(); + } + /** + * Get the actual instance of `Form1099C`. If the actual instance is not `Form1099C`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099C` + * @throws ClassCastException if the instance is not `Form1099C` + */ + public Form1099C getForm1099C() throws ClassCastException { + return (Form1099C)super.getActualInstance(); + } /** * Get the actual instance of `Form1099Div`. If the actual instance is not `Form1099Div`, * the ClassCastException will be thrown. @@ -552,6 +650,16 @@ public Form1099Patr getForm1099Patr() throws ClassCastException { public Form1099R getForm1099R() throws ClassCastException { return (Form1099R)super.getActualInstance(); } + /** + * Get the actual instance of `Form1099S`. If the actual instance is not `Form1099S`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `Form1099S` + * @throws ClassCastException if the instance is not `Form1099S` + */ + public Form1099S getForm1099S() throws ClassCastException { + return (Form1099S)super.getActualInstance(); + } /** * Get the actual instance of `Form1099W2`. If the actual instance is not `Form1099W2`, * the ClassCastException will be thrown. @@ -597,6 +705,22 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1095C failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1098 + try { + Form1098.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1098 failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with Form1099C + try { + Form1099C.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099C failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099Div try { Form1099Div.validateJsonElement(jsonElement); @@ -653,6 +777,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format("Deserialization for Form1099R failed with `%s`.", e.getMessage())); // continue to the next one } + // validate the json string with Form1099S + try { + Form1099S.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format("Deserialization for Form1099S failed with `%s`.", e.getMessage())); + // continue to the next one + } // validate the json string with Form1099W2 try { Form1099W2.validateJsonElement(jsonElement); @@ -662,7 +794,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042S, Form1095B, Form1095C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099W2. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format("The JSON string is invalid for Get1099Form200Response with oneOf schemas: Form1042S, Form1095B, Form1095C, Form1098, Form1099C, Form1099Div, Form1099Int, Form1099K, Form1099Misc, Form1099Nec, Form1099Patr, Form1099R, Form1099S, Form1099W2. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } 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 466554b..a8ee895 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IntermediaryOrFlowThrough.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java b/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java index 4c1e00b..c046a37 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IrisFormBase.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; @@ -77,6 +77,10 @@ public enum TypeEnum { _1095_C("1095-C"), + _1098("1098"), + + _1099_C("1099-C"), + _1099_DIV("1099-DIV"), _1099_INT("1099-INT"), @@ -91,6 +95,8 @@ public enum TypeEnum { _1099_R("1099-R"), + _1099_S("1099-S"), + W_2("W-2"); private String value; 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 63a0f14..6c67164 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IrsResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IrsResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 d73925e..fe34d73 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 95e0c7b..953b879 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java index 065967a..acb562e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/IssuerWriteResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 2378039..4ef6613 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/JobResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/JobResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 4653609..211ef77 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/OfferAndCoverage.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelBulkTinMatchResultItemResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelBulkTinMatchResultItemResponse.java new file mode 100644 index 0000000..265fb8e --- /dev/null +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelBulkTinMatchResultItemResponse.java @@ -0,0 +1,301 @@ +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara 1099 & W-9 API Definition + * + * > **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.BulkTinMatchResultItemResponse; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import Avalara.SDK.JSON; + +/** + * Generic paginated model to wrap query response data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class PaginatedQueryResultModelBulkTinMatchResultItemResponse { + public static final String SERIALIZED_NAME_AT_RECORDSET_COUNT = "@recordsetCount"; + @SerializedName(SERIALIZED_NAME_AT_RECORDSET_COUNT) + private Integer atRecordsetCount; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private List value; + + public static final String SERIALIZED_NAME_AT_NEXT_LINK = "@nextLink"; + @SerializedName(SERIALIZED_NAME_AT_NEXT_LINK) + private String atNextLink; + + public PaginatedQueryResultModelBulkTinMatchResultItemResponse() { + } + + public PaginatedQueryResultModelBulkTinMatchResultItemResponse atRecordsetCount(Integer atRecordsetCount) { + this.atRecordsetCount = atRecordsetCount; + return this; + } + + /** + * Get atRecordsetCount + * @return atRecordsetCount + */ + @javax.annotation.Nullable + public Integer getAtRecordsetCount() { + return atRecordsetCount; + } + + public void setAtRecordsetCount(Integer atRecordsetCount) { + this.atRecordsetCount = atRecordsetCount; + } + + + public PaginatedQueryResultModelBulkTinMatchResultItemResponse value(List value) { + this.value = value; + return this; + } + + public PaginatedQueryResultModelBulkTinMatchResultItemResponse addValueItem(BulkTinMatchResultItemResponse valueItem) { + if (this.value == null) { + this.value = new ArrayList<>(); + } + this.value.add(valueItem); + return this; + } + + /** + * Get value + * @return value + */ + @javax.annotation.Nullable + public List getValue() { + return value; + } + + public void setValue(List value) { + this.value = value; + } + + + public PaginatedQueryResultModelBulkTinMatchResultItemResponse atNextLink(String atNextLink) { + this.atNextLink = atNextLink; + return this; + } + + /** + * Get atNextLink + * @return atNextLink + */ + @javax.annotation.Nullable + public String getAtNextLink() { + return atNextLink; + } + + public void setAtNextLink(String atNextLink) { + this.atNextLink = atNextLink; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaginatedQueryResultModelBulkTinMatchResultItemResponse paginatedQueryResultModelBulkTinMatchResultItemResponse = (PaginatedQueryResultModelBulkTinMatchResultItemResponse) o; + return Objects.equals(this.atRecordsetCount, paginatedQueryResultModelBulkTinMatchResultItemResponse.atRecordsetCount) && + Objects.equals(this.value, paginatedQueryResultModelBulkTinMatchResultItemResponse.value) && + Objects.equals(this.atNextLink, paginatedQueryResultModelBulkTinMatchResultItemResponse.atNextLink); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(atRecordsetCount, value, atNextLink); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaginatedQueryResultModelBulkTinMatchResultItemResponse {\n"); + sb.append(" atRecordsetCount: ").append(toIndentedString(atRecordsetCount)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" atNextLink: ").append(toIndentedString(atNextLink)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("@recordsetCount"); + openapiFields.add("value"); + openapiFields.add("@nextLink"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PaginatedQueryResultModelBulkTinMatchResultItemResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PaginatedQueryResultModelBulkTinMatchResultItemResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PaginatedQueryResultModelBulkTinMatchResultItemResponse is not found in the empty JSON string", PaginatedQueryResultModelBulkTinMatchResultItemResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PaginatedQueryResultModelBulkTinMatchResultItemResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginatedQueryResultModelBulkTinMatchResultItemResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) { + JsonArray jsonArrayvalue = jsonObj.getAsJsonArray("value"); + if (jsonArrayvalue != null) { + // ensure the json data is an array + if (!jsonObj.get("value").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `value` to be an array in the JSON string but got `%s`", jsonObj.get("value").toString())); + } + + // validate the optional field `value` (array) + for (int i = 0; i < jsonArrayvalue.size(); i++) { + BulkTinMatchResultItemResponse.validateJsonElement(jsonArrayvalue.get(i)); + }; + } + } + if ((jsonObj.get("@nextLink") != null && !jsonObj.get("@nextLink").isJsonNull()) && !jsonObj.get("@nextLink").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `@nextLink` to be a primitive type in the JSON string but got `%s`", jsonObj.get("@nextLink").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PaginatedQueryResultModelBulkTinMatchResultItemResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PaginatedQueryResultModelBulkTinMatchResultItemResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PaginatedQueryResultModelBulkTinMatchResultItemResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PaginatedQueryResultModelBulkTinMatchResultItemResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PaginatedQueryResultModelBulkTinMatchResultItemResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PaginatedQueryResultModelBulkTinMatchResultItemResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of PaginatedQueryResultModelBulkTinMatchResultItemResponse + * @throws IOException if the JSON string is invalid with respect to PaginatedQueryResultModelBulkTinMatchResultItemResponse + */ + public static PaginatedQueryResultModelBulkTinMatchResultItemResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PaginatedQueryResultModelBulkTinMatchResultItemResponse.class); + } + + /** + * Convert an instance of PaginatedQueryResultModelBulkTinMatchResultItemResponse 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/PaginatedQueryResultModelCompanyResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java index aa589d2..e2eb6d1 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelCompanyResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 5a7f732..9631e67 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelForm1099Base.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 ba68241..b9fede1 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelIssuerResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 cdc540b..e267339 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 77e028c..7bd3d7e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/PrimaryWithholdingAgent.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchIrsResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchIrsResponse.java index 702d116..dc72fa9 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchIrsResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchIrsResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchRequest.java b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchRequest.java index f94b596..282dc30 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; diff --git a/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchResponse.java b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchResponse.java index 9c092b3..6ea7e23 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/RealTimeTinMatchResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 f4805e7..d147672 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateAndLocalWithholding.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 5b09822..508c10e 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/StateEfileStatusDetail.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 4f525c0..bb86ef7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 3083d82..e1c11df 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/SubstantialUsOwnerResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 bcbc71d..f66d732 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/TinMatchStatusResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/TinMatchStatusResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 370e632..e342321 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/ValidationError.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 aa8c927..b2476c1 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormMinimalRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 58ac9ab..c33e444 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 84c64b3..ee478b7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W4FormResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 516fd13..5824ba7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormMinimalRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 e95a25c..1cd31d9 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 8025120..6553c4a 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenEFormResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 3e0e835..d3b8f5c 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormMinimalRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 9255e5a..75f05ae 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 f1fb116..c8c9bff 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8BenFormResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 dbcfe25..7386443 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormMinimalRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 f19ab69..f875246 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 13e6848..504c8c5 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W8ImyFormResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 1f567b7..2c53e42 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseMinimalRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 4e76513..7539d8f 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 b0b6318..1c0e971 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormBaseResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 21335b1..c19e0e7 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormMinimalRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 57d8511..b8fc875 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormRequest.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; 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 183680b..26fa51b 100644 --- a/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java +++ b/src/main/java/Avalara/SDK/model/A1099/V2/W9FormResponse.java @@ -1,20 +1,20 @@ -/* - * 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 +/* + * 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; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Address.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Address.java index 45009db..db9f14c 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Address.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Address.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchErrorDetail.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchErrorDetail.java index 35676fa..8a23c3f 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchErrorDetail.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchErrorDetail.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearchParticipants202Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearchParticipants202Response.java index a50e27e..1c97d79 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearchParticipants202Response.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/BatchSearchParticipants202Response.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListListResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListListResponse.java index 6359e02..52053e0 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListListResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListListResponse.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListResponse.java index 3714ca6..336a3b6 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListResponse.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListSummary.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListSummary.java index a3c4b79..4840729 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListSummary.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListSummary.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListValue.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListValue.java index b686cea..3d11016 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListValue.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListValue.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListVersion.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListVersion.java index d14d695..b430fc2 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListVersion.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CodeListVersion.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Consents.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Consents.java index 5b73386..9b970e5 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Consents.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Consents.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartner201Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartner201Response.java index a8adc74..3735d7b 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartner201Response.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartner201Response.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200Response.java index 9ced9d8..0bd0d0f 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200Response.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200Response.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.java index 1b10eb9..31c8de2 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatch200ResponseValueInner.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatchRequest.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatchRequest.java index 99f936d..0302751 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatchRequest.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/CreateTradingPartnersBatchRequest.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventId.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventId.java index fb1ca29..ab06611 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventId.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventId.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventMessage.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventMessage.java index bbe9d63..5edb5a6 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventMessage.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventMessage.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventPayload.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventPayload.java index 769daed..e7784cd 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventPayload.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventPayload.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventSubscription.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventSubscription.java index 50750b6..570bdec 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventSubscription.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/EventSubscription.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Extension.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Extension.java index 73b7548..203647b 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Extension.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Extension.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignature.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignature.java index edf69d8..89d694d 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignature.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignature.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignatureValue.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignatureValue.java index 5df8bb2..0512173 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignatureValue.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/HmacSignatureValue.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Id.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Id.java index 59ffd23..85fe240 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Id.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Id.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Identifier.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Identifier.java index 01d85c0..cc8e099 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Identifier.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Identifier.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/OutputDataFormats.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/OutputDataFormats.java index e5e1367..32906ff 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/OutputDataFormats.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/OutputDataFormats.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Pagination.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Pagination.java index 6a1838f..1a2d9ac 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Pagination.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Pagination.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportDownloadResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportDownloadResponse.java index 6b30d33..2b30e5c 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportDownloadResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportDownloadResponse.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportItem.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportItem.java index 44da00d..93f098f 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportItem.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportItem.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportListResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportListResponse.java index 7e92853..bc5169d 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportListResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ReportListResponse.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SearchParticipants200Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SearchParticipants200Response.java index f0b028d..bc69e56 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SearchParticipants200Response.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SearchParticipants200Response.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Signature.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Signature.java index 46134df..ea4defb 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/Signature.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/Signature.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureSignature.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureSignature.java index 9f28795..b6a741a 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureSignature.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureSignature.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValue.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValue.java index 82a008d..035ae62 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValue.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValue.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValueSignature.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValueSignature.java index ea90b62..60afc6f 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValueSignature.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SignatureValueSignature.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionCommon.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionCommon.java index 3a0595e..d036c43 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionCommon.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionCommon.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionDetail.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionDetail.java index f548abf..7d66740 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionDetail.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionDetail.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionListResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionListResponse.java index adfbf15..a3e34c7 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionListResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionListResponse.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionRegistration.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionRegistration.java index 7b00cc5..2403b9c 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionRegistration.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SubscriptionRegistration.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SuccessResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SuccessResponse.java index ff1b1bb..d8fe385 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SuccessResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SuccessResponse.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentStatuses.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentStatuses.java index a14db57..267d648 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentStatuses.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentStatuses.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentTypes.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentTypes.java index 27334ba..1cfbeea 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentTypes.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/SupportedDocumentTypes.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierRequest.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierRequest.java index eb4e050..6d0dfbd 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierRequest.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierRequest.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponse.java index 0150bb4..42fab58 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponse.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponseValue.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponseValue.java index 821d84f..0172217 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponseValue.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierResponseValue.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.java index 0c5631b..e0231b9 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TaxIdentifierSchemaByCountry200Response.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TradingPartner.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TradingPartner.java index 0fdd91b..5285a2f 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/TradingPartner.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/TradingPartner.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/UpdateTradingPartner200Response.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/UpdateTradingPartner200Response.java index 0aa6b05..05607a3 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/UpdateTradingPartner200Response.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/UpdateTradingPartner200Response.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ValidationError.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ValidationError.java index 412e891..6f0e76d 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/ValidationError.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/ValidationError.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhookInvocation.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhookInvocation.java index 25eb07d..78d7b52 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhookInvocation.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhookInvocation.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorInfo.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorInfo.java index 74bd82d..00ec486 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorInfo.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorInfo.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1; diff --git a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorResponse.java b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorResponse.java index b08a96a..1e4d2fc 100644 --- a/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorResponse.java +++ b/src/main/java/Avalara/SDK/model/EInvoicing/V1/WebhooksErrorResponse.java @@ -1,20 +1,20 @@ -/* - * AvaTax Software Development Kit for Java (JRE) - * - * (c) 2004-2025 Avalara, Inc. - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - * - * Avalara E-Invoicing API - * - * An API that supports sending data for an E-Invoicing compliance use-case. - * - * @author Sachin Baijal - * @author Jonathan Wenger - * @copyright 2004-2025 Avalara, Inc. - * @license https://www.apache.org/licenses/LICENSE-2.0 - * @link https://github.com/avadev/Avalara-SDK-Java +/* + * AvaTax Software Development Kit for Java (JRE) + * + * (c) 2004-2025 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * Avalara E-Invoicing API + * + * An API that supports sending data for an E-Invoicing compliance use-case. + * + * @author Sachin Baijal + * @author Jonathan Wenger + * @copyright 2004-2025 Avalara, Inc. + * @license https://www.apache.org/licenses/LICENSE-2.0 + * @link https://github.com/avadev/Avalara-SDK-Java */ package Avalara.SDK.model.EInvoicing.V1;