diff --git a/Gemfile.lock b/Gemfile.lock index 021af73..0aa2d00 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - avalara_sdk (25.8.0) + avalara_sdk (25.8.1) faraday (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index a6bf23a..00629d3 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,7 @@ Class | Method | HTTP request | Description - [models.CompanyModel](docs/A1099/V2/CompanyModel.md) - [models.CompanyResponse](docs/A1099/V2/CompanyResponse.md) - [models.CompanyResponseModel](docs/A1099/V2/CompanyResponseModel.md) + - [models.CoveredIndividualReference](docs/A1099/V2/CoveredIndividualReference.md) - [models.CoveredIndividualReferenceResponse](docs/A1099/V2/CoveredIndividualReferenceResponse.md) - [models.CoveredIndividualRequest](docs/A1099/V2/CoveredIndividualRequest.md) - [models.Create1099Form201Response](docs/A1099/V2/Create1099Form201Response.md) @@ -207,24 +208,36 @@ Class | Method | HTTP request | Description - [models.Data](docs/A1099/V2/Data.md) - [models.ErrorModel](docs/A1099/V2/ErrorModel.md) - [models.ErrorResponse](docs/A1099/V2/ErrorResponse.md) - - [models.ErrorResponseErrorsInner](docs/A1099/V2/ErrorResponseErrorsInner.md) + - [models.ErrorResponseItem](docs/A1099/V2/ErrorResponseItem.md) + - [models.Form1042S](docs/A1099/V2/Form1042S.md) - [models.Form1042SList](docs/A1099/V2/Form1042SList.md) - [models.Form1042SListItem](docs/A1099/V2/Form1042SListItem.md) - [models.Form1042SListItemResponse](docs/A1099/V2/Form1042SListItemResponse.md) - [models.Form1042SRequest](docs/A1099/V2/Form1042SRequest.md) - [models.Form1042SResponse](docs/A1099/V2/Form1042SResponse.md) + - [models.Form1095B](docs/A1099/V2/Form1095B.md) - [models.Form1095BList](docs/A1099/V2/Form1095BList.md) - [models.Form1095BListItem](docs/A1099/V2/Form1095BListItem.md) - [models.Form1095BListItemResponse](docs/A1099/V2/Form1095BListItemResponse.md) - [models.Form1095BRequest](docs/A1099/V2/Form1095BRequest.md) + - [models.Form1095BResponse](docs/A1099/V2/Form1095BResponse.md) - [models.Form1095CList](docs/A1099/V2/Form1095CList.md) - [models.Form1095CListItem](docs/A1099/V2/Form1095CListItem.md) + - [models.Form1099Base](docs/A1099/V2/Form1099Base.md) - [models.Form1099BaseResponse](docs/A1099/V2/Form1099BaseResponse.md) + - [models.Form1099Div](docs/A1099/V2/Form1099Div.md) - [models.Form1099DivList](docs/A1099/V2/Form1099DivList.md) - [models.Form1099DivListItem](docs/A1099/V2/Form1099DivListItem.md) - [models.Form1099DivListItemResponse](docs/A1099/V2/Form1099DivListItemResponse.md) - [models.Form1099DivRequest](docs/A1099/V2/Form1099DivRequest.md) - [models.Form1099DivResponse](docs/A1099/V2/Form1099DivResponse.md) + - [models.Form1099Int](docs/A1099/V2/Form1099Int.md) + - [models.Form1099IntList](docs/A1099/V2/Form1099IntList.md) + - [models.Form1099IntListItem](docs/A1099/V2/Form1099IntListItem.md) + - [models.Form1099IntListItemResponse](docs/A1099/V2/Form1099IntListItemResponse.md) + - [models.Form1099IntRequest](docs/A1099/V2/Form1099IntRequest.md) + - [models.Form1099IntResponse](docs/A1099/V2/Form1099IntResponse.md) + - [models.Form1099K](docs/A1099/V2/Form1099K.md) - [models.Form1099KList](docs/A1099/V2/Form1099KList.md) - [models.Form1099KListItem](docs/A1099/V2/Form1099KListItem.md) - [models.Form1099KListItemResponse](docs/A1099/V2/Form1099KListItemResponse.md) @@ -232,30 +245,36 @@ Class | Method | HTTP request | Description - [models.Form1099KResponse](docs/A1099/V2/Form1099KResponse.md) - [models.Form1099ListResponse](docs/A1099/V2/Form1099ListResponse.md) - [models.Form1099ListResponseValueInner](docs/A1099/V2/Form1099ListResponseValueInner.md) + - [models.Form1099Misc](docs/A1099/V2/Form1099Misc.md) - [models.Form1099MiscList](docs/A1099/V2/Form1099MiscList.md) - [models.Form1099MiscListItem](docs/A1099/V2/Form1099MiscListItem.md) - [models.Form1099MiscListItemResponse](docs/A1099/V2/Form1099MiscListItemResponse.md) - [models.Form1099MiscRequest](docs/A1099/V2/Form1099MiscRequest.md) - [models.Form1099MiscResponse](docs/A1099/V2/Form1099MiscResponse.md) + - [models.Form1099Nec](docs/A1099/V2/Form1099Nec.md) - [models.Form1099NecList](docs/A1099/V2/Form1099NecList.md) - [models.Form1099NecListItem](docs/A1099/V2/Form1099NecListItem.md) - [models.Form1099NecListItemResponse](docs/A1099/V2/Form1099NecListItemResponse.md) - [models.Form1099NecRequest](docs/A1099/V2/Form1099NecRequest.md) - [models.Form1099NecResponse](docs/A1099/V2/Form1099NecResponse.md) - [models.Form1099ProccessResult](docs/A1099/V2/Form1099ProccessResult.md) + - [models.Form1099ProccessResultProcessedFormsInner](docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md) + - [models.Form1099R](docs/A1099/V2/Form1099R.md) - [models.Form1099RList](docs/A1099/V2/Form1099RList.md) - [models.Form1099RListItem](docs/A1099/V2/Form1099RListItem.md) - [models.Form1099RListItemResponse](docs/A1099/V2/Form1099RListItemResponse.md) - [models.Form1099RRequest](docs/A1099/V2/Form1099RRequest.md) + - [models.Form1099RResponse](docs/A1099/V2/Form1099RResponse.md) + - [models.Form1099StatusDetail](docs/A1099/V2/Form1099StatusDetail.md) - [models.FormRequestBase](docs/A1099/V2/FormRequestBase.md) - [models.FormRequestListItemBase](docs/A1099/V2/FormRequestListItemBase.md) - [models.FormResponseBase](docs/A1099/V2/FormResponseBase.md) - [models.FormSingleRequestBase](docs/A1099/V2/FormSingleRequestBase.md) - [models.Get1099Form200Response](docs/A1099/V2/Get1099Form200Response.md) - - [models.HttpValidationProblemDetails](docs/A1099/V2/HttpValidationProblemDetails.md) - [models.ICreateForm1099Request](docs/A1099/V2/ICreateForm1099Request.md) - [models.IUpdateForm1099Request](docs/A1099/V2/IUpdateForm1099Request.md) - [models.IW9FormDataModelsOneOf](docs/A1099/V2/IW9FormDataModelsOneOf.md) + - [models.IncludedBase](docs/A1099/V2/IncludedBase.md) - [models.IntermediaryOrFlowThrough](docs/A1099/V2/IntermediaryOrFlowThrough.md) - [models.IntermediaryOrFlowThroughRequest](docs/A1099/V2/IntermediaryOrFlowThroughRequest.md) - [models.IntermediaryOrFlowThroughResponse](docs/A1099/V2/IntermediaryOrFlowThroughResponse.md) @@ -265,22 +284,23 @@ Class | Method | HTTP request | Description - [models.JobResult](docs/A1099/V2/JobResult.md) - [models.Link](docs/A1099/V2/Link.md) - [models.OfferAndCoverageRequest](docs/A1099/V2/OfferAndCoverageRequest.md) - - [models.PaginatedQueryResultModel](docs/A1099/V2/PaginatedQueryResultModel.md) - [models.PaginatedQueryResultModelCompanyResponse](docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md) - [models.PaginatedQueryResultModelIssuerResponse](docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md) - - [models.PaginatedW9FormsModel](docs/A1099/V2/PaginatedW9FormsModel.md) + - [models.PaginatedQueryResultModelW9FormBaseResponse](docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md) - [models.PrimaryWithholdingAgent](docs/A1099/V2/PrimaryWithholdingAgent.md) - [models.PrimaryWithholdingAgentRequest](docs/A1099/V2/PrimaryWithholdingAgentRequest.md) - [models.PrimaryWithholdingAgentResponse](docs/A1099/V2/PrimaryWithholdingAgentResponse.md) - - [models.ProblemDetails](docs/A1099/V2/ProblemDetails.md) + - [models.StateAndLocalWithholding](docs/A1099/V2/StateAndLocalWithholding.md) - [models.StateAndLocalWithholdingRequest](docs/A1099/V2/StateAndLocalWithholdingRequest.md) - [models.StateAndLocalWithholdingResponse](docs/A1099/V2/StateAndLocalWithholdingResponse.md) + - [models.StateEfileStatusDetail](docs/A1099/V2/StateEfileStatusDetail.md) - [models.StateEfileStatusDetailResponse](docs/A1099/V2/StateEfileStatusDetailResponse.md) - [models.StatusDetail](docs/A1099/V2/StatusDetail.md) - [models.SubstantialUsOwnerRequest](docs/A1099/V2/SubstantialUsOwnerRequest.md) - [models.SubstantialUsOwnerResponse](docs/A1099/V2/SubstantialUsOwnerResponse.md) - [models.TinMatchStatusResponse](docs/A1099/V2/TinMatchStatusResponse.md) - [models.Update1099Form200Response](docs/A1099/V2/Update1099Form200Response.md) + - [models.ValidationError](docs/A1099/V2/ValidationError.md) - [models.ValidationErrorResponse](docs/A1099/V2/ValidationErrorResponse.md) - [models.W4FormDataModel](docs/A1099/V2/W4FormDataModel.md) - [models.W4FormRequest](docs/A1099/V2/W4FormRequest.md) diff --git a/docs/A1099/V2/BulkUpsert1099FormsRequest.md b/docs/A1099/V2/BulkUpsert1099FormsRequest.md index f80aebc..4f3b1db 100644 --- a/docs/A1099/V2/BulkUpsert1099FormsRequest.md +++ b/docs/A1099/V2/BulkUpsert1099FormsRequest.md @@ -18,6 +18,7 @@ AvalaraSdk::A1099::V2::BulkUpsert1099FormsRequest.openapi_one_of # :'Form1095BList', # :'Form1095CList', # :'Form1099DivList', +# :'Form1099IntList', # :'Form1099KList', # :'Form1099MiscList', # :'Form1099NecList', @@ -53,6 +54,7 @@ AvalaraSdk::A1099::V2::BulkUpsert1099FormsRequest.build(data_that_doesnt_match) - `Form1095BList` - `Form1095CList` - `Form1099DivList` +- `Form1099IntList` - `Form1099KList` - `Form1099MiscList` - `Form1099NecList` diff --git a/docs/A1099/V2/CompaniesW9Api.md b/docs/A1099/V2/CompaniesW9Api.md index e66f0ef..a0f3d99 100644 --- a/docs/A1099/V2/CompaniesW9Api.md +++ b/docs/A1099/V2/CompaniesW9Api.md @@ -39,7 +39,7 @@ api_instance = AvalaraSdk::A1099::V2::CompaniesW9Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '097506be-b40b-4107-8d62-206070d11548', # String | Unique correlation Id in a GUID format + x_correlation_id: '5ba3a8b6-bf05-4aaa-b8cb-d06c7cfea0f7', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . company_create_update_request_model: AvalaraSdk::A1099::V2::CompanyCreateUpdateRequestModel.new # CompanyCreateUpdateRequestModel | The company to create } @@ -123,7 +123,7 @@ api_instance = AvalaraSdk::A1099::V2::CompaniesW9Api.new api_client id = 'id_example' # String | The company to delete avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '3af2abb1-7024-4cc7-9c52-53e793e1c863', # String | Unique correlation Id in a GUID format + x_correlation_id: '07a8ecdb-0465-469d-8bff-49fce135d5e4', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -210,7 +210,7 @@ opts = { order_by: 'order_by_example', # String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. count: true, # Boolean | If true, return the global count of elements in the collection. count_only: true, # Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - x_correlation_id: 'bbe9eb96-736f-4c5c-99d7-9df8f66819b3', # String | Unique correlation Id in a GUID format + x_correlation_id: 'f047fdc5-a6e4-4290-8c5c-d4da96ad0699', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -298,7 +298,7 @@ api_instance = AvalaraSdk::A1099::V2::CompaniesW9Api.new api_client id = 'id_example' # String | Id of the company avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'e6013371-7d72-4c3d-8a5f-c4e08177c3ae', # String | Unique correlation Id in a GUID format + x_correlation_id: '3f7b5971-06e7-4459-84af-61db7fdcb027', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -381,7 +381,7 @@ api_instance = AvalaraSdk::A1099::V2::CompaniesW9Api.new api_client id = 'id_example' # String | The ID of the company to update avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'd8a0cb91-eb8b-4bd6-8812-2b690995afcc', # String | Unique correlation Id in a GUID format + x_correlation_id: '1cd32062-b0bc-46a0-8311-a973b8fb3d56', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . company_create_update_request_model: AvalaraSdk::A1099::V2::CompanyCreateUpdateRequestModel.new # CompanyCreateUpdateRequestModel | The updated company data } diff --git a/docs/A1099/V2/Create1099Form201Response.md b/docs/A1099/V2/Create1099Form201Response.md index 1567dc6..1a21d5b 100644 --- a/docs/A1099/V2/Create1099Form201Response.md +++ b/docs/A1099/V2/Create1099Form201Response.md @@ -18,6 +18,7 @@ AvalaraSdk::A1099::V2::Create1099Form201Response.openapi_one_of # :'Form1095BListItemResponse', # :'Form1099BaseResponse', # :'Form1099DivListItemResponse', +# :'Form1099IntListItemResponse', # :'Form1099KListItemResponse', # :'Form1099MiscListItemResponse', # :'Form1099NecListItemResponse', @@ -53,6 +54,7 @@ AvalaraSdk::A1099::V2::Create1099Form201Response.build(data_that_doesnt_match) - `Form1095BListItemResponse` - `Form1099BaseResponse` - `Form1099DivListItemResponse` +- `Form1099IntListItemResponse` - `Form1099KListItemResponse` - `Form1099MiscListItemResponse` - `Form1099NecListItemResponse` diff --git a/docs/A1099/V2/ErrorResponse.md b/docs/A1099/V2/ErrorResponse.md index 9b02c61..31fa425 100644 --- a/docs/A1099/V2/ErrorResponse.md +++ b/docs/A1099/V2/ErrorResponse.md @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **title** | **String** | | [optional] | -| **errors** | [**Array<ErrorResponseErrorsInner>**](ErrorResponseErrorsInner.md) | | [optional] | +| **errors** | [**Array<ErrorResponseItem>**](ErrorResponseItem.md) | | [optional] | ## Example diff --git a/docs/A1099/V2/ErrorResponseItem.md b/docs/A1099/V2/ErrorResponseItem.md new file mode 100644 index 0000000..5216d6b --- /dev/null +++ b/docs/A1099/V2/ErrorResponseItem.md @@ -0,0 +1,20 @@ +# AvalaraSdk::A1099::V2::ErrorResponseItem + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **detail** | **String** | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::ErrorResponseItem.new( + type: null, + detail: null +) +``` + diff --git a/docs/A1099/V2/Form1042S.md b/docs/A1099/V2/Form1042S.md new file mode 100644 index 0000000..d342a1a --- /dev/null +++ b/docs/A1099/V2/Form1042S.md @@ -0,0 +1,140 @@ +# AvalaraSdk::A1099::V2::Form1042S + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **unique_form_id** | **String** | | [optional] | +| **recipient_date_of_birth** | **Time** | | [optional] | +| **recipient_giin** | **String** | | [optional] | +| **recipient_foreign_tin** | **String** | | [optional] | +| **lob_code** | **String** | | [optional] | +| **income_code** | **String** | | [optional] | +| **gross_income** | **Float** | | [optional] | +| **withholding_indicator** | **String** | | [optional] | +| **tax_country_code** | **String** | | [optional] | +| **exemption_code_chap3** | **String** | | [optional] | +| **exemption_code_chap4** | **String** | | [optional] | +| **tax_rate_chap3** | **String** | | [optional] | +| **withholding_allowance** | **Float** | | [optional] | +| **federal_tax_withheld** | **Float** | | [optional] | +| **tax_not_deposited_indicator** | **Boolean** | | [optional] | +| **academic_indicator** | **Boolean** | | [optional] | +| **tax_withheld_other_agents** | **Float** | | [optional] | +| **amount_repaid** | **Float** | | [optional] | +| **tax_paid_agent** | **Float** | | [optional] | +| **chap3_status_code** | **String** | | [optional] | +| **chap4_status_code** | **String** | | [optional] | +| **primary_withholding_agent** | [**PrimaryWithholdingAgent**](PrimaryWithholdingAgent.md) | | [optional] | +| **intermediary_or_flow_through** | [**IntermediaryOrFlowThrough**](IntermediaryOrFlowThrough.md) | | [optional] | +| **id** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **issuer_id** | **Integer** | | [optional] | +| **issuer_reference_id** | **String** | | [optional] | +| **issuer_tin** | **String** | | [optional] | +| **tax_year** | **Integer** | | [optional] | +| **federal_efile** | **Boolean** | | [optional] | +| **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **state_efile** | **Boolean** | | [optional] | +| **state_efile_status** | [**Array<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | +| **postal_mail** | **Boolean** | | [optional] | +| **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **tin_match** | **Boolean** | | [optional] | +| **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **address_verification** | **Boolean** | | [optional] | +| **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **reference_id** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **tin_type** | **String** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | +| **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | +| **recipient_name** | **String** | | [optional] | +| **recipient_second_name** | **String** | | [optional] | +| **address** | **String** | | [optional] | +| **address2** | **String** | | [optional] | +| **city** | **String** | | [optional] | +| **state** | **String** | | [optional] | +| **zip** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | +| **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | +| **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | +| **created_at** | **Time** | | [optional] | +| **updated_at** | **Time** | | [optional] | +| **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1042S.new( + unique_form_id: null, + recipient_date_of_birth: null, + recipient_giin: null, + recipient_foreign_tin: null, + lob_code: null, + income_code: null, + gross_income: null, + withholding_indicator: null, + tax_country_code: null, + exemption_code_chap3: null, + exemption_code_chap4: null, + tax_rate_chap3: null, + withholding_allowance: null, + federal_tax_withheld: null, + tax_not_deposited_indicator: null, + academic_indicator: null, + tax_withheld_other_agents: null, + amount_repaid: null, + tax_paid_agent: null, + chap3_status_code: null, + chap4_status_code: null, + primary_withholding_agent: null, + intermediary_or_flow_through: null, + id: null, + type: null, + issuer_id: null, + issuer_reference_id: null, + issuer_tin: null, + tax_year: null, + federal_efile: null, + federal_efile_status: null, + state_efile: null, + state_efile_status: null, + postal_mail: null, + postal_mail_status: null, + tin_match: null, + tin_match_status: null, + address_verification: null, + address_verification_status: null, + e_delivery_status: null, + reference_id: null, + email: null, + tin_type: null, + fatca_filing_requirement: null, + tin: null, + no_tin: null, + second_tin_notice: null, + recipient_name: null, + recipient_second_name: null, + address: null, + address2: null, + city: null, + state: null, + zip: null, + non_us_province: null, + country_code: null, + account_number: null, + office_code: null, + validation_errors: null, + created_at: null, + updated_at: null, + state_and_local_withholding: null +) +``` + diff --git a/docs/A1099/V2/Form1042SListItem.md b/docs/A1099/V2/Form1042SListItem.md index b50b437..39570d0 100644 --- a/docs/A1099/V2/Form1042SListItem.md +++ b/docs/A1099/V2/Form1042SListItem.md @@ -34,21 +34,22 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -103,6 +104,7 @@ instance = AvalaraSdk::A1099::V2::Form1042SListItem.new( state_e_file: null, tin_match: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Form1042SListItemResponse.md b/docs/A1099/V2/Form1042SListItemResponse.md index 8767251..8e93276 100644 --- a/docs/A1099/V2/Form1042SListItemResponse.md +++ b/docs/A1099/V2/Form1042SListItemResponse.md @@ -132,8 +132,8 @@ instance = AvalaraSdk::A1099::V2::Form1042SListItemResponse.new( office_code: null, fatca_filing_requirement: null, validation_errors: null, - created_at: 2025-07-31T02:07:40.939073500Z, - updated_at: 2025-07-31T02:07:40.939074300Z, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, state_and_local_withholding: null ) ``` diff --git a/docs/A1099/V2/Form1042SRequest.md b/docs/A1099/V2/Form1042SRequest.md index e28ae44..a318135 100644 --- a/docs/A1099/V2/Form1042SRequest.md +++ b/docs/A1099/V2/Form1042SRequest.md @@ -35,22 +35,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | ## Example @@ -106,6 +107,7 @@ instance = AvalaraSdk::A1099::V2::Form1042SRequest.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null ) ``` diff --git a/docs/A1099/V2/Form1095B.md b/docs/A1099/V2/Form1095B.md index e849906..c302dd4 100644 --- a/docs/A1099/V2/Form1095B.md +++ b/docs/A1099/V2/Form1095B.md @@ -22,10 +22,14 @@ | **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **address_verification** | **Boolean** | | [optional] | | **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **reference_id** | **String** | | [optional] | | **email** | **String** | | [optional] | | **tin_type** | **String** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | | **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | | **recipient_name** | **String** | | [optional] | | **recipient_second_name** | **String** | | [optional] | | **address** | **String** | | [optional] | @@ -33,8 +37,10 @@ | **city** | **String** | | [optional] | | **state** | **String** | | [optional] | | **zip** | **String** | | [optional] | -| **foreign_province** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | | **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | | **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | | **created_at** | **Time** | | [optional] | | **updated_at** | **Time** | | [optional] | @@ -64,10 +70,14 @@ instance = AvalaraSdk::A1099::V2::Form1095B.new( tin_match_status: null, address_verification: null, address_verification_status: null, + e_delivery_status: null, reference_id: null, email: null, tin_type: null, + fatca_filing_requirement: null, tin: null, + no_tin: null, + second_tin_notice: null, recipient_name: null, recipient_second_name: null, address: null, @@ -75,8 +85,10 @@ instance = AvalaraSdk::A1099::V2::Form1095B.new( city: null, state: null, zip: null, - foreign_province: null, + non_us_province: null, country_code: null, + account_number: null, + office_code: null, validation_errors: null, created_at: null, updated_at: null, diff --git a/docs/A1099/V2/Form1095BListItem.md b/docs/A1099/V2/Form1095BListItem.md index b13c93a..e6d0be3 100644 --- a/docs/A1099/V2/Form1095BListItem.md +++ b/docs/A1099/V2/Form1095BListItem.md @@ -17,22 +17,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -71,6 +72,7 @@ instance = AvalaraSdk::A1099::V2::Form1095BListItem.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Form1095BListItemResponse.md b/docs/A1099/V2/Form1095BListItemResponse.md index d943eec..f657f2b 100644 --- a/docs/A1099/V2/Form1095BListItemResponse.md +++ b/docs/A1099/V2/Form1095BListItemResponse.md @@ -90,8 +90,8 @@ instance = AvalaraSdk::A1099::V2::Form1095BListItemResponse.new( office_code: null, fatca_filing_requirement: null, validation_errors: null, - created_at: 2025-07-31T02:07:40.939073500Z, - updated_at: 2025-07-31T02:07:40.939074300Z, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, state_and_local_withholding: null ) ``` diff --git a/docs/A1099/V2/Form1095BRequest.md b/docs/A1099/V2/Form1095BRequest.md index 9c0e1fd..556a73b 100644 --- a/docs/A1099/V2/Form1095BRequest.md +++ b/docs/A1099/V2/Form1095BRequest.md @@ -18,22 +18,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -73,6 +74,7 @@ instance = AvalaraSdk::A1099::V2::Form1095BRequest.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Form1095BResponse.md b/docs/A1099/V2/Form1095BResponse.md new file mode 100644 index 0000000..60437fb --- /dev/null +++ b/docs/A1099/V2/Form1095BResponse.md @@ -0,0 +1,106 @@ +# AvalaraSdk::A1099::V2::Form1095BResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **employee_first_name** | **String** | | [optional] | +| **employee_middle_name** | **String** | | [optional] | +| **employee_last_name** | **String** | | [optional] | +| **employee_name_suffix** | **String** | | [optional] | +| **employee_date_of_birth** | **Time** | | [optional] | +| **origin_of_health_coverage_code** | **String** | | [optional] | +| **covered_individuals** | [**Array<CoveredIndividualRequest>**](CoveredIndividualRequest.md) | | [optional] | +| **type** | **String** | | [optional][readonly] | +| **created_at** | **Time** | | [optional] | +| **updated_at** | **Time** | | [optional] | +| **state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | +| **tin_type** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **issuer_id** | **String** | | [optional] | +| **issuer_reference_id** | **String** | | [optional] | +| **issuer_tin** | **String** | | [optional] | +| **tax_year** | **Integer** | | [optional] | +| **reference_id** | **String** | | [optional] | +| **recipient_name** | **String** | | [optional] | +| **recipient_tin** | **String** | | [optional] | +| **recipient_second_name** | **String** | | [optional] | +| **address** | **String** | | [optional] | +| **address2** | **String** | | [optional] | +| **city** | **String** | | [optional] | +| **state** | **String** | | [optional] | +| **zip** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | +| **country_code** | **String** | | [optional] | +| **federal_e_file** | **Boolean** | | [optional] | +| **postal_mail** | **Boolean** | | [optional] | +| **state_e_file** | **Boolean** | | [optional] | +| **tin_match** | **Boolean** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | +| **address_verification** | **Boolean** | | [optional] | +| **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **state_efile_status** | [**Array<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | | [optional] | +| **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **validation_errors** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1095BResponse.new( + employee_first_name: null, + employee_middle_name: null, + employee_last_name: null, + employee_name_suffix: null, + employee_date_of_birth: null, + origin_of_health_coverage_code: A, + covered_individuals: null, + type: 1099-NEC, + created_at: null, + updated_at: null, + state_and_local_withholding: null, + tin_type: EIN, + id: null, + issuer_id: null, + issuer_reference_id: null, + issuer_tin: null, + tax_year: null, + reference_id: null, + recipient_name: null, + recipient_tin: null, + recipient_second_name: null, + address: null, + address2: null, + city: null, + state: null, + zip: null, + email: null, + account_number: null, + office_code: null, + non_us_province: null, + country_code: null, + federal_e_file: null, + postal_mail: null, + state_e_file: null, + tin_match: null, + no_tin: null, + second_tin_notice: null, + address_verification: null, + federal_efile_status: null, + e_delivery_status: null, + state_efile_status: null, + postal_mail_status: null, + tin_match_status: null, + address_verification_status: null, + validation_errors: null +) +``` + diff --git a/docs/A1099/V2/Form1095CListItem.md b/docs/A1099/V2/Form1095CListItem.md index 0595f14..6c4cd60 100644 --- a/docs/A1099/V2/Form1095CListItem.md +++ b/docs/A1099/V2/Form1095CListItem.md @@ -22,22 +22,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -81,6 +82,7 @@ instance = AvalaraSdk::A1099::V2::Form1095CListItem.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Form1099Base.md b/docs/A1099/V2/Form1099Base.md index e36ce67..300d320 100644 --- a/docs/A1099/V2/Form1099Base.md +++ b/docs/A1099/V2/Form1099Base.md @@ -20,10 +20,14 @@ | **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **address_verification** | **Boolean** | | [optional] | | **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **reference_id** | **String** | | [optional] | | **email** | **String** | | [optional] | | **tin_type** | **String** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | | **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | | **recipient_name** | **String** | | [optional] | | **recipient_second_name** | **String** | | [optional] | | **address** | **String** | | [optional] | @@ -31,8 +35,10 @@ | **city** | **String** | | [optional] | | **state** | **String** | | [optional] | | **zip** | **String** | | [optional] | -| **foreign_province** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | | **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | | **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | | **created_at** | **Time** | | [optional] | | **updated_at** | **Time** | | [optional] | @@ -60,10 +66,14 @@ instance = AvalaraSdk::A1099::V2::Form1099Base.new( tin_match_status: null, address_verification: null, address_verification_status: null, + e_delivery_status: null, reference_id: null, email: null, tin_type: null, + fatca_filing_requirement: null, tin: null, + no_tin: null, + second_tin_notice: null, recipient_name: null, recipient_second_name: null, address: null, @@ -71,8 +81,10 @@ instance = AvalaraSdk::A1099::V2::Form1099Base.new( city: null, state: null, zip: null, - foreign_province: null, + non_us_province: null, country_code: null, + account_number: null, + office_code: null, validation_errors: null, created_at: null, updated_at: null, diff --git a/docs/A1099/V2/Form1099BaseResponse.md b/docs/A1099/V2/Form1099BaseResponse.md index 419eac8..e903786 100644 --- a/docs/A1099/V2/Form1099BaseResponse.md +++ b/docs/A1099/V2/Form1099BaseResponse.md @@ -86,8 +86,8 @@ instance = AvalaraSdk::A1099::V2::Form1099BaseResponse.new( office_code: null, fatca_filing_requirement: null, validation_errors: null, - created_at: 2025-07-31T02:07:40.939073500Z, - updated_at: 2025-07-31T02:07:40.939074300Z, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, state_and_local_withholding: null ) ``` diff --git a/docs/A1099/V2/Form1099Div.md b/docs/A1099/V2/Form1099Div.md new file mode 100644 index 0000000..4e1176b --- /dev/null +++ b/docs/A1099/V2/Form1099Div.md @@ -0,0 +1,130 @@ +# AvalaraSdk::A1099::V2::Form1099Div + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **total_ordinary_dividends** | **Float** | | [optional] | +| **qualified_dividends** | **Float** | | [optional] | +| **total_capital_gain_distributions** | **Float** | | [optional] | +| **unrecaptured_section1250_gain** | **Float** | | [optional] | +| **section1202_gain** | **Float** | | [optional] | +| **collectibles_gain** | **Float** | | [optional] | +| **section897_ordinary_dividends** | **Float** | | [optional] | +| **section897_capital_gain** | **Float** | | [optional] | +| **nondividend_distributions** | **Float** | | [optional] | +| **federal_income_tax_withheld** | **Float** | | [optional] | +| **section199_a_dividends** | **Float** | | [optional] | +| **investment_expenses** | **Float** | | [optional] | +| **foreign_tax_paid** | **Float** | | [optional] | +| **foreign_country_or_us_possession** | **String** | | [optional] | +| **cash_liquidation_distributions** | **Float** | | [optional] | +| **noncash_liquidation_distributions** | **Float** | | [optional] | +| **exempt_interest_dividends** | **Float** | | [optional] | +| **specified_private_activity_bond_interest_dividends** | **Float** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | +| **id** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **issuer_id** | **Integer** | | [optional] | +| **issuer_reference_id** | **String** | | [optional] | +| **issuer_tin** | **String** | | [optional] | +| **tax_year** | **Integer** | | [optional] | +| **federal_efile** | **Boolean** | | [optional] | +| **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **state_efile** | **Boolean** | | [optional] | +| **state_efile_status** | [**Array<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | +| **postal_mail** | **Boolean** | | [optional] | +| **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **tin_match** | **Boolean** | | [optional] | +| **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **address_verification** | **Boolean** | | [optional] | +| **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **reference_id** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **tin_type** | **String** | | [optional] | +| **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | +| **recipient_name** | **String** | | [optional] | +| **recipient_second_name** | **String** | | [optional] | +| **address** | **String** | | [optional] | +| **address2** | **String** | | [optional] | +| **city** | **String** | | [optional] | +| **state** | **String** | | [optional] | +| **zip** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | +| **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | +| **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | +| **created_at** | **Time** | | [optional] | +| **updated_at** | **Time** | | [optional] | +| **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1099Div.new( + total_ordinary_dividends: null, + qualified_dividends: null, + total_capital_gain_distributions: null, + unrecaptured_section1250_gain: null, + section1202_gain: null, + collectibles_gain: null, + section897_ordinary_dividends: null, + section897_capital_gain: null, + nondividend_distributions: null, + federal_income_tax_withheld: null, + section199_a_dividends: null, + investment_expenses: null, + foreign_tax_paid: null, + foreign_country_or_us_possession: null, + cash_liquidation_distributions: null, + noncash_liquidation_distributions: null, + exempt_interest_dividends: null, + specified_private_activity_bond_interest_dividends: null, + fatca_filing_requirement: null, + id: null, + type: null, + issuer_id: null, + issuer_reference_id: null, + issuer_tin: null, + tax_year: null, + federal_efile: null, + federal_efile_status: null, + state_efile: null, + state_efile_status: null, + postal_mail: null, + postal_mail_status: null, + tin_match: null, + tin_match_status: null, + address_verification: null, + address_verification_status: null, + e_delivery_status: null, + reference_id: null, + email: null, + tin_type: null, + tin: null, + no_tin: null, + second_tin_notice: null, + recipient_name: null, + recipient_second_name: null, + address: null, + address2: null, + city: null, + state: null, + zip: null, + non_us_province: null, + country_code: null, + account_number: null, + office_code: null, + validation_errors: null, + created_at: null, + updated_at: null, + state_and_local_withholding: null +) +``` + diff --git a/docs/A1099/V2/Form1099DivListItem.md b/docs/A1099/V2/Form1099DivListItem.md index 0893a73..cb29592 100644 --- a/docs/A1099/V2/Form1099DivListItem.md +++ b/docs/A1099/V2/Form1099DivListItem.md @@ -4,24 +4,24 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **total_ordinary_dividends** | **String** | Total ordinary dividends | [optional] | -| **qualified_dividends** | **String** | Qualified dividends | [optional] | -| **total_capital_gain_distributions** | **String** | Total capital gain distributions | [optional] | -| **unrecaptured_section1250_gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -| **section1202_gain** | **String** | Section 1202 gain | [optional] | -| **collectibles_gain** | **String** | Collectibles (28%) gain | [optional] | -| **section897_ordinary_dividends** | **String** | Section 897 ordinary dividends | [optional] | -| **section897_capital_gain** | **String** | Section 897 capital gain | [optional] | -| **nondividend_distributions** | **String** | Nondividend distributions | [optional] | -| **federal_income_tax_withheld** | **String** | Federal income tax withheld | [optional] | -| **section199_a_dividends** | **String** | Section 199A dividends | [optional] | -| **investment_expenses** | **String** | Investment expenses | [optional] | -| **foreign_tax_paid** | **String** | Foreign tax paid | [optional] | +| **total_ordinary_dividends** | **Float** | Total ordinary dividends | [optional] | +| **qualified_dividends** | **Float** | Qualified dividends | [optional] | +| **total_capital_gain_distributions** | **Float** | Total capital gain distributions | [optional] | +| **unrecaptured_section1250_gain** | **Float** | Unrecaptured Section 1250 gain | [optional] | +| **section1202_gain** | **Float** | Section 1202 gain | [optional] | +| **collectibles_gain** | **Float** | Collectibles (28%) gain | [optional] | +| **section897_ordinary_dividends** | **Float** | Section 897 ordinary dividends | [optional] | +| **section897_capital_gain** | **Float** | Section 897 capital gain | [optional] | +| **nondividend_distributions** | **Float** | Nondividend distributions | [optional] | +| **federal_income_tax_withheld** | **Float** | Federal income tax withheld | [optional] | +| **section199_a_dividends** | **Float** | Section 199A dividends | [optional] | +| **investment_expenses** | **Float** | Investment expenses | [optional] | +| **foreign_tax_paid** | **Float** | Foreign tax paid | [optional] | | **foreign_country_or_us_possession** | **String** | Foreign country or U.S. possession | [optional] | -| **cash_liquidation_distributions** | **String** | Cash liquidation distributions | [optional] | -| **noncash_liquidation_distributions** | **String** | Noncash liquidation distributions | [optional] | -| **exempt_interest_dividends** | **String** | Exempt-interest dividends | [optional] | -| **specified_private_activity_bond_interest_dividends** | **String** | Specified private activity bond interest dividends | [optional] | +| **cash_liquidation_distributions** | **Float** | Cash liquidation distributions | [optional] | +| **noncash_liquidation_distributions** | **Float** | Noncash liquidation distributions | [optional] | +| **exempt_interest_dividends** | **Float** | Exempt-interest dividends | [optional] | +| **specified_private_activity_bond_interest_dividends** | **Float** | Specified private activity bond interest dividends | [optional] | | **fatca_filing_requirement** | **Boolean** | FATCA filing requirement | [optional] | | **issuer_reference_id** | **String** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] | | **issuer_tin** | **String** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] | @@ -32,16 +32,16 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099DivListItemResponse.md b/docs/A1099/V2/Form1099DivListItemResponse.md index d237574..1abf8a3 100644 --- a/docs/A1099/V2/Form1099DivListItemResponse.md +++ b/docs/A1099/V2/Form1099DivListItemResponse.md @@ -4,24 +4,24 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **total_ordinary_dividends** | **String** | Total ordinary dividends | [optional] | -| **qualified_dividends** | **String** | Qualified dividends | [optional] | -| **total_capital_gain_distributions** | **String** | Total capital gain distributions | [optional] | -| **unrecaptured_section1250_gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -| **section1202_gain** | **String** | Section 1202 gain | [optional] | -| **collectibles_gain** | **String** | Collectibles (28%) gain | [optional] | -| **section897_ordinary_dividends** | **String** | Section 897 ordinary dividends | [optional] | -| **section897_capital_gain** | **String** | Section 897 capital gain | [optional] | -| **nondividend_distributions** | **String** | Nondividend distributions | [optional] | -| **federal_income_tax_withheld** | **String** | Federal income tax withheld | [optional] | -| **section199_a_dividends** | **String** | Section 199A dividends | [optional] | -| **investment_expenses** | **String** | Investment expenses | [optional] | -| **foreign_tax_paid** | **String** | Foreign tax paid | [optional] | +| **total_ordinary_dividends** | **Float** | Total ordinary dividends | [optional] | +| **qualified_dividends** | **Float** | Qualified dividends | [optional] | +| **total_capital_gain_distributions** | **Float** | Total capital gain distributions | [optional] | +| **unrecaptured_section1250_gain** | **Float** | Unrecaptured Section 1250 gain | [optional] | +| **section1202_gain** | **Float** | Section 1202 gain | [optional] | +| **collectibles_gain** | **Float** | Collectibles (28%) gain | [optional] | +| **section897_ordinary_dividends** | **Float** | Section 897 ordinary dividends | [optional] | +| **section897_capital_gain** | **Float** | Section 897 capital gain | [optional] | +| **nondividend_distributions** | **Float** | Nondividend distributions | [optional] | +| **federal_income_tax_withheld** | **Float** | Federal income tax withheld | [optional] | +| **section199_a_dividends** | **Float** | Section 199A dividends | [optional] | +| **investment_expenses** | **Float** | Investment expenses | [optional] | +| **foreign_tax_paid** | **Float** | Foreign tax paid | [optional] | | **foreign_country_or_us_possession** | **String** | Foreign country or U.S. possession | [optional] | -| **cash_liquidation_distributions** | **String** | Cash liquidation distributions | [optional] | -| **noncash_liquidation_distributions** | **String** | Noncash liquidation distributions | [optional] | -| **exempt_interest_dividends** | **String** | Exempt-interest dividends | [optional] | -| **specified_private_activity_bond_interest_dividends** | **String** | Specified private activity bond interest dividends | [optional] | +| **cash_liquidation_distributions** | **Float** | Cash liquidation distributions | [optional] | +| **noncash_liquidation_distributions** | **Float** | Noncash liquidation distributions | [optional] | +| **exempt_interest_dividends** | **Float** | Exempt-interest dividends | [optional] | +| **specified_private_activity_bond_interest_dividends** | **Float** | Specified private activity bond interest dividends | [optional] | | **fatca_filing_requirement** | **Boolean** | FATCA filing requirement | [optional] | | **id** | **String** | ID of the form | [readonly] | | **type** | **String** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | | @@ -122,8 +122,8 @@ instance = AvalaraSdk::A1099::V2::Form1099DivListItemResponse.new( account_number: null, office_code: null, validation_errors: null, - created_at: 2025-07-31T02:07:40.939073500Z, - updated_at: 2025-07-31T02:07:40.939074300Z, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, state_and_local_withholding: null ) ``` diff --git a/docs/A1099/V2/Form1099DivRequest.md b/docs/A1099/V2/Form1099DivRequest.md index d564d9a..4302e41 100644 --- a/docs/A1099/V2/Form1099DivRequest.md +++ b/docs/A1099/V2/Form1099DivRequest.md @@ -4,24 +4,24 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **total_ordinary_dividends** | **String** | Total ordinary dividends | [optional] | -| **qualified_dividends** | **String** | Qualified dividends | [optional] | -| **total_capital_gain_distributions** | **String** | Total capital gain distributions | [optional] | -| **unrecaptured_section1250_gain** | **String** | Unrecaptured Section 1250 gain | [optional] | -| **section1202_gain** | **String** | Section 1202 gain | [optional] | -| **collectibles_gain** | **String** | Collectibles (28%) gain | [optional] | -| **section897_ordinary_dividends** | **String** | Section 897 ordinary dividends | [optional] | -| **section897_capital_gain** | **String** | Section 897 capital gain | [optional] | -| **nondividend_distributions** | **String** | Nondividend distributions | [optional] | -| **federal_income_tax_withheld** | **String** | Federal income tax withheld | [optional] | -| **section199_a_dividends** | **String** | Section 199A dividends | [optional] | -| **investment_expenses** | **String** | Investment expenses | [optional] | -| **foreign_tax_paid** | **String** | Foreign tax paid | [optional] | +| **total_ordinary_dividends** | **Float** | Total ordinary dividends | [optional] | +| **qualified_dividends** | **Float** | Qualified dividends | [optional] | +| **total_capital_gain_distributions** | **Float** | Total capital gain distributions | [optional] | +| **unrecaptured_section1250_gain** | **Float** | Unrecaptured Section 1250 gain | [optional] | +| **section1202_gain** | **Float** | Section 1202 gain | [optional] | +| **collectibles_gain** | **Float** | Collectibles (28%) gain | [optional] | +| **section897_ordinary_dividends** | **Float** | Section 897 ordinary dividends | [optional] | +| **section897_capital_gain** | **Float** | Section 897 capital gain | [optional] | +| **nondividend_distributions** | **Float** | Nondividend distributions | [optional] | +| **federal_income_tax_withheld** | **Float** | Federal income tax withheld | [optional] | +| **section199_a_dividends** | **Float** | Section 199A dividends | [optional] | +| **investment_expenses** | **Float** | Investment expenses | [optional] | +| **foreign_tax_paid** | **Float** | Foreign tax paid | [optional] | | **foreign_country_or_us_possession** | **String** | Foreign country or U.S. possession | [optional] | -| **cash_liquidation_distributions** | **String** | Cash liquidation distributions | [optional] | -| **noncash_liquidation_distributions** | **String** | Noncash liquidation distributions | [optional] | -| **exempt_interest_dividends** | **String** | Exempt-interest dividends | [optional] | -| **specified_private_activity_bond_interest_dividends** | **String** | Specified private activity bond interest dividends | [optional] | +| **cash_liquidation_distributions** | **Float** | Cash liquidation distributions | [optional] | +| **noncash_liquidation_distributions** | **Float** | Noncash liquidation distributions | [optional] | +| **exempt_interest_dividends** | **Float** | Exempt-interest dividends | [optional] | +| **specified_private_activity_bond_interest_dividends** | **Float** | Specified private activity bond interest dividends | [optional] | | **fatca_filing_requirement** | **Boolean** | FATCA filing requirement | [optional] | | **type** | **String** | | [optional] | | **issuer_id** | **String** | Issuer ID | [optional] | @@ -30,16 +30,16 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099DivResponse.md b/docs/A1099/V2/Form1099DivResponse.md index 45e6b9e..aeeb064 100644 --- a/docs/A1099/V2/Form1099DivResponse.md +++ b/docs/A1099/V2/Form1099DivResponse.md @@ -4,6 +4,25 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **total_ordinary_dividends** | **Float** | | [optional] | +| **qualified_dividends** | **Float** | | [optional] | +| **total_capital_gain_distributions** | **Float** | | [optional] | +| **unrecaptured_section1250_gain** | **Float** | | [optional] | +| **section1202_gain** | **Float** | | [optional] | +| **collectibles_gain** | **Float** | | [optional] | +| **section897_ordinary_dividends** | **Float** | | [optional] | +| **section897_capital_gain** | **Float** | | [optional] | +| **nondividend_distributions** | **Float** | | [optional] | +| **federal_income_tax_withheld** | **Float** | | [optional] | +| **section199_a_dividends** | **Float** | | [optional] | +| **investment_expenses** | **Float** | | [optional] | +| **foreign_tax_paid** | **Float** | | [optional] | +| **foreign_country_or_us_possession** | **String** | | [optional] | +| **cash_liquidation_distributions** | **Float** | | [optional] | +| **noncash_liquidation_distributions** | **Float** | | [optional] | +| **exempt_interest_dividends** | **Float** | | [optional] | +| **specified_private_activity_bond_interest_dividends** | **Float** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | | **type** | **String** | | [optional][readonly] | | **created_at** | **Time** | | [optional] | | **updated_at** | **Time** | | [optional] | @@ -49,6 +68,25 @@ require 'avalara_sdk' instance = AvalaraSdk::A1099::V2::Form1099DivResponse.new( + total_ordinary_dividends: null, + qualified_dividends: null, + total_capital_gain_distributions: null, + unrecaptured_section1250_gain: null, + section1202_gain: null, + collectibles_gain: null, + section897_ordinary_dividends: null, + section897_capital_gain: null, + nondividend_distributions: null, + federal_income_tax_withheld: null, + section199_a_dividends: null, + investment_expenses: null, + foreign_tax_paid: null, + foreign_country_or_us_possession: null, + cash_liquidation_distributions: null, + noncash_liquidation_distributions: null, + exempt_interest_dividends: null, + specified_private_activity_bond_interest_dividends: null, + fatca_filing_requirement: null, type: 1099-NEC, created_at: null, updated_at: null, diff --git a/docs/A1099/V2/Form1099Int.md b/docs/A1099/V2/Form1099Int.md new file mode 100644 index 0000000..5bc539b --- /dev/null +++ b/docs/A1099/V2/Form1099Int.md @@ -0,0 +1,122 @@ +# AvalaraSdk::A1099::V2::Form1099Int + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **interest_income** | **Float** | | [optional] | +| **early_withdrawal_penalty** | **Float** | | [optional] | +| **us_savings_bonds_interest** | **Float** | | [optional] | +| **federal_income_tax_withheld** | **Float** | | [optional] | +| **investment_expenses** | **Float** | | [optional] | +| **foreign_tax_paid** | **Float** | | [optional] | +| **foreign_country** | **String** | | [optional] | +| **tax_exempt_interest** | **Float** | | [optional] | +| **specified_private_activity_bond_interest** | **Float** | | [optional] | +| **market_discount** | **Float** | | [optional] | +| **bond_premium** | **Float** | | [optional] | +| **bond_premium_on_treasury_obligations** | **Float** | | [optional] | +| **bond_premium_on_tax_exempt_bond** | **Float** | | [optional] | +| **tax_exempt_bond_cusip_number** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **issuer_id** | **Integer** | | [optional] | +| **issuer_reference_id** | **String** | | [optional] | +| **issuer_tin** | **String** | | [optional] | +| **tax_year** | **Integer** | | [optional] | +| **federal_efile** | **Boolean** | | [optional] | +| **federal_efile_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **state_efile** | **Boolean** | | [optional] | +| **state_efile_status** | [**Array<StateEfileStatusDetail>**](StateEfileStatusDetail.md) | | [optional] | +| **postal_mail** | **Boolean** | | [optional] | +| **postal_mail_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **tin_match** | **Boolean** | | [optional] | +| **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **address_verification** | **Boolean** | | [optional] | +| **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **reference_id** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **tin_type** | **String** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | +| **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | +| **recipient_name** | **String** | | [optional] | +| **recipient_second_name** | **String** | | [optional] | +| **address** | **String** | | [optional] | +| **address2** | **String** | | [optional] | +| **city** | **String** | | [optional] | +| **state** | **String** | | [optional] | +| **zip** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | +| **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | +| **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | +| **created_at** | **Time** | | [optional] | +| **updated_at** | **Time** | | [optional] | +| **state_and_local_withholding** | [**StateAndLocalWithholding**](StateAndLocalWithholding.md) | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1099Int.new( + interest_income: null, + early_withdrawal_penalty: null, + us_savings_bonds_interest: null, + federal_income_tax_withheld: null, + investment_expenses: null, + foreign_tax_paid: null, + foreign_country: null, + tax_exempt_interest: null, + specified_private_activity_bond_interest: null, + market_discount: null, + bond_premium: null, + bond_premium_on_treasury_obligations: null, + bond_premium_on_tax_exempt_bond: null, + tax_exempt_bond_cusip_number: null, + id: null, + type: null, + issuer_id: null, + issuer_reference_id: null, + issuer_tin: null, + tax_year: null, + federal_efile: null, + federal_efile_status: null, + state_efile: null, + state_efile_status: null, + postal_mail: null, + postal_mail_status: null, + tin_match: null, + tin_match_status: null, + address_verification: null, + address_verification_status: null, + e_delivery_status: null, + reference_id: null, + email: null, + tin_type: null, + fatca_filing_requirement: null, + tin: null, + no_tin: null, + second_tin_notice: null, + recipient_name: null, + recipient_second_name: null, + address: null, + address2: null, + city: null, + state: null, + zip: null, + non_us_province: null, + country_code: null, + account_number: null, + office_code: null, + validation_errors: null, + created_at: null, + updated_at: null, + state_and_local_withholding: null +) +``` + diff --git a/docs/A1099/V2/Form1099IntList.md b/docs/A1099/V2/Form1099IntList.md new file mode 100644 index 0000000..6a4ec39 --- /dev/null +++ b/docs/A1099/V2/Form1099IntList.md @@ -0,0 +1,20 @@ +# AvalaraSdk::A1099::V2::Form1099IntList + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **forms** | [**Array<Form1099IntListItem>**](Form1099IntListItem.md) | | [optional] | +| **form_type** | **String** | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1099IntList.new( + forms: null, + form_type: null +) +``` + diff --git a/docs/A1099/V2/Form1099IntListItem.md b/docs/A1099/V2/Form1099IntListItem.md new file mode 100644 index 0000000..2c59252 --- /dev/null +++ b/docs/A1099/V2/Form1099IntListItem.md @@ -0,0 +1,100 @@ +# AvalaraSdk::A1099::V2::Form1099IntListItem + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **interest_income** | **Float** | Interest Income | [optional] | +| **early_withdrawal_penalty** | **Float** | Early Withdrawal Penalty | [optional] | +| **us_savings_bonds_interest** | **Float** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +| **federal_income_tax_withheld** | **Float** | Federal income tax withheld | [optional] | +| **investment_expenses** | **Float** | Investment Expenses | [optional] | +| **foreign_tax_paid** | **Float** | Foreign tax paid | [optional] | +| **foreign_country** | **String** | Foreign country or U.S. possession | [optional] | +| **tax_exempt_interest** | **Float** | Tax-Exempt Interest | [optional] | +| **specified_private_activity_bond_interest** | **Float** | Specified Private activity | [optional] | +| **market_discount** | **Float** | Market Discount | [optional] | +| **bond_premium** | **Float** | Bond Premium | [optional] | +| **bond_premium_on_treasury_obligations** | **Float** | Bond Premium on Treasury obligations | [optional] | +| **bond_premium_on_tax_exempt_bond** | **Float** | Bond Premium on tax exempt bond | [optional] | +| **tax_exempt_bond_cusip_number** | **String** | Tax exempt bond CUSIP no. | [optional] | +| **issuer_reference_id** | **String** | Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. | [optional] | +| **issuer_tin** | **String** | Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. | [optional] | +| **tax_year** | **Integer** | Tax year | | +| **issuer_id** | **String** | Issuer ID | [optional] | +| **reference_id** | **String** | Reference ID | [optional] | +| **recipient_tin** | **String** | Recipient Tax ID Number | [optional] | +| **recipient_name** | **String** | Recipient name | [optional] | +| **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | +| **recipient_second_name** | **String** | Recipient second name | [optional] | +| **address** | **String** | Address | [optional] | +| **address2** | **String** | Address line 2 | [optional] | +| **city** | **String** | City | [optional] | +| **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +| **zip** | **String** | Zip/postal code | [optional] | +| **email** | **String** | Recipient email address | [optional] | +| **account_number** | **String** | Account number | [optional] | +| **office_code** | **String** | Office code | [optional] | +| **non_us_province** | **String** | Foreign province | [optional] | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | +| **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | +| **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +| **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | +| **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +| **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | +| **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | +| **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +| **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1099IntListItem.new( + interest_income: null, + early_withdrawal_penalty: null, + us_savings_bonds_interest: null, + federal_income_tax_withheld: null, + investment_expenses: null, + foreign_tax_paid: null, + foreign_country: null, + tax_exempt_interest: null, + specified_private_activity_bond_interest: null, + market_discount: null, + bond_premium: null, + bond_premium_on_treasury_obligations: null, + bond_premium_on_tax_exempt_bond: null, + tax_exempt_bond_cusip_number: null, + issuer_reference_id: null, + issuer_tin: null, + tax_year: null, + issuer_id: null, + reference_id: null, + recipient_tin: null, + recipient_name: null, + tin_type: EIN, + recipient_second_name: null, + address: null, + address2: null, + city: null, + state: null, + zip: null, + email: null, + account_number: null, + office_code: null, + non_us_province: null, + country_code: null, + federal_e_file: null, + postal_mail: null, + state_e_file: null, + tin_match: null, + no_tin: null, + second_tin_notice: null, + fatca_filing_requirement: null, + address_verification: null, + state_and_local_withholding: null +) +``` + diff --git a/docs/A1099/V2/Form1099IntListItemResponse.md b/docs/A1099/V2/Form1099IntListItemResponse.md new file mode 100644 index 0000000..c7735d5 --- /dev/null +++ b/docs/A1099/V2/Form1099IntListItemResponse.md @@ -0,0 +1,122 @@ +# AvalaraSdk::A1099::V2::Form1099IntListItemResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **interest_income** | **Float** | Interest Income | [optional] | +| **early_withdrawal_penalty** | **Float** | Early withdrawal penalty | [optional] | +| **us_savings_bonds_interest** | **Float** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +| **federal_income_tax_withheld** | **Float** | Federal income tax withheld | [optional] | +| **investment_expenses** | **Float** | Investment expenses | [optional] | +| **foreign_tax_paid** | **Float** | Foreign tax paid | [optional] | +| **foreign_country** | **String** | Foreign country or U.S. possession | [optional] | +| **tax_exempt_interest** | **Float** | Tax-exempt interest | [optional] | +| **specified_private_activity_bond_interest** | **Float** | Specified private activity bond interest | [optional] | +| **market_discount** | **Float** | Market discount | [optional] | +| **bond_premium** | **Float** | Bond premium | [optional] | +| **bond_premium_on_treasury_obligations** | **Float** | Bond premium on Treasury obligations | [optional] | +| **bond_premium_on_tax_exempt_bond** | **Float** | Bond premium on tax exempt bond | [optional] | +| **tax_exempt_bond_cusip_number** | **String** | Tax exempt bond CUSIP number | [optional] | +| **id** | **String** | ID of the form | [readonly] | +| **type** | **String** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | | +| **issuer_id** | **Integer** | Issuer ID | | +| **issuer_reference_id** | **String** | Issuer Reference ID | [optional] | +| **issuer_tin** | **String** | Issuer TIN | [optional] | +| **tax_year** | **Integer** | Tax year | [optional] | +| **federal_efile** | **Boolean** | Boolean indicating that federal e-filing has been scheduled for this form | | +| **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | Federal e-file status | [optional][readonly] | +| **state_efile** | **Boolean** | Boolean indicating that state e-filing has been scheduled for this form | | +| **state_efile_status** | [**Array<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | State e-file status | [optional][readonly] | +| **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient has been scheduled for this form | | +| **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | Postal mail to recipient status | [optional][readonly] | +| **tin_match** | **Boolean** | Boolean indicating that TIN Matching has been scheduled for this form | | +| **tin_match_status** | [**StatusDetail**](StatusDetail.md) | TIN Match status | [optional][readonly] | +| **address_verification** | **Boolean** | Boolean indicating that address verification has been scheduled for this form | | +| **address_verification_status** | [**StatusDetail**](StatusDetail.md) | Address verification status | [optional][readonly] | +| **e_delivery_status** | [**StatusDetail**](StatusDetail.md) | EDelivery status | [optional][readonly] | +| **reference_id** | **String** | Reference ID | [optional] | +| **email** | **String** | Recipient email address | [optional] | +| **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | +| **tin** | **String** | Recipient Tax ID Number | [optional] | +| **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | +| **second_tin_notice** | **Boolean** | Second Tin Notice | [optional] | +| **recipient_name** | **String** | Recipient name | [optional] | +| **recipient_second_name** | **String** | Recipient second name | [optional] | +| **address** | **String** | Address | [optional] | +| **address2** | **String** | Address line 2 | [optional] | +| **city** | **String** | City | [optional] | +| **state** | **String** | US state | [optional] | +| **zip** | **String** | Zip/postal code | [optional] | +| **non_us_province** | **String** | Foreign province | [optional] | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | +| **account_number** | **String** | Account Number | [optional] | +| **office_code** | **String** | Office Code | [optional] | +| **fatca_filing_requirement** | **Boolean** | FATCA filing requirement | [optional] | +| **validation_errors** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | Validation errors | [optional][readonly] | +| **created_at** | **Time** | Creation time | [optional][readonly] | +| **updated_at** | **Time** | Update time | [optional][readonly] | +| **state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1099IntListItemResponse.new( + interest_income: 1402.71, + early_withdrawal_penalty: null, + us_savings_bonds_interest: null, + federal_income_tax_withheld: null, + investment_expenses: null, + foreign_tax_paid: null, + foreign_country: null, + tax_exempt_interest: null, + specified_private_activity_bond_interest: null, + market_discount: null, + bond_premium: null, + bond_premium_on_treasury_obligations: null, + bond_premium_on_tax_exempt_bond: null, + tax_exempt_bond_cusip_number: null, + id: 123456789, + type: 1099-NEC, + issuer_id: 987654321, + issuer_reference_id: R-3898734, + issuer_tin: 59-387274, + tax_year: 2024, + federal_efile: false, + federal_efile_status: null, + state_efile: false, + state_efile_status: null, + postal_mail: false, + postal_mail_status: null, + tin_match: false, + tin_match_status: null, + address_verification: false, + address_verification_status: null, + e_delivery_status: null, + reference_id: 1891810-9819891, + email: roadrunner@acmecorp.com, + tin_type: null, + tin: null, + no_tin: false, + second_tin_notice: null, + recipient_name: null, + recipient_second_name: null, + address: 1234 Meep Meep Blvd, + address2: null, + city: Tucson, + state: AZ, + zip: 35004, + non_us_province: , + country_code: US, + account_number: null, + office_code: null, + fatca_filing_requirement: null, + validation_errors: null, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, + state_and_local_withholding: null +) +``` + diff --git a/docs/A1099/V2/Form1099IntRequest.md b/docs/A1099/V2/Form1099IntRequest.md new file mode 100644 index 0000000..ddb499f --- /dev/null +++ b/docs/A1099/V2/Form1099IntRequest.md @@ -0,0 +1,96 @@ +# AvalaraSdk::A1099::V2::Form1099IntRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **interest_income** | **Float** | Interest Income | [optional] | +| **early_withdrawal_penalty** | **Float** | Early Withdrawl Penalty | [optional] | +| **us_savings_bonds_interest** | **Float** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +| **federal_income_tax_withheld** | **Float** | Federal income tax withheld | [optional] | +| **investment_expenses** | **Float** | Investment Expenses | [optional] | +| **foreign_tax_paid** | **Float** | Foreign tax paid | [optional] | +| **foreign_country** | **String** | Foreign country or U.S. possession | [optional] | +| **tax_exempt_interest** | **Float** | Tax-Exempt Interest | [optional] | +| **specified_private_activity_bond_interest** | **Float** | Specified Private activity | [optional] | +| **market_discount** | **Float** | Market Discount | [optional] | +| **bond_premium** | **Float** | Bond Premium | [optional] | +| **bond_premium_on_treasury_obligations** | **Float** | Bond Premium on Treasury obligations | [optional] | +| **bond_premium_on_tax_exempt_bond** | **Float** | Bond Premium on tax exempt bond | [optional] | +| **tax_exempt_bond_cusip_number** | **String** | Tax exempt bond CUSIP no. | [optional] | +| **type** | **String** | | [optional] | +| **issuer_id** | **String** | Issuer ID | [optional] | +| **reference_id** | **String** | Reference ID | [optional] | +| **recipient_tin** | **String** | Recipient Tax ID Number | [optional] | +| **recipient_name** | **String** | Recipient name | [optional] | +| **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | +| **recipient_second_name** | **String** | Recipient second name | [optional] | +| **address** | **String** | Address | [optional] | +| **address2** | **String** | Address line 2 | [optional] | +| **city** | **String** | City | [optional] | +| **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | +| **zip** | **String** | Zip/postal code | [optional] | +| **email** | **String** | Recipient email address | [optional] | +| **account_number** | **String** | Account number | [optional] | +| **office_code** | **String** | Office code | [optional] | +| **non_us_province** | **String** | Foreign province | [optional] | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | +| **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | +| **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | +| **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | +| **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | +| **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | +| **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | +| **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | +| **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1099IntRequest.new( + interest_income: null, + early_withdrawal_penalty: null, + us_savings_bonds_interest: null, + federal_income_tax_withheld: null, + investment_expenses: null, + foreign_tax_paid: null, + foreign_country: null, + tax_exempt_interest: null, + specified_private_activity_bond_interest: null, + market_discount: null, + bond_premium: null, + bond_premium_on_treasury_obligations: null, + bond_premium_on_tax_exempt_bond: null, + tax_exempt_bond_cusip_number: null, + type: 1099-NEC, + issuer_id: null, + reference_id: null, + recipient_tin: null, + recipient_name: null, + tin_type: EIN, + recipient_second_name: null, + address: null, + address2: null, + city: null, + state: null, + zip: null, + email: null, + account_number: null, + office_code: null, + non_us_province: null, + country_code: null, + federal_e_file: null, + postal_mail: null, + state_e_file: null, + tin_match: null, + no_tin: null, + second_tin_notice: null, + fatca_filing_requirement: null, + address_verification: null, + state_and_local_withholding: null +) +``` + diff --git a/docs/A1099/V2/Form1099IntResponse.md b/docs/A1099/V2/Form1099IntResponse.md new file mode 100644 index 0000000..0484e77 --- /dev/null +++ b/docs/A1099/V2/Form1099IntResponse.md @@ -0,0 +1,120 @@ +# AvalaraSdk::A1099::V2::Form1099IntResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **interest_income** | **Float** | Interest Income | [optional] | +| **early_withdrawal_penalty** | **Float** | Early Withdrawal Penalty | [optional] | +| **us_savings_bonds_interest** | **Float** | Interest on U.S. Savings Bonds and Treasury obligations | [optional] | +| **federal_income_tax_withheld** | **Float** | Federal income tax withheld | [optional] | +| **investment_expenses** | **Float** | Investment Expenses | [optional] | +| **foreign_tax_paid** | **Float** | Foreign tax paid | [optional] | +| **foreign_country** | **String** | Foreign country or U.S. possession | [optional] | +| **tax_exempt_interest** | **Float** | Tax-Exempt Interest | [optional] | +| **specified_private_activity_bond_interest** | **Float** | Specified Private activity | [optional] | +| **market_discount** | **Float** | Market Discount | [optional] | +| **bond_premium** | **Float** | Bond Premium | [optional] | +| **bond_premium_on_treasury_obligations** | **Float** | Bond Premium on Treasury obligations | [optional] | +| **bond_premium_on_tax_exempt_bond** | **Float** | Bond Premium on tax exempt bond | [optional] | +| **tax_exempt_bond_cusip_number** | **String** | Tax exempt bond CUSIP no. | [optional] | +| **type** | **String** | | [optional][readonly] | +| **created_at** | **Time** | | [optional] | +| **updated_at** | **Time** | | [optional] | +| **state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | +| **tin_type** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **issuer_id** | **String** | | [optional] | +| **issuer_reference_id** | **String** | | [optional] | +| **issuer_tin** | **String** | | [optional] | +| **tax_year** | **Integer** | | [optional] | +| **reference_id** | **String** | | [optional] | +| **recipient_name** | **String** | | [optional] | +| **recipient_tin** | **String** | | [optional] | +| **recipient_second_name** | **String** | | [optional] | +| **address** | **String** | | [optional] | +| **address2** | **String** | | [optional] | +| **city** | **String** | | [optional] | +| **state** | **String** | | [optional] | +| **zip** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | +| **country_code** | **String** | | [optional] | +| **federal_e_file** | **Boolean** | | [optional] | +| **postal_mail** | **Boolean** | | [optional] | +| **state_e_file** | **Boolean** | | [optional] | +| **tin_match** | **Boolean** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | +| **address_verification** | **Boolean** | | [optional] | +| **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **state_efile_status** | [**Array<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | | [optional] | +| **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **validation_errors** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1099IntResponse.new( + interest_income: null, + early_withdrawal_penalty: null, + us_savings_bonds_interest: null, + federal_income_tax_withheld: null, + investment_expenses: null, + foreign_tax_paid: null, + foreign_country: null, + tax_exempt_interest: null, + specified_private_activity_bond_interest: null, + market_discount: null, + bond_premium: null, + bond_premium_on_treasury_obligations: null, + bond_premium_on_tax_exempt_bond: null, + tax_exempt_bond_cusip_number: null, + type: 1099-NEC, + created_at: null, + updated_at: null, + state_and_local_withholding: null, + tin_type: EIN, + id: null, + issuer_id: null, + issuer_reference_id: null, + issuer_tin: null, + tax_year: null, + reference_id: null, + recipient_name: null, + recipient_tin: null, + recipient_second_name: null, + address: null, + address2: null, + city: null, + state: null, + zip: null, + email: null, + account_number: null, + office_code: null, + non_us_province: null, + country_code: null, + federal_e_file: null, + postal_mail: null, + state_e_file: null, + tin_match: null, + no_tin: null, + second_tin_notice: null, + address_verification: null, + federal_efile_status: null, + e_delivery_status: null, + state_efile_status: null, + postal_mail_status: null, + tin_match_status: null, + address_verification_status: null, + validation_errors: null +) +``` + diff --git a/docs/A1099/V2/Form1099K.md b/docs/A1099/V2/Form1099K.md index 6ed14a4..7d276fd 100644 --- a/docs/A1099/V2/Form1099K.md +++ b/docs/A1099/V2/Form1099K.md @@ -40,10 +40,14 @@ | **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **address_verification** | **Boolean** | | [optional] | | **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **reference_id** | **String** | | [optional] | | **email** | **String** | | [optional] | | **tin_type** | **String** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | | **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | | **recipient_name** | **String** | | [optional] | | **recipient_second_name** | **String** | | [optional] | | **address** | **String** | | [optional] | @@ -51,8 +55,10 @@ | **city** | **String** | | [optional] | | **state** | **String** | | [optional] | | **zip** | **String** | | [optional] | -| **foreign_province** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | | **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | | **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | | **created_at** | **Time** | | [optional] | | **updated_at** | **Time** | | [optional] | @@ -100,10 +106,14 @@ instance = AvalaraSdk::A1099::V2::Form1099K.new( tin_match_status: null, address_verification: null, address_verification_status: null, + e_delivery_status: null, reference_id: null, email: null, tin_type: null, + fatca_filing_requirement: null, tin: null, + no_tin: null, + second_tin_notice: null, recipient_name: null, recipient_second_name: null, address: null, @@ -111,8 +121,10 @@ instance = AvalaraSdk::A1099::V2::Form1099K.new( city: null, state: null, zip: null, - foreign_province: null, + non_us_province: null, country_code: null, + account_number: null, + office_code: null, validation_errors: null, created_at: null, updated_at: null, diff --git a/docs/A1099/V2/Form1099KListItem.md b/docs/A1099/V2/Form1099KListItem.md index e464371..62d67f5 100644 --- a/docs/A1099/V2/Form1099KListItem.md +++ b/docs/A1099/V2/Form1099KListItem.md @@ -33,22 +33,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -103,6 +104,7 @@ instance = AvalaraSdk::A1099::V2::Form1099KListItem.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Form1099KListItemResponse.md b/docs/A1099/V2/Form1099KListItemResponse.md index a69fc16..c243af4 100644 --- a/docs/A1099/V2/Form1099KListItemResponse.md +++ b/docs/A1099/V2/Form1099KListItemResponse.md @@ -126,8 +126,8 @@ instance = AvalaraSdk::A1099::V2::Form1099KListItemResponse.new( office_code: null, fatca_filing_requirement: null, validation_errors: null, - created_at: 2025-07-31T02:07:40.939073500Z, - updated_at: 2025-07-31T02:07:40.939074300Z, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, state_and_local_withholding: null ) ``` diff --git a/docs/A1099/V2/Form1099KRequest.md b/docs/A1099/V2/Form1099KRequest.md index 7d19b52..0ad9c9d 100644 --- a/docs/A1099/V2/Form1099KRequest.md +++ b/docs/A1099/V2/Form1099KRequest.md @@ -31,22 +31,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -99,6 +100,7 @@ instance = AvalaraSdk::A1099::V2::Form1099KRequest.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Form1099ListResponseValueInner.md b/docs/A1099/V2/Form1099ListResponseValueInner.md index 8f52e56..6b73096 100644 --- a/docs/A1099/V2/Form1099ListResponseValueInner.md +++ b/docs/A1099/V2/Form1099ListResponseValueInner.md @@ -18,6 +18,7 @@ AvalaraSdk::A1099::V2::Form1099ListResponseValueInner.openapi_one_of # :'Form1095BListItemResponse', # :'Form1099BaseResponse', # :'Form1099DivListItemResponse', +# :'Form1099IntListItemResponse', # :'Form1099KListItemResponse', # :'Form1099MiscListItemResponse', # :'Form1099NecListItemResponse', @@ -53,6 +54,7 @@ AvalaraSdk::A1099::V2::Form1099ListResponseValueInner.build(data_that_doesnt_mat - `Form1095BListItemResponse` - `Form1099BaseResponse` - `Form1099DivListItemResponse` +- `Form1099IntListItemResponse` - `Form1099KListItemResponse` - `Form1099MiscListItemResponse` - `Form1099NecListItemResponse` diff --git a/docs/A1099/V2/Form1099Misc.md b/docs/A1099/V2/Form1099Misc.md index 001c0b0..4cf7af1 100644 --- a/docs/A1099/V2/Form1099Misc.md +++ b/docs/A1099/V2/Form1099Misc.md @@ -9,15 +9,15 @@ | **other_income** | **Float** | | [optional] | | **fed_income_tax_withheld** | **Float** | | [optional] | | **fishing_boat_proceeds** | **Float** | | [optional] | -| **medical_and_health_care** | **Float** | | [optional] | -| **nonemployee_compensation** | **Float** | | [optional] | +| **medical_and_health_care_payments** | **Float** | | [optional] | | **substitute_payments** | **Float** | | [optional] | | **direct_sales_indicator** | **Boolean** | | [optional] | | **crop_insurance_proceeds** | **Float** | | [optional] | -| **excess_golden_parachute** | **Float** | | [optional] | -| **gross_amount_paid_attorney** | **Float** | | [optional] | +| **excess_golden_parachute_payments** | **Float** | | [optional] | +| **gross_proceeds_paid_to_attorney** | **Float** | | [optional] | +| **fish_purchased_for_resale** | **Float** | | [optional] | | **section409_a_deferrals** | **Float** | | [optional] | -| **section409_a_income** | **Float** | | [optional] | +| **nonqualified_deferred_compensation** | **Float** | | [optional] | | **id** | **String** | | [optional] | | **type** | **String** | | [optional] | | **issuer_id** | **Integer** | | [optional] | @@ -34,10 +34,14 @@ | **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **address_verification** | **Boolean** | | [optional] | | **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **reference_id** | **String** | | [optional] | | **email** | **String** | | [optional] | | **tin_type** | **String** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | | **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | | **recipient_name** | **String** | | [optional] | | **recipient_second_name** | **String** | | [optional] | | **address** | **String** | | [optional] | @@ -45,8 +49,10 @@ | **city** | **String** | | [optional] | | **state** | **String** | | [optional] | | **zip** | **String** | | [optional] | -| **foreign_province** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | | **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | | **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | | **created_at** | **Time** | | [optional] | | **updated_at** | **Time** | | [optional] | @@ -63,15 +69,15 @@ instance = AvalaraSdk::A1099::V2::Form1099Misc.new( other_income: null, fed_income_tax_withheld: null, fishing_boat_proceeds: null, - medical_and_health_care: null, - nonemployee_compensation: null, + medical_and_health_care_payments: null, substitute_payments: null, direct_sales_indicator: null, crop_insurance_proceeds: null, - excess_golden_parachute: null, - gross_amount_paid_attorney: null, + excess_golden_parachute_payments: null, + gross_proceeds_paid_to_attorney: null, + fish_purchased_for_resale: null, section409_a_deferrals: null, - section409_a_income: null, + nonqualified_deferred_compensation: null, id: null, type: null, issuer_id: null, @@ -88,10 +94,14 @@ instance = AvalaraSdk::A1099::V2::Form1099Misc.new( tin_match_status: null, address_verification: null, address_verification_status: null, + e_delivery_status: null, reference_id: null, email: null, tin_type: null, + fatca_filing_requirement: null, tin: null, + no_tin: null, + second_tin_notice: null, recipient_name: null, recipient_second_name: null, address: null, @@ -99,8 +109,10 @@ instance = AvalaraSdk::A1099::V2::Form1099Misc.new( city: null, state: null, zip: null, - foreign_province: null, + non_us_province: null, country_code: null, + account_number: null, + office_code: null, validation_errors: null, created_at: null, updated_at: null, diff --git a/docs/A1099/V2/Form1099MiscListItem.md b/docs/A1099/V2/Form1099MiscListItem.md index 0a5d16f..0cc54e1 100644 --- a/docs/A1099/V2/Form1099MiscListItem.md +++ b/docs/A1099/V2/Form1099MiscListItem.md @@ -28,16 +28,16 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099MiscListItemResponse.md b/docs/A1099/V2/Form1099MiscListItemResponse.md index 520dec9..8b78791 100644 --- a/docs/A1099/V2/Form1099MiscListItemResponse.md +++ b/docs/A1099/V2/Form1099MiscListItemResponse.md @@ -114,8 +114,8 @@ instance = AvalaraSdk::A1099::V2::Form1099MiscListItemResponse.new( office_code: null, fatca_filing_requirement: null, validation_errors: null, - created_at: 2025-07-31T02:07:40.939073500Z, - updated_at: 2025-07-31T02:07:40.939074300Z, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, state_and_local_withholding: null ) ``` diff --git a/docs/A1099/V2/Form1099MiscRequest.md b/docs/A1099/V2/Form1099MiscRequest.md index 9f94682..3cf47e9 100644 --- a/docs/A1099/V2/Form1099MiscRequest.md +++ b/docs/A1099/V2/Form1099MiscRequest.md @@ -26,16 +26,16 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099Nec.md b/docs/A1099/V2/Form1099Nec.md index ee41ac7..fc28b15 100644 --- a/docs/A1099/V2/Form1099Nec.md +++ b/docs/A1099/V2/Form1099Nec.md @@ -23,10 +23,14 @@ | **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **address_verification** | **Boolean** | | [optional] | | **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **reference_id** | **String** | | [optional] | | **email** | **String** | | [optional] | | **tin_type** | **String** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | | **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | | **recipient_name** | **String** | | [optional] | | **recipient_second_name** | **String** | | [optional] | | **address** | **String** | | [optional] | @@ -34,8 +38,10 @@ | **city** | **String** | | [optional] | | **state** | **String** | | [optional] | | **zip** | **String** | | [optional] | -| **foreign_province** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | | **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | | **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | | **created_at** | **Time** | | [optional] | | **updated_at** | **Time** | | [optional] | @@ -66,10 +72,14 @@ instance = AvalaraSdk::A1099::V2::Form1099Nec.new( tin_match_status: null, address_verification: null, address_verification_status: null, + e_delivery_status: null, reference_id: null, email: null, tin_type: null, + fatca_filing_requirement: null, tin: null, + no_tin: null, + second_tin_notice: null, recipient_name: null, recipient_second_name: null, address: null, @@ -77,8 +87,10 @@ instance = AvalaraSdk::A1099::V2::Form1099Nec.new( city: null, state: null, zip: null, - foreign_province: null, + non_us_province: null, country_code: null, + account_number: null, + office_code: null, validation_errors: null, created_at: null, updated_at: null, diff --git a/docs/A1099/V2/Form1099NecListItem.md b/docs/A1099/V2/Form1099NecListItem.md index 45962d2..08db2c1 100644 --- a/docs/A1099/V2/Form1099NecListItem.md +++ b/docs/A1099/V2/Form1099NecListItem.md @@ -16,22 +16,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -69,6 +70,7 @@ instance = AvalaraSdk::A1099::V2::Form1099NecListItem.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Form1099NecListItemResponse.md b/docs/A1099/V2/Form1099NecListItemResponse.md index 26fb21c..a6158b1 100644 --- a/docs/A1099/V2/Form1099NecListItemResponse.md +++ b/docs/A1099/V2/Form1099NecListItemResponse.md @@ -92,8 +92,8 @@ instance = AvalaraSdk::A1099::V2::Form1099NecListItemResponse.new( office_code: null, fatca_filing_requirement: null, validation_errors: null, - created_at: 2025-07-31T02:07:40.939073500Z, - updated_at: 2025-07-31T02:07:40.939074300Z, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, state_and_local_withholding: null ) ``` diff --git a/docs/A1099/V2/Form1099NecRequest.md b/docs/A1099/V2/Form1099NecRequest.md index 9b9c010..a024944 100644 --- a/docs/A1099/V2/Form1099NecRequest.md +++ b/docs/A1099/V2/Form1099NecRequest.md @@ -14,22 +14,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -65,6 +66,7 @@ instance = AvalaraSdk::A1099::V2::Form1099NecRequest.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Form1099ProccessResult.md b/docs/A1099/V2/Form1099ProccessResult.md index 6b9cb83..58686d8 100644 --- a/docs/A1099/V2/Form1099ProccessResult.md +++ b/docs/A1099/V2/Form1099ProccessResult.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **job_data** | [**Data**](Data.md) | | [optional] | +| **processed_forms** | [**Array<Form1099ProccessResultProcessedFormsInner>**](Form1099ProccessResultProcessedFormsInner.md) | | [optional] | ## Example @@ -12,7 +13,8 @@ require 'avalara_sdk' instance = AvalaraSdk::A1099::V2::Form1099ProccessResult.new( - job_data: null + job_data: null, + processed_forms: null ) ``` diff --git a/docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md b/docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md new file mode 100644 index 0000000..eb58e3c --- /dev/null +++ b/docs/A1099/V2/Form1099ProccessResultProcessedFormsInner.md @@ -0,0 +1,61 @@ +# AvalaraSdk::A1099::V2::Form1099ProccessResultProcessedFormsInner + +## Class instance methods + +### `openapi_one_of` + +Returns the list of classes defined in oneOf. + +#### Example + +```ruby +require 'avalara_sdk' + +AvalaraSdk::A1099::V2::Form1099ProccessResultProcessedFormsInner.openapi_one_of +# => +# [ +# :'Form1042S', +# :'Form1095B', +# :'Form1099Div', +# :'Form1099Int', +# :'Form1099K', +# :'Form1099Misc', +# :'Form1099Nec', +# :'Form1099R' +# ] +``` + +### build + +Find the appropriate object from the `openapi_one_of` list and casts the data into it. + +#### Example + +```ruby +require 'avalara_sdk' + +AvalaraSdk::A1099::V2::Form1099ProccessResultProcessedFormsInner.build(data) +# => # + +AvalaraSdk::A1099::V2::Form1099ProccessResultProcessedFormsInner.build(data_that_doesnt_match) +# => nil +``` + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| **data** | **Mixed** | data to be matched against the list of oneOf items | + +#### Return type + +- `Form1042S` +- `Form1095B` +- `Form1099Div` +- `Form1099Int` +- `Form1099K` +- `Form1099Misc` +- `Form1099Nec` +- `Form1099R` +- `nil` (if no type matches) + diff --git a/docs/A1099/V2/Form1099R.md b/docs/A1099/V2/Form1099R.md index 074c875..22d9edf 100644 --- a/docs/A1099/V2/Form1099R.md +++ b/docs/A1099/V2/Form1099R.md @@ -22,7 +22,6 @@ | **total_employee_contributions** | **Float** | | [optional] | | **amount_allocable_to_irr** | **Float** | | [optional] | | **first_year_designated_roth_contrib** | **String** | | [optional] | -| **fatca_requirement_indicator** | **Boolean** | | [optional] | | **date_of_payment** | **String** | | [optional] | | **id** | **String** | | [optional] | | **type** | **String** | | [optional] | @@ -40,10 +39,14 @@ | **tin_match_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **address_verification** | **Boolean** | | [optional] | | **address_verification_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**Form1099StatusDetail**](Form1099StatusDetail.md) | | [optional] | | **reference_id** | **String** | | [optional] | | **email** | **String** | | [optional] | | **tin_type** | **String** | | [optional] | +| **fatca_filing_requirement** | **Boolean** | | [optional] | | **tin** | **String** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | | **recipient_name** | **String** | | [optional] | | **recipient_second_name** | **String** | | [optional] | | **address** | **String** | | [optional] | @@ -51,8 +54,10 @@ | **city** | **String** | | [optional] | | **state** | **String** | | [optional] | | **zip** | **String** | | [optional] | -| **foreign_province** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | | **country_code** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | | **validation_errors** | [**Array<ValidationError>**](ValidationError.md) | | [optional] | | **created_at** | **Time** | | [optional] | | **updated_at** | **Time** | | [optional] | @@ -82,7 +87,6 @@ instance = AvalaraSdk::A1099::V2::Form1099R.new( total_employee_contributions: null, amount_allocable_to_irr: null, first_year_designated_roth_contrib: null, - fatca_requirement_indicator: null, date_of_payment: null, id: null, type: null, @@ -100,10 +104,14 @@ instance = AvalaraSdk::A1099::V2::Form1099R.new( tin_match_status: null, address_verification: null, address_verification_status: null, + e_delivery_status: null, reference_id: null, email: null, tin_type: null, + fatca_filing_requirement: null, tin: null, + no_tin: null, + second_tin_notice: null, recipient_name: null, recipient_second_name: null, address: null, @@ -111,8 +119,10 @@ instance = AvalaraSdk::A1099::V2::Form1099R.new( city: null, state: null, zip: null, - foreign_province: null, + non_us_province: null, country_code: null, + account_number: null, + office_code: null, validation_errors: null, created_at: null, updated_at: null, diff --git a/docs/A1099/V2/Form1099RListItem.md b/docs/A1099/V2/Form1099RListItem.md index 8ddce50..77ff9f1 100644 --- a/docs/A1099/V2/Form1099RListItem.md +++ b/docs/A1099/V2/Form1099RListItem.md @@ -33,16 +33,16 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099RListItemResponse.md b/docs/A1099/V2/Form1099RListItemResponse.md index 0fef6d1..8ef1103 100644 --- a/docs/A1099/V2/Form1099RListItemResponse.md +++ b/docs/A1099/V2/Form1099RListItemResponse.md @@ -22,7 +22,6 @@ | **total_employee_contributions** | **Float** | Total employee contributions | [optional] | | **amount_allocable_to_irr** | **Float** | Amount allocable to IRR within 5 years | [optional] | | **first_year_designated_roth_contrib** | **String** | First year of designated Roth contribution | [optional] | -| **fatca_requirement_indicator** | **Boolean** | FATCA filing requirement | [optional] | | **date_of_payment** | **String** | Date of payment | [optional] | | **id** | **String** | ID of the form | [readonly] | | **type** | **String** | Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC | | @@ -88,7 +87,6 @@ instance = AvalaraSdk::A1099::V2::Form1099RListItemResponse.new( total_employee_contributions: null, amount_allocable_to_irr: null, first_year_designated_roth_contrib: null, - fatca_requirement_indicator: null, date_of_payment: null, id: 123456789, type: 1099-NEC, @@ -126,8 +124,8 @@ instance = AvalaraSdk::A1099::V2::Form1099RListItemResponse.new( office_code: null, fatca_filing_requirement: null, validation_errors: null, - created_at: 2025-07-31T02:07:40.939073500Z, - updated_at: 2025-07-31T02:07:40.939074300Z, + created_at: 2025-08-15T15:39:30.279309800Z, + updated_at: 2025-08-15T15:39:30.279310500Z, state_and_local_withholding: null ) ``` diff --git a/docs/A1099/V2/Form1099RRequest.md b/docs/A1099/V2/Form1099RRequest.md index 87670ed..f008c09 100644 --- a/docs/A1099/V2/Form1099RRequest.md +++ b/docs/A1099/V2/Form1099RRequest.md @@ -31,16 +31,16 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | diff --git a/docs/A1099/V2/Form1099RResponse.md b/docs/A1099/V2/Form1099RResponse.md new file mode 100644 index 0000000..13165d8 --- /dev/null +++ b/docs/A1099/V2/Form1099RResponse.md @@ -0,0 +1,132 @@ +# AvalaraSdk::A1099::V2::Form1099RResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **gross_distribution** | **Float** | Gross distribution | [optional] | +| **taxable_amount** | **Float** | Taxable amount | [optional] | +| **taxable_amount_not_determined** | **Boolean** | Taxable amount not determined | [optional] | +| **total_distribution_determined** | **Boolean** | Total distribution | [optional] | +| **capital_gain** | **Float** | Capital gain (included in Box 2a) | [optional] | +| **federal_income_tax_withheld** | **Float** | Federal income tax withheld | [optional] | +| **employee_contributions_or_designated_roth_or_insurance_premiums** | **Float** | Employee contributions/Designated Roth contributions or insurance premiums | [optional] | +| **net_unrealized_appreciation_in_employer_securities** | **Float** | Net unrealized appreciation in employer's securities | [optional] | +| **distribution_code** | **String** | Distribution code | [optional] | +| **second_distribution_code** | **String** | Second distribution code | [optional] | +| **ira_sep_simple** | **Boolean** | IRA/SEP/SIMPLE | [optional] | +| **traditional_ira_sep_simple_or_roth_conversion_amount** | **Float** | Traditional IRA/SEP/SIMPLE or Roth conversion amount | [optional] | +| **other_amount** | **Float** | Other amount | [optional] | +| **other_percentage** | **String** | Other percentage | [optional] | +| **total_distribution_percentage** | **String** | Total distribution percentage | [optional] | +| **total_employee_contributions** | **Float** | Total employee contributions | [optional] | +| **amount_allocable_to_irr_within5_years** | **Float** | Amount allocable to IRR within 5 years | [optional] | +| **first_year_of_designated_roth_contribution** | **String** | First year of designated Roth contribution | [optional] | +| **fatca_filing_requirement** | **Boolean** | FATCA filing requirement | [optional] | +| **date_of_payment** | **Time** | Date of payment | [optional] | +| **type** | **String** | | [optional][readonly] | +| **created_at** | **Time** | | [optional] | +| **updated_at** | **Time** | | [optional] | +| **state_and_local_withholding** | [**StateAndLocalWithholdingResponse**](StateAndLocalWithholdingResponse.md) | | [optional] | +| **tin_type** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **issuer_id** | **String** | | [optional] | +| **issuer_reference_id** | **String** | | [optional] | +| **issuer_tin** | **String** | | [optional] | +| **tax_year** | **Integer** | | [optional] | +| **reference_id** | **String** | | [optional] | +| **recipient_name** | **String** | | [optional] | +| **recipient_tin** | **String** | | [optional] | +| **recipient_second_name** | **String** | | [optional] | +| **address** | **String** | | [optional] | +| **address2** | **String** | | [optional] | +| **city** | **String** | | [optional] | +| **state** | **String** | | [optional] | +| **zip** | **String** | | [optional] | +| **email** | **String** | | [optional] | +| **account_number** | **String** | | [optional] | +| **office_code** | **String** | | [optional] | +| **non_us_province** | **String** | | [optional] | +| **country_code** | **String** | | [optional] | +| **federal_e_file** | **Boolean** | | [optional] | +| **postal_mail** | **Boolean** | | [optional] | +| **state_e_file** | **Boolean** | | [optional] | +| **tin_match** | **Boolean** | | [optional] | +| **no_tin** | **Boolean** | | [optional] | +| **second_tin_notice** | **Boolean** | | [optional] | +| **address_verification** | **Boolean** | | [optional] | +| **federal_efile_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **e_delivery_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **state_efile_status** | [**Array<StateEfileStatusDetailResponse>**](StateEfileStatusDetailResponse.md) | | [optional] | +| **postal_mail_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **tin_match_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **address_verification_status** | [**StatusDetail**](StatusDetail.md) | | [optional] | +| **validation_errors** | [**Array<ValidationErrorResponse>**](ValidationErrorResponse.md) | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::Form1099RResponse.new( + gross_distribution: null, + taxable_amount: null, + taxable_amount_not_determined: null, + total_distribution_determined: null, + capital_gain: null, + federal_income_tax_withheld: null, + employee_contributions_or_designated_roth_or_insurance_premiums: null, + net_unrealized_appreciation_in_employer_securities: null, + distribution_code: null, + second_distribution_code: null, + ira_sep_simple: null, + traditional_ira_sep_simple_or_roth_conversion_amount: null, + other_amount: null, + other_percentage: null, + total_distribution_percentage: null, + total_employee_contributions: null, + amount_allocable_to_irr_within5_years: null, + first_year_of_designated_roth_contribution: null, + fatca_filing_requirement: null, + date_of_payment: null, + type: 1099-NEC, + created_at: null, + updated_at: null, + state_and_local_withholding: null, + tin_type: EIN, + id: null, + issuer_id: null, + issuer_reference_id: null, + issuer_tin: null, + tax_year: null, + reference_id: null, + recipient_name: null, + recipient_tin: null, + recipient_second_name: null, + address: null, + address2: null, + city: null, + state: null, + zip: null, + email: null, + account_number: null, + office_code: null, + non_us_province: null, + country_code: null, + federal_e_file: null, + postal_mail: null, + state_e_file: null, + tin_match: null, + no_tin: null, + second_tin_notice: null, + address_verification: null, + federal_efile_status: null, + e_delivery_status: null, + state_efile_status: null, + postal_mail_status: null, + tin_match_status: null, + address_verification_status: null, + validation_errors: null +) +``` + diff --git a/docs/A1099/V2/FormRequestBase.md b/docs/A1099/V2/FormRequestBase.md index 17eb837..caf8424 100644 --- a/docs/A1099/V2/FormRequestBase.md +++ b/docs/A1099/V2/FormRequestBase.md @@ -10,22 +10,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -57,6 +58,7 @@ instance = AvalaraSdk::A1099::V2::FormRequestBase.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/FormRequestListItemBase.md b/docs/A1099/V2/FormRequestListItemBase.md index abc80d4..5e72485 100644 --- a/docs/A1099/V2/FormRequestListItemBase.md +++ b/docs/A1099/V2/FormRequestListItemBase.md @@ -13,22 +13,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -63,6 +64,7 @@ instance = AvalaraSdk::A1099::V2::FormRequestListItemBase.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/FormSingleRequestBase.md b/docs/A1099/V2/FormSingleRequestBase.md index 18003bc..32c3cf0 100644 --- a/docs/A1099/V2/FormSingleRequestBase.md +++ b/docs/A1099/V2/FormSingleRequestBase.md @@ -11,22 +11,23 @@ | **recipient_name** | **String** | Recipient name | [optional] | | **tin_type** | **String** | Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN | [optional] | | **recipient_second_name** | **String** | Recipient second name | [optional] | -| **address** | **String** | Address | | +| **address** | **String** | Address | [optional] | | **address2** | **String** | Address line 2 | [optional] | -| **city** | **String** | City | | +| **city** | **String** | City | [optional] | | **state** | **String** | US state. Required if CountryCode is \"US\". | [optional] | | **zip** | **String** | Zip/postal code | [optional] | | **email** | **String** | Recipient email address | [optional] | | **account_number** | **String** | Account number | [optional] | | **office_code** | **String** | Office code | [optional] | | **non_us_province** | **String** | Foreign province | [optional] | -| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | | +| **country_code** | **String** | Country code, as defined at https://www.irs.gov/e-file-providers/country-codes | [optional] | | **federal_e_file** | **Boolean** | Boolean indicating that federal e-filing should be scheduled for this form | [optional] | | **postal_mail** | **Boolean** | Boolean indicating that postal mailing to the recipient should be scheduled for this form | [optional] | | **state_e_file** | **Boolean** | Boolean indicating that state e-filing should be scheduled for this form | [optional] | | **tin_match** | **Boolean** | Boolean indicating that TIN Matching should be scheduled for this form | [optional] | | **no_tin** | **Boolean** | Indicates whether the recipient has no TIN | [optional] | | **second_tin_notice** | **Boolean** | Second TIN notice in three years | [optional] | +| **fatca_filing_requirement** | **Boolean** | Fatca filing requirement | [optional] | | **address_verification** | **Boolean** | Boolean indicating that address verification should be scheduled for this form | [optional] | | **state_and_local_withholding** | [**StateAndLocalWithholdingRequest**](StateAndLocalWithholdingRequest.md) | State and local withholding information | [optional] | @@ -59,6 +60,7 @@ instance = AvalaraSdk::A1099::V2::FormSingleRequestBase.new( tin_match: null, no_tin: null, second_tin_notice: null, + fatca_filing_requirement: null, address_verification: null, state_and_local_withholding: null ) diff --git a/docs/A1099/V2/Forms1099Api.md b/docs/A1099/V2/Forms1099Api.md index f3ff8fc..6df6027 100644 --- a/docs/A1099/V2/Forms1099Api.md +++ b/docs/A1099/V2/Forms1099Api.md @@ -42,7 +42,7 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client avalara_version = '2.0.0' # String | API version opts = { dry_run: true, # Boolean | - x_correlation_id: '85d89e46-adbc-4a36-a615-347bd0ad3549', # String | Unique correlation Id in a GUID format + x_correlation_id: 'fc005c04-52f7-44d6-bf16-6551603a8324', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . bulk_upsert1099_forms_request: AvalaraSdk::A1099::V2::Form1042SList.new # BulkUpsert1099FormsRequest | } @@ -126,9 +126,9 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'ac2b2725-9848-49c3-9255-1d638490cc87', # String | Unique correlation Id in a GUID format + x_correlation_id: '13eb4eb0-0e7d-41e3-adf3-61b131c1a92c', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . - i_create_form1099_request: AvalaraSdk::A1099::V2::Form1099DivRequest.new({address: 'address_example', city: 'city_example', country_code: 'country_code_example'}) # ICreateForm1099Request | + i_create_form1099_request: AvalaraSdk::A1099::V2::Form1099DivRequest.new # ICreateForm1099Request | } begin @@ -210,7 +210,7 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client id = 'id_example' # String | The unique identifier of the desired form to delete. avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '0839267c-9208-438e-9fcd-3c193fd0216a', # String | Unique correlation Id in a GUID format + x_correlation_id: '2bcc9cf0-9638-46d5-a792-be61566e0651', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -292,7 +292,7 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client id = 'id_example' # String | avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '4c3931c8-2cd4-42f3-9042-7c23336b9f32', # String | Unique correlation Id in a GUID format + x_correlation_id: '6e842a03-8b64-4b02-8c5e-7073bf4e8a8c', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -376,7 +376,7 @@ id = 'id_example' # String | The ID of the form avalara_version = '2.0.0' # String | API version opts = { mark_edelivered: true, # Boolean | Optional boolean that if set indicates that the form should be marked as having been successfully edelivered - x_correlation_id: '9133bfa6-8661-46dc-bbf2-4d45d0439e76', # String | Unique correlation Id in a GUID format + x_correlation_id: '7b4aa70b-3a10-4fa0-bf19-7592170409b7', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -463,7 +463,7 @@ opts = { top: 56, # Integer | If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. skip: 56, # Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. order_by: 'order_by_example', # String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example issuerReferenceId ASC. Supported sorting fields are: issuerReferenceId taxYear createdAt recipientName updatedAt - x_correlation_id: '1d1f9e87-4684-46a4-9439-85058f82f858', # String | Unique correlation Id in a GUID format + x_correlation_id: '7766bce5-4834-4907-81e9-dd0fd6c13079', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -549,9 +549,9 @@ api_instance = AvalaraSdk::A1099::V2::Forms1099Api.new api_client id = 'id_example' # String | avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'e59dff29-007e-4aa7-8b11-5ba83766a56a', # String | Unique correlation Id in a GUID format + x_correlation_id: '9f622e4f-7992-4e4f-8e24-e628c5339402', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . - i_update_form1099_request: AvalaraSdk::A1099::V2::Form1099DivRequest.new({address: 'address_example', city: 'city_example', country_code: 'country_code_example'}) # IUpdateForm1099Request | + i_update_form1099_request: AvalaraSdk::A1099::V2::Form1099DivRequest.new # IUpdateForm1099Request | } begin diff --git a/docs/A1099/V2/FormsW9Api.md b/docs/A1099/V2/FormsW9Api.md index 167c679..84148ab 100644 --- a/docs/A1099/V2/FormsW9Api.md +++ b/docs/A1099/V2/FormsW9Api.md @@ -41,7 +41,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '479b3bdd-2b5c-48b3-b24c-b0ecbe0d07c5', # String | Unique correlation Id in a GUID format + x_correlation_id: 'd8cc3501-afdd-4b9e-af90-85db9793cbbc', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . create_w9_form_request: AvalaraSdk::A1099::V2::W4FormRequest.new # CreateW9FormRequest | Form to be created } @@ -125,7 +125,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | ID of the form to delete avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '7d79301a-ebfd-40a1-a1af-a9a1e44f8936', # String | Unique correlation Id in a GUID format + x_correlation_id: '0013f0dd-e304-45c6-9f17-bd023626ba48', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -207,7 +207,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | ID of the form avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'b4cc81aa-1d2e-4cef-aa68-705ea2aaf594', # String | Unique correlation Id in a GUID format + x_correlation_id: 'e76a4eb2-f5f0-4586-888a-c25443f75fc4', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -263,11 +263,11 @@ end ## list_w9_forms -> list_w9_forms(avalara_version, opts) +> list_w9_forms(avalara_version, opts) List W9/W4/W8 forms -List W9/W4/W8 forms. +List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". ### Examples @@ -289,12 +289,13 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - filter: 'filter_example', # String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. - top: 56, # Integer | If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + filter: 'filter_example', # String | A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST. + 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. skip: 56, # Integer | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. order_by: 'order_by_example', # String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. - count: true, # Boolean | When true, returns a @recordSetCount in the result set - x_correlation_id: '8afdb9ff-bb10-414e-bd81-5cb5175aad0c', # String | Unique correlation Id in a GUID format + count: true, # Boolean | If true, return the global count of elements in the collection. + count_only: true, # Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. + x_correlation_id: '8092ac9c-17d0-4ee8-a00e-804088e5ab81', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -311,7 +312,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> list_w9_forms_with_http_info(avalara_version, opts) +> , Integer, Hash)> list_w9_forms_with_http_info(avalara_version, opts) ```ruby begin @@ -319,7 +320,7 @@ begin data, status_code, headers = api_instance.list_w9_forms_with_http_info(avalara_version, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue AvalaraSdk::A1099::V2::ApiError => e puts "Error when calling FormsW9Api->list_w9_forms_with_http_info: #{e}" end @@ -330,17 +331,18 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **avalara_version** | **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 nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. | [optional][default to 10] | -| **skip** | **Integer** | If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. | [optional][default to 0] | +| **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] | | **order_by** | **String** | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. | [optional] | -| **count** | **Boolean** | When true, returns a @recordSetCount in the result set | [optional] | +| **count** | **Boolean** | If true, return the global count of elements in the collection. | [optional] | +| **count_only** | **Boolean** | If true, return ONLY the global count of elements in the collection. It only applies when count=true. | [optional] | | **x_correlation_id** | **String** | Unique correlation Id in a GUID format | [optional] | | **x_avalara_client** | **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 -[**PaginatedW9FormsModel**](PaginatedW9FormsModel.md) +[**PaginatedQueryResultModelW9FormBaseResponse**](PaginatedQueryResultModelW9FormBaseResponse.md) ### Authorization @@ -381,7 +383,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | The ID of the W9/W4/W8 form. avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '37d1fca1-1efa-454b-a3ff-94ec972b74b4', # String | Unique correlation Id in a GUID format + x_correlation_id: '05ca3285-5ab1-43c0-88d7-f23c30428d54', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -464,7 +466,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | ID of the form to update avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '8c37ab84-020e-452c-ad69-df89a9ac9cfa', # String | Unique correlation Id in a GUID format + x_correlation_id: '87498441-c774-4e3a-864e-dd604bff0d41', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . iw9_form_data_models_one_of: AvalaraSdk::A1099::V2::W4FormDataModel.new # IW9FormDataModelsOneOf | Form to be updated } @@ -549,7 +551,7 @@ api_instance = AvalaraSdk::A1099::V2::FormsW9Api.new api_client id = 'id_example' # String | Id of the form avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '2ce587b6-7523-41b2-8033-347329740bcb', # String | Unique correlation Id in a GUID format + x_correlation_id: '453b7d64-1fd0-4ed3-ba3c-a1d9ca1d69e6', # String | Unique correlation Id in a GUID format x_avalara_client: '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('/path/to/some/file') # File | } diff --git a/docs/A1099/V2/Get1099Form200Response.md b/docs/A1099/V2/Get1099Form200Response.md index 2b00d80..5b68e64 100644 --- a/docs/A1099/V2/Get1099Form200Response.md +++ b/docs/A1099/V2/Get1099Form200Response.md @@ -18,6 +18,7 @@ AvalaraSdk::A1099::V2::Get1099Form200Response.openapi_one_of # :'Form1095BListItemResponse', # :'Form1099BaseResponse', # :'Form1099DivListItemResponse', +# :'Form1099IntListItemResponse', # :'Form1099KListItemResponse', # :'Form1099MiscListItemResponse', # :'Form1099NecListItemResponse', @@ -53,6 +54,7 @@ AvalaraSdk::A1099::V2::Get1099Form200Response.build(data_that_doesnt_match) - `Form1095BListItemResponse` - `Form1099BaseResponse` - `Form1099DivListItemResponse` +- `Form1099IntListItemResponse` - `Form1099KListItemResponse` - `Form1099MiscListItemResponse` - `Form1099NecListItemResponse` diff --git a/docs/A1099/V2/Issuers1099Api.md b/docs/A1099/V2/Issuers1099Api.md index f339c5c..3a64465 100644 --- a/docs/A1099/V2/Issuers1099Api.md +++ b/docs/A1099/V2/Issuers1099Api.md @@ -39,7 +39,7 @@ api_instance = AvalaraSdk::A1099::V2::Issuers1099Api.new api_client avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'cd08f20c-e93f-4ed9-9fcc-1c43161a5ab1', # String | Unique correlation Id in a GUID format + x_correlation_id: 'd2b38090-a4c9-4170-bc1d-6cc2778b0bd0', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . issuer_command: AvalaraSdk::A1099::V2::IssuerCommand.new # IssuerCommand | The issuer to create } @@ -123,7 +123,7 @@ api_instance = AvalaraSdk::A1099::V2::Issuers1099Api.new api_client id = 'id_example' # String | Id of the issuer to delete avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: 'b31ed293-452b-4f1a-9781-92bf4cc732b2', # String | Unique correlation Id in a GUID format + x_correlation_id: '22e9dc96-0041-4e27-ab37-038dc9d6c215', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -205,7 +205,7 @@ api_instance = AvalaraSdk::A1099::V2::Issuers1099Api.new api_client id = 'id_example' # String | Id of the issuer to retrieve avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '6f7412dc-b5d2-4657-9ae0-9eb72e1cbaac', # String | Unique correlation Id in a GUID format + x_correlation_id: '86c9eff5-1ed3-49b1-be09-a117b235f3e2', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -293,7 +293,7 @@ opts = { order_by: 'order_by_example', # String | A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. count: true, # Boolean | If true, return the global count of elements in the collection. count_only: true, # Boolean | If true, return ONLY the global count of elements in the collection. It only applies when count=true. - x_correlation_id: '6ab59fe8-83fc-4fa3-9617-abb9b8d1bdb7', # String | Unique correlation Id in a GUID format + x_correlation_id: '0983f292-e1e0-4415-9cdc-b70482da76b0', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } @@ -381,7 +381,7 @@ api_instance = AvalaraSdk::A1099::V2::Issuers1099Api.new api_client id = 'id_example' # String | Id of the issuer to update avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '2f427cf4-fa55-4abb-85da-d79a4a846191', # String | Unique correlation Id in a GUID format + x_correlation_id: 'f43f2c52-c35e-4e50-b1ad-2923b624e5a0', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . issuer_command: AvalaraSdk::A1099::V2::IssuerCommand.new # IssuerCommand | The issuer to update } diff --git a/docs/A1099/V2/Jobs1099Api.md b/docs/A1099/V2/Jobs1099Api.md index a246616..7e8c476 100644 --- a/docs/A1099/V2/Jobs1099Api.md +++ b/docs/A1099/V2/Jobs1099Api.md @@ -36,7 +36,7 @@ api_instance = AvalaraSdk::A1099::V2::Jobs1099Api.new api_client id = 'id_example' # String | Job id obtained from other API responses, like `/1099/bulk-upsert`. avalara_version = '2.0.0' # String | API version opts = { - x_correlation_id: '85be69fe-08d7-40f4-8ce2-dd043ea36143', # String | Unique correlation Id in a GUID format + x_correlation_id: '25f0c6ce-1d1a-45f6-b828-15789bccc55b', # String | Unique correlation Id in a GUID format x_avalara_client: '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/) . } diff --git a/docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md b/docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md index 499f932..134a2b4 100644 --- a/docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md +++ b/docs/A1099/V2/PaginatedQueryResultModelCompanyResponse.md @@ -15,7 +15,7 @@ require 'avalara_sdk' instance = AvalaraSdk::A1099::V2::PaginatedQueryResultModelCompanyResponse.new( recordset_count: null, - value: [{"id":"","referenceId":"","groupName":"","name":"","dbaName":"","address":"","city":"","state":"","foreignProvince":"","zip":"","countryCode":"","email":"","telephone":"","tin":"","doTinMatch":null,"resendRequests":null,"resendIntervalDays":null,"maxReminderAttempts":null,"createdAt":null,"updatedAt":null}], + value: null, next_link: null ) ``` diff --git a/docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md b/docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md index 2299d8b..ebd6b58 100644 --- a/docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md +++ b/docs/A1099/V2/PaginatedQueryResultModelIssuerResponse.md @@ -15,7 +15,7 @@ require 'avalara_sdk' instance = AvalaraSdk::A1099::V2::PaginatedQueryResultModelIssuerResponse.new( recordset_count: null, - value: [{"id":"0","name":"Acme Corp","nameDba":"Second Name Corp","tin":"23-8234555","referenceId":"1891810-9819891","telephone":"520-555-1234","taxYear":2024,"countryCode":"US","email":"roadrunner@acmecorp.com","address":"1234 Meep Meep Blvd","city":"Tucson","state":"AZ","zip":"35004","foreignProvince":"1981981","transferAgentName":"test","lastFiling":false,"createdAt":"0001-01-01T00:00:00","updatedAt":"0001-01-01T00:00:00"}], + value: null, next_link: null ) ``` diff --git a/docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md b/docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md new file mode 100644 index 0000000..1ef9b42 --- /dev/null +++ b/docs/A1099/V2/PaginatedQueryResultModelW9FormBaseResponse.md @@ -0,0 +1,22 @@ +# AvalaraSdk::A1099::V2::PaginatedQueryResultModelW9FormBaseResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **recordset_count** | **Integer** | | [optional] | +| **value** | [**Array<CreateW9Form201Response>**](CreateW9Form201Response.md) | | [optional] | +| **next_link** | **String** | | [optional] | + +## Example + +```ruby +require 'avalara_sdk' + +instance = AvalaraSdk::A1099::V2::PaginatedQueryResultModelW9FormBaseResponse.new( + recordset_count: null, + value: null, + next_link: null +) +``` + diff --git a/docs/A1099/V2/Update1099Form200Response.md b/docs/A1099/V2/Update1099Form200Response.md index f21db79..07fc659 100644 --- a/docs/A1099/V2/Update1099Form200Response.md +++ b/docs/A1099/V2/Update1099Form200Response.md @@ -15,10 +15,13 @@ AvalaraSdk::A1099::V2::Update1099Form200Response.openapi_one_of # => # [ # :'Form1042SResponse', +# :'Form1095BResponse', # :'Form1099DivResponse', +# :'Form1099IntResponse', # :'Form1099KResponse', # :'Form1099MiscResponse', # :'Form1099NecResponse', +# :'Form1099RResponse', # :'FormResponseBase' # ] ``` @@ -48,10 +51,13 @@ AvalaraSdk::A1099::V2::Update1099Form200Response.build(data_that_doesnt_match) #### Return type - `Form1042SResponse` +- `Form1095BResponse` - `Form1099DivResponse` +- `Form1099IntResponse` - `Form1099KResponse` - `Form1099MiscResponse` - `Form1099NecResponse` +- `Form1099RResponse` - `FormResponseBase` - `nil` (if no type matches) diff --git a/docs/A1099/V2/W4FormResponse.md b/docs/A1099/V2/W4FormResponse.md index 208486a..d088a78 100644 --- a/docs/A1099/V2/W4FormResponse.md +++ b/docs/A1099/V2/W4FormResponse.md @@ -23,20 +23,6 @@ | **additional_withheld** | **Float** | The additional amount withheld. | [optional] | | **exempt_from_withholding** | **Boolean** | Indicates whether the employee is exempt from withholding. | [optional] | | **office_code** | **String** | The office code associated with the form. | [optional] | -| **id** | **String** | The unique identifier for the form. | [optional] | -| **type** | **String** | The form type. | [optional] | -| **entry_status** | **String** | The form status. | [optional] | -| **entry_status_date** | **Time** | The timestamp for the latest status update. | [optional] | -| **reference_id** | **String** | A reference identifier for the form. | [optional] | -| **company_id** | **String** | The ID of the associated company. | [optional] | -| **display_name** | **String** | The display name associated with the form. | [optional] | -| **email** | **String** | The email address of the individual associated with the form. | [optional] | -| **archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -| **signature** | **String** | The signature of the form. | [optional] | -| **signed_date** | **Time** | The date the form was signed. | [optional] | -| **e_delivery_consented_at** | **Time** | The date when e-delivery was consented. | [optional] | -| **created_at** | **Time** | The creation date of the form. | [optional] | -| **updated_at** | **Time** | The last updated date of the form. | [optional] | ## Example @@ -62,21 +48,7 @@ instance = AvalaraSdk::A1099::V2::W4FormResponse.new( deductions: 2000, additional_withheld: 150, exempt_from_withholding: false, - office_code: OC12345, - id: null, - type: null, - entry_status: null, - entry_status_date: null, - reference_id: null, - company_id: null, - display_name: null, - email: null, - archived: null, - signature: null, - signed_date: null, - e_delivery_consented_at: null, - created_at: null, - updated_at: null + office_code: OC12345 ) ``` diff --git a/docs/A1099/V2/W8BenEFormResponse.md b/docs/A1099/V2/W8BenEFormResponse.md index a7edd59..e9c2180 100644 --- a/docs/A1099/V2/W8BenEFormResponse.md +++ b/docs/A1099/V2/W8BenEFormResponse.md @@ -100,20 +100,6 @@ | **substantial_us_owners** | [**Array<SubstantialUsOwnerResponse>**](SubstantialUsOwnerResponse.md) | The list of substantial U.S. owners of passive NFFE. | [optional] | | **signer_name** | **String** | The name of the signer. | [optional] | | **capacity_to_sign_certification** | **Boolean** | Certifies signer has the capacity to sign for the beneficial owner. | [optional] | -| **id** | **String** | The unique identifier for the form. | [optional] | -| **type** | **String** | The form type. | [optional] | -| **entry_status** | **String** | The form status. | [optional] | -| **entry_status_date** | **Time** | The timestamp for the latest status update. | [optional] | -| **reference_id** | **String** | A reference identifier for the form. | [optional] | -| **company_id** | **String** | The ID of the associated company. | [optional] | -| **display_name** | **String** | The display name associated with the form. | [optional] | -| **email** | **String** | The email address of the individual associated with the form. | [optional] | -| **archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -| **signature** | **String** | The signature of the form. | [optional] | -| **signed_date** | **Time** | The date the form was signed. | [optional] | -| **e_delivery_consented_at** | **Time** | The date when e-delivery was consented. | [optional] | -| **created_at** | **Time** | The creation date of the form. | [optional] | -| **updated_at** | **Time** | The last updated date of the form. | [optional] | ## Example @@ -216,21 +202,7 @@ instance = AvalaraSdk::A1099::V2::W8BenEFormResponse.new( direct_reporting_nffe_sponsoring_entity: null, substantial_us_owners: [], signer_name: null, - capacity_to_sign_certification: false, - id: null, - type: null, - entry_status: null, - entry_status_date: null, - reference_id: null, - company_id: null, - display_name: null, - email: null, - archived: null, - signature: null, - signed_date: null, - e_delivery_consented_at: null, - created_at: null, - updated_at: null + capacity_to_sign_certification: false ) ``` diff --git a/docs/A1099/V2/W8BenFormResponse.md b/docs/A1099/V2/W8BenFormResponse.md index bbf74dc..847341b 100644 --- a/docs/A1099/V2/W8BenFormResponse.md +++ b/docs/A1099/V2/W8BenFormResponse.md @@ -30,20 +30,6 @@ | **income_type** | **String** | The type of income covered by the treaty. | [optional] | | **signer_name** | **String** | The name of the signer of the form. | [optional] | | **signer_capacity** | **String** | The capacity in which the signer is signing the form. | [optional] | -| **id** | **String** | The unique identifier for the form. | [optional] | -| **type** | **String** | The form type. | [optional] | -| **entry_status** | **String** | The form status. | [optional] | -| **entry_status_date** | **Time** | The timestamp for the latest status update. | [optional] | -| **reference_id** | **String** | A reference identifier for the form. | [optional] | -| **company_id** | **String** | The ID of the associated company. | [optional] | -| **display_name** | **String** | The display name associated with the form. | [optional] | -| **email** | **String** | The email address of the individual associated with the form. | [optional] | -| **archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -| **signature** | **String** | The signature of the form. | [optional] | -| **signed_date** | **Time** | The date the form was signed. | [optional] | -| **e_delivery_consented_at** | **Time** | The date when e-delivery was consented. | [optional] | -| **created_at** | **Time** | The creation date of the form. | [optional] | -| **updated_at** | **Time** | The last updated date of the form. | [optional] | ## Example @@ -76,21 +62,7 @@ instance = AvalaraSdk::A1099::V2::W8BenFormResponse.new( withholding_rate: 15%, income_type: Dividend, signer_name: Alice Johnson, - signer_capacity: Authorized Representative, - id: null, - type: null, - entry_status: null, - entry_status_date: null, - reference_id: null, - company_id: null, - display_name: null, - email: null, - archived: null, - signature: null, - signed_date: null, - e_delivery_consented_at: null, - created_at: null, - updated_at: null + signer_capacity: Authorized Representative ) ``` diff --git a/docs/A1099/V2/W8ImyFormResponse.md b/docs/A1099/V2/W8ImyFormResponse.md index 2a0bfc9..03a524b 100644 --- a/docs/A1099/V2/W8ImyFormResponse.md +++ b/docs/A1099/V2/W8ImyFormResponse.md @@ -115,20 +115,6 @@ | **sponsored_direct_reporting_nffe_certification** | **Boolean** | Certifies that the entity is a sponsored direct reporting NFFE. | [optional] | | **direct_reporting_nffe_sponsoring_entity** | **String** | The name of the entity that sponsors the direct reporting NFFE. | [optional] | | **signer_name** | **String** | The name of the signer. | [optional] | -| **id** | **String** | The unique identifier for the form. | [optional] | -| **type** | **String** | The form type. | [optional] | -| **entry_status** | **String** | The form status. | [optional] | -| **entry_status_date** | **Time** | The timestamp for the latest status update. | [optional] | -| **reference_id** | **String** | A reference identifier for the form. | [optional] | -| **company_id** | **String** | The ID of the associated company. | [optional] | -| **display_name** | **String** | The display name associated with the form. | [optional] | -| **email** | **String** | The email address of the individual associated with the form. | [optional] | -| **archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -| **signature** | **String** | The signature of the form. | [optional] | -| **signed_date** | **Time** | The date the form was signed. | [optional] | -| **e_delivery_consented_at** | **Time** | The date when e-delivery was consented. | [optional] | -| **created_at** | **Time** | The creation date of the form. | [optional] | -| **updated_at** | **Time** | The last updated date of the form. | [optional] | ## Example @@ -246,21 +232,7 @@ instance = AvalaraSdk::A1099::V2::W8ImyFormResponse.new( passive_nffe_certification: false, sponsored_direct_reporting_nffe_certification: false, direct_reporting_nffe_sponsoring_entity: null, - signer_name: null, - id: null, - type: null, - entry_status: null, - entry_status_date: null, - reference_id: null, - company_id: null, - display_name: null, - email: null, - archived: null, - signature: null, - signed_date: null, - e_delivery_consented_at: null, - created_at: null, - updated_at: null + signer_name: null ) ``` diff --git a/docs/A1099/V2/W9FormBaseResponse.md b/docs/A1099/V2/W9FormBaseResponse.md index b89b51c..35976cf 100644 --- a/docs/A1099/V2/W9FormBaseResponse.md +++ b/docs/A1099/V2/W9FormBaseResponse.md @@ -5,7 +5,6 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | The unique identifier for the form. | [optional] | -| **type** | **String** | The form type. | [optional] | | **entry_status** | **String** | The form status. | [optional] | | **entry_status_date** | **Time** | The timestamp for the latest status update. | [optional] | | **reference_id** | **String** | A reference identifier for the form. | [optional] | @@ -18,6 +17,7 @@ | **e_delivery_consented_at** | **Time** | The date when e-delivery was consented. | [optional] | | **created_at** | **Time** | The creation date of the form. | [optional] | | **updated_at** | **Time** | The last updated date of the form. | [optional] | +| **type** | **String** | The type of the response object. | [optional] | ## Example @@ -26,7 +26,6 @@ require 'avalara_sdk' instance = AvalaraSdk::A1099::V2::W9FormBaseResponse.new( id: null, - type: null, entry_status: null, entry_status_date: null, reference_id: null, @@ -38,7 +37,8 @@ instance = AvalaraSdk::A1099::V2::W9FormBaseResponse.new( signed_date: null, e_delivery_consented_at: null, created_at: null, - updated_at: null + updated_at: null, + type: null ) ``` diff --git a/docs/A1099/V2/W9FormResponse.md b/docs/A1099/V2/W9FormResponse.md index 42def54..b0f4e21 100644 --- a/docs/A1099/V2/W9FormResponse.md +++ b/docs/A1099/V2/W9FormResponse.md @@ -23,20 +23,6 @@ | **backup_withholding** | **Boolean** | Indicates whether backup withholding applies. | [optional] | | **is1099able** | **Boolean** | Indicates whether the individual or entity should be issued a 1099 form. | [optional] | | **tin_match_status** | [**TinMatchStatusResponse**](TinMatchStatusResponse.md) | The TIN Match status from IRS. | [optional] | -| **id** | **String** | The unique identifier for the form. | [optional] | -| **type** | **String** | The form type. | [optional] | -| **entry_status** | **String** | The form status. | [optional] | -| **entry_status_date** | **Time** | The timestamp for the latest status update. | [optional] | -| **reference_id** | **String** | A reference identifier for the form. | [optional] | -| **company_id** | **String** | The ID of the associated company. | [optional] | -| **display_name** | **String** | The display name associated with the form. | [optional] | -| **email** | **String** | The email address of the individual associated with the form. | [optional] | -| **archived** | **Boolean** | Indicates whether the form is archived. | [optional] | -| **signature** | **String** | The signature of the form. | [optional] | -| **signed_date** | **Time** | The date the form was signed. | [optional] | -| **e_delivery_consented_at** | **Time** | The date when e-delivery was consented. | [optional] | -| **created_at** | **Time** | The creation date of the form. | [optional] | -| **updated_at** | **Time** | The last updated date of the form. | [optional] | ## Example @@ -62,21 +48,7 @@ instance = AvalaraSdk::A1099::V2::W9FormResponse.new( tin: 12-3456789, backup_withholding: false, is1099able: true, - tin_match_status: null, - id: null, - type: null, - entry_status: null, - entry_status_date: null, - reference_id: null, - company_id: null, - display_name: null, - email: null, - archived: null, - signature: null, - signed_date: null, - e_delivery_consented_at: null, - created_at: null, - updated_at: null + tin_match_status: null ) ``` diff --git a/lib/avalara_sdk.rb b/lib/avalara_sdk.rb index 300f689..e212ddf 100644 --- a/lib/avalara_sdk.rb +++ b/lib/avalara_sdk.rb @@ -42,6 +42,7 @@ require File.expand_path( '../avalara_sdk/models/A1099/V2/data.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/error_model.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/error_response_errors_inner.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/error_response_item.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/error_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form_request_base.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form_request_csv_base.rb', __FILE__) @@ -54,10 +55,12 @@ require File.expand_path( '../avalara_sdk/models/A1099/V2/form1042_s_list.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1042_s_request.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1042_s_response.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1042_s.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1095_b_list_item_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1095_b_list_item.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1095_b_list.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1095_b_request.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1095_b_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1095_b.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1095_c_list_item.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1095_c_list.rb', __FILE__) @@ -68,6 +71,13 @@ require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_div_list.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_div_request.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_div_response.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_div.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_int_list_item.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_int_list.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_int_request.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_int_response.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_int.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_k_list_item_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_k_list_item.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_k_list.rb', __FILE__) @@ -90,11 +100,13 @@ require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_nec_request.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_nec_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_nec.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_proccess_result.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_r_list_item.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_r_list.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_r_request.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_r_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_r.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_status_detail_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/form1099_status_detail.rb', __FILE__) @@ -115,6 +127,7 @@ require File.expand_path( '../avalara_sdk/models/A1099/V2/offer_and_coverage_request.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/paginated_query_result_model_company_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/paginated_query_result_model_issuer_response.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/paginated_query_result_model_w9_form_base_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/paginated_query_result_model.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/paginated_w9_forms_model.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/primary_withholding_agent_request.rb', __FILE__) @@ -137,6 +150,7 @@ require File.expand_path( '../avalara_sdk/models/A1099/V2/validation_error.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w4_form_data_model.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w4_form_request.rb', __FILE__) +require File.expand_path( '../avalara_sdk/models/A1099/V2/w9_form_base_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w4_form_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb', __FILE__) @@ -149,7 +163,6 @@ require File.expand_path( '../avalara_sdk/models/A1099/V2/w8_imy_form_request.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w8_imy_form_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w9_form_base_request.rb', __FILE__) -require File.expand_path( '../avalara_sdk/models/A1099/V2/w9_form_base_response.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w9_form_data_model.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w9_form_request.rb', __FILE__) require File.expand_path( '../avalara_sdk/models/A1099/V2/w9_form_response.rb', __FILE__) diff --git a/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb b/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb index 2343d18..efd995b 100644 --- a/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb b/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb index 7da1dd9..8b60bf5 100644 --- a/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb b/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb index 98cc8a4..a7a0b5e 100644 --- a/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end @@ -485,26 +485,27 @@ def get_w9_form_with_http_info(request_parameters) end # List W9/W4/W8 forms - # List W9/W4/W8 forms. - # @param avalara_version [String] API version # @param 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>. # @param top [Integer] If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. # @param order_by [String] A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. # @param count [Boolean] When true, returns a @recordSetCount in the result set # @param x_correlation_id [String] Unique correlation Id in a GUID format # @param x_avalara_client [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/) . - # @return [PaginatedW9FormsModel] + # List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". + # @param avalara_version [String] API version # @param 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>. # @param 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. # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. # @param order_by [String] A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. # @param count [Boolean] If true, return the global count of elements in the collection. # @param count_only [Boolean] If true, return ONLY the global count of elements in the collection. It only applies when count=true. # @param x_correlation_id [String] Unique correlation Id in a GUID format # @param x_avalara_client [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/) . + # @return [PaginatedQueryResultModelW9FormBaseResponse] def list_w9_forms(request_parameters) data, _status_code, _headers = list_w9_forms_with_http_info(request_parameters) data end # List W9/W4/W8 forms - # List W9/W4/W8 forms. + # List W9/W4/W8 forms. Filterable/Sortable fields are: \"companyId\", \"type\", \"displayName\", \"entryStatus\", \"email\", \"archived\" and \"referenceId\". # @param avalara_version [String] API version - # @param 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>. - # @param top [Integer] If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + # @param 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>. + # @param 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. # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. # @param order_by [String] A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. - # @param count [Boolean] When true, returns a @recordSetCount in the result set + # @param count [Boolean] If true, return the global count of elements in the collection. + # @param count_only [Boolean] If true, return ONLY the global count of elements in the collection. It only applies when count=true. # @param x_correlation_id [String] Unique correlation Id in a GUID format # @param x_avalara_client [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/) . - # @return [Array<(PaginatedW9FormsModel, Integer, Hash)>] PaginatedW9FormsModel data, response status code and response headers + # @return [Array<(PaginatedQueryResultModelW9FormBaseResponse, Integer, Hash)>] PaginatedQueryResultModelW9FormBaseResponse data, response status code and response headers def list_w9_forms_with_http_info(request_parameters) # OAuth2 Scopes required_scopes = '' @@ -515,6 +516,7 @@ def list_w9_forms_with_http_info(request_parameters) skip = request_parameters.get_skip() order_by = request_parameters.get_order_by() count = request_parameters.get_count() + count_only = request_parameters.get_count_only() x_correlation_id = request_parameters.get_x_correlation_id() x_avalara_client = request_parameters.get_x_avalara_client() # verify the required parameter 'avalara_version' is set @@ -541,6 +543,9 @@ def list_w9_forms_with_http_info(request_parameters) if !count.nil? query_params[:'count'] = count end + if !count_only.nil? + query_params[:'countOnly'] = count_only + end # header parameters header_params = {} @@ -563,7 +568,7 @@ def list_w9_forms_with_http_info(request_parameters) post_body = {} # return_type - return_type = 'PaginatedW9FormsModel' + return_type = 'PaginatedQueryResultModelW9FormBaseResponse' # auth_names auth_names = ['bearer'] @@ -1020,11 +1025,12 @@ def set_x_avalara_client(x_avalara_client) # Represents the Request object for the ListW9Forms API # # @param String $avalara_version API version (required) - # @param String $filter 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) - # @param Integer $top If nonzero, return no more than this number of results. Used with skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. (optional, default to 10) - # @param Integer $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional, default to 0) + # @param String $filter 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) + # @param Integer $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 Integer $skip If nonzero, skip this number of results before returning data. Used with top to provide pagination for large datasets. (optional) # @param String $order_by A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC. (optional) - # @param Boolean $count When true, returns a @recordSetCount in the result set (optional) + # @param Boolean $count If true, return the global count of elements in the collection. (optional) + # @param Boolean $count_only If true, return ONLY the global count of elements in the collection. It only applies when count=true. (optional) # @param String $x_correlation_id Unique correlation Id in a GUID format (optional) # @param String $x_avalara_client 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) # @@ -1041,6 +1047,8 @@ class ListW9FormsRequestSdk attr_accessor :count + attr_accessor :count_only + attr_accessor :x_correlation_id attr_accessor :x_avalara_client @@ -1096,6 +1104,14 @@ def set_count(count) @count = count end + def get_count_only() + return @count_only + end + + def set_count_only(count_only) + @count_only = count_only + end + def get_x_correlation_id() return @x_correlation_id end diff --git a/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb b/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb index 1185295..5bb1bc1 100644 --- a/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb b/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb index fe06309..c170b30 100644 --- a/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb +++ b/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb index 18a1b6a..77f6dc6 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb index d0fdfa2..f64bcc8 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb index d0dd8a9..9a5b461 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb index 7b25b02..b3af3d1 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb index 3f0eb5a..0ef4dac 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb index bdae480..3a2d30d 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb b/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb index bc15a7c..29d0574 100644 --- a/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +++ b/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb @@ -17,7 +17,7 @@ def initialize(api_client) if (api_client.nil?) fail ArgumentError,'api_client is nil' end - api_client.set_sdk_version("25.8.1") + api_client.set_sdk_version("25.8.2") @api_client = api_client end diff --git a/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb b/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb index 78346cf..78c363c 100644 --- a/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb @@ -19,6 +19,7 @@ def openapi_one_of :'Form1095BList', :'Form1095CList', :'Form1099DivList', + :'Form1099IntList', :'Form1099KList', :'Form1099MiscList', :'Form1099NecList', diff --git a/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb b/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb index 9fe387e..4a3b792 100644 --- a/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +++ b/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end diff --git a/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb b/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb index 3f75d6f..1e59639 100644 --- a/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb @@ -19,6 +19,7 @@ def openapi_one_of :'Form1095BListItemResponse', :'Form1099BaseResponse', :'Form1099DivListItemResponse', + :'Form1099IntListItemResponse', :'Form1099KListItemResponse', :'Form1099MiscListItemResponse', :'Form1099NecListItemResponse', diff --git a/lib/avalara_sdk/models/A1099/V2/error_response.rb b/lib/avalara_sdk/models/A1099/V2/error_response.rb index cfebdeb..829a09d 100644 --- a/lib/avalara_sdk/models/A1099/V2/error_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/error_response.rb @@ -32,7 +32,7 @@ def self.acceptable_attributes def self.openapi_types { :'title' => :'String', - :'errors' => :'Array' + :'errors' => :'Array' } end diff --git a/lib/avalara_sdk/models/A1099/V2/error_response_item.rb b/lib/avalara_sdk/models/A1099/V2/error_response_item.rb new file mode 100644 index 0000000..d9e8401 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/error_response_item.rb @@ -0,0 +1,221 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class ErrorResponseItem + attr_accessor :type + + attr_accessor :detail + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'detail' => :'detail' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'detail' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'type', + :'detail' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::ErrorResponseItem` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::ErrorResponseItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + detail == o.detail + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, detail].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1042_s.rb b/lib/avalara_sdk/models/A1099/V2/form1042_s.rb new file mode 100644 index 0000000..1cb40be --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1042_s.rb @@ -0,0 +1,824 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1042S + attr_accessor :unique_form_id + + attr_accessor :recipient_date_of_birth + + attr_accessor :recipient_giin + + attr_accessor :recipient_foreign_tin + + attr_accessor :lob_code + + attr_accessor :income_code + + attr_accessor :gross_income + + attr_accessor :withholding_indicator + + attr_accessor :tax_country_code + + attr_accessor :exemption_code_chap3 + + attr_accessor :exemption_code_chap4 + + attr_accessor :tax_rate_chap3 + + attr_accessor :withholding_allowance + + attr_accessor :federal_tax_withheld + + attr_accessor :tax_not_deposited_indicator + + attr_accessor :academic_indicator + + attr_accessor :tax_withheld_other_agents + + attr_accessor :amount_repaid + + attr_accessor :tax_paid_agent + + attr_accessor :chap3_status_code + + attr_accessor :chap4_status_code + + attr_accessor :primary_withholding_agent + + attr_accessor :intermediary_or_flow_through + + attr_accessor :id + + attr_accessor :type + + attr_accessor :issuer_id + + attr_accessor :issuer_reference_id + + attr_accessor :issuer_tin + + attr_accessor :tax_year + + attr_accessor :federal_efile + + attr_accessor :federal_efile_status + + attr_accessor :state_efile + + attr_accessor :state_efile_status + + attr_accessor :postal_mail + + attr_accessor :postal_mail_status + + attr_accessor :tin_match + + attr_accessor :tin_match_status + + attr_accessor :address_verification + + attr_accessor :address_verification_status + + attr_accessor :e_delivery_status + + attr_accessor :reference_id + + attr_accessor :email + + attr_accessor :tin_type + + attr_accessor :fatca_filing_requirement + + attr_accessor :tin + + attr_accessor :no_tin + + attr_accessor :second_tin_notice + + attr_accessor :recipient_name + + attr_accessor :recipient_second_name + + attr_accessor :address + + attr_accessor :address2 + + attr_accessor :city + + attr_accessor :state + + attr_accessor :zip + + attr_accessor :non_us_province + + attr_accessor :country_code + + attr_accessor :account_number + + attr_accessor :office_code + + attr_accessor :validation_errors + + attr_accessor :created_at + + attr_accessor :updated_at + + attr_accessor :state_and_local_withholding + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'unique_form_id' => :'uniqueFormId', + :'recipient_date_of_birth' => :'recipientDateOfBirth', + :'recipient_giin' => :'recipientGiin', + :'recipient_foreign_tin' => :'recipientForeignTin', + :'lob_code' => :'lobCode', + :'income_code' => :'incomeCode', + :'gross_income' => :'grossIncome', + :'withholding_indicator' => :'withholdingIndicator', + :'tax_country_code' => :'taxCountryCode', + :'exemption_code_chap3' => :'exemptionCodeChap3', + :'exemption_code_chap4' => :'exemptionCodeChap4', + :'tax_rate_chap3' => :'taxRateChap3', + :'withholding_allowance' => :'withholdingAllowance', + :'federal_tax_withheld' => :'federalTaxWithheld', + :'tax_not_deposited_indicator' => :'taxNotDepositedIndicator', + :'academic_indicator' => :'academicIndicator', + :'tax_withheld_other_agents' => :'taxWithheldOtherAgents', + :'amount_repaid' => :'amountRepaid', + :'tax_paid_agent' => :'taxPaidAgent', + :'chap3_status_code' => :'chap3StatusCode', + :'chap4_status_code' => :'chap4StatusCode', + :'primary_withholding_agent' => :'primaryWithholdingAgent', + :'intermediary_or_flow_through' => :'intermediaryOrFlowThrough', + :'id' => :'id', + :'type' => :'type', + :'issuer_id' => :'issuerId', + :'issuer_reference_id' => :'issuerReferenceId', + :'issuer_tin' => :'issuerTin', + :'tax_year' => :'taxYear', + :'federal_efile' => :'federalEfile', + :'federal_efile_status' => :'federalEfileStatus', + :'state_efile' => :'stateEfile', + :'state_efile_status' => :'stateEfileStatus', + :'postal_mail' => :'postalMail', + :'postal_mail_status' => :'postalMailStatus', + :'tin_match' => :'tinMatch', + :'tin_match_status' => :'tinMatchStatus', + :'address_verification' => :'addressVerification', + :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', + :'reference_id' => :'referenceId', + :'email' => :'email', + :'tin_type' => :'tinType', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', + :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'recipient_name' => :'recipientName', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'validation_errors' => :'validationErrors', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'state_and_local_withholding' => :'stateAndLocalWithholding' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'unique_form_id' => :'String', + :'recipient_date_of_birth' => :'Time', + :'recipient_giin' => :'String', + :'recipient_foreign_tin' => :'String', + :'lob_code' => :'String', + :'income_code' => :'String', + :'gross_income' => :'Float', + :'withholding_indicator' => :'String', + :'tax_country_code' => :'String', + :'exemption_code_chap3' => :'String', + :'exemption_code_chap4' => :'String', + :'tax_rate_chap3' => :'String', + :'withholding_allowance' => :'Float', + :'federal_tax_withheld' => :'Float', + :'tax_not_deposited_indicator' => :'Boolean', + :'academic_indicator' => :'Boolean', + :'tax_withheld_other_agents' => :'Float', + :'amount_repaid' => :'Float', + :'tax_paid_agent' => :'Float', + :'chap3_status_code' => :'String', + :'chap4_status_code' => :'String', + :'primary_withholding_agent' => :'PrimaryWithholdingAgent', + :'intermediary_or_flow_through' => :'IntermediaryOrFlowThrough', + :'id' => :'String', + :'type' => :'String', + :'issuer_id' => :'Integer', + :'issuer_reference_id' => :'String', + :'issuer_tin' => :'String', + :'tax_year' => :'Integer', + :'federal_efile' => :'Boolean', + :'federal_efile_status' => :'Form1099StatusDetail', + :'state_efile' => :'Boolean', + :'state_efile_status' => :'Array', + :'postal_mail' => :'Boolean', + :'postal_mail_status' => :'Form1099StatusDetail', + :'tin_match' => :'Boolean', + :'tin_match_status' => :'Form1099StatusDetail', + :'address_verification' => :'Boolean', + :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', + :'reference_id' => :'String', + :'email' => :'String', + :'tin_type' => :'String', + :'fatca_filing_requirement' => :'Boolean', + :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'recipient_name' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'validation_errors' => :'Array', + :'created_at' => :'Time', + :'updated_at' => :'Time', + :'state_and_local_withholding' => :'StateAndLocalWithholding' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'recipient_date_of_birth', + :'recipient_giin', + :'recipient_foreign_tin', + :'lob_code', + :'exemption_code_chap3', + :'exemption_code_chap4', + :'tax_rate_chap3', + :'withholding_allowance', + :'federal_tax_withheld', + :'tax_not_deposited_indicator', + :'academic_indicator', + :'tax_withheld_other_agents', + :'amount_repaid', + :'tax_paid_agent', + :'chap3_status_code', + :'chap4_status_code', + :'issuer_reference_id', + :'issuer_tin', + :'state_efile_status', + :'postal_mail_status', + :'tin_match_status', + :'address_verification_status', + :'e_delivery_status', + :'reference_id', + :'email', + :'tin_type', + :'fatca_filing_requirement', + :'tin', + :'second_tin_notice', + :'recipient_name', + :'recipient_second_name', + :'address', + :'address2', + :'city', + :'state', + :'zip', + :'non_us_province', + :'country_code', + :'account_number', + :'office_code', + :'validation_errors', + :'state_and_local_withholding' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'Form1099Base' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1042S` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1042S`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'unique_form_id') + self.unique_form_id = attributes[:'unique_form_id'] + end + + if attributes.key?(:'recipient_date_of_birth') + self.recipient_date_of_birth = attributes[:'recipient_date_of_birth'] + end + + if attributes.key?(:'recipient_giin') + self.recipient_giin = attributes[:'recipient_giin'] + end + + if attributes.key?(:'recipient_foreign_tin') + self.recipient_foreign_tin = attributes[:'recipient_foreign_tin'] + end + + if attributes.key?(:'lob_code') + self.lob_code = attributes[:'lob_code'] + end + + if attributes.key?(:'income_code') + self.income_code = attributes[:'income_code'] + end + + if attributes.key?(:'gross_income') + self.gross_income = attributes[:'gross_income'] + end + + if attributes.key?(:'withholding_indicator') + self.withholding_indicator = attributes[:'withholding_indicator'] + end + + if attributes.key?(:'tax_country_code') + self.tax_country_code = attributes[:'tax_country_code'] + end + + if attributes.key?(:'exemption_code_chap3') + self.exemption_code_chap3 = attributes[:'exemption_code_chap3'] + end + + if attributes.key?(:'exemption_code_chap4') + self.exemption_code_chap4 = attributes[:'exemption_code_chap4'] + end + + if attributes.key?(:'tax_rate_chap3') + self.tax_rate_chap3 = attributes[:'tax_rate_chap3'] + end + + if attributes.key?(:'withholding_allowance') + self.withholding_allowance = attributes[:'withholding_allowance'] + end + + if attributes.key?(:'federal_tax_withheld') + self.federal_tax_withheld = attributes[:'federal_tax_withheld'] + end + + if attributes.key?(:'tax_not_deposited_indicator') + self.tax_not_deposited_indicator = attributes[:'tax_not_deposited_indicator'] + end + + if attributes.key?(:'academic_indicator') + self.academic_indicator = attributes[:'academic_indicator'] + end + + if attributes.key?(:'tax_withheld_other_agents') + self.tax_withheld_other_agents = attributes[:'tax_withheld_other_agents'] + end + + if attributes.key?(:'amount_repaid') + self.amount_repaid = attributes[:'amount_repaid'] + end + + if attributes.key?(:'tax_paid_agent') + self.tax_paid_agent = attributes[:'tax_paid_agent'] + end + + if attributes.key?(:'chap3_status_code') + self.chap3_status_code = attributes[:'chap3_status_code'] + end + + if attributes.key?(:'chap4_status_code') + self.chap4_status_code = attributes[:'chap4_status_code'] + end + + if attributes.key?(:'primary_withholding_agent') + self.primary_withholding_agent = attributes[:'primary_withholding_agent'] + end + + if attributes.key?(:'intermediary_or_flow_through') + self.intermediary_or_flow_through = attributes[:'intermediary_or_flow_through'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + end + + if attributes.key?(:'issuer_reference_id') + self.issuer_reference_id = attributes[:'issuer_reference_id'] + end + + if attributes.key?(:'issuer_tin') + self.issuer_tin = attributes[:'issuer_tin'] + end + + if attributes.key?(:'tax_year') + self.tax_year = attributes[:'tax_year'] + end + + if attributes.key?(:'federal_efile') + self.federal_efile = attributes[:'federal_efile'] + end + + if attributes.key?(:'federal_efile_status') + self.federal_efile_status = attributes[:'federal_efile_status'] + end + + if attributes.key?(:'state_efile') + self.state_efile = attributes[:'state_efile'] + end + + if attributes.key?(:'state_efile_status') + if (value = attributes[:'state_efile_status']).is_a?(Array) + self.state_efile_status = value + end + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + end + + if attributes.key?(:'postal_mail_status') + self.postal_mail_status = attributes[:'postal_mail_status'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + end + + if attributes.key?(:'tin_match_status') + self.tin_match_status = attributes[:'tin_match_status'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + end + + if attributes.key?(:'address_verification_status') + self.address_verification_status = attributes[:'address_verification_status'] + end + + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + + if attributes.key?(:'tin') + self.tin = attributes[:'tin'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'validation_errors') + if (value = attributes[:'validation_errors']).is_a?(Array) + self.validation_errors = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Custom attribute writer method with validation + # @param [Object] state_efile_status Value to be assigned + def state_efile_status=(state_efile_status) + @state_efile_status = state_efile_status + end + + # Custom attribute writer method with validation + # @param [Object] validation_errors Value to be assigned + def validation_errors=(validation_errors) + @validation_errors = validation_errors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + unique_form_id == o.unique_form_id && + recipient_date_of_birth == o.recipient_date_of_birth && + recipient_giin == o.recipient_giin && + recipient_foreign_tin == o.recipient_foreign_tin && + lob_code == o.lob_code && + income_code == o.income_code && + gross_income == o.gross_income && + withholding_indicator == o.withholding_indicator && + tax_country_code == o.tax_country_code && + exemption_code_chap3 == o.exemption_code_chap3 && + exemption_code_chap4 == o.exemption_code_chap4 && + tax_rate_chap3 == o.tax_rate_chap3 && + withholding_allowance == o.withholding_allowance && + federal_tax_withheld == o.federal_tax_withheld && + tax_not_deposited_indicator == o.tax_not_deposited_indicator && + academic_indicator == o.academic_indicator && + tax_withheld_other_agents == o.tax_withheld_other_agents && + amount_repaid == o.amount_repaid && + tax_paid_agent == o.tax_paid_agent && + chap3_status_code == o.chap3_status_code && + chap4_status_code == o.chap4_status_code && + primary_withholding_agent == o.primary_withholding_agent && + intermediary_or_flow_through == o.intermediary_or_flow_through && + id == o.id && + type == o.type && + issuer_id == o.issuer_id && + issuer_reference_id == o.issuer_reference_id && + issuer_tin == o.issuer_tin && + tax_year == o.tax_year && + federal_efile == o.federal_efile && + federal_efile_status == o.federal_efile_status && + state_efile == o.state_efile && + state_efile_status == o.state_efile_status && + postal_mail == o.postal_mail && + postal_mail_status == o.postal_mail_status && + tin_match == o.tin_match && + tin_match_status == o.tin_match_status && + address_verification == o.address_verification && + address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && + reference_id == o.reference_id && + email == o.email && + tin_type == o.tin_type && + fatca_filing_requirement == o.fatca_filing_requirement && + tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + recipient_name == o.recipient_name && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + non_us_province == o.non_us_province && + country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && + validation_errors == o.validation_errors && + created_at == o.created_at && + updated_at == o.updated_at && + state_and_local_withholding == o.state_and_local_withholding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [unique_form_id, recipient_date_of_birth, recipient_giin, recipient_foreign_tin, lob_code, income_code, gross_income, withholding_indicator, tax_country_code, exemption_code_chap3, exemption_code_chap4, tax_rate_chap3, withholding_allowance, federal_tax_withheld, tax_not_deposited_indicator, academic_indicator, tax_withheld_other_agents, amount_repaid, tax_paid_agent, chap3_status_code, chap4_status_code, primary_withholding_agent, intermediary_or_flow_through, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb index 24018b2..9a64a78 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb @@ -146,6 +146,9 @@ class Form1042SListItem # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -222,6 +225,7 @@ def self.attribute_map :'state_e_file' => :'stateEFile', :'tin_match' => :'tinMatch', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -280,6 +284,7 @@ def self.openapi_types :'state_e_file' => :'Boolean', :'tin_match' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -307,13 +312,19 @@ def self.openapi_nullable :'chap4_status_code', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -463,8 +474,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -473,8 +482,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -503,8 +510,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -527,6 +532,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -541,30 +550,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -584,12 +569,6 @@ def valid? return false unless chap4_status_code_validator.valid?(@chap4_status_code) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -653,48 +632,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -745,6 +682,7 @@ def ==(o) state_e_file == o.state_e_file && tin_match == o.tin_match && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -758,7 +696,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [unique_form_id, no_tin, recipient_date_of_birth, recipient_giin, recipient_foreign_tin, lob_code, income_code, gross_income, withholding_indicator, tax_country_code, exemption_code_chap3, exemption_code_chap4, tax_rate_chap3, withholding_allowance, federal_tax_withheld, tax_not_deposited_indicator, academic_indicator, tax_withheld_other_agents, amount_repaid, tax_paid_agent, chap3_status_code, chap4_status_code, primary_withholding_agent, intermediary_or_flow_through, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, second_tin_notice, address_verification, state_and_local_withholding].hash + [unique_form_id, no_tin, recipient_date_of_birth, recipient_giin, recipient_foreign_tin, lob_code, income_code, gross_income, withholding_indicator, tax_country_code, exemption_code_chap3, exemption_code_chap4, tax_rate_chap3, withholding_allowance, federal_tax_withheld, tax_not_deposited_indicator, academic_indicator, tax_withheld_other_agents, amount_repaid, tax_paid_agent, chap3_status_code, chap4_status_code, primary_withholding_agent, intermediary_or_flow_through, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb b/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb index 86ffc92..b0e1b87 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb @@ -151,6 +151,9 @@ class Form1042SRequest # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -226,6 +229,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification' } end @@ -285,6 +289,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean' } end @@ -313,13 +318,19 @@ def self.openapi_nullable :'chap4_status_code', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', ]) end @@ -472,8 +483,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -482,8 +491,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -512,8 +519,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -540,6 +545,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -550,30 +559,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -581,23 +566,17 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -614,48 +593,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -708,6 +645,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification end @@ -720,7 +658,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [unique_form_id, recipient_date_of_birth, recipient_giin, recipient_foreign_tin, lob_code, income_code, gross_income, withholding_indicator, tax_country_code, exemption_code_chap3, exemption_code_chap4, tax_rate_chap3, withholding_allowance, federal_tax_withheld, tax_not_deposited_indicator, academic_indicator, tax_withheld_other_agents, amount_repaid, tax_paid_agent, chap3_status_code, chap4_status_code, primary_withholding_agent, intermediary_or_flow_through, state_and_local_withholding, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification].hash + [unique_form_id, recipient_date_of_birth, recipient_giin, recipient_foreign_tin, lob_code, income_code, gross_income, withholding_indicator, tax_country_code, exemption_code_chap3, exemption_code_chap4, tax_rate_chap3, withholding_allowance, federal_tax_withheld, tax_not_deposited_indicator, academic_indicator, tax_withheld_other_agents, amount_repaid, tax_paid_agent, chap3_status_code, chap4_status_code, primary_withholding_agent, intermediary_or_flow_through, state_and_local_withholding, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb b/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb index 8099753..9cd2be4 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb @@ -406,7 +406,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) @@ -416,7 +416,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/avalara_sdk/models/A1099/V2/form1095_b.rb b/lib/avalara_sdk/models/A1099/V2/form1095_b.rb index b2d4cb1..0d701f6 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1095_b.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end @@ -47,14 +47,22 @@ class Form1095B attr_accessor :address_verification_status + attr_accessor :e_delivery_status + attr_accessor :reference_id attr_accessor :email attr_accessor :tin_type + attr_accessor :fatca_filing_requirement + attr_accessor :tin + attr_accessor :no_tin + + attr_accessor :second_tin_notice + attr_accessor :recipient_name attr_accessor :recipient_second_name @@ -69,10 +77,14 @@ class Form1095B attr_accessor :zip - attr_accessor :foreign_province + attr_accessor :non_us_province attr_accessor :country_code + attr_accessor :account_number + + attr_accessor :office_code + attr_accessor :validation_errors attr_accessor :created_at @@ -102,10 +114,14 @@ def self.attribute_map :'tin_match_status' => :'tinMatchStatus', :'address_verification' => :'addressVerification', :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', :'reference_id' => :'referenceId', :'email' => :'email', :'tin_type' => :'tinType', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', :'recipient_name' => :'recipientName', :'recipient_second_name' => :'recipientSecondName', :'address' => :'address', @@ -113,8 +129,10 @@ def self.attribute_map :'city' => :'city', :'state' => :'state', :'zip' => :'zip', - :'foreign_province' => :'foreignProvince', + :'non_us_province' => :'nonUsProvince', :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', :'validation_errors' => :'validationErrors', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', @@ -148,10 +166,14 @@ def self.openapi_types :'tin_match_status' => :'Form1099StatusDetail', :'address_verification' => :'Boolean', :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', :'reference_id' => :'String', :'email' => :'String', :'tin_type' => :'String', + :'fatca_filing_requirement' => :'Boolean', :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', :'recipient_name' => :'String', :'recipient_second_name' => :'String', :'address' => :'String', @@ -159,8 +181,10 @@ def self.openapi_types :'city' => :'String', :'state' => :'String', :'zip' => :'String', - :'foreign_province' => :'String', + :'non_us_province' => :'String', :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', :'validation_errors' => :'Array', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -177,10 +201,13 @@ def self.openapi_nullable :'postal_mail_status', :'tin_match_status', :'address_verification_status', + :'e_delivery_status', :'reference_id', :'email', :'tin_type', + :'fatca_filing_requirement', :'tin', + :'second_tin_notice', :'recipient_name', :'recipient_second_name', :'address', @@ -188,8 +215,10 @@ def self.openapi_nullable :'city', :'state', :'zip', - :'foreign_province', + :'non_us_province', :'country_code', + :'account_number', + :'office_code', :'validation_errors', :'state_and_local_withholding' ]) @@ -293,6 +322,10 @@ def initialize(attributes = {}) self.address_verification_status = attributes[:'address_verification_status'] end + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + if attributes.key?(:'reference_id') self.reference_id = attributes[:'reference_id'] end @@ -305,10 +338,22 @@ def initialize(attributes = {}) self.tin_type = attributes[:'tin_type'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'tin') self.tin = attributes[:'tin'] end + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + if attributes.key?(:'recipient_name') self.recipient_name = attributes[:'recipient_name'] end @@ -337,14 +382,22 @@ def initialize(attributes = {}) self.zip = attributes[:'zip'] end - if attributes.key?(:'foreign_province') - self.foreign_province = attributes[:'foreign_province'] + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] end if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] end + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + if attributes.key?(:'validation_errors') if (value = attributes[:'validation_errors']).is_a?(Array) self.validation_errors = value @@ -424,10 +477,14 @@ def ==(o) tin_match_status == o.tin_match_status && address_verification == o.address_verification && address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && reference_id == o.reference_id && email == o.email && tin_type == o.tin_type && + fatca_filing_requirement == o.fatca_filing_requirement && tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && recipient_name == o.recipient_name && recipient_second_name == o.recipient_second_name && address == o.address && @@ -435,8 +492,10 @@ def ==(o) city == o.city && state == o.state && zip == o.zip && - foreign_province == o.foreign_province && + non_us_province == o.non_us_province && country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && validation_errors == o.validation_errors && created_at == o.created_at && updated_at == o.updated_at && @@ -452,7 +511,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [origin_of_health_coverage_code, covered_individuals, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + [origin_of_health_coverage_code, covered_individuals, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb index fc7cd95..a2fb1ec 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb @@ -98,6 +98,9 @@ class Form1095BListItem # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -158,6 +161,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -200,6 +204,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -213,13 +218,19 @@ def self.openapi_nullable :'employee_date_of_birth', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -303,8 +314,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -313,8 +322,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -343,8 +350,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -371,6 +376,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -385,30 +394,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -420,12 +405,6 @@ def valid? return false unless origin_of_health_coverage_code_validator.valid?(@origin_of_health_coverage_code) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -459,48 +438,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -535,6 +472,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -548,7 +486,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, employee_date_of_birth, origin_of_health_coverage_code, covered_individuals, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, employee_date_of_birth, origin_of_health_coverage_code, covered_individuals, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb b/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb index f343869..3ae334a 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb @@ -100,6 +100,9 @@ class Form1095BRequest # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -161,6 +164,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -204,6 +208,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -217,13 +222,19 @@ def self.openapi_nullable :'employee_date_of_birth', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -311,8 +322,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -321,8 +330,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -351,8 +358,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -379,6 +384,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -393,30 +402,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -426,16 +411,10 @@ def valid? warn '[DEPRECATED] the `valid?` method is obsolete' origin_of_health_coverage_code_validator = EnumAttributeValidator.new('String', ["A", "B", "C", "D", "E", "F", "G"]) return false unless origin_of_health_coverage_code_validator.valid?(@origin_of_health_coverage_code) - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -462,7 +441,7 @@ def covered_individuals=(covered_individuals) # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -479,48 +458,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -556,6 +493,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -569,7 +507,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, employee_date_of_birth, origin_of_health_coverage_code, covered_individuals, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, employee_date_of_birth, origin_of_health_coverage_code, covered_individuals, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1095_b_response.rb b/lib/avalara_sdk/models/A1099/V2/form1095_b_response.rb new file mode 100644 index 0000000..9d8391d --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1095_b_response.rb @@ -0,0 +1,709 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1095BResponse + attr_accessor :employee_first_name + + attr_accessor :employee_middle_name + + attr_accessor :employee_last_name + + attr_accessor :employee_name_suffix + + attr_accessor :employee_date_of_birth + + attr_accessor :origin_of_health_coverage_code + + attr_accessor :covered_individuals + + attr_accessor :type + + attr_accessor :created_at + + attr_accessor :updated_at + + attr_accessor :state_and_local_withholding + + attr_accessor :tin_type + + attr_accessor :id + + attr_accessor :issuer_id + + attr_accessor :issuer_reference_id + + attr_accessor :issuer_tin + + attr_accessor :tax_year + + attr_accessor :reference_id + + attr_accessor :recipient_name + + attr_accessor :recipient_tin + + attr_accessor :recipient_second_name + + attr_accessor :address + + attr_accessor :address2 + + attr_accessor :city + + attr_accessor :state + + attr_accessor :zip + + attr_accessor :email + + attr_accessor :account_number + + attr_accessor :office_code + + attr_accessor :non_us_province + + attr_accessor :country_code + + attr_accessor :federal_e_file + + attr_accessor :postal_mail + + attr_accessor :state_e_file + + attr_accessor :tin_match + + attr_accessor :no_tin + + attr_accessor :second_tin_notice + + attr_accessor :address_verification + + attr_accessor :federal_efile_status + + attr_accessor :e_delivery_status + + attr_accessor :state_efile_status + + attr_accessor :postal_mail_status + + attr_accessor :tin_match_status + + attr_accessor :address_verification_status + + attr_accessor :validation_errors + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'employee_first_name' => :'employeeFirstName', + :'employee_middle_name' => :'employeeMiddleName', + :'employee_last_name' => :'employeeLastName', + :'employee_name_suffix' => :'employeeNameSuffix', + :'employee_date_of_birth' => :'employeeDateOfBirth', + :'origin_of_health_coverage_code' => :'originOfHealthCoverageCode', + :'covered_individuals' => :'coveredIndividuals', + :'type' => :'type', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'state_and_local_withholding' => :'stateAndLocalWithholding', + :'tin_type' => :'tinType', + :'id' => :'id', + :'issuer_id' => :'issuerId', + :'issuer_reference_id' => :'issuerReferenceId', + :'issuer_tin' => :'issuerTin', + :'tax_year' => :'taxYear', + :'reference_id' => :'referenceId', + :'recipient_name' => :'recipientName', + :'recipient_tin' => :'recipientTin', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'email' => :'email', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'federal_e_file' => :'federalEFile', + :'postal_mail' => :'postalMail', + :'state_e_file' => :'stateEFile', + :'tin_match' => :'tinMatch', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'address_verification' => :'addressVerification', + :'federal_efile_status' => :'federalEfileStatus', + :'e_delivery_status' => :'eDeliveryStatus', + :'state_efile_status' => :'stateEfileStatus', + :'postal_mail_status' => :'postalMailStatus', + :'tin_match_status' => :'tinMatchStatus', + :'address_verification_status' => :'addressVerificationStatus', + :'validation_errors' => :'validationErrors' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'employee_first_name' => :'String', + :'employee_middle_name' => :'String', + :'employee_last_name' => :'String', + :'employee_name_suffix' => :'String', + :'employee_date_of_birth' => :'Time', + :'origin_of_health_coverage_code' => :'String', + :'covered_individuals' => :'Array', + :'type' => :'String', + :'created_at' => :'Time', + :'updated_at' => :'Time', + :'state_and_local_withholding' => :'StateAndLocalWithholdingResponse', + :'tin_type' => :'String', + :'id' => :'String', + :'issuer_id' => :'String', + :'issuer_reference_id' => :'String', + :'issuer_tin' => :'String', + :'tax_year' => :'Integer', + :'reference_id' => :'String', + :'recipient_name' => :'String', + :'recipient_tin' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'email' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'federal_e_file' => :'Boolean', + :'postal_mail' => :'Boolean', + :'state_e_file' => :'Boolean', + :'tin_match' => :'Boolean', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'address_verification' => :'Boolean', + :'federal_efile_status' => :'StatusDetail', + :'e_delivery_status' => :'StatusDetail', + :'state_efile_status' => :'Array', + :'postal_mail_status' => :'StatusDetail', + :'tin_match_status' => :'StatusDetail', + :'address_verification_status' => :'StatusDetail', + :'validation_errors' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'employee_middle_name', + :'employee_name_suffix', + :'employee_date_of_birth', + :'federal_efile_status', + :'e_delivery_status', + :'state_efile_status', + :'postal_mail_status', + :'tin_match_status', + :'address_verification_status', + :'validation_errors' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'FormResponseBase' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1095BResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1095BResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'employee_first_name') + self.employee_first_name = attributes[:'employee_first_name'] + end + + if attributes.key?(:'employee_middle_name') + self.employee_middle_name = attributes[:'employee_middle_name'] + end + + if attributes.key?(:'employee_last_name') + self.employee_last_name = attributes[:'employee_last_name'] + end + + if attributes.key?(:'employee_name_suffix') + self.employee_name_suffix = attributes[:'employee_name_suffix'] + end + + if attributes.key?(:'employee_date_of_birth') + self.employee_date_of_birth = attributes[:'employee_date_of_birth'] + end + + if attributes.key?(:'origin_of_health_coverage_code') + self.origin_of_health_coverage_code = attributes[:'origin_of_health_coverage_code'] + end + + if attributes.key?(:'covered_individuals') + if (value = attributes[:'covered_individuals']).is_a?(Array) + self.covered_individuals = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + end + + if attributes.key?(:'issuer_reference_id') + self.issuer_reference_id = attributes[:'issuer_reference_id'] + end + + if attributes.key?(:'issuer_tin') + self.issuer_tin = attributes[:'issuer_tin'] + end + + if attributes.key?(:'tax_year') + self.tax_year = attributes[:'tax_year'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'recipient_tin') + self.recipient_tin = attributes[:'recipient_tin'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'federal_e_file') + self.federal_e_file = attributes[:'federal_e_file'] + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + end + + if attributes.key?(:'state_e_file') + self.state_e_file = attributes[:'state_e_file'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + end + + if attributes.key?(:'federal_efile_status') + self.federal_efile_status = attributes[:'federal_efile_status'] + end + + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + + if attributes.key?(:'state_efile_status') + if (value = attributes[:'state_efile_status']).is_a?(Array) + self.state_efile_status = value + end + end + + if attributes.key?(:'postal_mail_status') + self.postal_mail_status = attributes[:'postal_mail_status'] + end + + if attributes.key?(:'tin_match_status') + self.tin_match_status = attributes[:'tin_match_status'] + end + + if attributes.key?(:'address_verification_status') + self.address_verification_status = attributes[:'address_verification_status'] + end + + if attributes.key?(:'validation_errors') + if (value = attributes[:'validation_errors']).is_a?(Array) + self.validation_errors = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + origin_of_health_coverage_code_validator = EnumAttributeValidator.new('String', ["A", "B", "C", "D", "E", "F", "G"]) + return false unless origin_of_health_coverage_code_validator.valid?(@origin_of_health_coverage_code) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) + return false unless type_validator.valid?(@type) + tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + return false unless tin_type_validator.valid?(@tin_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] origin_of_health_coverage_code Object to be assigned + def origin_of_health_coverage_code=(origin_of_health_coverage_code) + validator = EnumAttributeValidator.new('String', ["A", "B", "C", "D", "E", "F", "G"]) + unless validator.valid?(origin_of_health_coverage_code) + fail ArgumentError, "invalid value for \"origin_of_health_coverage_code\", must be one of #{validator.allowable_values}." + end + @origin_of_health_coverage_code = origin_of_health_coverage_code + end + + # Custom attribute writer method with validation + # @param [Object] covered_individuals Value to be assigned + def covered_individuals=(covered_individuals) + if covered_individuals.nil? + fail ArgumentError, 'covered_individuals cannot be nil' + end + + @covered_individuals = covered_individuals + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] tin_type Object to be assigned + def tin_type=(tin_type) + validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + unless validator.valid?(tin_type) + fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}." + end + @tin_type = tin_type + end + + # Custom attribute writer method with validation + # @param [Object] state_efile_status Value to be assigned + def state_efile_status=(state_efile_status) + @state_efile_status = state_efile_status + end + + # Custom attribute writer method with validation + # @param [Object] validation_errors Value to be assigned + def validation_errors=(validation_errors) + @validation_errors = validation_errors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + employee_first_name == o.employee_first_name && + employee_middle_name == o.employee_middle_name && + employee_last_name == o.employee_last_name && + employee_name_suffix == o.employee_name_suffix && + employee_date_of_birth == o.employee_date_of_birth && + origin_of_health_coverage_code == o.origin_of_health_coverage_code && + covered_individuals == o.covered_individuals && + type == o.type && + created_at == o.created_at && + updated_at == o.updated_at && + state_and_local_withholding == o.state_and_local_withholding && + tin_type == o.tin_type && + id == o.id && + issuer_id == o.issuer_id && + issuer_reference_id == o.issuer_reference_id && + issuer_tin == o.issuer_tin && + tax_year == o.tax_year && + reference_id == o.reference_id && + recipient_name == o.recipient_name && + recipient_tin == o.recipient_tin && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + email == o.email && + account_number == o.account_number && + office_code == o.office_code && + non_us_province == o.non_us_province && + country_code == o.country_code && + federal_e_file == o.federal_e_file && + postal_mail == o.postal_mail && + state_e_file == o.state_e_file && + tin_match == o.tin_match && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + address_verification == o.address_verification && + federal_efile_status == o.federal_efile_status && + e_delivery_status == o.e_delivery_status && + state_efile_status == o.state_efile_status && + postal_mail_status == o.postal_mail_status && + tin_match_status == o.tin_match_status && + address_verification_status == o.address_verification_status && + validation_errors == o.validation_errors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, employee_date_of_birth, origin_of_health_coverage_code, covered_individuals, type, created_at, updated_at, state_and_local_withholding, tin_type, id, issuer_id, issuer_reference_id, issuer_tin, tax_year, reference_id, recipient_name, recipient_tin, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, federal_efile_status, e_delivery_status, state_efile_status, postal_mail_status, tin_match_status, address_verification_status, validation_errors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb index bc45171..bb52acb 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb @@ -113,6 +113,9 @@ class Form1095CListItem # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -178,6 +181,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -225,6 +229,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -241,15 +246,23 @@ def self.openapi_nullable :'plan_start_month', :'offer_and_coverages', :'covered_individuals', + :'issuer_reference_id', + :'issuer_tin', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -357,8 +370,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -367,8 +378,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -397,8 +406,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -425,6 +432,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -443,30 +454,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "tax_year", tax_year cannot be nil.') end - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -477,12 +464,6 @@ def valid? return false if @tax_year.nil? tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -508,48 +489,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -589,6 +528,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -602,7 +542,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, recipient_date_of_birth, plan_start_month, offer_and_coverages, employer_provided_si_coverage, covered_individuals, issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, recipient_date_of_birth, plan_start_month, offer_and_coverages, employer_provided_si_coverage, covered_individuals, issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_base.rb b/lib/avalara_sdk/models/A1099/V2/form1099_base.rb index afa46f7..a401286 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_base.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end @@ -43,14 +43,22 @@ class Form1099Base attr_accessor :address_verification_status + attr_accessor :e_delivery_status + attr_accessor :reference_id attr_accessor :email attr_accessor :tin_type + attr_accessor :fatca_filing_requirement + attr_accessor :tin + attr_accessor :no_tin + + attr_accessor :second_tin_notice + attr_accessor :recipient_name attr_accessor :recipient_second_name @@ -65,10 +73,14 @@ class Form1099Base attr_accessor :zip - attr_accessor :foreign_province + attr_accessor :non_us_province attr_accessor :country_code + attr_accessor :account_number + + attr_accessor :office_code + attr_accessor :validation_errors attr_accessor :created_at @@ -96,10 +108,14 @@ def self.attribute_map :'tin_match_status' => :'tinMatchStatus', :'address_verification' => :'addressVerification', :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', :'reference_id' => :'referenceId', :'email' => :'email', :'tin_type' => :'tinType', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', :'recipient_name' => :'recipientName', :'recipient_second_name' => :'recipientSecondName', :'address' => :'address', @@ -107,8 +123,10 @@ def self.attribute_map :'city' => :'city', :'state' => :'state', :'zip' => :'zip', - :'foreign_province' => :'foreignProvince', + :'non_us_province' => :'nonUsProvince', :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', :'validation_errors' => :'validationErrors', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', @@ -140,10 +158,14 @@ def self.openapi_types :'tin_match_status' => :'Form1099StatusDetail', :'address_verification' => :'Boolean', :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', :'reference_id' => :'String', :'email' => :'String', :'tin_type' => :'String', + :'fatca_filing_requirement' => :'Boolean', :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', :'recipient_name' => :'String', :'recipient_second_name' => :'String', :'address' => :'String', @@ -151,8 +173,10 @@ def self.openapi_types :'city' => :'String', :'state' => :'String', :'zip' => :'String', - :'foreign_province' => :'String', + :'non_us_province' => :'String', :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', :'validation_errors' => :'Array', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -169,10 +193,13 @@ def self.openapi_nullable :'postal_mail_status', :'tin_match_status', :'address_verification_status', + :'e_delivery_status', :'reference_id', :'email', :'tin_type', + :'fatca_filing_requirement', :'tin', + :'second_tin_notice', :'recipient_name', :'recipient_second_name', :'address', @@ -180,8 +207,10 @@ def self.openapi_nullable :'city', :'state', :'zip', - :'foreign_province', + :'non_us_province', :'country_code', + :'account_number', + :'office_code', :'validation_errors', :'state_and_local_withholding' ]) @@ -268,6 +297,10 @@ def initialize(attributes = {}) self.address_verification_status = attributes[:'address_verification_status'] end + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + if attributes.key?(:'reference_id') self.reference_id = attributes[:'reference_id'] end @@ -280,10 +313,22 @@ def initialize(attributes = {}) self.tin_type = attributes[:'tin_type'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'tin') self.tin = attributes[:'tin'] end + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + if attributes.key?(:'recipient_name') self.recipient_name = attributes[:'recipient_name'] end @@ -312,14 +357,22 @@ def initialize(attributes = {}) self.zip = attributes[:'zip'] end - if attributes.key?(:'foreign_province') - self.foreign_province = attributes[:'foreign_province'] + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] end if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] end + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + if attributes.key?(:'validation_errors') if (value = attributes[:'validation_errors']).is_a?(Array) self.validation_errors = value @@ -387,10 +440,14 @@ def ==(o) tin_match_status == o.tin_match_status && address_verification == o.address_verification && address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && reference_id == o.reference_id && email == o.email && tin_type == o.tin_type && + fatca_filing_requirement == o.fatca_filing_requirement && tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && recipient_name == o.recipient_name && recipient_second_name == o.recipient_second_name && address == o.address && @@ -398,8 +455,10 @@ def ==(o) city == o.city && state == o.state && zip == o.zip && - foreign_province == o.foreign_province && + non_us_province == o.non_us_province && country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && validation_errors == o.validation_errors && created_at == o.created_at && updated_at == o.updated_at && @@ -415,7 +474,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + [id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_div.rb b/lib/avalara_sdk/models/A1099/V2/form1099_div.rb new file mode 100644 index 0000000..baa9c42 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_div.rb @@ -0,0 +1,781 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1099Div + attr_accessor :total_ordinary_dividends + + attr_accessor :qualified_dividends + + attr_accessor :total_capital_gain_distributions + + attr_accessor :unrecaptured_section1250_gain + + attr_accessor :section1202_gain + + attr_accessor :collectibles_gain + + attr_accessor :section897_ordinary_dividends + + attr_accessor :section897_capital_gain + + attr_accessor :nondividend_distributions + + attr_accessor :federal_income_tax_withheld + + attr_accessor :section199_a_dividends + + attr_accessor :investment_expenses + + attr_accessor :foreign_tax_paid + + attr_accessor :foreign_country_or_us_possession + + attr_accessor :cash_liquidation_distributions + + attr_accessor :noncash_liquidation_distributions + + attr_accessor :exempt_interest_dividends + + attr_accessor :specified_private_activity_bond_interest_dividends + + attr_accessor :fatca_filing_requirement + + attr_accessor :id + + attr_accessor :type + + attr_accessor :issuer_id + + attr_accessor :issuer_reference_id + + attr_accessor :issuer_tin + + attr_accessor :tax_year + + attr_accessor :federal_efile + + attr_accessor :federal_efile_status + + attr_accessor :state_efile + + attr_accessor :state_efile_status + + attr_accessor :postal_mail + + attr_accessor :postal_mail_status + + attr_accessor :tin_match + + attr_accessor :tin_match_status + + attr_accessor :address_verification + + attr_accessor :address_verification_status + + attr_accessor :e_delivery_status + + attr_accessor :reference_id + + attr_accessor :email + + attr_accessor :tin_type + + attr_accessor :tin + + attr_accessor :no_tin + + attr_accessor :second_tin_notice + + attr_accessor :recipient_name + + attr_accessor :recipient_second_name + + attr_accessor :address + + attr_accessor :address2 + + attr_accessor :city + + attr_accessor :state + + attr_accessor :zip + + attr_accessor :non_us_province + + attr_accessor :country_code + + attr_accessor :account_number + + attr_accessor :office_code + + attr_accessor :validation_errors + + attr_accessor :created_at + + attr_accessor :updated_at + + attr_accessor :state_and_local_withholding + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'total_ordinary_dividends' => :'totalOrdinaryDividends', + :'qualified_dividends' => :'qualifiedDividends', + :'total_capital_gain_distributions' => :'totalCapitalGainDistributions', + :'unrecaptured_section1250_gain' => :'unrecapturedSection1250Gain', + :'section1202_gain' => :'section1202Gain', + :'collectibles_gain' => :'collectiblesGain', + :'section897_ordinary_dividends' => :'section897OrdinaryDividends', + :'section897_capital_gain' => :'section897CapitalGain', + :'nondividend_distributions' => :'nondividendDistributions', + :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld', + :'section199_a_dividends' => :'section199ADividends', + :'investment_expenses' => :'investmentExpenses', + :'foreign_tax_paid' => :'foreignTaxPaid', + :'foreign_country_or_us_possession' => :'foreignCountryOrUSPossession', + :'cash_liquidation_distributions' => :'cashLiquidationDistributions', + :'noncash_liquidation_distributions' => :'noncashLiquidationDistributions', + :'exempt_interest_dividends' => :'exemptInterestDividends', + :'specified_private_activity_bond_interest_dividends' => :'specifiedPrivateActivityBondInterestDividends', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', + :'id' => :'id', + :'type' => :'type', + :'issuer_id' => :'issuerId', + :'issuer_reference_id' => :'issuerReferenceId', + :'issuer_tin' => :'issuerTin', + :'tax_year' => :'taxYear', + :'federal_efile' => :'federalEfile', + :'federal_efile_status' => :'federalEfileStatus', + :'state_efile' => :'stateEfile', + :'state_efile_status' => :'stateEfileStatus', + :'postal_mail' => :'postalMail', + :'postal_mail_status' => :'postalMailStatus', + :'tin_match' => :'tinMatch', + :'tin_match_status' => :'tinMatchStatus', + :'address_verification' => :'addressVerification', + :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', + :'reference_id' => :'referenceId', + :'email' => :'email', + :'tin_type' => :'tinType', + :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'recipient_name' => :'recipientName', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'validation_errors' => :'validationErrors', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'state_and_local_withholding' => :'stateAndLocalWithholding' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'total_ordinary_dividends' => :'Float', + :'qualified_dividends' => :'Float', + :'total_capital_gain_distributions' => :'Float', + :'unrecaptured_section1250_gain' => :'Float', + :'section1202_gain' => :'Float', + :'collectibles_gain' => :'Float', + :'section897_ordinary_dividends' => :'Float', + :'section897_capital_gain' => :'Float', + :'nondividend_distributions' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'section199_a_dividends' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', + :'foreign_country_or_us_possession' => :'String', + :'cash_liquidation_distributions' => :'Float', + :'noncash_liquidation_distributions' => :'Float', + :'exempt_interest_dividends' => :'Float', + :'specified_private_activity_bond_interest_dividends' => :'Float', + :'fatca_filing_requirement' => :'Boolean', + :'id' => :'String', + :'type' => :'String', + :'issuer_id' => :'Integer', + :'issuer_reference_id' => :'String', + :'issuer_tin' => :'String', + :'tax_year' => :'Integer', + :'federal_efile' => :'Boolean', + :'federal_efile_status' => :'Form1099StatusDetail', + :'state_efile' => :'Boolean', + :'state_efile_status' => :'Array', + :'postal_mail' => :'Boolean', + :'postal_mail_status' => :'Form1099StatusDetail', + :'tin_match' => :'Boolean', + :'tin_match_status' => :'Form1099StatusDetail', + :'address_verification' => :'Boolean', + :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', + :'reference_id' => :'String', + :'email' => :'String', + :'tin_type' => :'String', + :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'recipient_name' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'validation_errors' => :'Array', + :'created_at' => :'Time', + :'updated_at' => :'Time', + :'state_and_local_withholding' => :'StateAndLocalWithholding' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'total_ordinary_dividends', + :'qualified_dividends', + :'total_capital_gain_distributions', + :'unrecaptured_section1250_gain', + :'section1202_gain', + :'collectibles_gain', + :'section897_ordinary_dividends', + :'section897_capital_gain', + :'nondividend_distributions', + :'federal_income_tax_withheld', + :'section199_a_dividends', + :'investment_expenses', + :'foreign_tax_paid', + :'foreign_country_or_us_possession', + :'cash_liquidation_distributions', + :'noncash_liquidation_distributions', + :'exempt_interest_dividends', + :'specified_private_activity_bond_interest_dividends', + :'fatca_filing_requirement', + :'issuer_reference_id', + :'issuer_tin', + :'state_efile_status', + :'postal_mail_status', + :'tin_match_status', + :'address_verification_status', + :'e_delivery_status', + :'reference_id', + :'email', + :'tin_type', + :'tin', + :'second_tin_notice', + :'recipient_name', + :'recipient_second_name', + :'address', + :'address2', + :'city', + :'state', + :'zip', + :'non_us_province', + :'country_code', + :'account_number', + :'office_code', + :'validation_errors', + :'state_and_local_withholding' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'Form1099Base' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099Div` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099Div`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'total_ordinary_dividends') + self.total_ordinary_dividends = attributes[:'total_ordinary_dividends'] + end + + if attributes.key?(:'qualified_dividends') + self.qualified_dividends = attributes[:'qualified_dividends'] + end + + if attributes.key?(:'total_capital_gain_distributions') + self.total_capital_gain_distributions = attributes[:'total_capital_gain_distributions'] + end + + if attributes.key?(:'unrecaptured_section1250_gain') + self.unrecaptured_section1250_gain = attributes[:'unrecaptured_section1250_gain'] + end + + if attributes.key?(:'section1202_gain') + self.section1202_gain = attributes[:'section1202_gain'] + end + + if attributes.key?(:'collectibles_gain') + self.collectibles_gain = attributes[:'collectibles_gain'] + end + + if attributes.key?(:'section897_ordinary_dividends') + self.section897_ordinary_dividends = attributes[:'section897_ordinary_dividends'] + end + + if attributes.key?(:'section897_capital_gain') + self.section897_capital_gain = attributes[:'section897_capital_gain'] + end + + if attributes.key?(:'nondividend_distributions') + self.nondividend_distributions = attributes[:'nondividend_distributions'] + end + + if attributes.key?(:'federal_income_tax_withheld') + self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld'] + end + + if attributes.key?(:'section199_a_dividends') + self.section199_a_dividends = attributes[:'section199_a_dividends'] + end + + if attributes.key?(:'investment_expenses') + self.investment_expenses = attributes[:'investment_expenses'] + end + + if attributes.key?(:'foreign_tax_paid') + self.foreign_tax_paid = attributes[:'foreign_tax_paid'] + end + + if attributes.key?(:'foreign_country_or_us_possession') + self.foreign_country_or_us_possession = attributes[:'foreign_country_or_us_possession'] + end + + if attributes.key?(:'cash_liquidation_distributions') + self.cash_liquidation_distributions = attributes[:'cash_liquidation_distributions'] + end + + if attributes.key?(:'noncash_liquidation_distributions') + self.noncash_liquidation_distributions = attributes[:'noncash_liquidation_distributions'] + end + + if attributes.key?(:'exempt_interest_dividends') + self.exempt_interest_dividends = attributes[:'exempt_interest_dividends'] + end + + if attributes.key?(:'specified_private_activity_bond_interest_dividends') + self.specified_private_activity_bond_interest_dividends = attributes[:'specified_private_activity_bond_interest_dividends'] + end + + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + end + + if attributes.key?(:'issuer_reference_id') + self.issuer_reference_id = attributes[:'issuer_reference_id'] + end + + if attributes.key?(:'issuer_tin') + self.issuer_tin = attributes[:'issuer_tin'] + end + + if attributes.key?(:'tax_year') + self.tax_year = attributes[:'tax_year'] + end + + if attributes.key?(:'federal_efile') + self.federal_efile = attributes[:'federal_efile'] + end + + if attributes.key?(:'federal_efile_status') + self.federal_efile_status = attributes[:'federal_efile_status'] + end + + if attributes.key?(:'state_efile') + self.state_efile = attributes[:'state_efile'] + end + + if attributes.key?(:'state_efile_status') + if (value = attributes[:'state_efile_status']).is_a?(Array) + self.state_efile_status = value + end + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + end + + if attributes.key?(:'postal_mail_status') + self.postal_mail_status = attributes[:'postal_mail_status'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + end + + if attributes.key?(:'tin_match_status') + self.tin_match_status = attributes[:'tin_match_status'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + end + + if attributes.key?(:'address_verification_status') + self.address_verification_status = attributes[:'address_verification_status'] + end + + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'tin') + self.tin = attributes[:'tin'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'validation_errors') + if (value = attributes[:'validation_errors']).is_a?(Array) + self.validation_errors = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Custom attribute writer method with validation + # @param [Object] state_efile_status Value to be assigned + def state_efile_status=(state_efile_status) + @state_efile_status = state_efile_status + end + + # Custom attribute writer method with validation + # @param [Object] validation_errors Value to be assigned + def validation_errors=(validation_errors) + @validation_errors = validation_errors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_ordinary_dividends == o.total_ordinary_dividends && + qualified_dividends == o.qualified_dividends && + total_capital_gain_distributions == o.total_capital_gain_distributions && + unrecaptured_section1250_gain == o.unrecaptured_section1250_gain && + section1202_gain == o.section1202_gain && + collectibles_gain == o.collectibles_gain && + section897_ordinary_dividends == o.section897_ordinary_dividends && + section897_capital_gain == o.section897_capital_gain && + nondividend_distributions == o.nondividend_distributions && + federal_income_tax_withheld == o.federal_income_tax_withheld && + section199_a_dividends == o.section199_a_dividends && + investment_expenses == o.investment_expenses && + foreign_tax_paid == o.foreign_tax_paid && + foreign_country_or_us_possession == o.foreign_country_or_us_possession && + cash_liquidation_distributions == o.cash_liquidation_distributions && + noncash_liquidation_distributions == o.noncash_liquidation_distributions && + exempt_interest_dividends == o.exempt_interest_dividends && + specified_private_activity_bond_interest_dividends == o.specified_private_activity_bond_interest_dividends && + fatca_filing_requirement == o.fatca_filing_requirement && + id == o.id && + type == o.type && + issuer_id == o.issuer_id && + issuer_reference_id == o.issuer_reference_id && + issuer_tin == o.issuer_tin && + tax_year == o.tax_year && + federal_efile == o.federal_efile && + federal_efile_status == o.federal_efile_status && + state_efile == o.state_efile && + state_efile_status == o.state_efile_status && + postal_mail == o.postal_mail && + postal_mail_status == o.postal_mail_status && + tin_match == o.tin_match && + tin_match_status == o.tin_match_status && + address_verification == o.address_verification && + address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && + reference_id == o.reference_id && + email == o.email && + tin_type == o.tin_type && + tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + recipient_name == o.recipient_name && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + non_us_province == o.non_us_province && + country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && + validation_errors == o.validation_errors && + created_at == o.created_at && + updated_at == o.updated_at && + state_and_local_withholding == o.state_and_local_withholding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [total_ordinary_dividends, qualified_dividends, total_capital_gain_distributions, unrecaptured_section1250_gain, section1202_gain, collectibles_gain, section897_ordinary_dividends, section897_capital_gain, nondividend_distributions, federal_income_tax_withheld, section199_a_dividends, investment_expenses, foreign_tax_paid, foreign_country_or_us_possession, cash_liquidation_distributions, noncash_liquidation_distributions, exempt_interest_dividends, specified_private_activity_bond_interest_dividends, fatca_filing_requirement, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb index 1ab2c87..3eb776a 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb @@ -231,24 +231,24 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total_ordinary_dividends' => :'String', - :'qualified_dividends' => :'String', - :'total_capital_gain_distributions' => :'String', - :'unrecaptured_section1250_gain' => :'String', - :'section1202_gain' => :'String', - :'collectibles_gain' => :'String', - :'section897_ordinary_dividends' => :'String', - :'section897_capital_gain' => :'String', - :'nondividend_distributions' => :'String', - :'federal_income_tax_withheld' => :'String', - :'section199_a_dividends' => :'String', - :'investment_expenses' => :'String', - :'foreign_tax_paid' => :'String', + :'total_ordinary_dividends' => :'Float', + :'qualified_dividends' => :'Float', + :'total_capital_gain_distributions' => :'Float', + :'unrecaptured_section1250_gain' => :'Float', + :'section1202_gain' => :'Float', + :'collectibles_gain' => :'Float', + :'section897_ordinary_dividends' => :'Float', + :'section897_capital_gain' => :'Float', + :'nondividend_distributions' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'section199_a_dividends' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', :'foreign_country_or_us_possession' => :'String', - :'cash_liquidation_distributions' => :'String', - :'noncash_liquidation_distributions' => :'String', - :'exempt_interest_dividends' => :'String', - :'specified_private_activity_bond_interest_dividends' => :'String', + :'cash_liquidation_distributions' => :'Float', + :'noncash_liquidation_distributions' => :'Float', + :'exempt_interest_dividends' => :'Float', + :'specified_private_activity_bond_interest_dividends' => :'Float', :'fatca_filing_requirement' => :'Boolean', :'issuer_reference_id' => :'String', :'issuer_tin' => :'String', @@ -302,15 +302,23 @@ def self.openapi_nullable :'exempt_interest_dividends', :'specified_private_activity_bond_interest_dividends', :'fatca_filing_requirement', + :'issuer_reference_id', + :'issuer_tin', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -454,8 +462,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -464,8 +470,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -494,8 +498,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -540,30 +542,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "tax_year", tax_year cannot be nil.') end - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -574,12 +552,6 @@ def valid? return false if @tax_year.nil? tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -593,48 +565,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb index 03dcbd9..8e9b7c5 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb @@ -252,24 +252,24 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total_ordinary_dividends' => :'String', - :'qualified_dividends' => :'String', - :'total_capital_gain_distributions' => :'String', - :'unrecaptured_section1250_gain' => :'String', - :'section1202_gain' => :'String', - :'collectibles_gain' => :'String', - :'section897_ordinary_dividends' => :'String', - :'section897_capital_gain' => :'String', - :'nondividend_distributions' => :'String', - :'federal_income_tax_withheld' => :'String', - :'section199_a_dividends' => :'String', - :'investment_expenses' => :'String', - :'foreign_tax_paid' => :'String', + :'total_ordinary_dividends' => :'Float', + :'qualified_dividends' => :'Float', + :'total_capital_gain_distributions' => :'Float', + :'unrecaptured_section1250_gain' => :'Float', + :'section1202_gain' => :'Float', + :'collectibles_gain' => :'Float', + :'section897_ordinary_dividends' => :'Float', + :'section897_capital_gain' => :'Float', + :'nondividend_distributions' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'section199_a_dividends' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', :'foreign_country_or_us_possession' => :'String', - :'cash_liquidation_distributions' => :'String', - :'noncash_liquidation_distributions' => :'String', - :'exempt_interest_dividends' => :'String', - :'specified_private_activity_bond_interest_dividends' => :'String', + :'cash_liquidation_distributions' => :'Float', + :'noncash_liquidation_distributions' => :'Float', + :'exempt_interest_dividends' => :'Float', + :'specified_private_activity_bond_interest_dividends' => :'Float', :'fatca_filing_requirement' => :'Boolean', :'id' => :'String', :'type' => :'String', diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb b/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb index 559097d..1078b89 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb @@ -222,24 +222,24 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'total_ordinary_dividends' => :'String', - :'qualified_dividends' => :'String', - :'total_capital_gain_distributions' => :'String', - :'unrecaptured_section1250_gain' => :'String', - :'section1202_gain' => :'String', - :'collectibles_gain' => :'String', - :'section897_ordinary_dividends' => :'String', - :'section897_capital_gain' => :'String', - :'nondividend_distributions' => :'String', - :'federal_income_tax_withheld' => :'String', - :'section199_a_dividends' => :'String', - :'investment_expenses' => :'String', - :'foreign_tax_paid' => :'String', + :'total_ordinary_dividends' => :'Float', + :'qualified_dividends' => :'Float', + :'total_capital_gain_distributions' => :'Float', + :'unrecaptured_section1250_gain' => :'Float', + :'section1202_gain' => :'Float', + :'collectibles_gain' => :'Float', + :'section897_ordinary_dividends' => :'Float', + :'section897_capital_gain' => :'Float', + :'nondividend_distributions' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'section199_a_dividends' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', :'foreign_country_or_us_possession' => :'String', - :'cash_liquidation_distributions' => :'String', - :'noncash_liquidation_distributions' => :'String', - :'exempt_interest_dividends' => :'String', - :'specified_private_activity_bond_interest_dividends' => :'String', + :'cash_liquidation_distributions' => :'Float', + :'noncash_liquidation_distributions' => :'Float', + :'exempt_interest_dividends' => :'Float', + :'specified_private_activity_bond_interest_dividends' => :'Float', :'fatca_filing_requirement' => :'Boolean', :'type' => :'String', :'issuer_id' => :'String', @@ -293,13 +293,19 @@ def self.openapi_nullable :'fatca_filing_requirement', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -433,8 +439,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -443,8 +447,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -473,8 +475,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -515,30 +515,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -546,23 +522,17 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -579,48 +549,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb index 0e7eb00..c17d93f 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb @@ -11,6 +11,44 @@ module AvalaraSdk::A1099::V2 class Form1099DivResponse + attr_accessor :total_ordinary_dividends + + attr_accessor :qualified_dividends + + attr_accessor :total_capital_gain_distributions + + attr_accessor :unrecaptured_section1250_gain + + attr_accessor :section1202_gain + + attr_accessor :collectibles_gain + + attr_accessor :section897_ordinary_dividends + + attr_accessor :section897_capital_gain + + attr_accessor :nondividend_distributions + + attr_accessor :federal_income_tax_withheld + + attr_accessor :section199_a_dividends + + attr_accessor :investment_expenses + + attr_accessor :foreign_tax_paid + + attr_accessor :foreign_country_or_us_possession + + attr_accessor :cash_liquidation_distributions + + attr_accessor :noncash_liquidation_distributions + + attr_accessor :exempt_interest_dividends + + attr_accessor :specified_private_activity_bond_interest_dividends + + attr_accessor :fatca_filing_requirement + attr_accessor :type attr_accessor :created_at @@ -112,6 +150,25 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'total_ordinary_dividends' => :'totalOrdinaryDividends', + :'qualified_dividends' => :'qualifiedDividends', + :'total_capital_gain_distributions' => :'totalCapitalGainDistributions', + :'unrecaptured_section1250_gain' => :'unrecapturedSection1250Gain', + :'section1202_gain' => :'section1202Gain', + :'collectibles_gain' => :'collectiblesGain', + :'section897_ordinary_dividends' => :'section897OrdinaryDividends', + :'section897_capital_gain' => :'section897CapitalGain', + :'nondividend_distributions' => :'nondividendDistributions', + :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld', + :'section199_a_dividends' => :'section199ADividends', + :'investment_expenses' => :'investmentExpenses', + :'foreign_tax_paid' => :'foreignTaxPaid', + :'foreign_country_or_us_possession' => :'foreignCountryOrUSPossession', + :'cash_liquidation_distributions' => :'cashLiquidationDistributions', + :'noncash_liquidation_distributions' => :'noncashLiquidationDistributions', + :'exempt_interest_dividends' => :'exemptInterestDividends', + :'specified_private_activity_bond_interest_dividends' => :'specifiedPrivateActivityBondInterestDividends', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'type' => :'type', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', @@ -161,6 +218,25 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'total_ordinary_dividends' => :'Float', + :'qualified_dividends' => :'Float', + :'total_capital_gain_distributions' => :'Float', + :'unrecaptured_section1250_gain' => :'Float', + :'section1202_gain' => :'Float', + :'collectibles_gain' => :'Float', + :'section897_ordinary_dividends' => :'Float', + :'section897_capital_gain' => :'Float', + :'nondividend_distributions' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'section199_a_dividends' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', + :'foreign_country_or_us_possession' => :'String', + :'cash_liquidation_distributions' => :'Float', + :'noncash_liquidation_distributions' => :'Float', + :'exempt_interest_dividends' => :'Float', + :'specified_private_activity_bond_interest_dividends' => :'Float', + :'fatca_filing_requirement' => :'Boolean', :'type' => :'String', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -237,6 +313,82 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'total_ordinary_dividends') + self.total_ordinary_dividends = attributes[:'total_ordinary_dividends'] + end + + if attributes.key?(:'qualified_dividends') + self.qualified_dividends = attributes[:'qualified_dividends'] + end + + if attributes.key?(:'total_capital_gain_distributions') + self.total_capital_gain_distributions = attributes[:'total_capital_gain_distributions'] + end + + if attributes.key?(:'unrecaptured_section1250_gain') + self.unrecaptured_section1250_gain = attributes[:'unrecaptured_section1250_gain'] + end + + if attributes.key?(:'section1202_gain') + self.section1202_gain = attributes[:'section1202_gain'] + end + + if attributes.key?(:'collectibles_gain') + self.collectibles_gain = attributes[:'collectibles_gain'] + end + + if attributes.key?(:'section897_ordinary_dividends') + self.section897_ordinary_dividends = attributes[:'section897_ordinary_dividends'] + end + + if attributes.key?(:'section897_capital_gain') + self.section897_capital_gain = attributes[:'section897_capital_gain'] + end + + if attributes.key?(:'nondividend_distributions') + self.nondividend_distributions = attributes[:'nondividend_distributions'] + end + + if attributes.key?(:'federal_income_tax_withheld') + self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld'] + end + + if attributes.key?(:'section199_a_dividends') + self.section199_a_dividends = attributes[:'section199_a_dividends'] + end + + if attributes.key?(:'investment_expenses') + self.investment_expenses = attributes[:'investment_expenses'] + end + + if attributes.key?(:'foreign_tax_paid') + self.foreign_tax_paid = attributes[:'foreign_tax_paid'] + end + + if attributes.key?(:'foreign_country_or_us_possession') + self.foreign_country_or_us_possession = attributes[:'foreign_country_or_us_possession'] + end + + if attributes.key?(:'cash_liquidation_distributions') + self.cash_liquidation_distributions = attributes[:'cash_liquidation_distributions'] + end + + if attributes.key?(:'noncash_liquidation_distributions') + self.noncash_liquidation_distributions = attributes[:'noncash_liquidation_distributions'] + end + + if attributes.key?(:'exempt_interest_dividends') + self.exempt_interest_dividends = attributes[:'exempt_interest_dividends'] + end + + if attributes.key?(:'specified_private_activity_bond_interest_dividends') + self.specified_private_activity_bond_interest_dividends = attributes[:'specified_private_activity_bond_interest_dividends'] + end + + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -406,7 +558,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) @@ -416,7 +568,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -450,6 +602,25 @@ def validation_errors=(validation_errors) def ==(o) return true if self.equal?(o) self.class == o.class && + total_ordinary_dividends == o.total_ordinary_dividends && + qualified_dividends == o.qualified_dividends && + total_capital_gain_distributions == o.total_capital_gain_distributions && + unrecaptured_section1250_gain == o.unrecaptured_section1250_gain && + section1202_gain == o.section1202_gain && + collectibles_gain == o.collectibles_gain && + section897_ordinary_dividends == o.section897_ordinary_dividends && + section897_capital_gain == o.section897_capital_gain && + nondividend_distributions == o.nondividend_distributions && + federal_income_tax_withheld == o.federal_income_tax_withheld && + section199_a_dividends == o.section199_a_dividends && + investment_expenses == o.investment_expenses && + foreign_tax_paid == o.foreign_tax_paid && + foreign_country_or_us_possession == o.foreign_country_or_us_possession && + cash_liquidation_distributions == o.cash_liquidation_distributions && + noncash_liquidation_distributions == o.noncash_liquidation_distributions && + exempt_interest_dividends == o.exempt_interest_dividends && + specified_private_activity_bond_interest_dividends == o.specified_private_activity_bond_interest_dividends && + fatca_filing_requirement == o.fatca_filing_requirement && type == o.type && created_at == o.created_at && updated_at == o.updated_at && @@ -499,7 +670,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, created_at, updated_at, state_and_local_withholding, tin_type, id, issuer_id, issuer_reference_id, issuer_tin, tax_year, reference_id, recipient_name, recipient_tin, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, federal_efile_status, e_delivery_status, state_efile_status, postal_mail_status, tin_match_status, address_verification_status, validation_errors].hash + [total_ordinary_dividends, qualified_dividends, total_capital_gain_distributions, unrecaptured_section1250_gain, section1202_gain, collectibles_gain, section897_ordinary_dividends, section897_capital_gain, nondividend_distributions, federal_income_tax_withheld, section199_a_dividends, investment_expenses, foreign_tax_paid, foreign_country_or_us_possession, cash_liquidation_distributions, noncash_liquidation_distributions, exempt_interest_dividends, specified_private_activity_bond_interest_dividends, fatca_filing_requirement, type, created_at, updated_at, state_and_local_withholding, tin_type, id, issuer_id, issuer_reference_id, issuer_tin, tax_year, reference_id, recipient_name, recipient_tin, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, federal_efile_status, e_delivery_status, state_efile_status, postal_mail_status, tin_match_status, address_verification_status, validation_errors].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_int.rb b/lib/avalara_sdk/models/A1099/V2/form1099_int.rb new file mode 100644 index 0000000..f09d344 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_int.rb @@ -0,0 +1,741 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1099Int + attr_accessor :interest_income + + attr_accessor :early_withdrawal_penalty + + attr_accessor :us_savings_bonds_interest + + attr_accessor :federal_income_tax_withheld + + attr_accessor :investment_expenses + + attr_accessor :foreign_tax_paid + + attr_accessor :foreign_country + + attr_accessor :tax_exempt_interest + + attr_accessor :specified_private_activity_bond_interest + + attr_accessor :market_discount + + attr_accessor :bond_premium + + attr_accessor :bond_premium_on_treasury_obligations + + attr_accessor :bond_premium_on_tax_exempt_bond + + attr_accessor :tax_exempt_bond_cusip_number + + attr_accessor :id + + attr_accessor :type + + attr_accessor :issuer_id + + attr_accessor :issuer_reference_id + + attr_accessor :issuer_tin + + attr_accessor :tax_year + + attr_accessor :federal_efile + + attr_accessor :federal_efile_status + + attr_accessor :state_efile + + attr_accessor :state_efile_status + + attr_accessor :postal_mail + + attr_accessor :postal_mail_status + + attr_accessor :tin_match + + attr_accessor :tin_match_status + + attr_accessor :address_verification + + attr_accessor :address_verification_status + + attr_accessor :e_delivery_status + + attr_accessor :reference_id + + attr_accessor :email + + attr_accessor :tin_type + + attr_accessor :fatca_filing_requirement + + attr_accessor :tin + + attr_accessor :no_tin + + attr_accessor :second_tin_notice + + attr_accessor :recipient_name + + attr_accessor :recipient_second_name + + attr_accessor :address + + attr_accessor :address2 + + attr_accessor :city + + attr_accessor :state + + attr_accessor :zip + + attr_accessor :non_us_province + + attr_accessor :country_code + + attr_accessor :account_number + + attr_accessor :office_code + + attr_accessor :validation_errors + + attr_accessor :created_at + + attr_accessor :updated_at + + attr_accessor :state_and_local_withholding + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'interest_income' => :'interestIncome', + :'early_withdrawal_penalty' => :'earlyWithdrawalPenalty', + :'us_savings_bonds_interest' => :'usSavingsBondsInterest', + :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld', + :'investment_expenses' => :'investmentExpenses', + :'foreign_tax_paid' => :'foreignTaxPaid', + :'foreign_country' => :'foreignCountry', + :'tax_exempt_interest' => :'taxExemptInterest', + :'specified_private_activity_bond_interest' => :'specifiedPrivateActivityBondInterest', + :'market_discount' => :'marketDiscount', + :'bond_premium' => :'bondPremium', + :'bond_premium_on_treasury_obligations' => :'bondPremiumOnTreasuryObligations', + :'bond_premium_on_tax_exempt_bond' => :'bondPremiumOnTaxExemptBond', + :'tax_exempt_bond_cusip_number' => :'taxExemptBondCusipNumber', + :'id' => :'id', + :'type' => :'type', + :'issuer_id' => :'issuerId', + :'issuer_reference_id' => :'issuerReferenceId', + :'issuer_tin' => :'issuerTin', + :'tax_year' => :'taxYear', + :'federal_efile' => :'federalEfile', + :'federal_efile_status' => :'federalEfileStatus', + :'state_efile' => :'stateEfile', + :'state_efile_status' => :'stateEfileStatus', + :'postal_mail' => :'postalMail', + :'postal_mail_status' => :'postalMailStatus', + :'tin_match' => :'tinMatch', + :'tin_match_status' => :'tinMatchStatus', + :'address_verification' => :'addressVerification', + :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', + :'reference_id' => :'referenceId', + :'email' => :'email', + :'tin_type' => :'tinType', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', + :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'recipient_name' => :'recipientName', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'validation_errors' => :'validationErrors', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'state_and_local_withholding' => :'stateAndLocalWithholding' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'interest_income' => :'Float', + :'early_withdrawal_penalty' => :'Float', + :'us_savings_bonds_interest' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', + :'foreign_country' => :'String', + :'tax_exempt_interest' => :'Float', + :'specified_private_activity_bond_interest' => :'Float', + :'market_discount' => :'Float', + :'bond_premium' => :'Float', + :'bond_premium_on_treasury_obligations' => :'Float', + :'bond_premium_on_tax_exempt_bond' => :'Float', + :'tax_exempt_bond_cusip_number' => :'String', + :'id' => :'String', + :'type' => :'String', + :'issuer_id' => :'Integer', + :'issuer_reference_id' => :'String', + :'issuer_tin' => :'String', + :'tax_year' => :'Integer', + :'federal_efile' => :'Boolean', + :'federal_efile_status' => :'Form1099StatusDetail', + :'state_efile' => :'Boolean', + :'state_efile_status' => :'Array', + :'postal_mail' => :'Boolean', + :'postal_mail_status' => :'Form1099StatusDetail', + :'tin_match' => :'Boolean', + :'tin_match_status' => :'Form1099StatusDetail', + :'address_verification' => :'Boolean', + :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', + :'reference_id' => :'String', + :'email' => :'String', + :'tin_type' => :'String', + :'fatca_filing_requirement' => :'Boolean', + :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'recipient_name' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'validation_errors' => :'Array', + :'created_at' => :'Time', + :'updated_at' => :'Time', + :'state_and_local_withholding' => :'StateAndLocalWithholding' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'interest_income', + :'early_withdrawal_penalty', + :'us_savings_bonds_interest', + :'federal_income_tax_withheld', + :'investment_expenses', + :'foreign_tax_paid', + :'foreign_country', + :'tax_exempt_interest', + :'specified_private_activity_bond_interest', + :'market_discount', + :'bond_premium', + :'bond_premium_on_treasury_obligations', + :'bond_premium_on_tax_exempt_bond', + :'tax_exempt_bond_cusip_number', + :'issuer_reference_id', + :'issuer_tin', + :'state_efile_status', + :'postal_mail_status', + :'tin_match_status', + :'address_verification_status', + :'e_delivery_status', + :'reference_id', + :'email', + :'tin_type', + :'fatca_filing_requirement', + :'tin', + :'second_tin_notice', + :'recipient_name', + :'recipient_second_name', + :'address', + :'address2', + :'city', + :'state', + :'zip', + :'non_us_province', + :'country_code', + :'account_number', + :'office_code', + :'validation_errors', + :'state_and_local_withholding' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'Form1099Base' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099Int` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099Int`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'interest_income') + self.interest_income = attributes[:'interest_income'] + end + + if attributes.key?(:'early_withdrawal_penalty') + self.early_withdrawal_penalty = attributes[:'early_withdrawal_penalty'] + end + + if attributes.key?(:'us_savings_bonds_interest') + self.us_savings_bonds_interest = attributes[:'us_savings_bonds_interest'] + end + + if attributes.key?(:'federal_income_tax_withheld') + self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld'] + end + + if attributes.key?(:'investment_expenses') + self.investment_expenses = attributes[:'investment_expenses'] + end + + if attributes.key?(:'foreign_tax_paid') + self.foreign_tax_paid = attributes[:'foreign_tax_paid'] + end + + if attributes.key?(:'foreign_country') + self.foreign_country = attributes[:'foreign_country'] + end + + if attributes.key?(:'tax_exempt_interest') + self.tax_exempt_interest = attributes[:'tax_exempt_interest'] + end + + if attributes.key?(:'specified_private_activity_bond_interest') + self.specified_private_activity_bond_interest = attributes[:'specified_private_activity_bond_interest'] + end + + if attributes.key?(:'market_discount') + self.market_discount = attributes[:'market_discount'] + end + + if attributes.key?(:'bond_premium') + self.bond_premium = attributes[:'bond_premium'] + end + + if attributes.key?(:'bond_premium_on_treasury_obligations') + self.bond_premium_on_treasury_obligations = attributes[:'bond_premium_on_treasury_obligations'] + end + + if attributes.key?(:'bond_premium_on_tax_exempt_bond') + self.bond_premium_on_tax_exempt_bond = attributes[:'bond_premium_on_tax_exempt_bond'] + end + + if attributes.key?(:'tax_exempt_bond_cusip_number') + self.tax_exempt_bond_cusip_number = attributes[:'tax_exempt_bond_cusip_number'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + end + + if attributes.key?(:'issuer_reference_id') + self.issuer_reference_id = attributes[:'issuer_reference_id'] + end + + if attributes.key?(:'issuer_tin') + self.issuer_tin = attributes[:'issuer_tin'] + end + + if attributes.key?(:'tax_year') + self.tax_year = attributes[:'tax_year'] + end + + if attributes.key?(:'federal_efile') + self.federal_efile = attributes[:'federal_efile'] + end + + if attributes.key?(:'federal_efile_status') + self.federal_efile_status = attributes[:'federal_efile_status'] + end + + if attributes.key?(:'state_efile') + self.state_efile = attributes[:'state_efile'] + end + + if attributes.key?(:'state_efile_status') + if (value = attributes[:'state_efile_status']).is_a?(Array) + self.state_efile_status = value + end + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + end + + if attributes.key?(:'postal_mail_status') + self.postal_mail_status = attributes[:'postal_mail_status'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + end + + if attributes.key?(:'tin_match_status') + self.tin_match_status = attributes[:'tin_match_status'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + end + + if attributes.key?(:'address_verification_status') + self.address_verification_status = attributes[:'address_verification_status'] + end + + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + + if attributes.key?(:'tin') + self.tin = attributes[:'tin'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'validation_errors') + if (value = attributes[:'validation_errors']).is_a?(Array) + self.validation_errors = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Custom attribute writer method with validation + # @param [Object] state_efile_status Value to be assigned + def state_efile_status=(state_efile_status) + @state_efile_status = state_efile_status + end + + # Custom attribute writer method with validation + # @param [Object] validation_errors Value to be assigned + def validation_errors=(validation_errors) + @validation_errors = validation_errors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + interest_income == o.interest_income && + early_withdrawal_penalty == o.early_withdrawal_penalty && + us_savings_bonds_interest == o.us_savings_bonds_interest && + federal_income_tax_withheld == o.federal_income_tax_withheld && + investment_expenses == o.investment_expenses && + foreign_tax_paid == o.foreign_tax_paid && + foreign_country == o.foreign_country && + tax_exempt_interest == o.tax_exempt_interest && + specified_private_activity_bond_interest == o.specified_private_activity_bond_interest && + market_discount == o.market_discount && + bond_premium == o.bond_premium && + bond_premium_on_treasury_obligations == o.bond_premium_on_treasury_obligations && + bond_premium_on_tax_exempt_bond == o.bond_premium_on_tax_exempt_bond && + tax_exempt_bond_cusip_number == o.tax_exempt_bond_cusip_number && + id == o.id && + type == o.type && + issuer_id == o.issuer_id && + issuer_reference_id == o.issuer_reference_id && + issuer_tin == o.issuer_tin && + tax_year == o.tax_year && + federal_efile == o.federal_efile && + federal_efile_status == o.federal_efile_status && + state_efile == o.state_efile && + state_efile_status == o.state_efile_status && + postal_mail == o.postal_mail && + postal_mail_status == o.postal_mail_status && + tin_match == o.tin_match && + tin_match_status == o.tin_match_status && + address_verification == o.address_verification && + address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && + reference_id == o.reference_id && + email == o.email && + tin_type == o.tin_type && + fatca_filing_requirement == o.fatca_filing_requirement && + tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + recipient_name == o.recipient_name && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + non_us_province == o.non_us_province && + country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && + validation_errors == o.validation_errors && + created_at == o.created_at && + updated_at == o.updated_at && + state_and_local_withholding == o.state_and_local_withholding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [interest_income, early_withdrawal_penalty, us_savings_bonds_interest, federal_income_tax_withheld, investment_expenses, foreign_tax_paid, foreign_country, tax_exempt_interest, specified_private_activity_bond_interest, market_discount, bond_premium, bond_premium_on_treasury_obligations, bond_premium_on_tax_exempt_bond, tax_exempt_bond_cusip_number, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_int_list.rb b/lib/avalara_sdk/models/A1099/V2/form1099_int_list.rb new file mode 100644 index 0000000..c6cd9af --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_int_list.rb @@ -0,0 +1,238 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1099IntList + attr_accessor :forms + + attr_accessor :form_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'forms' => :'forms', + :'form_type' => :'formType' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'forms' => :'Array', + :'form_type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'BaseFormListRequest' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099IntList` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099IntList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'forms') + if (value = attributes[:'forms']).is_a?(Array) + self.forms = value + end + end + + if attributes.key?(:'form_type') + self.form_type = attributes[:'form_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Custom attribute writer method with validation + # @param [Object] forms Value to be assigned + def forms=(forms) + if forms.nil? + fail ArgumentError, 'forms cannot be nil' + end + + @forms = forms + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + forms == o.forms && + form_type == o.form_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [forms, form_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item.rb new file mode 100644 index 0000000..45d8523 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item.rb @@ -0,0 +1,702 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1099IntListItem + # Interest Income + attr_accessor :interest_income + + # Early Withdrawal Penalty + attr_accessor :early_withdrawal_penalty + + # Interest on U.S. Savings Bonds and Treasury obligations + attr_accessor :us_savings_bonds_interest + + # Federal income tax withheld + attr_accessor :federal_income_tax_withheld + + # Investment Expenses + attr_accessor :investment_expenses + + # Foreign tax paid + attr_accessor :foreign_tax_paid + + # Foreign country or U.S. possession + attr_accessor :foreign_country + + # Tax-Exempt Interest + attr_accessor :tax_exempt_interest + + # Specified Private activity + attr_accessor :specified_private_activity_bond_interest + + # Market Discount + attr_accessor :market_discount + + # Bond Premium + attr_accessor :bond_premium + + # Bond Premium on Treasury obligations + attr_accessor :bond_premium_on_treasury_obligations + + # Bond Premium on tax exempt bond + attr_accessor :bond_premium_on_tax_exempt_bond + + # Tax exempt bond CUSIP no. + attr_accessor :tax_exempt_bond_cusip_number + + # Issuer Reference ID. One of `issuerReferenceId` or `issuerTin` is required. + attr_accessor :issuer_reference_id + + # Issuer TIN. One of `issuerReferenceId` or `issuerTin` is required. + attr_accessor :issuer_tin + + # Tax year + attr_accessor :tax_year + + # Issuer ID + attr_accessor :issuer_id + + # Reference ID + attr_accessor :reference_id + + # Recipient Tax ID Number + attr_accessor :recipient_tin + + # Recipient name + attr_accessor :recipient_name + + # Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + attr_accessor :tin_type + + # Recipient second name + attr_accessor :recipient_second_name + + # Address + attr_accessor :address + + # Address line 2 + attr_accessor :address2 + + # City + attr_accessor :city + + # US state. Required if CountryCode is \"US\". + attr_accessor :state + + # Zip/postal code + attr_accessor :zip + + # Recipient email address + attr_accessor :email + + # Account number + attr_accessor :account_number + + # Office code + attr_accessor :office_code + + # Foreign province + attr_accessor :non_us_province + + # Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + attr_accessor :country_code + + # Boolean indicating that federal e-filing should be scheduled for this form + attr_accessor :federal_e_file + + # Boolean indicating that postal mailing to the recipient should be scheduled for this form + attr_accessor :postal_mail + + # Boolean indicating that state e-filing should be scheduled for this form + attr_accessor :state_e_file + + # Boolean indicating that TIN Matching should be scheduled for this form + attr_accessor :tin_match + + # Indicates whether the recipient has no TIN + attr_accessor :no_tin + + # Second TIN notice in three years + attr_accessor :second_tin_notice + + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + + # Boolean indicating that address verification should be scheduled for this form + attr_accessor :address_verification + + # State and local withholding information + attr_accessor :state_and_local_withholding + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'interest_income' => :'interestIncome', + :'early_withdrawal_penalty' => :'earlyWithdrawalPenalty', + :'us_savings_bonds_interest' => :'usSavingsBondsInterest', + :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld', + :'investment_expenses' => :'investmentExpenses', + :'foreign_tax_paid' => :'foreignTaxPaid', + :'foreign_country' => :'foreignCountry', + :'tax_exempt_interest' => :'taxExemptInterest', + :'specified_private_activity_bond_interest' => :'specifiedPrivateActivityBondInterest', + :'market_discount' => :'marketDiscount', + :'bond_premium' => :'bondPremium', + :'bond_premium_on_treasury_obligations' => :'bondPremiumOnTreasuryObligations', + :'bond_premium_on_tax_exempt_bond' => :'bondPremiumOnTaxExemptBond', + :'tax_exempt_bond_cusip_number' => :'taxExemptBondCusipNumber', + :'issuer_reference_id' => :'issuerReferenceId', + :'issuer_tin' => :'issuerTin', + :'tax_year' => :'taxYear', + :'issuer_id' => :'issuerId', + :'reference_id' => :'referenceId', + :'recipient_tin' => :'recipientTin', + :'recipient_name' => :'recipientName', + :'tin_type' => :'tinType', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'email' => :'email', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'federal_e_file' => :'federalEFile', + :'postal_mail' => :'postalMail', + :'state_e_file' => :'stateEFile', + :'tin_match' => :'tinMatch', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', + :'address_verification' => :'addressVerification', + :'state_and_local_withholding' => :'stateAndLocalWithholding' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'interest_income' => :'Float', + :'early_withdrawal_penalty' => :'Float', + :'us_savings_bonds_interest' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', + :'foreign_country' => :'String', + :'tax_exempt_interest' => :'Float', + :'specified_private_activity_bond_interest' => :'Float', + :'market_discount' => :'Float', + :'bond_premium' => :'Float', + :'bond_premium_on_treasury_obligations' => :'Float', + :'bond_premium_on_tax_exempt_bond' => :'Float', + :'tax_exempt_bond_cusip_number' => :'String', + :'issuer_reference_id' => :'String', + :'issuer_tin' => :'String', + :'tax_year' => :'Integer', + :'issuer_id' => :'String', + :'reference_id' => :'String', + :'recipient_tin' => :'String', + :'recipient_name' => :'String', + :'tin_type' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'email' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'federal_e_file' => :'Boolean', + :'postal_mail' => :'Boolean', + :'state_e_file' => :'Boolean', + :'tin_match' => :'Boolean', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', + :'address_verification' => :'Boolean', + :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'interest_income', + :'early_withdrawal_penalty', + :'us_savings_bonds_interest', + :'federal_income_tax_withheld', + :'investment_expenses', + :'foreign_tax_paid', + :'foreign_country', + :'tax_exempt_interest', + :'specified_private_activity_bond_interest', + :'market_discount', + :'bond_premium', + :'bond_premium_on_treasury_obligations', + :'bond_premium_on_tax_exempt_bond', + :'tax_exempt_bond_cusip_number', + :'issuer_reference_id', + :'issuer_tin', + :'issuer_id', + :'reference_id', + :'recipient_tin', + :'recipient_name', + :'recipient_second_name', + :'address', + :'address2', + :'city', + :'state', + :'zip', + :'email', + :'account_number', + :'office_code', + :'non_us_province', + :'country_code', + :'second_tin_notice', + :'state_and_local_withholding' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'FormRequestListItemBase' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099IntListItem` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099IntListItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'interest_income') + self.interest_income = attributes[:'interest_income'] + end + + if attributes.key?(:'early_withdrawal_penalty') + self.early_withdrawal_penalty = attributes[:'early_withdrawal_penalty'] + end + + if attributes.key?(:'us_savings_bonds_interest') + self.us_savings_bonds_interest = attributes[:'us_savings_bonds_interest'] + end + + if attributes.key?(:'federal_income_tax_withheld') + self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld'] + end + + if attributes.key?(:'investment_expenses') + self.investment_expenses = attributes[:'investment_expenses'] + end + + if attributes.key?(:'foreign_tax_paid') + self.foreign_tax_paid = attributes[:'foreign_tax_paid'] + end + + if attributes.key?(:'foreign_country') + self.foreign_country = attributes[:'foreign_country'] + end + + if attributes.key?(:'tax_exempt_interest') + self.tax_exempt_interest = attributes[:'tax_exempt_interest'] + end + + if attributes.key?(:'specified_private_activity_bond_interest') + self.specified_private_activity_bond_interest = attributes[:'specified_private_activity_bond_interest'] + end + + if attributes.key?(:'market_discount') + self.market_discount = attributes[:'market_discount'] + end + + if attributes.key?(:'bond_premium') + self.bond_premium = attributes[:'bond_premium'] + end + + if attributes.key?(:'bond_premium_on_treasury_obligations') + self.bond_premium_on_treasury_obligations = attributes[:'bond_premium_on_treasury_obligations'] + end + + if attributes.key?(:'bond_premium_on_tax_exempt_bond') + self.bond_premium_on_tax_exempt_bond = attributes[:'bond_premium_on_tax_exempt_bond'] + end + + if attributes.key?(:'tax_exempt_bond_cusip_number') + self.tax_exempt_bond_cusip_number = attributes[:'tax_exempt_bond_cusip_number'] + end + + if attributes.key?(:'issuer_reference_id') + self.issuer_reference_id = attributes[:'issuer_reference_id'] + end + + if attributes.key?(:'issuer_tin') + self.issuer_tin = attributes[:'issuer_tin'] + end + + if attributes.key?(:'tax_year') + self.tax_year = attributes[:'tax_year'] + else + self.tax_year = nil + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'recipient_tin') + self.recipient_tin = attributes[:'recipient_tin'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'federal_e_file') + self.federal_e_file = attributes[:'federal_e_file'] + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + end + + if attributes.key?(:'state_e_file') + self.state_e_file = attributes[:'state_e_file'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @tax_year.nil? + invalid_properties.push('invalid value for "tax_year", tax_year cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @tax_year.nil? + tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + return false unless tin_type_validator.valid?(@tin_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] tin_type Object to be assigned + def tin_type=(tin_type) + validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + unless validator.valid?(tin_type) + fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}." + end + @tin_type = tin_type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + interest_income == o.interest_income && + early_withdrawal_penalty == o.early_withdrawal_penalty && + us_savings_bonds_interest == o.us_savings_bonds_interest && + federal_income_tax_withheld == o.federal_income_tax_withheld && + investment_expenses == o.investment_expenses && + foreign_tax_paid == o.foreign_tax_paid && + foreign_country == o.foreign_country && + tax_exempt_interest == o.tax_exempt_interest && + specified_private_activity_bond_interest == o.specified_private_activity_bond_interest && + market_discount == o.market_discount && + bond_premium == o.bond_premium && + bond_premium_on_treasury_obligations == o.bond_premium_on_treasury_obligations && + bond_premium_on_tax_exempt_bond == o.bond_premium_on_tax_exempt_bond && + tax_exempt_bond_cusip_number == o.tax_exempt_bond_cusip_number && + issuer_reference_id == o.issuer_reference_id && + issuer_tin == o.issuer_tin && + tax_year == o.tax_year && + issuer_id == o.issuer_id && + reference_id == o.reference_id && + recipient_tin == o.recipient_tin && + recipient_name == o.recipient_name && + tin_type == o.tin_type && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + email == o.email && + account_number == o.account_number && + office_code == o.office_code && + non_us_province == o.non_us_province && + country_code == o.country_code && + federal_e_file == o.federal_e_file && + postal_mail == o.postal_mail && + state_e_file == o.state_e_file && + tin_match == o.tin_match && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && + address_verification == o.address_verification && + state_and_local_withholding == o.state_and_local_withholding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [interest_income, early_withdrawal_penalty, us_savings_bonds_interest, federal_income_tax_withheld, investment_expenses, foreign_tax_paid, foreign_country, tax_exempt_interest, specified_private_activity_bond_interest, market_discount, bond_premium, bond_premium_on_treasury_obligations, bond_premium_on_tax_exempt_bond, tax_exempt_bond_cusip_number, issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb new file mode 100644 index 0000000..f8fe729 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb @@ -0,0 +1,887 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1099IntListItemResponse + # Interest Income + attr_accessor :interest_income + + # Early withdrawal penalty + attr_accessor :early_withdrawal_penalty + + # Interest on U.S. Savings Bonds and Treasury obligations + attr_accessor :us_savings_bonds_interest + + # Federal income tax withheld + attr_accessor :federal_income_tax_withheld + + # Investment expenses + attr_accessor :investment_expenses + + # Foreign tax paid + attr_accessor :foreign_tax_paid + + # Foreign country or U.S. possession + attr_accessor :foreign_country + + # Tax-exempt interest + attr_accessor :tax_exempt_interest + + # Specified private activity bond interest + attr_accessor :specified_private_activity_bond_interest + + # Market discount + attr_accessor :market_discount + + # Bond premium + attr_accessor :bond_premium + + # Bond premium on Treasury obligations + attr_accessor :bond_premium_on_treasury_obligations + + # Bond premium on tax exempt bond + attr_accessor :bond_premium_on_tax_exempt_bond + + # Tax exempt bond CUSIP number + attr_accessor :tax_exempt_bond_cusip_number + + # ID of the form + attr_accessor :id + + # Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC + attr_accessor :type + + # Issuer ID + attr_accessor :issuer_id + + # Issuer Reference ID + attr_accessor :issuer_reference_id + + # Issuer TIN + attr_accessor :issuer_tin + + # Tax year + attr_accessor :tax_year + + # Boolean indicating that federal e-filing has been scheduled for this form + attr_accessor :federal_efile + + # Federal e-file status + attr_accessor :federal_efile_status + + # Boolean indicating that state e-filing has been scheduled for this form + attr_accessor :state_efile + + # State e-file status + attr_accessor :state_efile_status + + # Boolean indicating that postal mailing to the recipient has been scheduled for this form + attr_accessor :postal_mail + + # Postal mail to recipient status + attr_accessor :postal_mail_status + + # Boolean indicating that TIN Matching has been scheduled for this form + attr_accessor :tin_match + + # TIN Match status + attr_accessor :tin_match_status + + # Boolean indicating that address verification has been scheduled for this form + attr_accessor :address_verification + + # Address verification status + attr_accessor :address_verification_status + + # EDelivery status + attr_accessor :e_delivery_status + + # Reference ID + attr_accessor :reference_id + + # Recipient email address + attr_accessor :email + + # Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + attr_accessor :tin_type + + # Recipient Tax ID Number + attr_accessor :tin + + # Indicates whether the recipient has no TIN + attr_accessor :no_tin + + # Second Tin Notice + attr_accessor :second_tin_notice + + # Recipient name + attr_accessor :recipient_name + + # Recipient second name + attr_accessor :recipient_second_name + + # Address + attr_accessor :address + + # Address line 2 + attr_accessor :address2 + + # City + attr_accessor :city + + # US state + attr_accessor :state + + # Zip/postal code + attr_accessor :zip + + # Foreign province + attr_accessor :non_us_province + + # Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + attr_accessor :country_code + + # Account Number + attr_accessor :account_number + + # Office Code + attr_accessor :office_code + + # FATCA filing requirement + attr_accessor :fatca_filing_requirement + + # Validation errors + attr_accessor :validation_errors + + # Creation time + attr_accessor :created_at + + # Update time + attr_accessor :updated_at + + attr_accessor :state_and_local_withholding + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'interest_income' => :'interestIncome', + :'early_withdrawal_penalty' => :'earlyWithdrawalPenalty', + :'us_savings_bonds_interest' => :'usSavingsBondsInterest', + :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld', + :'investment_expenses' => :'investmentExpenses', + :'foreign_tax_paid' => :'foreignTaxPaid', + :'foreign_country' => :'foreignCountry', + :'tax_exempt_interest' => :'taxExemptInterest', + :'specified_private_activity_bond_interest' => :'specifiedPrivateActivityBondInterest', + :'market_discount' => :'marketDiscount', + :'bond_premium' => :'bondPremium', + :'bond_premium_on_treasury_obligations' => :'bondPremiumOnTreasuryObligations', + :'bond_premium_on_tax_exempt_bond' => :'bondPremiumOnTaxExemptBond', + :'tax_exempt_bond_cusip_number' => :'taxExemptBondCusipNumber', + :'id' => :'id', + :'type' => :'type', + :'issuer_id' => :'issuerId', + :'issuer_reference_id' => :'issuerReferenceId', + :'issuer_tin' => :'issuerTin', + :'tax_year' => :'taxYear', + :'federal_efile' => :'federalEfile', + :'federal_efile_status' => :'federalEfileStatus', + :'state_efile' => :'stateEfile', + :'state_efile_status' => :'stateEfileStatus', + :'postal_mail' => :'postalMail', + :'postal_mail_status' => :'postalMailStatus', + :'tin_match' => :'tinMatch', + :'tin_match_status' => :'tinMatchStatus', + :'address_verification' => :'addressVerification', + :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', + :'reference_id' => :'referenceId', + :'email' => :'email', + :'tin_type' => :'tinType', + :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'recipient_name' => :'recipientName', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', + :'validation_errors' => :'validationErrors', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'state_and_local_withholding' => :'stateAndLocalWithholding' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'interest_income' => :'Float', + :'early_withdrawal_penalty' => :'Float', + :'us_savings_bonds_interest' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', + :'foreign_country' => :'String', + :'tax_exempt_interest' => :'Float', + :'specified_private_activity_bond_interest' => :'Float', + :'market_discount' => :'Float', + :'bond_premium' => :'Float', + :'bond_premium_on_treasury_obligations' => :'Float', + :'bond_premium_on_tax_exempt_bond' => :'Float', + :'tax_exempt_bond_cusip_number' => :'String', + :'id' => :'String', + :'type' => :'String', + :'issuer_id' => :'Integer', + :'issuer_reference_id' => :'String', + :'issuer_tin' => :'String', + :'tax_year' => :'Integer', + :'federal_efile' => :'Boolean', + :'federal_efile_status' => :'StatusDetail', + :'state_efile' => :'Boolean', + :'state_efile_status' => :'Array', + :'postal_mail' => :'Boolean', + :'postal_mail_status' => :'StatusDetail', + :'tin_match' => :'Boolean', + :'tin_match_status' => :'StatusDetail', + :'address_verification' => :'Boolean', + :'address_verification_status' => :'StatusDetail', + :'e_delivery_status' => :'StatusDetail', + :'reference_id' => :'String', + :'email' => :'String', + :'tin_type' => :'String', + :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'recipient_name' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'fatca_filing_requirement' => :'Boolean', + :'validation_errors' => :'Array', + :'created_at' => :'Time', + :'updated_at' => :'Time', + :'state_and_local_withholding' => :'StateAndLocalWithholdingResponse' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'interest_income', + :'early_withdrawal_penalty', + :'us_savings_bonds_interest', + :'federal_income_tax_withheld', + :'investment_expenses', + :'foreign_tax_paid', + :'foreign_country', + :'tax_exempt_interest', + :'specified_private_activity_bond_interest', + :'market_discount', + :'bond_premium', + :'bond_premium_on_treasury_obligations', + :'bond_premium_on_tax_exempt_bond', + :'tax_exempt_bond_cusip_number', + :'issuer_reference_id', + :'issuer_tin', + :'state_efile_status', + :'postal_mail_status', + :'tin_match_status', + :'address_verification_status', + :'e_delivery_status', + :'reference_id', + :'email', + :'tin_type', + :'tin', + :'second_tin_notice', + :'recipient_name', + :'recipient_second_name', + :'address', + :'address2', + :'city', + :'state', + :'zip', + :'non_us_province', + :'country_code', + :'account_number', + :'office_code', + :'fatca_filing_requirement', + :'validation_errors', + :'state_and_local_withholding' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'Form1099BaseResponse' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099IntListItemResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099IntListItemResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'interest_income') + self.interest_income = attributes[:'interest_income'] + end + + if attributes.key?(:'early_withdrawal_penalty') + self.early_withdrawal_penalty = attributes[:'early_withdrawal_penalty'] + end + + if attributes.key?(:'us_savings_bonds_interest') + self.us_savings_bonds_interest = attributes[:'us_savings_bonds_interest'] + end + + if attributes.key?(:'federal_income_tax_withheld') + self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld'] + end + + if attributes.key?(:'investment_expenses') + self.investment_expenses = attributes[:'investment_expenses'] + end + + if attributes.key?(:'foreign_tax_paid') + self.foreign_tax_paid = attributes[:'foreign_tax_paid'] + end + + if attributes.key?(:'foreign_country') + self.foreign_country = attributes[:'foreign_country'] + end + + if attributes.key?(:'tax_exempt_interest') + self.tax_exempt_interest = attributes[:'tax_exempt_interest'] + end + + if attributes.key?(:'specified_private_activity_bond_interest') + self.specified_private_activity_bond_interest = attributes[:'specified_private_activity_bond_interest'] + end + + if attributes.key?(:'market_discount') + self.market_discount = attributes[:'market_discount'] + end + + if attributes.key?(:'bond_premium') + self.bond_premium = attributes[:'bond_premium'] + end + + if attributes.key?(:'bond_premium_on_treasury_obligations') + self.bond_premium_on_treasury_obligations = attributes[:'bond_premium_on_treasury_obligations'] + end + + if attributes.key?(:'bond_premium_on_tax_exempt_bond') + self.bond_premium_on_tax_exempt_bond = attributes[:'bond_premium_on_tax_exempt_bond'] + end + + if attributes.key?(:'tax_exempt_bond_cusip_number') + self.tax_exempt_bond_cusip_number = attributes[:'tax_exempt_bond_cusip_number'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + else + self.id = nil + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = nil + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + else + self.issuer_id = nil + end + + if attributes.key?(:'issuer_reference_id') + self.issuer_reference_id = attributes[:'issuer_reference_id'] + end + + if attributes.key?(:'issuer_tin') + self.issuer_tin = attributes[:'issuer_tin'] + end + + if attributes.key?(:'tax_year') + self.tax_year = attributes[:'tax_year'] + end + + if attributes.key?(:'federal_efile') + self.federal_efile = attributes[:'federal_efile'] + else + self.federal_efile = nil + end + + if attributes.key?(:'federal_efile_status') + self.federal_efile_status = attributes[:'federal_efile_status'] + end + + if attributes.key?(:'state_efile') + self.state_efile = attributes[:'state_efile'] + else + self.state_efile = nil + end + + if attributes.key?(:'state_efile_status') + if (value = attributes[:'state_efile_status']).is_a?(Array) + self.state_efile_status = value + end + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + else + self.postal_mail = nil + end + + if attributes.key?(:'postal_mail_status') + self.postal_mail_status = attributes[:'postal_mail_status'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + else + self.tin_match = nil + end + + if attributes.key?(:'tin_match_status') + self.tin_match_status = attributes[:'tin_match_status'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + else + self.address_verification = nil + end + + if attributes.key?(:'address_verification_status') + self.address_verification_status = attributes[:'address_verification_status'] + end + + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'tin') + self.tin = attributes[:'tin'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + + if attributes.key?(:'validation_errors') + if (value = attributes[:'validation_errors']).is_a?(Array) + self.validation_errors = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @id.to_s.length < 1 + invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @type.to_s.length < 1 + invalid_properties.push('invalid value for "type", the character length must be great than or equal to 1.') + end + + if @issuer_id.nil? + invalid_properties.push('invalid value for "issuer_id", issuer_id cannot be nil.') + end + + if @federal_efile.nil? + invalid_properties.push('invalid value for "federal_efile", federal_efile cannot be nil.') + end + + if @state_efile.nil? + invalid_properties.push('invalid value for "state_efile", state_efile cannot be nil.') + end + + if @postal_mail.nil? + invalid_properties.push('invalid value for "postal_mail", postal_mail cannot be nil.') + end + + if @tin_match.nil? + invalid_properties.push('invalid value for "tin_match", tin_match cannot be nil.') + end + + if @address_verification.nil? + invalid_properties.push('invalid value for "address_verification", address_verification cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + return false if @id.nil? + return false if @id.to_s.length < 1 + return false if @type.nil? + return false if @type.to_s.length < 1 + return false if @issuer_id.nil? + return false if @federal_efile.nil? + return false if @state_efile.nil? + return false if @postal_mail.nil? + return false if @tin_match.nil? + return false if @address_verification.nil? + true + end + + # Custom attribute writer method with validation + # @param [Object] id Value to be assigned + def id=(id) + if id.nil? + fail ArgumentError, 'id cannot be nil' + end + + if id.to_s.length < 1 + fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.' + end + + @id = id + end + + # Custom attribute writer method with validation + # @param [Object] type Value to be assigned + def type=(type) + if type.nil? + fail ArgumentError, 'type cannot be nil' + end + + if type.to_s.length < 1 + fail ArgumentError, 'invalid value for "type", the character length must be great than or equal to 1.' + end + + @type = type + end + + # Custom attribute writer method with validation + # @param [Object] state_efile_status Value to be assigned + def state_efile_status=(state_efile_status) + @state_efile_status = state_efile_status + end + + # Custom attribute writer method with validation + # @param [Object] validation_errors Value to be assigned + def validation_errors=(validation_errors) + @validation_errors = validation_errors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + interest_income == o.interest_income && + early_withdrawal_penalty == o.early_withdrawal_penalty && + us_savings_bonds_interest == o.us_savings_bonds_interest && + federal_income_tax_withheld == o.federal_income_tax_withheld && + investment_expenses == o.investment_expenses && + foreign_tax_paid == o.foreign_tax_paid && + foreign_country == o.foreign_country && + tax_exempt_interest == o.tax_exempt_interest && + specified_private_activity_bond_interest == o.specified_private_activity_bond_interest && + market_discount == o.market_discount && + bond_premium == o.bond_premium && + bond_premium_on_treasury_obligations == o.bond_premium_on_treasury_obligations && + bond_premium_on_tax_exempt_bond == o.bond_premium_on_tax_exempt_bond && + tax_exempt_bond_cusip_number == o.tax_exempt_bond_cusip_number && + id == o.id && + type == o.type && + issuer_id == o.issuer_id && + issuer_reference_id == o.issuer_reference_id && + issuer_tin == o.issuer_tin && + tax_year == o.tax_year && + federal_efile == o.federal_efile && + federal_efile_status == o.federal_efile_status && + state_efile == o.state_efile && + state_efile_status == o.state_efile_status && + postal_mail == o.postal_mail && + postal_mail_status == o.postal_mail_status && + tin_match == o.tin_match && + tin_match_status == o.tin_match_status && + address_verification == o.address_verification && + address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && + reference_id == o.reference_id && + email == o.email && + tin_type == o.tin_type && + tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + recipient_name == o.recipient_name && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + non_us_province == o.non_us_province && + country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && + fatca_filing_requirement == o.fatca_filing_requirement && + validation_errors == o.validation_errors && + created_at == o.created_at && + updated_at == o.updated_at && + state_and_local_withholding == o.state_and_local_withholding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [interest_income, early_withdrawal_penalty, us_savings_bonds_interest, federal_income_tax_withheld, investment_expenses, foreign_tax_paid, foreign_country, tax_exempt_interest, specified_private_activity_bond_interest, market_discount, bond_premium, bond_premium_on_treasury_obligations, bond_premium_on_tax_exempt_bond, tax_exempt_bond_cusip_number, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, fatca_filing_requirement, validation_errors, created_at, updated_at, state_and_local_withholding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_int_request.rb b/lib/avalara_sdk/models/A1099/V2/form1099_int_request.rb new file mode 100644 index 0000000..ec54662 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_int_request.rb @@ -0,0 +1,684 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1099IntRequest + # Interest Income + attr_accessor :interest_income + + # Early Withdrawl Penalty + attr_accessor :early_withdrawal_penalty + + # Interest on U.S. Savings Bonds and Treasury obligations + attr_accessor :us_savings_bonds_interest + + # Federal income tax withheld + attr_accessor :federal_income_tax_withheld + + # Investment Expenses + attr_accessor :investment_expenses + + # Foreign tax paid + attr_accessor :foreign_tax_paid + + # Foreign country or U.S. possession + attr_accessor :foreign_country + + # Tax-Exempt Interest + attr_accessor :tax_exempt_interest + + # Specified Private activity + attr_accessor :specified_private_activity_bond_interest + + # Market Discount + attr_accessor :market_discount + + # Bond Premium + attr_accessor :bond_premium + + # Bond Premium on Treasury obligations + attr_accessor :bond_premium_on_treasury_obligations + + # Bond Premium on tax exempt bond + attr_accessor :bond_premium_on_tax_exempt_bond + + # Tax exempt bond CUSIP no. + attr_accessor :tax_exempt_bond_cusip_number + + attr_accessor :type + + # Issuer ID + attr_accessor :issuer_id + + # Reference ID + attr_accessor :reference_id + + # Recipient Tax ID Number + attr_accessor :recipient_tin + + # Recipient name + attr_accessor :recipient_name + + # Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN + attr_accessor :tin_type + + # Recipient second name + attr_accessor :recipient_second_name + + # Address + attr_accessor :address + + # Address line 2 + attr_accessor :address2 + + # City + attr_accessor :city + + # US state. Required if CountryCode is \"US\". + attr_accessor :state + + # Zip/postal code + attr_accessor :zip + + # Recipient email address + attr_accessor :email + + # Account number + attr_accessor :account_number + + # Office code + attr_accessor :office_code + + # Foreign province + attr_accessor :non_us_province + + # Country code, as defined at https://www.irs.gov/e-file-providers/country-codes + attr_accessor :country_code + + # Boolean indicating that federal e-filing should be scheduled for this form + attr_accessor :federal_e_file + + # Boolean indicating that postal mailing to the recipient should be scheduled for this form + attr_accessor :postal_mail + + # Boolean indicating that state e-filing should be scheduled for this form + attr_accessor :state_e_file + + # Boolean indicating that TIN Matching should be scheduled for this form + attr_accessor :tin_match + + # Indicates whether the recipient has no TIN + attr_accessor :no_tin + + # Second TIN notice in three years + attr_accessor :second_tin_notice + + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + + # Boolean indicating that address verification should be scheduled for this form + attr_accessor :address_verification + + # State and local withholding information + attr_accessor :state_and_local_withholding + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'interest_income' => :'interestIncome', + :'early_withdrawal_penalty' => :'earlyWithdrawalPenalty', + :'us_savings_bonds_interest' => :'usSavingsBondsInterest', + :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld', + :'investment_expenses' => :'investmentExpenses', + :'foreign_tax_paid' => :'foreignTaxPaid', + :'foreign_country' => :'foreignCountry', + :'tax_exempt_interest' => :'taxExemptInterest', + :'specified_private_activity_bond_interest' => :'specifiedPrivateActivityBondInterest', + :'market_discount' => :'marketDiscount', + :'bond_premium' => :'bondPremium', + :'bond_premium_on_treasury_obligations' => :'bondPremiumOnTreasuryObligations', + :'bond_premium_on_tax_exempt_bond' => :'bondPremiumOnTaxExemptBond', + :'tax_exempt_bond_cusip_number' => :'taxExemptBondCusipNumber', + :'type' => :'type', + :'issuer_id' => :'issuerId', + :'reference_id' => :'referenceId', + :'recipient_tin' => :'recipientTin', + :'recipient_name' => :'recipientName', + :'tin_type' => :'tinType', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'email' => :'email', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'federal_e_file' => :'federalEFile', + :'postal_mail' => :'postalMail', + :'state_e_file' => :'stateEFile', + :'tin_match' => :'tinMatch', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', + :'address_verification' => :'addressVerification', + :'state_and_local_withholding' => :'stateAndLocalWithholding' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'interest_income' => :'Float', + :'early_withdrawal_penalty' => :'Float', + :'us_savings_bonds_interest' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', + :'foreign_country' => :'String', + :'tax_exempt_interest' => :'Float', + :'specified_private_activity_bond_interest' => :'Float', + :'market_discount' => :'Float', + :'bond_premium' => :'Float', + :'bond_premium_on_treasury_obligations' => :'Float', + :'bond_premium_on_tax_exempt_bond' => :'Float', + :'tax_exempt_bond_cusip_number' => :'String', + :'type' => :'String', + :'issuer_id' => :'String', + :'reference_id' => :'String', + :'recipient_tin' => :'String', + :'recipient_name' => :'String', + :'tin_type' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'email' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'federal_e_file' => :'Boolean', + :'postal_mail' => :'Boolean', + :'state_e_file' => :'Boolean', + :'tin_match' => :'Boolean', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', + :'address_verification' => :'Boolean', + :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'interest_income', + :'early_withdrawal_penalty', + :'us_savings_bonds_interest', + :'federal_income_tax_withheld', + :'investment_expenses', + :'foreign_tax_paid', + :'foreign_country', + :'tax_exempt_interest', + :'specified_private_activity_bond_interest', + :'market_discount', + :'bond_premium', + :'bond_premium_on_treasury_obligations', + :'bond_premium_on_tax_exempt_bond', + :'tax_exempt_bond_cusip_number', + :'issuer_id', + :'reference_id', + :'recipient_tin', + :'recipient_name', + :'recipient_second_name', + :'address', + :'address2', + :'city', + :'state', + :'zip', + :'email', + :'account_number', + :'office_code', + :'non_us_province', + :'country_code', + :'second_tin_notice', + :'state_and_local_withholding' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'FormSingleRequestBase' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099IntRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099IntRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'interest_income') + self.interest_income = attributes[:'interest_income'] + end + + if attributes.key?(:'early_withdrawal_penalty') + self.early_withdrawal_penalty = attributes[:'early_withdrawal_penalty'] + end + + if attributes.key?(:'us_savings_bonds_interest') + self.us_savings_bonds_interest = attributes[:'us_savings_bonds_interest'] + end + + if attributes.key?(:'federal_income_tax_withheld') + self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld'] + end + + if attributes.key?(:'investment_expenses') + self.investment_expenses = attributes[:'investment_expenses'] + end + + if attributes.key?(:'foreign_tax_paid') + self.foreign_tax_paid = attributes[:'foreign_tax_paid'] + end + + if attributes.key?(:'foreign_country') + self.foreign_country = attributes[:'foreign_country'] + end + + if attributes.key?(:'tax_exempt_interest') + self.tax_exempt_interest = attributes[:'tax_exempt_interest'] + end + + if attributes.key?(:'specified_private_activity_bond_interest') + self.specified_private_activity_bond_interest = attributes[:'specified_private_activity_bond_interest'] + end + + if attributes.key?(:'market_discount') + self.market_discount = attributes[:'market_discount'] + end + + if attributes.key?(:'bond_premium') + self.bond_premium = attributes[:'bond_premium'] + end + + if attributes.key?(:'bond_premium_on_treasury_obligations') + self.bond_premium_on_treasury_obligations = attributes[:'bond_premium_on_treasury_obligations'] + end + + if attributes.key?(:'bond_premium_on_tax_exempt_bond') + self.bond_premium_on_tax_exempt_bond = attributes[:'bond_premium_on_tax_exempt_bond'] + end + + if attributes.key?(:'tax_exempt_bond_cusip_number') + self.tax_exempt_bond_cusip_number = attributes[:'tax_exempt_bond_cusip_number'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'recipient_tin') + self.recipient_tin = attributes[:'recipient_tin'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'federal_e_file') + self.federal_e_file = attributes[:'federal_e_file'] + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + end + + if attributes.key?(:'state_e_file') + self.state_e_file = attributes[:'state_e_file'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) + return false unless type_validator.valid?(@type) + tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + return false unless tin_type_validator.valid?(@tin_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] tin_type Object to be assigned + def tin_type=(tin_type) + validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + unless validator.valid?(tin_type) + fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}." + end + @tin_type = tin_type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + interest_income == o.interest_income && + early_withdrawal_penalty == o.early_withdrawal_penalty && + us_savings_bonds_interest == o.us_savings_bonds_interest && + federal_income_tax_withheld == o.federal_income_tax_withheld && + investment_expenses == o.investment_expenses && + foreign_tax_paid == o.foreign_tax_paid && + foreign_country == o.foreign_country && + tax_exempt_interest == o.tax_exempt_interest && + specified_private_activity_bond_interest == o.specified_private_activity_bond_interest && + market_discount == o.market_discount && + bond_premium == o.bond_premium && + bond_premium_on_treasury_obligations == o.bond_premium_on_treasury_obligations && + bond_premium_on_tax_exempt_bond == o.bond_premium_on_tax_exempt_bond && + tax_exempt_bond_cusip_number == o.tax_exempt_bond_cusip_number && + type == o.type && + issuer_id == o.issuer_id && + reference_id == o.reference_id && + recipient_tin == o.recipient_tin && + recipient_name == o.recipient_name && + tin_type == o.tin_type && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + email == o.email && + account_number == o.account_number && + office_code == o.office_code && + non_us_province == o.non_us_province && + country_code == o.country_code && + federal_e_file == o.federal_e_file && + postal_mail == o.postal_mail && + state_e_file == o.state_e_file && + tin_match == o.tin_match && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && + address_verification == o.address_verification && + state_and_local_withholding == o.state_and_local_withholding + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [interest_income, early_withdrawal_penalty, us_savings_bonds_interest, federal_income_tax_withheld, investment_expenses, foreign_tax_paid, foreign_country, tax_exempt_interest, specified_private_activity_bond_interest, market_discount, bond_premium, bond_premium_on_treasury_obligations, bond_premium_on_tax_exempt_bond, tax_exempt_bond_cusip_number, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_int_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_int_response.rb new file mode 100644 index 0000000..b0d3223 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_int_response.rb @@ -0,0 +1,773 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1099IntResponse + # Interest Income + attr_accessor :interest_income + + # Early Withdrawal Penalty + attr_accessor :early_withdrawal_penalty + + # Interest on U.S. Savings Bonds and Treasury obligations + attr_accessor :us_savings_bonds_interest + + # Federal income tax withheld + attr_accessor :federal_income_tax_withheld + + # Investment Expenses + attr_accessor :investment_expenses + + # Foreign tax paid + attr_accessor :foreign_tax_paid + + # Foreign country or U.S. possession + attr_accessor :foreign_country + + # Tax-Exempt Interest + attr_accessor :tax_exempt_interest + + # Specified Private activity + attr_accessor :specified_private_activity_bond_interest + + # Market Discount + attr_accessor :market_discount + + # Bond Premium + attr_accessor :bond_premium + + # Bond Premium on Treasury obligations + attr_accessor :bond_premium_on_treasury_obligations + + # Bond Premium on tax exempt bond + attr_accessor :bond_premium_on_tax_exempt_bond + + # Tax exempt bond CUSIP no. + attr_accessor :tax_exempt_bond_cusip_number + + attr_accessor :type + + attr_accessor :created_at + + attr_accessor :updated_at + + attr_accessor :state_and_local_withholding + + attr_accessor :tin_type + + attr_accessor :id + + attr_accessor :issuer_id + + attr_accessor :issuer_reference_id + + attr_accessor :issuer_tin + + attr_accessor :tax_year + + attr_accessor :reference_id + + attr_accessor :recipient_name + + attr_accessor :recipient_tin + + attr_accessor :recipient_second_name + + attr_accessor :address + + attr_accessor :address2 + + attr_accessor :city + + attr_accessor :state + + attr_accessor :zip + + attr_accessor :email + + attr_accessor :account_number + + attr_accessor :office_code + + attr_accessor :non_us_province + + attr_accessor :country_code + + attr_accessor :federal_e_file + + attr_accessor :postal_mail + + attr_accessor :state_e_file + + attr_accessor :tin_match + + attr_accessor :no_tin + + attr_accessor :second_tin_notice + + attr_accessor :address_verification + + attr_accessor :federal_efile_status + + attr_accessor :e_delivery_status + + attr_accessor :state_efile_status + + attr_accessor :postal_mail_status + + attr_accessor :tin_match_status + + attr_accessor :address_verification_status + + attr_accessor :validation_errors + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'interest_income' => :'interestIncome', + :'early_withdrawal_penalty' => :'earlyWithdrawalPenalty', + :'us_savings_bonds_interest' => :'usSavingsBondsInterest', + :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld', + :'investment_expenses' => :'investmentExpenses', + :'foreign_tax_paid' => :'foreignTaxPaid', + :'foreign_country' => :'foreignCountry', + :'tax_exempt_interest' => :'taxExemptInterest', + :'specified_private_activity_bond_interest' => :'specifiedPrivateActivityBondInterest', + :'market_discount' => :'marketDiscount', + :'bond_premium' => :'bondPremium', + :'bond_premium_on_treasury_obligations' => :'bondPremiumOnTreasuryObligations', + :'bond_premium_on_tax_exempt_bond' => :'bondPremiumOnTaxExemptBond', + :'tax_exempt_bond_cusip_number' => :'taxExemptBondCusipNumber', + :'type' => :'type', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'state_and_local_withholding' => :'stateAndLocalWithholding', + :'tin_type' => :'tinType', + :'id' => :'id', + :'issuer_id' => :'issuerId', + :'issuer_reference_id' => :'issuerReferenceId', + :'issuer_tin' => :'issuerTin', + :'tax_year' => :'taxYear', + :'reference_id' => :'referenceId', + :'recipient_name' => :'recipientName', + :'recipient_tin' => :'recipientTin', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'email' => :'email', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'federal_e_file' => :'federalEFile', + :'postal_mail' => :'postalMail', + :'state_e_file' => :'stateEFile', + :'tin_match' => :'tinMatch', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'address_verification' => :'addressVerification', + :'federal_efile_status' => :'federalEfileStatus', + :'e_delivery_status' => :'eDeliveryStatus', + :'state_efile_status' => :'stateEfileStatus', + :'postal_mail_status' => :'postalMailStatus', + :'tin_match_status' => :'tinMatchStatus', + :'address_verification_status' => :'addressVerificationStatus', + :'validation_errors' => :'validationErrors' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'interest_income' => :'Float', + :'early_withdrawal_penalty' => :'Float', + :'us_savings_bonds_interest' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'investment_expenses' => :'Float', + :'foreign_tax_paid' => :'Float', + :'foreign_country' => :'String', + :'tax_exempt_interest' => :'Float', + :'specified_private_activity_bond_interest' => :'Float', + :'market_discount' => :'Float', + :'bond_premium' => :'Float', + :'bond_premium_on_treasury_obligations' => :'Float', + :'bond_premium_on_tax_exempt_bond' => :'Float', + :'tax_exempt_bond_cusip_number' => :'String', + :'type' => :'String', + :'created_at' => :'Time', + :'updated_at' => :'Time', + :'state_and_local_withholding' => :'StateAndLocalWithholdingResponse', + :'tin_type' => :'String', + :'id' => :'String', + :'issuer_id' => :'String', + :'issuer_reference_id' => :'String', + :'issuer_tin' => :'String', + :'tax_year' => :'Integer', + :'reference_id' => :'String', + :'recipient_name' => :'String', + :'recipient_tin' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'email' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'federal_e_file' => :'Boolean', + :'postal_mail' => :'Boolean', + :'state_e_file' => :'Boolean', + :'tin_match' => :'Boolean', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'address_verification' => :'Boolean', + :'federal_efile_status' => :'StatusDetail', + :'e_delivery_status' => :'StatusDetail', + :'state_efile_status' => :'Array', + :'postal_mail_status' => :'StatusDetail', + :'tin_match_status' => :'StatusDetail', + :'address_verification_status' => :'StatusDetail', + :'validation_errors' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'interest_income', + :'early_withdrawal_penalty', + :'us_savings_bonds_interest', + :'federal_income_tax_withheld', + :'investment_expenses', + :'foreign_tax_paid', + :'foreign_country', + :'tax_exempt_interest', + :'specified_private_activity_bond_interest', + :'market_discount', + :'bond_premium', + :'bond_premium_on_treasury_obligations', + :'bond_premium_on_tax_exempt_bond', + :'tax_exempt_bond_cusip_number', + :'federal_efile_status', + :'e_delivery_status', + :'state_efile_status', + :'postal_mail_status', + :'tin_match_status', + :'address_verification_status', + :'validation_errors' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'FormResponseBase' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099IntResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099IntResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'interest_income') + self.interest_income = attributes[:'interest_income'] + end + + if attributes.key?(:'early_withdrawal_penalty') + self.early_withdrawal_penalty = attributes[:'early_withdrawal_penalty'] + end + + if attributes.key?(:'us_savings_bonds_interest') + self.us_savings_bonds_interest = attributes[:'us_savings_bonds_interest'] + end + + if attributes.key?(:'federal_income_tax_withheld') + self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld'] + end + + if attributes.key?(:'investment_expenses') + self.investment_expenses = attributes[:'investment_expenses'] + end + + if attributes.key?(:'foreign_tax_paid') + self.foreign_tax_paid = attributes[:'foreign_tax_paid'] + end + + if attributes.key?(:'foreign_country') + self.foreign_country = attributes[:'foreign_country'] + end + + if attributes.key?(:'tax_exempt_interest') + self.tax_exempt_interest = attributes[:'tax_exempt_interest'] + end + + if attributes.key?(:'specified_private_activity_bond_interest') + self.specified_private_activity_bond_interest = attributes[:'specified_private_activity_bond_interest'] + end + + if attributes.key?(:'market_discount') + self.market_discount = attributes[:'market_discount'] + end + + if attributes.key?(:'bond_premium') + self.bond_premium = attributes[:'bond_premium'] + end + + if attributes.key?(:'bond_premium_on_treasury_obligations') + self.bond_premium_on_treasury_obligations = attributes[:'bond_premium_on_treasury_obligations'] + end + + if attributes.key?(:'bond_premium_on_tax_exempt_bond') + self.bond_premium_on_tax_exempt_bond = attributes[:'bond_premium_on_tax_exempt_bond'] + end + + if attributes.key?(:'tax_exempt_bond_cusip_number') + self.tax_exempt_bond_cusip_number = attributes[:'tax_exempt_bond_cusip_number'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + end + + if attributes.key?(:'issuer_reference_id') + self.issuer_reference_id = attributes[:'issuer_reference_id'] + end + + if attributes.key?(:'issuer_tin') + self.issuer_tin = attributes[:'issuer_tin'] + end + + if attributes.key?(:'tax_year') + self.tax_year = attributes[:'tax_year'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'recipient_tin') + self.recipient_tin = attributes[:'recipient_tin'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'federal_e_file') + self.federal_e_file = attributes[:'federal_e_file'] + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + end + + if attributes.key?(:'state_e_file') + self.state_e_file = attributes[:'state_e_file'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + end + + if attributes.key?(:'federal_efile_status') + self.federal_efile_status = attributes[:'federal_efile_status'] + end + + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + + if attributes.key?(:'state_efile_status') + if (value = attributes[:'state_efile_status']).is_a?(Array) + self.state_efile_status = value + end + end + + if attributes.key?(:'postal_mail_status') + self.postal_mail_status = attributes[:'postal_mail_status'] + end + + if attributes.key?(:'tin_match_status') + self.tin_match_status = attributes[:'tin_match_status'] + end + + if attributes.key?(:'address_verification_status') + self.address_verification_status = attributes[:'address_verification_status'] + end + + if attributes.key?(:'validation_errors') + if (value = attributes[:'validation_errors']).is_a?(Array) + self.validation_errors = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) + return false unless type_validator.valid?(@type) + tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + return false unless tin_type_validator.valid?(@tin_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] tin_type Object to be assigned + def tin_type=(tin_type) + validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + unless validator.valid?(tin_type) + fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}." + end + @tin_type = tin_type + end + + # Custom attribute writer method with validation + # @param [Object] state_efile_status Value to be assigned + def state_efile_status=(state_efile_status) + @state_efile_status = state_efile_status + end + + # Custom attribute writer method with validation + # @param [Object] validation_errors Value to be assigned + def validation_errors=(validation_errors) + @validation_errors = validation_errors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + interest_income == o.interest_income && + early_withdrawal_penalty == o.early_withdrawal_penalty && + us_savings_bonds_interest == o.us_savings_bonds_interest && + federal_income_tax_withheld == o.federal_income_tax_withheld && + investment_expenses == o.investment_expenses && + foreign_tax_paid == o.foreign_tax_paid && + foreign_country == o.foreign_country && + tax_exempt_interest == o.tax_exempt_interest && + specified_private_activity_bond_interest == o.specified_private_activity_bond_interest && + market_discount == o.market_discount && + bond_premium == o.bond_premium && + bond_premium_on_treasury_obligations == o.bond_premium_on_treasury_obligations && + bond_premium_on_tax_exempt_bond == o.bond_premium_on_tax_exempt_bond && + tax_exempt_bond_cusip_number == o.tax_exempt_bond_cusip_number && + type == o.type && + created_at == o.created_at && + updated_at == o.updated_at && + state_and_local_withholding == o.state_and_local_withholding && + tin_type == o.tin_type && + id == o.id && + issuer_id == o.issuer_id && + issuer_reference_id == o.issuer_reference_id && + issuer_tin == o.issuer_tin && + tax_year == o.tax_year && + reference_id == o.reference_id && + recipient_name == o.recipient_name && + recipient_tin == o.recipient_tin && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + email == o.email && + account_number == o.account_number && + office_code == o.office_code && + non_us_province == o.non_us_province && + country_code == o.country_code && + federal_e_file == o.federal_e_file && + postal_mail == o.postal_mail && + state_e_file == o.state_e_file && + tin_match == o.tin_match && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + address_verification == o.address_verification && + federal_efile_status == o.federal_efile_status && + e_delivery_status == o.e_delivery_status && + state_efile_status == o.state_efile_status && + postal_mail_status == o.postal_mail_status && + tin_match_status == o.tin_match_status && + address_verification_status == o.address_verification_status && + validation_errors == o.validation_errors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [interest_income, early_withdrawal_penalty, us_savings_bonds_interest, federal_income_tax_withheld, investment_expenses, foreign_tax_paid, foreign_country, tax_exempt_interest, specified_private_activity_bond_interest, market_discount, bond_premium, bond_premium_on_treasury_obligations, bond_premium_on_tax_exempt_bond, tax_exempt_bond_cusip_number, type, created_at, updated_at, state_and_local_withholding, tin_type, id, issuer_id, issuer_reference_id, issuer_tin, tax_year, reference_id, recipient_name, recipient_tin, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, federal_efile_status, e_delivery_status, state_efile_status, postal_mail_status, tin_match_status, address_verification_status, validation_errors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_k.rb b/lib/avalara_sdk/models/A1099/V2/form1099_k.rb index 70aa9d1..afc9946 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_k.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end @@ -83,14 +83,22 @@ class Form1099K attr_accessor :address_verification_status + attr_accessor :e_delivery_status + attr_accessor :reference_id attr_accessor :email attr_accessor :tin_type + attr_accessor :fatca_filing_requirement + attr_accessor :tin + attr_accessor :no_tin + + attr_accessor :second_tin_notice + attr_accessor :recipient_name attr_accessor :recipient_second_name @@ -105,10 +113,14 @@ class Form1099K attr_accessor :zip - attr_accessor :foreign_province + attr_accessor :non_us_province attr_accessor :country_code + attr_accessor :account_number + + attr_accessor :office_code + attr_accessor :validation_errors attr_accessor :created_at @@ -178,10 +190,14 @@ def self.attribute_map :'tin_match_status' => :'tinMatchStatus', :'address_verification' => :'addressVerification', :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', :'reference_id' => :'referenceId', :'email' => :'email', :'tin_type' => :'tinType', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', :'recipient_name' => :'recipientName', :'recipient_second_name' => :'recipientSecondName', :'address' => :'address', @@ -189,8 +205,10 @@ def self.attribute_map :'city' => :'city', :'state' => :'state', :'zip' => :'zip', - :'foreign_province' => :'foreignProvince', + :'non_us_province' => :'nonUsProvince', :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', :'validation_errors' => :'validationErrors', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', @@ -242,10 +260,14 @@ def self.openapi_types :'tin_match_status' => :'Form1099StatusDetail', :'address_verification' => :'Boolean', :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', :'reference_id' => :'String', :'email' => :'String', :'tin_type' => :'String', + :'fatca_filing_requirement' => :'Boolean', :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', :'recipient_name' => :'String', :'recipient_second_name' => :'String', :'address' => :'String', @@ -253,8 +275,10 @@ def self.openapi_types :'city' => :'String', :'state' => :'String', :'zip' => :'String', - :'foreign_province' => :'String', + :'non_us_province' => :'String', :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', :'validation_errors' => :'Array', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -287,10 +311,13 @@ def self.openapi_nullable :'postal_mail_status', :'tin_match_status', :'address_verification_status', + :'e_delivery_status', :'reference_id', :'email', :'tin_type', + :'fatca_filing_requirement', :'tin', + :'second_tin_notice', :'recipient_name', :'recipient_second_name', :'address', @@ -298,8 +325,10 @@ def self.openapi_nullable :'city', :'state', :'zip', - :'foreign_province', + :'non_us_province', :'country_code', + :'account_number', + :'office_code', :'validation_errors', :'state_and_local_withholding' ]) @@ -473,6 +502,10 @@ def initialize(attributes = {}) self.address_verification_status = attributes[:'address_verification_status'] end + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + if attributes.key?(:'reference_id') self.reference_id = attributes[:'reference_id'] end @@ -485,10 +518,22 @@ def initialize(attributes = {}) self.tin_type = attributes[:'tin_type'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'tin') self.tin = attributes[:'tin'] end + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + if attributes.key?(:'recipient_name') self.recipient_name = attributes[:'recipient_name'] end @@ -517,14 +562,22 @@ def initialize(attributes = {}) self.zip = attributes[:'zip'] end - if attributes.key?(:'foreign_province') - self.foreign_province = attributes[:'foreign_province'] + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] end if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] end + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + if attributes.key?(:'validation_errors') if (value = attributes[:'validation_errors']).is_a?(Array) self.validation_errors = value @@ -636,10 +689,14 @@ def ==(o) tin_match_status == o.tin_match_status && address_verification == o.address_verification && address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && reference_id == o.reference_id && email == o.email && tin_type == o.tin_type && + fatca_filing_requirement == o.fatca_filing_requirement && tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && recipient_name == o.recipient_name && recipient_second_name == o.recipient_second_name && address == o.address && @@ -647,8 +704,10 @@ def ==(o) city == o.city && state == o.state && zip == o.zip && - foreign_province == o.foreign_province && + non_us_province == o.non_us_province && country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && validation_errors == o.validation_errors && created_at == o.created_at && updated_at == o.updated_at && @@ -664,7 +723,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [filer_type, payment_type, payment_settlement_entity_name_phone_number, gross_amount_payment_card, card_not_present_transactions, merchant_category_code, payment_transaction_number, federal_income_tax_withheld, january, february, march, april, may, june, july, august, sept, october, november, december, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + [filer_type, payment_type, payment_settlement_entity_name_phone_number, gross_amount_payment_card, card_not_present_transactions, merchant_category_code, payment_transaction_number, federal_income_tax_withheld, january, february, march, april, may, june, july, august, sept, october, november, december, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb index aba67c4..4692949 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb @@ -146,6 +146,9 @@ class Form1099KListItem # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -222,6 +225,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -280,6 +284,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -304,15 +309,23 @@ def self.openapi_nullable :'october', :'november', :'december', + :'issuer_reference_id', + :'issuer_tin', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -460,8 +473,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -470,8 +481,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -500,8 +509,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -528,6 +535,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -546,30 +557,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "tax_year", tax_year cannot be nil.') end - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -584,12 +571,6 @@ def valid? return false if @tax_year.nil? tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -623,48 +604,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -715,6 +654,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -728,7 +668,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [filer_type, payment_type, payment_settlement_entity_name_phone_number, gross_amount_payment_card, card_not_present_transactions, merchant_category_code, payment_transaction_number, federal_income_tax_withheld, january, february, march, april, may, june, july, august, sept, october, november, december, issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [filer_type, payment_type, payment_settlement_entity_name_phone_number, gross_amount_payment_card, card_not_present_transactions, merchant_category_code, payment_transaction_number, federal_income_tax_withheld, january, february, march, april, may, june, july, august, sept, october, november, december, issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb b/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb index dd8beec..9b4cc04 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb @@ -139,6 +139,9 @@ class Form1099KRequest # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -213,6 +216,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -269,6 +273,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -295,13 +300,19 @@ def self.openapi_nullable :'december', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -439,8 +450,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -449,8 +458,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -479,8 +486,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -507,6 +512,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -521,30 +530,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -556,16 +541,10 @@ def valid? return false unless filer_type_validator.valid?(@filer_type) payment_type_validator = EnumAttributeValidator.new('String', ["MerchantPaymentCard", "ThirdPartyNetwork"]) return false unless payment_type_validator.valid?(@payment_type) - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -592,7 +571,7 @@ def payment_type=(payment_type) # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -609,48 +588,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -699,6 +636,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -712,7 +650,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [filer_type, payment_type, payment_settlement_entity_name_phone_number, gross_amount_payment_card, card_not_present_transactions, merchant_category_code, payment_transaction_number, federal_income_tax_withheld, january, february, march, april, may, june, july, august, sept, october, november, december, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [filer_type, payment_type, payment_settlement_entity_name_phone_number, gross_amount_payment_card, card_not_present_transactions, merchant_category_code, payment_transaction_number, federal_income_tax_withheld, january, february, march, april, may, june, july, august, sept, october, november, december, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb index 9ef361b..1878b6e 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb @@ -586,7 +586,7 @@ def valid? return false unless filer_type_validator.valid?(@filer_type) payment_type_validator = EnumAttributeValidator.new('String', ["MerchantPaymentCard", "ThirdPartyNetwork"]) return false unless payment_type_validator.valid?(@payment_type) - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) @@ -616,7 +616,7 @@ def payment_type=(payment_type) # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb b/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb index 5b03431..7076e41 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb @@ -19,6 +19,7 @@ def openapi_one_of :'Form1095BListItemResponse', :'Form1099BaseResponse', :'Form1099DivListItemResponse', + :'Form1099IntListItemResponse', :'Form1099KListItemResponse', :'Form1099MiscListItemResponse', :'Form1099NecListItemResponse', diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb b/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb index 7fee901..32b7f7d 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end @@ -21,9 +21,7 @@ class Form1099Misc attr_accessor :fishing_boat_proceeds - attr_accessor :medical_and_health_care - - attr_accessor :nonemployee_compensation + attr_accessor :medical_and_health_care_payments attr_accessor :substitute_payments @@ -31,13 +29,15 @@ class Form1099Misc attr_accessor :crop_insurance_proceeds - attr_accessor :excess_golden_parachute + attr_accessor :excess_golden_parachute_payments + + attr_accessor :gross_proceeds_paid_to_attorney - attr_accessor :gross_amount_paid_attorney + attr_accessor :fish_purchased_for_resale attr_accessor :section409_a_deferrals - attr_accessor :section409_a_income + attr_accessor :nonqualified_deferred_compensation attr_accessor :id @@ -71,14 +71,22 @@ class Form1099Misc attr_accessor :address_verification_status + attr_accessor :e_delivery_status + attr_accessor :reference_id attr_accessor :email attr_accessor :tin_type + attr_accessor :fatca_filing_requirement + attr_accessor :tin + attr_accessor :no_tin + + attr_accessor :second_tin_notice + attr_accessor :recipient_name attr_accessor :recipient_second_name @@ -93,10 +101,14 @@ class Form1099Misc attr_accessor :zip - attr_accessor :foreign_province + attr_accessor :non_us_province attr_accessor :country_code + attr_accessor :account_number + + attr_accessor :office_code + attr_accessor :validation_errors attr_accessor :created_at @@ -113,15 +125,15 @@ def self.attribute_map :'other_income' => :'otherIncome', :'fed_income_tax_withheld' => :'fedIncomeTaxWithheld', :'fishing_boat_proceeds' => :'fishingBoatProceeds', - :'medical_and_health_care' => :'medicalAndHealthCare', - :'nonemployee_compensation' => :'nonemployeeCompensation', + :'medical_and_health_care_payments' => :'medicalAndHealthCarePayments', :'substitute_payments' => :'substitutePayments', :'direct_sales_indicator' => :'directSalesIndicator', :'crop_insurance_proceeds' => :'cropInsuranceProceeds', - :'excess_golden_parachute' => :'excessGoldenParachute', - :'gross_amount_paid_attorney' => :'grossAmountPaidAttorney', + :'excess_golden_parachute_payments' => :'excessGoldenParachutePayments', + :'gross_proceeds_paid_to_attorney' => :'grossProceedsPaidToAttorney', + :'fish_purchased_for_resale' => :'fishPurchasedForResale', :'section409_a_deferrals' => :'section409ADeferrals', - :'section409_a_income' => :'section409AIncome', + :'nonqualified_deferred_compensation' => :'nonqualifiedDeferredCompensation', :'id' => :'id', :'type' => :'type', :'issuer_id' => :'issuerId', @@ -138,10 +150,14 @@ def self.attribute_map :'tin_match_status' => :'tinMatchStatus', :'address_verification' => :'addressVerification', :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', :'reference_id' => :'referenceId', :'email' => :'email', :'tin_type' => :'tinType', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', :'recipient_name' => :'recipientName', :'recipient_second_name' => :'recipientSecondName', :'address' => :'address', @@ -149,8 +165,10 @@ def self.attribute_map :'city' => :'city', :'state' => :'state', :'zip' => :'zip', - :'foreign_province' => :'foreignProvince', + :'non_us_province' => :'nonUsProvince', :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', :'validation_errors' => :'validationErrors', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', @@ -171,15 +189,15 @@ def self.openapi_types :'other_income' => :'Float', :'fed_income_tax_withheld' => :'Float', :'fishing_boat_proceeds' => :'Float', - :'medical_and_health_care' => :'Float', - :'nonemployee_compensation' => :'Float', + :'medical_and_health_care_payments' => :'Float', :'substitute_payments' => :'Float', :'direct_sales_indicator' => :'Boolean', :'crop_insurance_proceeds' => :'Float', - :'excess_golden_parachute' => :'Float', - :'gross_amount_paid_attorney' => :'Float', + :'excess_golden_parachute_payments' => :'Float', + :'gross_proceeds_paid_to_attorney' => :'Float', + :'fish_purchased_for_resale' => :'Float', :'section409_a_deferrals' => :'Float', - :'section409_a_income' => :'Float', + :'nonqualified_deferred_compensation' => :'Float', :'id' => :'String', :'type' => :'String', :'issuer_id' => :'Integer', @@ -196,10 +214,14 @@ def self.openapi_types :'tin_match_status' => :'Form1099StatusDetail', :'address_verification' => :'Boolean', :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', :'reference_id' => :'String', :'email' => :'String', :'tin_type' => :'String', + :'fatca_filing_requirement' => :'Boolean', :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', :'recipient_name' => :'String', :'recipient_second_name' => :'String', :'address' => :'String', @@ -207,8 +229,10 @@ def self.openapi_types :'city' => :'String', :'state' => :'String', :'zip' => :'String', - :'foreign_province' => :'String', + :'non_us_province' => :'String', :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', :'validation_errors' => :'Array', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -224,24 +248,27 @@ def self.openapi_nullable :'other_income', :'fed_income_tax_withheld', :'fishing_boat_proceeds', - :'medical_and_health_care', - :'nonemployee_compensation', + :'medical_and_health_care_payments', :'substitute_payments', :'crop_insurance_proceeds', - :'excess_golden_parachute', - :'gross_amount_paid_attorney', + :'excess_golden_parachute_payments', + :'gross_proceeds_paid_to_attorney', + :'fish_purchased_for_resale', :'section409_a_deferrals', - :'section409_a_income', + :'nonqualified_deferred_compensation', :'issuer_reference_id', :'issuer_tin', :'state_efile_status', :'postal_mail_status', :'tin_match_status', :'address_verification_status', + :'e_delivery_status', :'reference_id', :'email', :'tin_type', + :'fatca_filing_requirement', :'tin', + :'second_tin_notice', :'recipient_name', :'recipient_second_name', :'address', @@ -249,8 +276,10 @@ def self.openapi_nullable :'city', :'state', :'zip', - :'foreign_province', + :'non_us_province', :'country_code', + :'account_number', + :'office_code', :'validation_errors', :'state_and_local_withholding' ]) @@ -298,12 +327,8 @@ def initialize(attributes = {}) self.fishing_boat_proceeds = attributes[:'fishing_boat_proceeds'] end - if attributes.key?(:'medical_and_health_care') - self.medical_and_health_care = attributes[:'medical_and_health_care'] - end - - if attributes.key?(:'nonemployee_compensation') - self.nonemployee_compensation = attributes[:'nonemployee_compensation'] + if attributes.key?(:'medical_and_health_care_payments') + self.medical_and_health_care_payments = attributes[:'medical_and_health_care_payments'] end if attributes.key?(:'substitute_payments') @@ -318,20 +343,24 @@ def initialize(attributes = {}) self.crop_insurance_proceeds = attributes[:'crop_insurance_proceeds'] end - if attributes.key?(:'excess_golden_parachute') - self.excess_golden_parachute = attributes[:'excess_golden_parachute'] + if attributes.key?(:'excess_golden_parachute_payments') + self.excess_golden_parachute_payments = attributes[:'excess_golden_parachute_payments'] + end + + if attributes.key?(:'gross_proceeds_paid_to_attorney') + self.gross_proceeds_paid_to_attorney = attributes[:'gross_proceeds_paid_to_attorney'] end - if attributes.key?(:'gross_amount_paid_attorney') - self.gross_amount_paid_attorney = attributes[:'gross_amount_paid_attorney'] + if attributes.key?(:'fish_purchased_for_resale') + self.fish_purchased_for_resale = attributes[:'fish_purchased_for_resale'] end if attributes.key?(:'section409_a_deferrals') self.section409_a_deferrals = attributes[:'section409_a_deferrals'] end - if attributes.key?(:'section409_a_income') - self.section409_a_income = attributes[:'section409_a_income'] + if attributes.key?(:'nonqualified_deferred_compensation') + self.nonqualified_deferred_compensation = attributes[:'nonqualified_deferred_compensation'] end if attributes.key?(:'id') @@ -400,6 +429,10 @@ def initialize(attributes = {}) self.address_verification_status = attributes[:'address_verification_status'] end + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + if attributes.key?(:'reference_id') self.reference_id = attributes[:'reference_id'] end @@ -412,10 +445,22 @@ def initialize(attributes = {}) self.tin_type = attributes[:'tin_type'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'tin') self.tin = attributes[:'tin'] end + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + if attributes.key?(:'recipient_name') self.recipient_name = attributes[:'recipient_name'] end @@ -444,14 +489,22 @@ def initialize(attributes = {}) self.zip = attributes[:'zip'] end - if attributes.key?(:'foreign_province') - self.foreign_province = attributes[:'foreign_province'] + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] end if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] end + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + if attributes.key?(:'validation_errors') if (value = attributes[:'validation_errors']).is_a?(Array) self.validation_errors = value @@ -508,15 +561,15 @@ def ==(o) other_income == o.other_income && fed_income_tax_withheld == o.fed_income_tax_withheld && fishing_boat_proceeds == o.fishing_boat_proceeds && - medical_and_health_care == o.medical_and_health_care && - nonemployee_compensation == o.nonemployee_compensation && + medical_and_health_care_payments == o.medical_and_health_care_payments && substitute_payments == o.substitute_payments && direct_sales_indicator == o.direct_sales_indicator && crop_insurance_proceeds == o.crop_insurance_proceeds && - excess_golden_parachute == o.excess_golden_parachute && - gross_amount_paid_attorney == o.gross_amount_paid_attorney && + excess_golden_parachute_payments == o.excess_golden_parachute_payments && + gross_proceeds_paid_to_attorney == o.gross_proceeds_paid_to_attorney && + fish_purchased_for_resale == o.fish_purchased_for_resale && section409_a_deferrals == o.section409_a_deferrals && - section409_a_income == o.section409_a_income && + nonqualified_deferred_compensation == o.nonqualified_deferred_compensation && id == o.id && type == o.type && issuer_id == o.issuer_id && @@ -533,10 +586,14 @@ def ==(o) tin_match_status == o.tin_match_status && address_verification == o.address_verification && address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && reference_id == o.reference_id && email == o.email && tin_type == o.tin_type && + fatca_filing_requirement == o.fatca_filing_requirement && tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && recipient_name == o.recipient_name && recipient_second_name == o.recipient_second_name && address == o.address && @@ -544,8 +601,10 @@ def ==(o) city == o.city && state == o.state && zip == o.zip && - foreign_province == o.foreign_province && + non_us_province == o.non_us_province && country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && validation_errors == o.validation_errors && created_at == o.created_at && updated_at == o.updated_at && @@ -561,7 +620,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [rents, royalties, other_income, fed_income_tax_withheld, fishing_boat_proceeds, medical_and_health_care, nonemployee_compensation, substitute_payments, direct_sales_indicator, crop_insurance_proceeds, excess_golden_parachute, gross_amount_paid_attorney, section409_a_deferrals, section409_a_income, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + [rents, royalties, other_income, fed_income_tax_withheld, fishing_boat_proceeds, medical_and_health_care_payments, substitute_payments, direct_sales_indicator, crop_insurance_proceeds, excess_golden_parachute_payments, gross_proceeds_paid_to_attorney, fish_purchased_for_resale, section409_a_deferrals, nonqualified_deferred_compensation, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb index 1f819c0..071ce09 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb @@ -263,15 +263,23 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'issuer_reference_id', + :'issuer_tin', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -399,8 +407,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -409,8 +415,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -439,8 +443,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -485,30 +487,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "tax_year", tax_year cannot be nil.') end - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -519,12 +497,6 @@ def valid? return false if @tax_year.nil? tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -538,48 +510,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb b/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb index 499c8a2..a433a7b 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb @@ -254,13 +254,19 @@ def self.openapi_nullable Set.new([ :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -378,8 +384,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -388,8 +392,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -418,8 +420,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -460,30 +460,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -491,23 +467,17 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -524,48 +494,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb index 05a496f..d7b0819 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb @@ -526,7 +526,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) @@ -536,7 +536,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb b/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb index 3733703..0c3fc07 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end @@ -49,14 +49,22 @@ class Form1099Nec attr_accessor :address_verification_status + attr_accessor :e_delivery_status + attr_accessor :reference_id attr_accessor :email attr_accessor :tin_type + attr_accessor :fatca_filing_requirement + attr_accessor :tin + attr_accessor :no_tin + + attr_accessor :second_tin_notice + attr_accessor :recipient_name attr_accessor :recipient_second_name @@ -71,10 +79,14 @@ class Form1099Nec attr_accessor :zip - attr_accessor :foreign_province + attr_accessor :non_us_province attr_accessor :country_code + attr_accessor :account_number + + attr_accessor :office_code + attr_accessor :validation_errors attr_accessor :created_at @@ -105,10 +117,14 @@ def self.attribute_map :'tin_match_status' => :'tinMatchStatus', :'address_verification' => :'addressVerification', :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', :'reference_id' => :'referenceId', :'email' => :'email', :'tin_type' => :'tinType', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', :'recipient_name' => :'recipientName', :'recipient_second_name' => :'recipientSecondName', :'address' => :'address', @@ -116,8 +132,10 @@ def self.attribute_map :'city' => :'city', :'state' => :'state', :'zip' => :'zip', - :'foreign_province' => :'foreignProvince', + :'non_us_province' => :'nonUsProvince', :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', :'validation_errors' => :'validationErrors', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', @@ -152,10 +170,14 @@ def self.openapi_types :'tin_match_status' => :'Form1099StatusDetail', :'address_verification' => :'Boolean', :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', :'reference_id' => :'String', :'email' => :'String', :'tin_type' => :'String', + :'fatca_filing_requirement' => :'Boolean', :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', :'recipient_name' => :'String', :'recipient_second_name' => :'String', :'address' => :'String', @@ -163,8 +185,10 @@ def self.openapi_types :'city' => :'String', :'state' => :'String', :'zip' => :'String', - :'foreign_province' => :'String', + :'non_us_province' => :'String', :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', :'validation_errors' => :'Array', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -183,10 +207,13 @@ def self.openapi_nullable :'postal_mail_status', :'tin_match_status', :'address_verification_status', + :'e_delivery_status', :'reference_id', :'email', :'tin_type', + :'fatca_filing_requirement', :'tin', + :'second_tin_notice', :'recipient_name', :'recipient_second_name', :'address', @@ -194,8 +221,10 @@ def self.openapi_nullable :'city', :'state', :'zip', - :'foreign_province', + :'non_us_province', :'country_code', + :'account_number', + :'office_code', :'validation_errors', :'state_and_local_withholding' ]) @@ -301,6 +330,10 @@ def initialize(attributes = {}) self.address_verification_status = attributes[:'address_verification_status'] end + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + if attributes.key?(:'reference_id') self.reference_id = attributes[:'reference_id'] end @@ -313,10 +346,22 @@ def initialize(attributes = {}) self.tin_type = attributes[:'tin_type'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'tin') self.tin = attributes[:'tin'] end + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + if attributes.key?(:'recipient_name') self.recipient_name = attributes[:'recipient_name'] end @@ -345,14 +390,22 @@ def initialize(attributes = {}) self.zip = attributes[:'zip'] end - if attributes.key?(:'foreign_province') - self.foreign_province = attributes[:'foreign_province'] + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] end if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] end + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + if attributes.key?(:'validation_errors') if (value = attributes[:'validation_errors']).is_a?(Array) self.validation_errors = value @@ -423,10 +476,14 @@ def ==(o) tin_match_status == o.tin_match_status && address_verification == o.address_verification && address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && reference_id == o.reference_id && email == o.email && tin_type == o.tin_type && + fatca_filing_requirement == o.fatca_filing_requirement && tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && recipient_name == o.recipient_name && recipient_second_name == o.recipient_second_name && address == o.address && @@ -434,8 +491,10 @@ def ==(o) city == o.city && state == o.state && zip == o.zip && - foreign_province == o.foreign_province && + non_us_province == o.non_us_province && country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && validation_errors == o.validation_errors && created_at == o.created_at && updated_at == o.updated_at && @@ -451,7 +510,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [nonemployee_compensation, federal_income_tax_withheld, direct_sales_indicator, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + [nonemployee_compensation, federal_income_tax_withheld, direct_sales_indicator, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb index 9f5ed60..1c0bc97 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb @@ -96,6 +96,9 @@ class Form1099NecListItem # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -155,6 +158,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -196,6 +200,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -204,15 +209,23 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'issuer_reference_id', + :'issuer_tin', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -294,8 +307,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -304,8 +315,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -334,8 +343,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -362,6 +369,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -384,30 +395,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "tax_year", tax_year cannot be nil.') end - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -419,12 +406,6 @@ def valid? return false if @tax_year.nil? tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -438,48 +419,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -513,6 +452,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -526,7 +466,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [nonemployee_compensation, direct_sales_indicator, federal_income_tax_withheld, issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [nonemployee_compensation, direct_sales_indicator, federal_income_tax_withheld, issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb b/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb index 30e28e3..a4345dc 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb @@ -88,6 +88,9 @@ class Form1099NecRequest # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -145,6 +148,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -184,6 +188,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -194,13 +199,19 @@ def self.openapi_nullable Set.new([ :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -272,8 +283,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -282,8 +291,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -312,8 +319,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -340,6 +345,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -358,30 +367,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "nonemployee_compensation", nonemployee_compensation cannot be nil.') end - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -390,23 +375,17 @@ def list_invalid_properties def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @nonemployee_compensation.nil? - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -423,48 +402,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -496,6 +433,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -509,7 +447,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [nonemployee_compensation, direct_sales_indicator, federal_income_tax_withheld, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [nonemployee_compensation, direct_sales_indicator, federal_income_tax_withheld, type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb index 27aeab6..1cf9ac7 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb @@ -430,7 +430,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) @@ -440,7 +440,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb b/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb index 4f02dac..8f0ed9f 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb @@ -13,10 +13,13 @@ module AvalaraSdk::A1099::V2 class Form1099ProccessResult attr_accessor :job_data + attr_accessor :processed_forms + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'job_data' => :'jobData' + :'job_data' => :'jobData', + :'processed_forms' => :'processedForms' } end @@ -28,13 +31,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'job_data' => :'Data' + :'job_data' => :'Data', + :'processed_forms' => :'Array' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'processed_forms' ]) end @@ -56,6 +61,12 @@ def initialize(attributes = {}) if attributes.key?(:'job_data') self.job_data = attributes[:'job_data'] end + + if attributes.key?(:'processed_forms') + if (value = attributes[:'processed_forms']).is_a?(Array) + self.processed_forms = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -73,12 +84,19 @@ def valid? true end + # Custom attribute writer method with validation + # @param [Object] processed_forms Value to be assigned + def processed_forms=(processed_forms) + @processed_forms = processed_forms + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - job_data == o.job_data + job_data == o.job_data && + processed_forms == o.processed_forms end # @see the `==` method @@ -90,7 +108,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [job_data].hash + [job_data, processed_forms].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb b/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb new file mode 100644 index 0000000..a728513 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb @@ -0,0 +1,107 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + module Form1099ProccessResultProcessedFormsInner + class << self + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'Form1042S', + :'Form1095B', + :'Form1099Div', + :'Form1099Int', + :'Form1099K', + :'Form1099Misc', + :'Form1099Nec', + :'Form1099R' + ] + end + + # Builds the object + # @param [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + openapi_one_of.include?(:AnyType) ? data : nil + end + + private + + SchemaMismatchError = Class.new(StandardError) + + # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse. + def find_and_cast_into_type(klass, data) + return if data.nil? + + case klass.to_s + when 'Boolean' + return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass) + when 'Float' + return data if data.instance_of?(Float) + when 'Integer' + return data if data.instance_of?(Integer) + when 'Time' + return Time.parse(data) + when 'Date' + return Date.parse(data) + when 'String' + return data if data.instance_of?(String) + when 'Object' # "type: object" + return data if data.instance_of?(Hash) + when /\AArray<(?.+)>\z/ # "type: array" + if data.instance_of?(Array) + sub_type = Regexp.last_match[:sub_type] + return data.map { |item| find_and_cast_into_type(sub_type, item) } + end + when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }" + if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) } + sub_type = Regexp.last_match[:sub_type] + return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) } + end + else # model + const = AvalaraSdk::A1099::V2.const_get(klass) + if const + if const.respond_to?(:openapi_one_of) # nested oneOf model + model = const.build(data) + return model if model + else + # raise if data contains keys that are not known to the model + raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty? + model = const.build_from_hash(data) + return model if model + end + end + end + + raise # if no match by now, raise + rescue + raise SchemaMismatchError, "#{data} doesn't match the #{klass} type" + end + end + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_r.rb b/lib/avalara_sdk/models/A1099/V2/form1099_r.rb index bb7f343..45d76a4 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_r.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end @@ -47,8 +47,6 @@ class Form1099R attr_accessor :first_year_designated_roth_contrib - attr_accessor :fatca_requirement_indicator - attr_accessor :date_of_payment attr_accessor :id @@ -83,14 +81,22 @@ class Form1099R attr_accessor :address_verification_status + attr_accessor :e_delivery_status + attr_accessor :reference_id attr_accessor :email attr_accessor :tin_type + attr_accessor :fatca_filing_requirement + attr_accessor :tin + attr_accessor :no_tin + + attr_accessor :second_tin_notice + attr_accessor :recipient_name attr_accessor :recipient_second_name @@ -105,10 +111,14 @@ class Form1099R attr_accessor :zip - attr_accessor :foreign_province + attr_accessor :non_us_province attr_accessor :country_code + attr_accessor :account_number + + attr_accessor :office_code + attr_accessor :validation_errors attr_accessor :created_at @@ -138,7 +148,6 @@ def self.attribute_map :'total_employee_contributions' => :'totalEmployeeContributions', :'amount_allocable_to_irr' => :'amountAllocableToIrr', :'first_year_designated_roth_contrib' => :'firstYearDesignatedRothContrib', - :'fatca_requirement_indicator' => :'fatcaRequirementIndicator', :'date_of_payment' => :'dateOfPayment', :'id' => :'id', :'type' => :'type', @@ -156,10 +165,14 @@ def self.attribute_map :'tin_match_status' => :'tinMatchStatus', :'address_verification' => :'addressVerification', :'address_verification_status' => :'addressVerificationStatus', + :'e_delivery_status' => :'eDeliveryStatus', :'reference_id' => :'referenceId', :'email' => :'email', :'tin_type' => :'tinType', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'tin' => :'tin', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', :'recipient_name' => :'recipientName', :'recipient_second_name' => :'recipientSecondName', :'address' => :'address', @@ -167,8 +180,10 @@ def self.attribute_map :'city' => :'city', :'state' => :'state', :'zip' => :'zip', - :'foreign_province' => :'foreignProvince', + :'non_us_province' => :'nonUsProvince', :'country_code' => :'countryCode', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', :'validation_errors' => :'validationErrors', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', @@ -202,7 +217,6 @@ def self.openapi_types :'total_employee_contributions' => :'Float', :'amount_allocable_to_irr' => :'Float', :'first_year_designated_roth_contrib' => :'String', - :'fatca_requirement_indicator' => :'Boolean', :'date_of_payment' => :'String', :'id' => :'String', :'type' => :'String', @@ -220,10 +234,14 @@ def self.openapi_types :'tin_match_status' => :'Form1099StatusDetail', :'address_verification' => :'Boolean', :'address_verification_status' => :'Form1099StatusDetail', + :'e_delivery_status' => :'Form1099StatusDetail', :'reference_id' => :'String', :'email' => :'String', :'tin_type' => :'String', + :'fatca_filing_requirement' => :'Boolean', :'tin' => :'String', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', :'recipient_name' => :'String', :'recipient_second_name' => :'String', :'address' => :'String', @@ -231,8 +249,10 @@ def self.openapi_types :'city' => :'String', :'state' => :'String', :'zip' => :'String', - :'foreign_province' => :'String', + :'non_us_province' => :'String', :'country_code' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', :'validation_errors' => :'Array', :'created_at' => :'Time', :'updated_at' => :'Time', @@ -261,7 +281,6 @@ def self.openapi_nullable :'total_employee_contributions', :'amount_allocable_to_irr', :'first_year_designated_roth_contrib', - :'fatca_requirement_indicator', :'date_of_payment', :'issuer_reference_id', :'issuer_tin', @@ -269,10 +288,13 @@ def self.openapi_nullable :'postal_mail_status', :'tin_match_status', :'address_verification_status', + :'e_delivery_status', :'reference_id', :'email', :'tin_type', + :'fatca_filing_requirement', :'tin', + :'second_tin_notice', :'recipient_name', :'recipient_second_name', :'address', @@ -280,8 +302,10 @@ def self.openapi_nullable :'city', :'state', :'zip', - :'foreign_province', + :'non_us_province', :'country_code', + :'account_number', + :'office_code', :'validation_errors', :'state_and_local_withholding' ]) @@ -381,10 +405,6 @@ def initialize(attributes = {}) self.first_year_designated_roth_contrib = attributes[:'first_year_designated_roth_contrib'] end - if attributes.key?(:'fatca_requirement_indicator') - self.fatca_requirement_indicator = attributes[:'fatca_requirement_indicator'] - end - if attributes.key?(:'date_of_payment') self.date_of_payment = attributes[:'date_of_payment'] end @@ -455,6 +475,10 @@ def initialize(attributes = {}) self.address_verification_status = attributes[:'address_verification_status'] end + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + if attributes.key?(:'reference_id') self.reference_id = attributes[:'reference_id'] end @@ -467,10 +491,22 @@ def initialize(attributes = {}) self.tin_type = attributes[:'tin_type'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'tin') self.tin = attributes[:'tin'] end + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + if attributes.key?(:'recipient_name') self.recipient_name = attributes[:'recipient_name'] end @@ -499,14 +535,22 @@ def initialize(attributes = {}) self.zip = attributes[:'zip'] end - if attributes.key?(:'foreign_province') - self.foreign_province = attributes[:'foreign_province'] + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] end if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] end + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + if attributes.key?(:'validation_errors') if (value = attributes[:'validation_errors']).is_a?(Array) self.validation_errors = value @@ -576,7 +620,6 @@ def ==(o) total_employee_contributions == o.total_employee_contributions && amount_allocable_to_irr == o.amount_allocable_to_irr && first_year_designated_roth_contrib == o.first_year_designated_roth_contrib && - fatca_requirement_indicator == o.fatca_requirement_indicator && date_of_payment == o.date_of_payment && id == o.id && type == o.type && @@ -594,10 +637,14 @@ def ==(o) tin_match_status == o.tin_match_status && address_verification == o.address_verification && address_verification_status == o.address_verification_status && + e_delivery_status == o.e_delivery_status && reference_id == o.reference_id && email == o.email && tin_type == o.tin_type && + fatca_filing_requirement == o.fatca_filing_requirement && tin == o.tin && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && recipient_name == o.recipient_name && recipient_second_name == o.recipient_second_name && address == o.address && @@ -605,8 +652,10 @@ def ==(o) city == o.city && state == o.state && zip == o.zip && - foreign_province == o.foreign_province && + non_us_province == o.non_us_province && country_code == o.country_code && + account_number == o.account_number && + office_code == o.office_code && validation_errors == o.validation_errors && created_at == o.created_at && updated_at == o.updated_at && @@ -622,7 +671,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [gross_distributions, taxable_amount, taxable_amount_not_determined, total_distribution_indicator, capital_gain, fed_income_tax_withheld, employee_contributions, net_unrealized_appreciation, distribution_code_required, distribution_code_optional, ira_sep_simple_indicator, total_ira_sep_simple_distribution, other, other_percent, percentage_total_distribution, total_employee_contributions, amount_allocable_to_irr, first_year_designated_roth_contrib, fatca_requirement_indicator, date_of_payment, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash + [gross_distributions, taxable_amount, taxable_amount_not_determined, total_distribution_indicator, capital_gain, fed_income_tax_withheld, employee_contributions, net_unrealized_appreciation, distribution_code_required, distribution_code_optional, ira_sep_simple_indicator, total_ira_sep_simple_distribution, other, other_percent, percentage_total_distribution, total_employee_contributions, amount_allocable_to_irr, first_year_designated_roth_contrib, date_of_payment, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb b/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb index f84bbb9..06dd709 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb @@ -289,15 +289,23 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'second_distribution_code', + :'issuer_reference_id', + :'issuer_tin', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -445,8 +453,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -455,8 +461,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -485,8 +489,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -531,30 +533,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "tax_year", tax_year cannot be nil.') end - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -569,12 +547,6 @@ def valid? return false if @tax_year.nil? tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -608,48 +580,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb index 89df1f0..ac191d1 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb @@ -65,9 +65,6 @@ class Form1099RListItemResponse # First year of designated Roth contribution attr_accessor :first_year_designated_roth_contrib - # FATCA filing requirement - attr_accessor :fatca_requirement_indicator - # Date of payment attr_accessor :date_of_payment @@ -208,7 +205,6 @@ def self.attribute_map :'total_employee_contributions' => :'totalEmployeeContributions', :'amount_allocable_to_irr' => :'amountAllocableToIrr', :'first_year_designated_roth_contrib' => :'firstYearDesignatedRothContrib', - :'fatca_requirement_indicator' => :'fatcaRequirementIndicator', :'date_of_payment' => :'dateOfPayment', :'id' => :'id', :'type' => :'type', @@ -278,7 +274,6 @@ def self.openapi_types :'total_employee_contributions' => :'Float', :'amount_allocable_to_irr' => :'Float', :'first_year_designated_roth_contrib' => :'String', - :'fatca_requirement_indicator' => :'Boolean', :'date_of_payment' => :'String', :'id' => :'String', :'type' => :'String', @@ -343,7 +338,6 @@ def self.openapi_nullable :'total_employee_contributions', :'amount_allocable_to_irr', :'first_year_designated_roth_contrib', - :'fatca_requirement_indicator', :'date_of_payment', :'issuer_reference_id', :'issuer_tin', @@ -468,10 +462,6 @@ def initialize(attributes = {}) self.first_year_designated_roth_contrib = attributes[:'first_year_designated_roth_contrib'] end - if attributes.key?(:'fatca_requirement_indicator') - self.fatca_requirement_indicator = attributes[:'fatca_requirement_indicator'] - end - if attributes.key?(:'date_of_payment') self.date_of_payment = attributes[:'date_of_payment'] end @@ -781,7 +771,6 @@ def ==(o) total_employee_contributions == o.total_employee_contributions && amount_allocable_to_irr == o.amount_allocable_to_irr && first_year_designated_roth_contrib == o.first_year_designated_roth_contrib && - fatca_requirement_indicator == o.fatca_requirement_indicator && date_of_payment == o.date_of_payment && id == o.id && type == o.type && @@ -833,7 +822,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [gross_distributions, taxable_amount, taxable_amount_not_determined, total_distribution_indicator, capital_gain, fed_income_tax_withheld, employee_contributions, net_unrealized_appreciation, distribution_code_required, distribution_code_optional, ira_sep_simple_indicator, total_ira_sep_simple_distribution, other, other_percent, percentage_total_distribution, total_employee_contributions, amount_allocable_to_irr, first_year_designated_roth_contrib, fatca_requirement_indicator, date_of_payment, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, fatca_filing_requirement, validation_errors, created_at, updated_at, state_and_local_withholding].hash + [gross_distributions, taxable_amount, taxable_amount_not_determined, total_distribution_indicator, capital_gain, fed_income_tax_withheld, employee_contributions, net_unrealized_appreciation, distribution_code_required, distribution_code_optional, ira_sep_simple_indicator, total_ira_sep_simple_distribution, other, other_percent, percentage_total_distribution, total_employee_contributions, amount_allocable_to_irr, first_year_designated_roth_contrib, date_of_payment, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, fatca_filing_requirement, validation_errors, created_at, updated_at, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb b/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb index 7966c6a..5ef4692 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb @@ -279,13 +279,19 @@ def self.openapi_nullable Set.new([ :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -423,8 +429,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -433,8 +437,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -463,8 +465,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -505,30 +505,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -536,23 +512,17 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -569,48 +539,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_r_response.rb b/lib/avalara_sdk/models/A1099/V2/form1099_r_response.rb new file mode 100644 index 0000000..ca34f27 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/form1099_r_response.rb @@ -0,0 +1,839 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + class Form1099RResponse + # Gross distribution + attr_accessor :gross_distribution + + # Taxable amount + attr_accessor :taxable_amount + + # Taxable amount not determined + attr_accessor :taxable_amount_not_determined + + # Total distribution + attr_accessor :total_distribution_determined + + # Capital gain (included in Box 2a) + attr_accessor :capital_gain + + # Federal income tax withheld + attr_accessor :federal_income_tax_withheld + + # Employee contributions/Designated Roth contributions or insurance premiums + attr_accessor :employee_contributions_or_designated_roth_or_insurance_premiums + + # Net unrealized appreciation in employer's securities + attr_accessor :net_unrealized_appreciation_in_employer_securities + + # Distribution code + attr_accessor :distribution_code + + # Second distribution code + attr_accessor :second_distribution_code + + # IRA/SEP/SIMPLE + attr_accessor :ira_sep_simple + + # Traditional IRA/SEP/SIMPLE or Roth conversion amount + attr_accessor :traditional_ira_sep_simple_or_roth_conversion_amount + + # Other amount + attr_accessor :other_amount + + # Other percentage + attr_accessor :other_percentage + + # Total distribution percentage + attr_accessor :total_distribution_percentage + + # Total employee contributions + attr_accessor :total_employee_contributions + + # Amount allocable to IRR within 5 years + attr_accessor :amount_allocable_to_irr_within5_years + + # First year of designated Roth contribution + attr_accessor :first_year_of_designated_roth_contribution + + # FATCA filing requirement + attr_accessor :fatca_filing_requirement + + # Date of payment + attr_accessor :date_of_payment + + attr_accessor :type + + attr_accessor :created_at + + attr_accessor :updated_at + + attr_accessor :state_and_local_withholding + + attr_accessor :tin_type + + attr_accessor :id + + attr_accessor :issuer_id + + attr_accessor :issuer_reference_id + + attr_accessor :issuer_tin + + attr_accessor :tax_year + + attr_accessor :reference_id + + attr_accessor :recipient_name + + attr_accessor :recipient_tin + + attr_accessor :recipient_second_name + + attr_accessor :address + + attr_accessor :address2 + + attr_accessor :city + + attr_accessor :state + + attr_accessor :zip + + attr_accessor :email + + attr_accessor :account_number + + attr_accessor :office_code + + attr_accessor :non_us_province + + attr_accessor :country_code + + attr_accessor :federal_e_file + + attr_accessor :postal_mail + + attr_accessor :state_e_file + + attr_accessor :tin_match + + attr_accessor :no_tin + + attr_accessor :second_tin_notice + + attr_accessor :address_verification + + attr_accessor :federal_efile_status + + attr_accessor :e_delivery_status + + attr_accessor :state_efile_status + + attr_accessor :postal_mail_status + + attr_accessor :tin_match_status + + attr_accessor :address_verification_status + + attr_accessor :validation_errors + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'gross_distribution' => :'grossDistribution', + :'taxable_amount' => :'taxableAmount', + :'taxable_amount_not_determined' => :'taxableAmountNotDetermined', + :'total_distribution_determined' => :'totalDistributionDetermined', + :'capital_gain' => :'capitalGain', + :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld', + :'employee_contributions_or_designated_roth_or_insurance_premiums' => :'employeeContributionsOrDesignatedRothOrInsurancePremiums', + :'net_unrealized_appreciation_in_employer_securities' => :'netUnrealizedAppreciationInEmployerSecurities', + :'distribution_code' => :'distributionCode', + :'second_distribution_code' => :'secondDistributionCode', + :'ira_sep_simple' => :'iraSepSimple', + :'traditional_ira_sep_simple_or_roth_conversion_amount' => :'traditionalIraSepSimpleOrRothConversionAmount', + :'other_amount' => :'otherAmount', + :'other_percentage' => :'otherPercentage', + :'total_distribution_percentage' => :'totalDistributionPercentage', + :'total_employee_contributions' => :'totalEmployeeContributions', + :'amount_allocable_to_irr_within5_years' => :'amountAllocableToIrrWithin5Years', + :'first_year_of_designated_roth_contribution' => :'firstYearOfDesignatedRothContribution', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', + :'date_of_payment' => :'dateOfPayment', + :'type' => :'type', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt', + :'state_and_local_withholding' => :'stateAndLocalWithholding', + :'tin_type' => :'tinType', + :'id' => :'id', + :'issuer_id' => :'issuerId', + :'issuer_reference_id' => :'issuerReferenceId', + :'issuer_tin' => :'issuerTin', + :'tax_year' => :'taxYear', + :'reference_id' => :'referenceId', + :'recipient_name' => :'recipientName', + :'recipient_tin' => :'recipientTin', + :'recipient_second_name' => :'recipientSecondName', + :'address' => :'address', + :'address2' => :'address2', + :'city' => :'city', + :'state' => :'state', + :'zip' => :'zip', + :'email' => :'email', + :'account_number' => :'accountNumber', + :'office_code' => :'officeCode', + :'non_us_province' => :'nonUsProvince', + :'country_code' => :'countryCode', + :'federal_e_file' => :'federalEFile', + :'postal_mail' => :'postalMail', + :'state_e_file' => :'stateEFile', + :'tin_match' => :'tinMatch', + :'no_tin' => :'noTin', + :'second_tin_notice' => :'secondTinNotice', + :'address_verification' => :'addressVerification', + :'federal_efile_status' => :'federalEfileStatus', + :'e_delivery_status' => :'eDeliveryStatus', + :'state_efile_status' => :'stateEfileStatus', + :'postal_mail_status' => :'postalMailStatus', + :'tin_match_status' => :'tinMatchStatus', + :'address_verification_status' => :'addressVerificationStatus', + :'validation_errors' => :'validationErrors' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'gross_distribution' => :'Float', + :'taxable_amount' => :'Float', + :'taxable_amount_not_determined' => :'Boolean', + :'total_distribution_determined' => :'Boolean', + :'capital_gain' => :'Float', + :'federal_income_tax_withheld' => :'Float', + :'employee_contributions_or_designated_roth_or_insurance_premiums' => :'Float', + :'net_unrealized_appreciation_in_employer_securities' => :'Float', + :'distribution_code' => :'String', + :'second_distribution_code' => :'String', + :'ira_sep_simple' => :'Boolean', + :'traditional_ira_sep_simple_or_roth_conversion_amount' => :'Float', + :'other_amount' => :'Float', + :'other_percentage' => :'String', + :'total_distribution_percentage' => :'String', + :'total_employee_contributions' => :'Float', + :'amount_allocable_to_irr_within5_years' => :'Float', + :'first_year_of_designated_roth_contribution' => :'String', + :'fatca_filing_requirement' => :'Boolean', + :'date_of_payment' => :'Time', + :'type' => :'String', + :'created_at' => :'Time', + :'updated_at' => :'Time', + :'state_and_local_withholding' => :'StateAndLocalWithholdingResponse', + :'tin_type' => :'String', + :'id' => :'String', + :'issuer_id' => :'String', + :'issuer_reference_id' => :'String', + :'issuer_tin' => :'String', + :'tax_year' => :'Integer', + :'reference_id' => :'String', + :'recipient_name' => :'String', + :'recipient_tin' => :'String', + :'recipient_second_name' => :'String', + :'address' => :'String', + :'address2' => :'String', + :'city' => :'String', + :'state' => :'String', + :'zip' => :'String', + :'email' => :'String', + :'account_number' => :'String', + :'office_code' => :'String', + :'non_us_province' => :'String', + :'country_code' => :'String', + :'federal_e_file' => :'Boolean', + :'postal_mail' => :'Boolean', + :'state_e_file' => :'Boolean', + :'tin_match' => :'Boolean', + :'no_tin' => :'Boolean', + :'second_tin_notice' => :'Boolean', + :'address_verification' => :'Boolean', + :'federal_efile_status' => :'StatusDetail', + :'e_delivery_status' => :'StatusDetail', + :'state_efile_status' => :'Array', + :'postal_mail_status' => :'StatusDetail', + :'tin_match_status' => :'StatusDetail', + :'address_verification_status' => :'StatusDetail', + :'validation_errors' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'gross_distribution', + :'taxable_amount', + :'taxable_amount_not_determined', + :'total_distribution_determined', + :'capital_gain', + :'federal_income_tax_withheld', + :'employee_contributions_or_designated_roth_or_insurance_premiums', + :'net_unrealized_appreciation_in_employer_securities', + :'distribution_code', + :'second_distribution_code', + :'ira_sep_simple', + :'traditional_ira_sep_simple_or_roth_conversion_amount', + :'other_amount', + :'other_percentage', + :'total_distribution_percentage', + :'total_employee_contributions', + :'amount_allocable_to_irr_within5_years', + :'first_year_of_designated_roth_contribution', + :'fatca_filing_requirement', + :'date_of_payment', + :'federal_efile_status', + :'e_delivery_status', + :'state_efile_status', + :'postal_mail_status', + :'tin_match_status', + :'address_verification_status', + :'validation_errors' + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.openapi_all_of + [ + :'FormResponseBase' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099RResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099RResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'gross_distribution') + self.gross_distribution = attributes[:'gross_distribution'] + end + + if attributes.key?(:'taxable_amount') + self.taxable_amount = attributes[:'taxable_amount'] + end + + if attributes.key?(:'taxable_amount_not_determined') + self.taxable_amount_not_determined = attributes[:'taxable_amount_not_determined'] + end + + if attributes.key?(:'total_distribution_determined') + self.total_distribution_determined = attributes[:'total_distribution_determined'] + end + + if attributes.key?(:'capital_gain') + self.capital_gain = attributes[:'capital_gain'] + end + + if attributes.key?(:'federal_income_tax_withheld') + self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld'] + end + + if attributes.key?(:'employee_contributions_or_designated_roth_or_insurance_premiums') + self.employee_contributions_or_designated_roth_or_insurance_premiums = attributes[:'employee_contributions_or_designated_roth_or_insurance_premiums'] + end + + if attributes.key?(:'net_unrealized_appreciation_in_employer_securities') + self.net_unrealized_appreciation_in_employer_securities = attributes[:'net_unrealized_appreciation_in_employer_securities'] + end + + if attributes.key?(:'distribution_code') + self.distribution_code = attributes[:'distribution_code'] + end + + if attributes.key?(:'second_distribution_code') + self.second_distribution_code = attributes[:'second_distribution_code'] + end + + if attributes.key?(:'ira_sep_simple') + self.ira_sep_simple = attributes[:'ira_sep_simple'] + end + + if attributes.key?(:'traditional_ira_sep_simple_or_roth_conversion_amount') + self.traditional_ira_sep_simple_or_roth_conversion_amount = attributes[:'traditional_ira_sep_simple_or_roth_conversion_amount'] + end + + if attributes.key?(:'other_amount') + self.other_amount = attributes[:'other_amount'] + end + + if attributes.key?(:'other_percentage') + self.other_percentage = attributes[:'other_percentage'] + end + + if attributes.key?(:'total_distribution_percentage') + self.total_distribution_percentage = attributes[:'total_distribution_percentage'] + end + + if attributes.key?(:'total_employee_contributions') + self.total_employee_contributions = attributes[:'total_employee_contributions'] + end + + if attributes.key?(:'amount_allocable_to_irr_within5_years') + self.amount_allocable_to_irr_within5_years = attributes[:'amount_allocable_to_irr_within5_years'] + end + + if attributes.key?(:'first_year_of_designated_roth_contribution') + self.first_year_of_designated_roth_contribution = attributes[:'first_year_of_designated_roth_contribution'] + end + + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + + if attributes.key?(:'date_of_payment') + self.date_of_payment = attributes[:'date_of_payment'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'state_and_local_withholding') + self.state_and_local_withholding = attributes[:'state_and_local_withholding'] + end + + if attributes.key?(:'tin_type') + self.tin_type = attributes[:'tin_type'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'issuer_id') + self.issuer_id = attributes[:'issuer_id'] + end + + if attributes.key?(:'issuer_reference_id') + self.issuer_reference_id = attributes[:'issuer_reference_id'] + end + + if attributes.key?(:'issuer_tin') + self.issuer_tin = attributes[:'issuer_tin'] + end + + if attributes.key?(:'tax_year') + self.tax_year = attributes[:'tax_year'] + end + + if attributes.key?(:'reference_id') + self.reference_id = attributes[:'reference_id'] + end + + if attributes.key?(:'recipient_name') + self.recipient_name = attributes[:'recipient_name'] + end + + if attributes.key?(:'recipient_tin') + self.recipient_tin = attributes[:'recipient_tin'] + end + + if attributes.key?(:'recipient_second_name') + self.recipient_second_name = attributes[:'recipient_second_name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'address2') + self.address2 = attributes[:'address2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'office_code') + self.office_code = attributes[:'office_code'] + end + + if attributes.key?(:'non_us_province') + self.non_us_province = attributes[:'non_us_province'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'federal_e_file') + self.federal_e_file = attributes[:'federal_e_file'] + end + + if attributes.key?(:'postal_mail') + self.postal_mail = attributes[:'postal_mail'] + end + + if attributes.key?(:'state_e_file') + self.state_e_file = attributes[:'state_e_file'] + end + + if attributes.key?(:'tin_match') + self.tin_match = attributes[:'tin_match'] + end + + if attributes.key?(:'no_tin') + self.no_tin = attributes[:'no_tin'] + end + + if attributes.key?(:'second_tin_notice') + self.second_tin_notice = attributes[:'second_tin_notice'] + end + + if attributes.key?(:'address_verification') + self.address_verification = attributes[:'address_verification'] + end + + if attributes.key?(:'federal_efile_status') + self.federal_efile_status = attributes[:'federal_efile_status'] + end + + if attributes.key?(:'e_delivery_status') + self.e_delivery_status = attributes[:'e_delivery_status'] + end + + if attributes.key?(:'state_efile_status') + if (value = attributes[:'state_efile_status']).is_a?(Array) + self.state_efile_status = value + end + end + + if attributes.key?(:'postal_mail_status') + self.postal_mail_status = attributes[:'postal_mail_status'] + end + + if attributes.key?(:'tin_match_status') + self.tin_match_status = attributes[:'tin_match_status'] + end + + if attributes.key?(:'address_verification_status') + self.address_verification_status = attributes[:'address_verification_status'] + end + + if attributes.key?(:'validation_errors') + if (value = attributes[:'validation_errors']).is_a?(Array) + self.validation_errors = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) + return false unless type_validator.valid?(@type) + tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + return false unless tin_type_validator.valid?(@tin_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] tin_type Object to be assigned + def tin_type=(tin_type) + validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) + unless validator.valid?(tin_type) + fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}." + end + @tin_type = tin_type + end + + # Custom attribute writer method with validation + # @param [Object] state_efile_status Value to be assigned + def state_efile_status=(state_efile_status) + @state_efile_status = state_efile_status + end + + # Custom attribute writer method with validation + # @param [Object] validation_errors Value to be assigned + def validation_errors=(validation_errors) + @validation_errors = validation_errors + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + gross_distribution == o.gross_distribution && + taxable_amount == o.taxable_amount && + taxable_amount_not_determined == o.taxable_amount_not_determined && + total_distribution_determined == o.total_distribution_determined && + capital_gain == o.capital_gain && + federal_income_tax_withheld == o.federal_income_tax_withheld && + employee_contributions_or_designated_roth_or_insurance_premiums == o.employee_contributions_or_designated_roth_or_insurance_premiums && + net_unrealized_appreciation_in_employer_securities == o.net_unrealized_appreciation_in_employer_securities && + distribution_code == o.distribution_code && + second_distribution_code == o.second_distribution_code && + ira_sep_simple == o.ira_sep_simple && + traditional_ira_sep_simple_or_roth_conversion_amount == o.traditional_ira_sep_simple_or_roth_conversion_amount && + other_amount == o.other_amount && + other_percentage == o.other_percentage && + total_distribution_percentage == o.total_distribution_percentage && + total_employee_contributions == o.total_employee_contributions && + amount_allocable_to_irr_within5_years == o.amount_allocable_to_irr_within5_years && + first_year_of_designated_roth_contribution == o.first_year_of_designated_roth_contribution && + fatca_filing_requirement == o.fatca_filing_requirement && + date_of_payment == o.date_of_payment && + type == o.type && + created_at == o.created_at && + updated_at == o.updated_at && + state_and_local_withholding == o.state_and_local_withholding && + tin_type == o.tin_type && + id == o.id && + issuer_id == o.issuer_id && + issuer_reference_id == o.issuer_reference_id && + issuer_tin == o.issuer_tin && + tax_year == o.tax_year && + reference_id == o.reference_id && + recipient_name == o.recipient_name && + recipient_tin == o.recipient_tin && + recipient_second_name == o.recipient_second_name && + address == o.address && + address2 == o.address2 && + city == o.city && + state == o.state && + zip == o.zip && + email == o.email && + account_number == o.account_number && + office_code == o.office_code && + non_us_province == o.non_us_province && + country_code == o.country_code && + federal_e_file == o.federal_e_file && + postal_mail == o.postal_mail && + state_e_file == o.state_e_file && + tin_match == o.tin_match && + no_tin == o.no_tin && + second_tin_notice == o.second_tin_notice && + address_verification == o.address_verification && + federal_efile_status == o.federal_efile_status && + e_delivery_status == o.e_delivery_status && + state_efile_status == o.state_efile_status && + postal_mail_status == o.postal_mail_status && + tin_match_status == o.tin_match_status && + address_verification_status == o.address_verification_status && + validation_errors == o.validation_errors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [gross_distribution, taxable_amount, taxable_amount_not_determined, total_distribution_determined, capital_gain, federal_income_tax_withheld, employee_contributions_or_designated_roth_or_insurance_premiums, net_unrealized_appreciation_in_employer_securities, distribution_code, second_distribution_code, ira_sep_simple, traditional_ira_sep_simple_or_roth_conversion_amount, other_amount, other_percentage, total_distribution_percentage, total_employee_contributions, amount_allocable_to_irr_within5_years, first_year_of_designated_roth_contribution, fatca_filing_requirement, date_of_payment, type, created_at, updated_at, state_and_local_withholding, tin_type, id, issuer_id, issuer_reference_id, issuer_tin, tax_year, reference_id, recipient_name, recipient_tin, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, federal_efile_status, e_delivery_status, state_efile_status, postal_mail_status, tin_match_status, address_verification_status, validation_errors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/form1099_status_detail.rb b/lib/avalara_sdk/models/A1099/V2/form1099_status_detail.rb index 7ca74af..408817c 100644 --- a/lib/avalara_sdk/models/A1099/V2/form1099_status_detail.rb +++ b/lib/avalara_sdk/models/A1099/V2/form1099_status_detail.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end diff --git a/lib/avalara_sdk/models/A1099/V2/form_request_base.rb b/lib/avalara_sdk/models/A1099/V2/form_request_base.rb index 01901e1..5fb8f74 100644 --- a/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +++ b/lib/avalara_sdk/models/A1099/V2/form_request_base.rb @@ -77,6 +77,9 @@ class FormRequestBase # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -130,6 +133,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -165,6 +169,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -175,13 +180,19 @@ def self.openapi_nullable Set.new([ :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -228,8 +239,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -238,8 +247,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -268,8 +275,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -296,6 +301,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -310,30 +319,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -343,12 +328,6 @@ def valid? warn '[DEPRECATED] the `valid?` method is obsolete' tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -362,48 +341,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -431,6 +368,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -444,7 +382,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb b/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb index 366386f..a77daa7 100644 --- a/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb +++ b/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb @@ -86,6 +86,9 @@ class FormRequestListItemBase # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -142,6 +145,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -180,6 +184,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -188,15 +193,23 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'issuer_reference_id', + :'issuer_tin', :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -264,8 +277,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -274,8 +285,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -304,8 +313,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -332,6 +339,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -350,30 +361,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "tax_year", tax_year cannot be nil.') end - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -384,12 +371,6 @@ def valid? return false if @tax_year.nil? tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end @@ -403,48 +384,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -475,6 +414,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -488,7 +428,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/form_response_base.rb b/lib/avalara_sdk/models/A1099/V2/form_response_base.rb index 16abc9f..77f4cec 100644 --- a/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +++ b/lib/avalara_sdk/models/A1099/V2/form_response_base.rb @@ -399,7 +399,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) @@ -409,7 +409,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb b/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb index 77266de..5073af7 100644 --- a/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +++ b/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb @@ -79,6 +79,9 @@ class FormSingleRequestBase # Second TIN notice in three years attr_accessor :second_tin_notice + # Fatca filing requirement + attr_accessor :fatca_filing_requirement + # Boolean indicating that address verification should be scheduled for this form attr_accessor :address_verification @@ -133,6 +136,7 @@ def self.attribute_map :'tin_match' => :'tinMatch', :'no_tin' => :'noTin', :'second_tin_notice' => :'secondTinNotice', + :'fatca_filing_requirement' => :'fatcaFilingRequirement', :'address_verification' => :'addressVerification', :'state_and_local_withholding' => :'stateAndLocalWithholding' } @@ -169,6 +173,7 @@ def self.openapi_types :'tin_match' => :'Boolean', :'no_tin' => :'Boolean', :'second_tin_notice' => :'Boolean', + :'fatca_filing_requirement' => :'Boolean', :'address_verification' => :'Boolean', :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest' } @@ -179,13 +184,19 @@ def self.openapi_nullable Set.new([ :'issuer_id', :'reference_id', + :'recipient_tin', :'recipient_name', :'recipient_second_name', + :'address', :'address2', + :'city', + :'state', + :'zip', :'email', :'account_number', :'office_code', :'non_us_province', + :'country_code', :'second_tin_notice', :'state_and_local_withholding' ]) @@ -243,8 +254,6 @@ def initialize(attributes = {}) if attributes.key?(:'address') self.address = attributes[:'address'] - else - self.address = nil end if attributes.key?(:'address2') @@ -253,8 +262,6 @@ def initialize(attributes = {}) if attributes.key?(:'city') self.city = attributes[:'city'] - else - self.city = nil end if attributes.key?(:'state') @@ -283,8 +290,6 @@ def initialize(attributes = {}) if attributes.key?(:'country_code') self.country_code = attributes[:'country_code'] - else - self.country_code = nil end if attributes.key?(:'federal_e_file') @@ -311,6 +316,10 @@ def initialize(attributes = {}) self.second_tin_notice = attributes[:'second_tin_notice'] end + if attributes.key?(:'fatca_filing_requirement') + self.fatca_filing_requirement = attributes[:'fatca_filing_requirement'] + end + if attributes.key?(:'address_verification') self.address_verification = attributes[:'address_verification'] end @@ -325,30 +334,6 @@ def initialize(attributes = {}) def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new - if @address.nil? - invalid_properties.push('invalid value for "address", address cannot be nil.') - end - - if @address.to_s.length < 1 - invalid_properties.push('invalid value for "address", the character length must be great than or equal to 1.') - end - - if @city.nil? - invalid_properties.push('invalid value for "city", city cannot be nil.') - end - - if @city.to_s.length < 1 - invalid_properties.push('invalid value for "city", the character length must be great than or equal to 1.') - end - - if @country_code.nil? - invalid_properties.push('invalid value for "country_code", country_code cannot be nil.') - end - - if @country_code.to_s.length < 1 - invalid_properties.push('invalid value for "country_code", the character length must be great than or equal to 1.') - end - invalid_properties end @@ -356,23 +341,17 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) return false unless type_validator.valid?(@type) tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"]) return false unless tin_type_validator.valid?(@tin_type) - return false if @address.nil? - return false if @address.to_s.length < 1 - return false if @city.nil? - return false if @city.to_s.length < 1 - return false if @country_code.nil? - return false if @country_code.to_s.length < 1 true end # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C"]) + validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -389,48 +368,6 @@ def tin_type=(tin_type) @tin_type = tin_type end - # Custom attribute writer method with validation - # @param [Object] address Value to be assigned - def address=(address) - if address.nil? - fail ArgumentError, 'address cannot be nil' - end - - if address.to_s.length < 1 - fail ArgumentError, 'invalid value for "address", the character length must be great than or equal to 1.' - end - - @address = address - end - - # Custom attribute writer method with validation - # @param [Object] city Value to be assigned - def city=(city) - if city.nil? - fail ArgumentError, 'city cannot be nil' - end - - if city.to_s.length < 1 - fail ArgumentError, 'invalid value for "city", the character length must be great than or equal to 1.' - end - - @city = city - end - - # Custom attribute writer method with validation - # @param [Object] country_code Value to be assigned - def country_code=(country_code) - if country_code.nil? - fail ArgumentError, 'country_code cannot be nil' - end - - if country_code.to_s.length < 1 - fail ArgumentError, 'invalid value for "country_code", the character length must be great than or equal to 1.' - end - - @country_code = country_code - end - # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -459,6 +396,7 @@ def ==(o) tin_match == o.tin_match && no_tin == o.no_tin && second_tin_notice == o.second_tin_notice && + fatca_filing_requirement == o.fatca_filing_requirement && address_verification == o.address_verification && state_and_local_withholding == o.state_and_local_withholding end @@ -472,7 +410,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, address_verification, state_and_local_withholding].hash + [type, issuer_id, reference_id, recipient_tin, recipient_name, tin_type, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, no_tin, second_tin_notice, fatca_filing_requirement, address_verification, state_and_local_withholding].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb b/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb index c1c1f53..d18e463 100644 --- a/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb @@ -19,6 +19,7 @@ def openapi_one_of :'Form1095BListItemResponse', :'Form1099BaseResponse', :'Form1099DivListItemResponse', + :'Form1099IntListItemResponse', :'Form1099KListItemResponse', :'Form1099MiscListItemResponse', :'Form1099NecListItemResponse', diff --git a/lib/avalara_sdk/models/A1099/V2/included_base.rb b/lib/avalara_sdk/models/A1099/V2/included_base.rb index bf1f3b3..d726ff7 100644 --- a/lib/avalara_sdk/models/A1099/V2/included_base.rb +++ b/lib/avalara_sdk/models/A1099/V2/included_base.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end diff --git a/lib/avalara_sdk/models/A1099/V2/issuer_command.rb b/lib/avalara_sdk/models/A1099/V2/issuer_command.rb index 2cdd70f..a0f160b 100644 --- a/lib/avalara_sdk/models/A1099/V2/issuer_command.rb +++ b/lib/avalara_sdk/models/A1099/V2/issuer_command.rb @@ -106,6 +106,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'name', :'name_dba', :'tin', :'reference_id', diff --git a/lib/avalara_sdk/models/A1099/V2/paginated_query_result_model_w9_form_base_response.rb b/lib/avalara_sdk/models/A1099/V2/paginated_query_result_model_w9_form_base_response.rb new file mode 100644 index 0000000..2b316a4 --- /dev/null +++ b/lib/avalara_sdk/models/A1099/V2/paginated_query_result_model_w9_form_base_response.rb @@ -0,0 +1,234 @@ +=begin +#Avalara 1099 & W-9 API Definition + +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) + + +=end + +require 'date' +require 'time' + +module AvalaraSdk::A1099::V2 + # Generic paginated model to wrap query response data + class PaginatedQueryResultModelW9FormBaseResponse + attr_accessor :recordset_count + + attr_accessor :value + + attr_accessor :next_link + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'recordset_count' => :'@recordsetCount', + :'value' => :'value', + :'next_link' => :'@nextLink' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'recordset_count' => :'Integer', + :'value' => :'Array', + :'next_link' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'recordset_count', + :'value', + :'next_link' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::PaginatedQueryResultModelW9FormBaseResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::PaginatedQueryResultModelW9FormBaseResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'recordset_count') + self.recordset_count = attributes[:'recordset_count'] + end + + if attributes.key?(:'value') + if (value = attributes[:'value']).is_a?(Array) + self.value = value + end + end + + if attributes.key?(:'next_link') + self.next_link = attributes[:'next_link'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + warn '[DEPRECATED] the `valid?` method is obsolete' + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + recordset_count == o.recordset_count && + value == o.value && + next_link == o.next_link + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [recordset_count, value, next_link].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + transformed_hash = {} + openapi_types.each_pair do |key, type| + if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = nil + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[attribute_map[key]].is_a?(Array) + transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } + end + elsif !attributes[attribute_map[key]].nil? + transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) + end + end + new(transformed_hash) + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def self._deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = AvalaraSdk::A1099::V2.const_get(type) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb b/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb index f108199..4fdaec5 100644 --- a/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb +++ b/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end diff --git a/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail.rb b/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail.rb index e3636cf..0134522 100644 --- a/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail.rb +++ b/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end diff --git a/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb b/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb index 622a5aa..7e85dd8 100644 --- a/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb @@ -16,10 +16,13 @@ class << self def openapi_one_of [ :'Form1042SResponse', + :'Form1095BResponse', :'Form1099DivResponse', + :'Form1099IntResponse', :'Form1099KResponse', :'Form1099MiscResponse', :'Form1099NecResponse', + :'Form1099RResponse', :'FormResponseBase' ] end diff --git a/lib/avalara_sdk/models/A1099/V2/validation_error.rb b/lib/avalara_sdk/models/A1099/V2/validation_error.rb index df4e638..8441027 100644 --- a/lib/avalara_sdk/models/A1099/V2/validation_error.rb +++ b/lib/avalara_sdk/models/A1099/V2/validation_error.rb @@ -1,7 +1,7 @@ =begin #Avalara 1099 & W-9 API Definition -### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) +### 🔐 Authentication Generate a **license key** from: *[Avalara Portal](https://www.avalara.com/us/en/signin.html) → Settings → License and API Keys*. [More on authentication methods](https://developer.avalara.com/avatax-dm-combined-erp/common-setup/authentication/authentication-methods/) [Test your credentials](https://developer.avalara.com/avatax/test-credentials/) ## 📘 API & SDK Documentation [Avalara SDK (.NET) on GitHub](https://github.com/avadev/Avalara-SDK-DotNet#avalarasdk--the-unified-c-library-for-next-gen-avalara-services) [Code Examples – 1099 API](https://github.com/avadev/Avalara-SDK-DotNet/blob/main/docs/A1099/V2/Class1099IssuersApi.md#call1099issuersget) =end diff --git a/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb b/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb index f691318..09e0c61 100644 --- a/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb @@ -10,7 +10,7 @@ require 'time' module AvalaraSdk::A1099::V2 - class W4FormResponse + class W4FormResponse < W9FormBaseResponse # The first name of the employee. attr_accessor :employee_first_name @@ -68,48 +68,6 @@ class W4FormResponse # The office code associated with the form. attr_accessor :office_code - # The unique identifier for the form. - attr_accessor :id - - # The form type. - attr_accessor :type - - # The form status. - attr_accessor :entry_status - - # The timestamp for the latest status update. - attr_accessor :entry_status_date - - # A reference identifier for the form. - attr_accessor :reference_id - - # The ID of the associated company. - attr_accessor :company_id - - # The display name associated with the form. - attr_accessor :display_name - - # The email address of the individual associated with the form. - attr_accessor :email - - # Indicates whether the form is archived. - attr_accessor :archived - - # The signature of the form. - attr_accessor :signature - - # The date the form was signed. - attr_accessor :signed_date - - # The date when e-delivery was consented. - attr_accessor :e_delivery_consented_at - - # The creation date of the form. - attr_accessor :created_at - - # The last updated date of the form. - attr_accessor :updated_at - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -131,27 +89,13 @@ def self.attribute_map :'deductions' => :'deductions', :'additional_withheld' => :'additionalWithheld', :'exempt_from_withholding' => :'exemptFromWithholding', - :'office_code' => :'officeCode', - :'id' => :'id', - :'type' => :'type', - :'entry_status' => :'entryStatus', - :'entry_status_date' => :'entryStatusDate', - :'reference_id' => :'referenceId', - :'company_id' => :'companyId', - :'display_name' => :'displayName', - :'email' => :'email', - :'archived' => :'archived', - :'signature' => :'signature', - :'signed_date' => :'signedDate', - :'e_delivery_consented_at' => :'eDeliveryConsentedAt', - :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt' + :'office_code' => :'officeCode' } end - # Returns all the JSON keys this model knows about + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values + attribute_map.values.concat(superclass.acceptable_attributes) end # Attribute type mapping. @@ -175,21 +119,7 @@ def self.openapi_types :'deductions' => :'Float', :'additional_withheld' => :'Float', :'exempt_from_withholding' => :'Boolean', - :'office_code' => :'String', - :'id' => :'String', - :'type' => :'String', - :'entry_status' => :'String', - :'entry_status_date' => :'Time', - :'reference_id' => :'String', - :'company_id' => :'String', - :'display_name' => :'String', - :'email' => :'String', - :'archived' => :'Boolean', - :'signature' => :'String', - :'signed_date' => :'Time', - :'e_delivery_consented_at' => :'Time', - :'created_at' => :'Time', - :'updated_at' => :'Time' + :'office_code' => :'String' } end @@ -208,13 +138,7 @@ def self.openapi_nullable :'non_job_income', :'deductions', :'additional_withheld', - :'office_code', - :'entry_status_date', - :'reference_id', - :'email', - :'signature', - :'signed_date', - :'e_delivery_consented_at', + :'office_code' ]) end @@ -240,6 +164,9 @@ def initialize(attributes = {}) h[k.to_sym] = v } + # call parent's initialize + super(attributes) + if attributes.key?(:'employee_first_name') self.employee_first_name = attributes[:'employee_first_name'] end @@ -315,69 +242,13 @@ def initialize(attributes = {}) if attributes.key?(:'office_code') self.office_code = attributes[:'office_code'] end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'entry_status') - self.entry_status = attributes[:'entry_status'] - end - - if attributes.key?(:'entry_status_date') - self.entry_status_date = attributes[:'entry_status_date'] - end - - if attributes.key?(:'reference_id') - self.reference_id = attributes[:'reference_id'] - end - - if attributes.key?(:'company_id') - self.company_id = attributes[:'company_id'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'archived') - self.archived = attributes[:'archived'] - end - - if attributes.key?(:'signature') - self.signature = attributes[:'signature'] - end - - if attributes.key?(:'signed_date') - self.signed_date = attributes[:'signed_date'] - end - - if attributes.key?(:'e_delivery_consented_at') - self.e_delivery_consented_at = attributes[:'e_delivery_consented_at'] - end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'updated_at') - self.updated_at = attributes[:'updated_at'] - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new + invalid_properties = super invalid_properties end @@ -385,7 +256,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - true + true && super end # Checks equality by comparing each attribute. @@ -411,21 +282,7 @@ def ==(o) deductions == o.deductions && additional_withheld == o.additional_withheld && exempt_from_withholding == o.exempt_from_withholding && - office_code == o.office_code && - id == o.id && - type == o.type && - entry_status == o.entry_status && - entry_status_date == o.entry_status_date && - reference_id == o.reference_id && - company_id == o.company_id && - display_name == o.display_name && - email == o.email && - archived == o.archived && - signature == o.signature && - signed_date == o.signed_date && - e_delivery_consented_at == o.e_delivery_consented_at && - created_at == o.created_at && - updated_at == o.updated_at + office_code == o.office_code && super(o) end # @see the `==` method @@ -437,7 +294,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, tin_type, tin, address, city, state, zip, marital_status, last_name_differs, num_allowances, other_dependents, non_job_income, deductions, additional_withheld, exempt_from_withholding, office_code, id, type, entry_status, entry_status_date, reference_id, company_id, display_name, email, archived, signature, signed_date, e_delivery_consented_at, created_at, updated_at].hash + [employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, tin_type, tin, address, city, state, zip, marital_status, last_name_differs, num_allowances, other_dependents, non_job_income, deductions, additional_withheld, exempt_from_withholding, office_code].hash end # Builds the object from hash @@ -445,6 +302,7 @@ def hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + super(attributes) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| @@ -521,7 +379,7 @@ def to_body # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash - hash = {} + hash = super self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? diff --git a/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb b/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb index b817182..f358a28 100644 --- a/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb @@ -10,7 +10,7 @@ require 'time' module AvalaraSdk::A1099::V2 - class W8BenEFormResponse + class W8BenEFormResponse < W9FormBaseResponse # The name of the individual or entity associated with the form. attr_accessor :name @@ -299,48 +299,6 @@ class W8BenEFormResponse # Certifies signer has the capacity to sign for the beneficial owner. attr_accessor :capacity_to_sign_certification - # The unique identifier for the form. - attr_accessor :id - - # The form type. - attr_accessor :type - - # The form status. - attr_accessor :entry_status - - # The timestamp for the latest status update. - attr_accessor :entry_status_date - - # A reference identifier for the form. - attr_accessor :reference_id - - # The ID of the associated company. - attr_accessor :company_id - - # The display name associated with the form. - attr_accessor :display_name - - # The email address of the individual associated with the form. - attr_accessor :email - - # Indicates whether the form is archived. - attr_accessor :archived - - # The signature of the form. - attr_accessor :signature - - # The date the form was signed. - attr_accessor :signed_date - - # The date when e-delivery was consented. - attr_accessor :e_delivery_consented_at - - # The creation date of the form. - attr_accessor :created_at - - # The last updated date of the form. - attr_accessor :updated_at - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -439,27 +397,13 @@ def self.attribute_map :'direct_reporting_nffe_sponsoring_entity' => :'directReportingNffeSponsoringEntity', :'substantial_us_owners' => :'substantialUsOwners', :'signer_name' => :'signerName', - :'capacity_to_sign_certification' => :'capacityToSignCertification', - :'id' => :'id', - :'type' => :'type', - :'entry_status' => :'entryStatus', - :'entry_status_date' => :'entryStatusDate', - :'reference_id' => :'referenceId', - :'company_id' => :'companyId', - :'display_name' => :'displayName', - :'email' => :'email', - :'archived' => :'archived', - :'signature' => :'signature', - :'signed_date' => :'signedDate', - :'e_delivery_consented_at' => :'eDeliveryConsentedAt', - :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt' + :'capacity_to_sign_certification' => :'capacityToSignCertification' } end - # Returns all the JSON keys this model knows about + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values + attribute_map.values.concat(superclass.acceptable_attributes) end # Attribute type mapping. @@ -560,21 +504,7 @@ def self.openapi_types :'direct_reporting_nffe_sponsoring_entity' => :'String', :'substantial_us_owners' => :'Array', :'signer_name' => :'String', - :'capacity_to_sign_certification' => :'Boolean', - :'id' => :'String', - :'type' => :'String', - :'entry_status' => :'String', - :'entry_status_date' => :'Time', - :'reference_id' => :'String', - :'company_id' => :'String', - :'display_name' => :'String', - :'email' => :'String', - :'archived' => :'Boolean', - :'signature' => :'String', - :'signed_date' => :'Time', - :'e_delivery_consented_at' => :'Time', - :'created_at' => :'Time', - :'updated_at' => :'Time' + :'capacity_to_sign_certification' => :'Boolean' } end @@ -621,12 +551,6 @@ def self.openapi_nullable :'nffe_affiliate_of_publicly_traded_entity_securities_market', :'direct_reporting_nffe_sponsoring_entity', :'signer_name', - :'entry_status_date', - :'reference_id', - :'email', - :'signature', - :'signed_date', - :'e_delivery_consented_at', ]) end @@ -652,6 +576,9 @@ def initialize(attributes = {}) h[k.to_sym] = v } + # call parent's initialize + super(attributes) + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -1037,69 +964,13 @@ def initialize(attributes = {}) if attributes.key?(:'capacity_to_sign_certification') self.capacity_to_sign_certification = attributes[:'capacity_to_sign_certification'] end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'entry_status') - self.entry_status = attributes[:'entry_status'] - end - - if attributes.key?(:'entry_status_date') - self.entry_status_date = attributes[:'entry_status_date'] - end - - if attributes.key?(:'reference_id') - self.reference_id = attributes[:'reference_id'] - end - - if attributes.key?(:'company_id') - self.company_id = attributes[:'company_id'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'archived') - self.archived = attributes[:'archived'] - end - - if attributes.key?(:'signature') - self.signature = attributes[:'signature'] - end - - if attributes.key?(:'signed_date') - self.signed_date = attributes[:'signed_date'] - end - - if attributes.key?(:'e_delivery_consented_at') - self.e_delivery_consented_at = attributes[:'e_delivery_consented_at'] - end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'updated_at') - self.updated_at = attributes[:'updated_at'] - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new + invalid_properties = super invalid_properties end @@ -1107,7 +978,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - true + true && super end # Checks equality by comparing each attribute. @@ -1210,21 +1081,7 @@ def ==(o) direct_reporting_nffe_sponsoring_entity == o.direct_reporting_nffe_sponsoring_entity && substantial_us_owners == o.substantial_us_owners && signer_name == o.signer_name && - capacity_to_sign_certification == o.capacity_to_sign_certification && - id == o.id && - type == o.type && - entry_status == o.entry_status && - entry_status_date == o.entry_status_date && - reference_id == o.reference_id && - company_id == o.company_id && - display_name == o.display_name && - email == o.email && - archived == o.archived && - signature == o.signature && - signed_date == o.signed_date && - e_delivery_consented_at == o.e_delivery_consented_at && - created_at == o.created_at && - updated_at == o.updated_at + capacity_to_sign_certification == o.capacity_to_sign_certification && super(o) end # @see the `==` method @@ -1236,7 +1093,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, citizenship_country, disregarded_entity, entity_type, making_treaty_claim, fatca_status, residence_address, residence_city, residence_state, residence_zip, residence_country, residence_is_mailing, mailing_address, mailing_city, mailing_state, mailing_zip, mailing_country, tin_type, tin, giin, foreign_tin_not_required, foreign_tin, reference_number, disregarded_entity_fatca_status, disregarded_address, disregarded_city, disregarded_state, disregarded_zip, disregarded_country, disregarded_entity_giin, treaty_country_certification, treaty_country, benefit_limitation_certification, benefit_limitation, qualified_resident_status_certification, treaty_article, withholding_rate, income_type, treaty_reasons, ffi_sponsoring_entity, investment_entity_certification, controlled_foreign_corporation_certification, compliant_nonregistering_local_bank_certification, compliant_ffi_low_value_accounts_certification, sponsored_closely_held_entity_sponsoring_entity, sponsored_closely_held_investment_vehicle_certification, compliant_limited_life_debt_entity_certification, investment_entity_no_financial_accounts_certification, owner_documented_ffi_certification, owner_documented_ffi_reporting_statement_certification, owner_documented_ffi_auditor_letter_certification, owner_documented_ffi_trust_beneficiaries_certification, restricted_distributor_certification, restricted_distributor_agreement_certification, restricted_distributor_preexisting_sales_compliance_certification, nonreporting_iga_ffi_certification, iga_country, iga_model, iga_legal_status_treatment, iga_ffi_trustee_or_sponsor, iga_ffi_trustee_is_foreign, non_commercial_financial_activity_certification, internation_organization_certification, intergovernmental_organization_certification, treaty_qualified_pension_fund_certification, qualified_retirement_fund_certification, narrow_participation_retirement_fund_certification, section401_a_equivalent_pension_plan_certification, investment_entity_for_retirement_funds_certification, exempt_beneficial_owner_sponsored_retirement_fund_certification, exempt_beneficial_owner_owned_investment_entity_certification, territory_financial_institution_certification, excepted_nonfinancial_group_entity_certification, excepted_nonfinancial_start_up_certification, startup_formation_or_resolution_date, excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification, nonfinancial_entity_filing_date, section501_c_organization_certification, determination_letter_date, nonprofit_organization_certification, publicly_traded_nffe_certification, publicly_traded_nffe_securities_market, nffe_affiliate_of_publicly_traded_entity_certification, publicly_traded_entity, nffe_affiliate_of_publicly_traded_entity_securities_market, excepted_territory_nffe_certification, active_nffe_certification, passive_nffe_certification, passive_nffe_no_substantial_us_owners_certification, passive_nffe_substantial_us_owners_provided_certification, excepted_inter_affiliate_ffi_certification, sponsored_direct_reporting_nffe_certification, direct_reporting_nffe_sponsoring_entity, substantial_us_owners, signer_name, capacity_to_sign_certification, id, type, entry_status, entry_status_date, reference_id, company_id, display_name, email, archived, signature, signed_date, e_delivery_consented_at, created_at, updated_at].hash + [name, citizenship_country, disregarded_entity, entity_type, making_treaty_claim, fatca_status, residence_address, residence_city, residence_state, residence_zip, residence_country, residence_is_mailing, mailing_address, mailing_city, mailing_state, mailing_zip, mailing_country, tin_type, tin, giin, foreign_tin_not_required, foreign_tin, reference_number, disregarded_entity_fatca_status, disregarded_address, disregarded_city, disregarded_state, disregarded_zip, disregarded_country, disregarded_entity_giin, treaty_country_certification, treaty_country, benefit_limitation_certification, benefit_limitation, qualified_resident_status_certification, treaty_article, withholding_rate, income_type, treaty_reasons, ffi_sponsoring_entity, investment_entity_certification, controlled_foreign_corporation_certification, compliant_nonregistering_local_bank_certification, compliant_ffi_low_value_accounts_certification, sponsored_closely_held_entity_sponsoring_entity, sponsored_closely_held_investment_vehicle_certification, compliant_limited_life_debt_entity_certification, investment_entity_no_financial_accounts_certification, owner_documented_ffi_certification, owner_documented_ffi_reporting_statement_certification, owner_documented_ffi_auditor_letter_certification, owner_documented_ffi_trust_beneficiaries_certification, restricted_distributor_certification, restricted_distributor_agreement_certification, restricted_distributor_preexisting_sales_compliance_certification, nonreporting_iga_ffi_certification, iga_country, iga_model, iga_legal_status_treatment, iga_ffi_trustee_or_sponsor, iga_ffi_trustee_is_foreign, non_commercial_financial_activity_certification, internation_organization_certification, intergovernmental_organization_certification, treaty_qualified_pension_fund_certification, qualified_retirement_fund_certification, narrow_participation_retirement_fund_certification, section401_a_equivalent_pension_plan_certification, investment_entity_for_retirement_funds_certification, exempt_beneficial_owner_sponsored_retirement_fund_certification, exempt_beneficial_owner_owned_investment_entity_certification, territory_financial_institution_certification, excepted_nonfinancial_group_entity_certification, excepted_nonfinancial_start_up_certification, startup_formation_or_resolution_date, excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification, nonfinancial_entity_filing_date, section501_c_organization_certification, determination_letter_date, nonprofit_organization_certification, publicly_traded_nffe_certification, publicly_traded_nffe_securities_market, nffe_affiliate_of_publicly_traded_entity_certification, publicly_traded_entity, nffe_affiliate_of_publicly_traded_entity_securities_market, excepted_territory_nffe_certification, active_nffe_certification, passive_nffe_certification, passive_nffe_no_substantial_us_owners_certification, passive_nffe_substantial_us_owners_provided_certification, excepted_inter_affiliate_ffi_certification, sponsored_direct_reporting_nffe_certification, direct_reporting_nffe_sponsoring_entity, substantial_us_owners, signer_name, capacity_to_sign_certification].hash end # Builds the object from hash @@ -1244,6 +1101,7 @@ def hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + super(attributes) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| @@ -1320,7 +1178,7 @@ def to_body # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash - hash = {} + hash = super self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? diff --git a/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb b/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb index a337f31..ed93271 100644 --- a/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb @@ -10,7 +10,7 @@ require 'time' module AvalaraSdk::A1099::V2 - class W8BenFormResponse + class W8BenFormResponse < W9FormBaseResponse # The name of the individual or entity associated with the form. attr_accessor :name @@ -89,48 +89,6 @@ class W8BenFormResponse # The capacity in which the signer is signing the form. attr_accessor :signer_capacity - # The unique identifier for the form. - attr_accessor :id - - # The form type. - attr_accessor :type - - # The form status. - attr_accessor :entry_status - - # The timestamp for the latest status update. - attr_accessor :entry_status_date - - # A reference identifier for the form. - attr_accessor :reference_id - - # The ID of the associated company. - attr_accessor :company_id - - # The display name associated with the form. - attr_accessor :display_name - - # The email address of the individual associated with the form. - attr_accessor :email - - # Indicates whether the form is archived. - attr_accessor :archived - - # The signature of the form. - attr_accessor :signature - - # The date the form was signed. - attr_accessor :signed_date - - # The date when e-delivery was consented. - attr_accessor :e_delivery_consented_at - - # The creation date of the form. - attr_accessor :created_at - - # The last updated date of the form. - attr_accessor :updated_at - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -159,27 +117,13 @@ def self.attribute_map :'withholding_rate' => :'withholdingRate', :'income_type' => :'incomeType', :'signer_name' => :'signerName', - :'signer_capacity' => :'signerCapacity', - :'id' => :'id', - :'type' => :'type', - :'entry_status' => :'entryStatus', - :'entry_status_date' => :'entryStatusDate', - :'reference_id' => :'referenceId', - :'company_id' => :'companyId', - :'display_name' => :'displayName', - :'email' => :'email', - :'archived' => :'archived', - :'signature' => :'signature', - :'signed_date' => :'signedDate', - :'e_delivery_consented_at' => :'eDeliveryConsentedAt', - :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt' + :'signer_capacity' => :'signerCapacity' } end - # Returns all the JSON keys this model knows about + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values + attribute_map.values.concat(superclass.acceptable_attributes) end # Attribute type mapping. @@ -210,21 +154,7 @@ def self.openapi_types :'withholding_rate' => :'String', :'income_type' => :'String', :'signer_name' => :'String', - :'signer_capacity' => :'String', - :'id' => :'String', - :'type' => :'String', - :'entry_status' => :'String', - :'entry_status_date' => :'Time', - :'reference_id' => :'String', - :'company_id' => :'String', - :'display_name' => :'String', - :'email' => :'String', - :'archived' => :'Boolean', - :'signature' => :'String', - :'signed_date' => :'Time', - :'e_delivery_consented_at' => :'Time', - :'created_at' => :'Time', - :'updated_at' => :'Time' + :'signer_capacity' => :'String' } end @@ -247,13 +177,7 @@ def self.openapi_nullable :'withholding_rate', :'income_type', :'signer_name', - :'signer_capacity', - :'entry_status_date', - :'reference_id', - :'email', - :'signature', - :'signed_date', - :'e_delivery_consented_at', + :'signer_capacity' ]) end @@ -279,6 +203,9 @@ def initialize(attributes = {}) h[k.to_sym] = v } + # call parent's initialize + super(attributes) + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -382,69 +309,13 @@ def initialize(attributes = {}) if attributes.key?(:'signer_capacity') self.signer_capacity = attributes[:'signer_capacity'] end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'entry_status') - self.entry_status = attributes[:'entry_status'] - end - - if attributes.key?(:'entry_status_date') - self.entry_status_date = attributes[:'entry_status_date'] - end - - if attributes.key?(:'reference_id') - self.reference_id = attributes[:'reference_id'] - end - - if attributes.key?(:'company_id') - self.company_id = attributes[:'company_id'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'archived') - self.archived = attributes[:'archived'] - end - - if attributes.key?(:'signature') - self.signature = attributes[:'signature'] - end - - if attributes.key?(:'signed_date') - self.signed_date = attributes[:'signed_date'] - end - - if attributes.key?(:'e_delivery_consented_at') - self.e_delivery_consented_at = attributes[:'e_delivery_consented_at'] - end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'updated_at') - self.updated_at = attributes[:'updated_at'] - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new + invalid_properties = super invalid_properties end @@ -452,7 +323,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - true + true && super end # Checks equality by comparing each attribute. @@ -485,21 +356,7 @@ def ==(o) withholding_rate == o.withholding_rate && income_type == o.income_type && signer_name == o.signer_name && - signer_capacity == o.signer_capacity && - id == o.id && - type == o.type && - entry_status == o.entry_status && - entry_status_date == o.entry_status_date && - reference_id == o.reference_id && - company_id == o.company_id && - display_name == o.display_name && - email == o.email && - archived == o.archived && - signature == o.signature && - signed_date == o.signed_date && - e_delivery_consented_at == o.e_delivery_consented_at && - created_at == o.created_at && - updated_at == o.updated_at + signer_capacity == o.signer_capacity && super(o) end # @see the `==` method @@ -511,7 +368,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, citizenship_country, residence_address, residence_city, residence_state, residence_zip, residence_country, residence_is_mailing, mailing_address, mailing_city, mailing_state, mailing_zip, mailing_country, tin_type, tin, foreign_tin_not_required, foreign_tin, reference_number, birthday, treaty_country, treaty_article, treaty_reasons, withholding_rate, income_type, signer_name, signer_capacity, id, type, entry_status, entry_status_date, reference_id, company_id, display_name, email, archived, signature, signed_date, e_delivery_consented_at, created_at, updated_at].hash + [name, citizenship_country, residence_address, residence_city, residence_state, residence_zip, residence_country, residence_is_mailing, mailing_address, mailing_city, mailing_state, mailing_zip, mailing_country, tin_type, tin, foreign_tin_not_required, foreign_tin, reference_number, birthday, treaty_country, treaty_article, treaty_reasons, withholding_rate, income_type, signer_name, signer_capacity].hash end # Builds the object from hash @@ -519,6 +376,7 @@ def hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + super(attributes) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| @@ -595,7 +453,7 @@ def to_body # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash - hash = {} + hash = super self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? diff --git a/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb b/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb index 065fc42..a57b2ff 100644 --- a/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb @@ -10,7 +10,7 @@ require 'time' module AvalaraSdk::A1099::V2 - class W8ImyFormResponse + class W8ImyFormResponse < W9FormBaseResponse # The name of the individual or entity associated with the form. attr_accessor :name @@ -344,48 +344,6 @@ class W8ImyFormResponse # The name of the signer. attr_accessor :signer_name - # The unique identifier for the form. - attr_accessor :id - - # The form type. - attr_accessor :type - - # The form status. - attr_accessor :entry_status - - # The timestamp for the latest status update. - attr_accessor :entry_status_date - - # A reference identifier for the form. - attr_accessor :reference_id - - # The ID of the associated company. - attr_accessor :company_id - - # The display name associated with the form. - attr_accessor :display_name - - # The email address of the individual associated with the form. - attr_accessor :email - - # Indicates whether the form is archived. - attr_accessor :archived - - # The signature of the form. - attr_accessor :signature - - # The date the form was signed. - attr_accessor :signed_date - - # The date when e-delivery was consented. - attr_accessor :e_delivery_consented_at - - # The creation date of the form. - attr_accessor :created_at - - # The last updated date of the form. - attr_accessor :updated_at - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -499,27 +457,13 @@ def self.attribute_map :'passive_nffe_certification' => :'passiveNffeCertification', :'sponsored_direct_reporting_nffe_certification' => :'sponsoredDirectReportingNffeCertification', :'direct_reporting_nffe_sponsoring_entity' => :'directReportingNffeSponsoringEntity', - :'signer_name' => :'signerName', - :'id' => :'id', - :'type' => :'type', - :'entry_status' => :'entryStatus', - :'entry_status_date' => :'entryStatusDate', - :'reference_id' => :'referenceId', - :'company_id' => :'companyId', - :'display_name' => :'displayName', - :'email' => :'email', - :'archived' => :'archived', - :'signature' => :'signature', - :'signed_date' => :'signedDate', - :'e_delivery_consented_at' => :'eDeliveryConsentedAt', - :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt' + :'signer_name' => :'signerName' } end - # Returns all the JSON keys this model knows about + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values + attribute_map.values.concat(superclass.acceptable_attributes) end # Attribute type mapping. @@ -635,21 +579,7 @@ def self.openapi_types :'passive_nffe_certification' => :'Boolean', :'sponsored_direct_reporting_nffe_certification' => :'Boolean', :'direct_reporting_nffe_sponsoring_entity' => :'String', - :'signer_name' => :'String', - :'id' => :'String', - :'type' => :'String', - :'entry_status' => :'String', - :'entry_status_date' => :'Time', - :'reference_id' => :'String', - :'company_id' => :'String', - :'display_name' => :'String', - :'email' => :'String', - :'archived' => :'Boolean', - :'signature' => :'String', - :'signed_date' => :'Time', - :'e_delivery_consented_at' => :'Time', - :'created_at' => :'Time', - :'updated_at' => :'Time' + :'signer_name' => :'String' } end @@ -688,13 +618,7 @@ def self.openapi_nullable :'publicly_traded_entity', :'nffe_affiliate_of_publicly_traded_entity_securities_market', :'direct_reporting_nffe_sponsoring_entity', - :'signer_name', - :'entry_status_date', - :'reference_id', - :'email', - :'signature', - :'signed_date', - :'e_delivery_consented_at', + :'signer_name' ]) end @@ -720,6 +644,9 @@ def initialize(attributes = {}) h[k.to_sym] = v } + # call parent's initialize + super(attributes) + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -1163,69 +1090,13 @@ def initialize(attributes = {}) if attributes.key?(:'signer_name') self.signer_name = attributes[:'signer_name'] end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'entry_status') - self.entry_status = attributes[:'entry_status'] - end - - if attributes.key?(:'entry_status_date') - self.entry_status_date = attributes[:'entry_status_date'] - end - - if attributes.key?(:'reference_id') - self.reference_id = attributes[:'reference_id'] - end - - if attributes.key?(:'company_id') - self.company_id = attributes[:'company_id'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'archived') - self.archived = attributes[:'archived'] - end - - if attributes.key?(:'signature') - self.signature = attributes[:'signature'] - end - - if attributes.key?(:'signed_date') - self.signed_date = attributes[:'signed_date'] - end - - if attributes.key?(:'e_delivery_consented_at') - self.e_delivery_consented_at = attributes[:'e_delivery_consented_at'] - end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'updated_at') - self.updated_at = attributes[:'updated_at'] - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new + invalid_properties = super invalid_properties end @@ -1233,7 +1104,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - true + true && super end # Checks equality by comparing each attribute. @@ -1351,21 +1222,7 @@ def ==(o) passive_nffe_certification == o.passive_nffe_certification && sponsored_direct_reporting_nffe_certification == o.sponsored_direct_reporting_nffe_certification && direct_reporting_nffe_sponsoring_entity == o.direct_reporting_nffe_sponsoring_entity && - signer_name == o.signer_name && - id == o.id && - type == o.type && - entry_status == o.entry_status && - entry_status_date == o.entry_status_date && - reference_id == o.reference_id && - company_id == o.company_id && - display_name == o.display_name && - email == o.email && - archived == o.archived && - signature == o.signature && - signed_date == o.signed_date && - e_delivery_consented_at == o.e_delivery_consented_at && - created_at == o.created_at && - updated_at == o.updated_at + signer_name == o.signer_name && super(o) end # @see the `==` method @@ -1377,7 +1234,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, citizenship_country, disregarded_entity, entity_type, fatca_status, residence_address, residence_city, residence_state, residence_zip, residence_country, residence_is_mailing, mailing_address, mailing_city, mailing_state, mailing_zip, mailing_country, tin_type, tin, giin, foreign_tin, reference_number, disregarded_entity_fatca_status, disregarded_address, disregarded_city, disregarded_state, disregarded_zip, disregarded_country, disregarded_entity_giin, qualified_intermediary_certification, qi_primary_withholding_responsibility_certification, qi_withholding_responsibility_for_ptp_sales_certification, qi_nominee_withholding_responsibility_for_ptp_distributions_certification, qi_securities_lender_substitute_dividend_withholding_certification, qi_withholding_and1099_reporting_responsibility_certification, qi_form1099_or_fatca_reporting_responsibility_certification, qi_opt_out_of_form1099_reporting_certification, qi_withholding_rate_pool_certification, qi_intermediary_or_flow_through_entity_documentation_certification, qualified_derivatives_dealer_certification, qdd_corporation, qdd_partnership, qdd_disregarded_entity, nonqualified_intermediary_certification, nqi_withholding_statement_transmission_certification, nqi_withholding_rate_pool_compliance_certification, nqi_qualified_securities_lender_certification, nqi_alternative_withholding_statement_verification_certification, territory_financial_institution_certification, tfi_treated_as_us_person_certification, tfi_withholding_statement_transmission_certification, tfi_treated_as_us_person_for_ptp_sales_certification, tfi_nominee_us_person_for_ptp_distributions_certification, tfi_not_nominee_for_ptp_distributions_certification, us_branch_non_effectively_connected_income_certification, us_branch_agreement_to_be_treated_as_us_person_certification, us_branch_withholding_statement_and_compliance_certification, us_branch_acting_as_us_person_for_ptp_sales_certification, us_branch_nominee_for_ptp_distributions_certification, us_branch_not_nominee_for_ptp_distributions_certification, withholding_foreign_partnership_or_trust_certification, nonwithholding_foreign_entity_withholding_statement_certification, foreign_entity_partner_in_lower_tier_partnership_certification, foreign_partnership_amount_realized_section1446_f_certification, foreign_partnership_modified_amount_realized_certification, foreign_grantor_trust_amount_realized_allocation_certification, alternative_withholding_statement_reliance_certification, np_ffi_with_exempt_beneficial_owners_certification, ffi_sponsoring_entity, investment_entity_certification, controlled_foreign_corporation_certification, owner_documented_ffi_certification, owner_documented_ffi_reporting_statement_certification, owner_documented_ffi_auditor_letter_certification, compliant_nonregistering_local_bank_certification, compliant_ffi_low_value_accounts_certification, sponsored_closely_held_entity_sponsoring_entity, sponsored_closely_held_investment_vehicle_certification, compliant_limited_life_debt_entity_certification, investment_entity_no_financial_accounts_certification, restricted_distributor_certification, restricted_distributor_agreement_certification, restricted_distributor_preexisting_sales_compliance_certification, foreign_central_bank_of_issue_certification, nonreporting_iga_ffi_certification, iga_country, iga_model, iga_legal_status_treatment, iga_ffi_trustee_or_sponsor, iga_ffi_trustee_is_foreign, treaty_qualified_pension_fund_certification, qualified_retirement_fund_certification, narrow_participation_retirement_fund_certification, section401_a_equivalent_pension_plan_certification, investment_entity_for_retirement_funds_certification, exempt_beneficial_owner_sponsored_retirement_fund_certification, excepted_nonfinancial_group_entity_certification, excepted_nonfinancial_start_up_certification, startup_formation_or_resolution_date, excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification, nonfinancial_entity_filing_date, publicly_traded_nffe_certification, publicly_traded_nffe_securities_market, nffe_affiliate_of_publicly_traded_entity_certification, publicly_traded_entity, nffe_affiliate_of_publicly_traded_entity_securities_market, excepted_territory_nffe_certification, active_nffe_certification, passive_nffe_certification, sponsored_direct_reporting_nffe_certification, direct_reporting_nffe_sponsoring_entity, signer_name, id, type, entry_status, entry_status_date, reference_id, company_id, display_name, email, archived, signature, signed_date, e_delivery_consented_at, created_at, updated_at].hash + [name, citizenship_country, disregarded_entity, entity_type, fatca_status, residence_address, residence_city, residence_state, residence_zip, residence_country, residence_is_mailing, mailing_address, mailing_city, mailing_state, mailing_zip, mailing_country, tin_type, tin, giin, foreign_tin, reference_number, disregarded_entity_fatca_status, disregarded_address, disregarded_city, disregarded_state, disregarded_zip, disregarded_country, disregarded_entity_giin, qualified_intermediary_certification, qi_primary_withholding_responsibility_certification, qi_withholding_responsibility_for_ptp_sales_certification, qi_nominee_withholding_responsibility_for_ptp_distributions_certification, qi_securities_lender_substitute_dividend_withholding_certification, qi_withholding_and1099_reporting_responsibility_certification, qi_form1099_or_fatca_reporting_responsibility_certification, qi_opt_out_of_form1099_reporting_certification, qi_withholding_rate_pool_certification, qi_intermediary_or_flow_through_entity_documentation_certification, qualified_derivatives_dealer_certification, qdd_corporation, qdd_partnership, qdd_disregarded_entity, nonqualified_intermediary_certification, nqi_withholding_statement_transmission_certification, nqi_withholding_rate_pool_compliance_certification, nqi_qualified_securities_lender_certification, nqi_alternative_withholding_statement_verification_certification, territory_financial_institution_certification, tfi_treated_as_us_person_certification, tfi_withholding_statement_transmission_certification, tfi_treated_as_us_person_for_ptp_sales_certification, tfi_nominee_us_person_for_ptp_distributions_certification, tfi_not_nominee_for_ptp_distributions_certification, us_branch_non_effectively_connected_income_certification, us_branch_agreement_to_be_treated_as_us_person_certification, us_branch_withholding_statement_and_compliance_certification, us_branch_acting_as_us_person_for_ptp_sales_certification, us_branch_nominee_for_ptp_distributions_certification, us_branch_not_nominee_for_ptp_distributions_certification, withholding_foreign_partnership_or_trust_certification, nonwithholding_foreign_entity_withholding_statement_certification, foreign_entity_partner_in_lower_tier_partnership_certification, foreign_partnership_amount_realized_section1446_f_certification, foreign_partnership_modified_amount_realized_certification, foreign_grantor_trust_amount_realized_allocation_certification, alternative_withholding_statement_reliance_certification, np_ffi_with_exempt_beneficial_owners_certification, ffi_sponsoring_entity, investment_entity_certification, controlled_foreign_corporation_certification, owner_documented_ffi_certification, owner_documented_ffi_reporting_statement_certification, owner_documented_ffi_auditor_letter_certification, compliant_nonregistering_local_bank_certification, compliant_ffi_low_value_accounts_certification, sponsored_closely_held_entity_sponsoring_entity, sponsored_closely_held_investment_vehicle_certification, compliant_limited_life_debt_entity_certification, investment_entity_no_financial_accounts_certification, restricted_distributor_certification, restricted_distributor_agreement_certification, restricted_distributor_preexisting_sales_compliance_certification, foreign_central_bank_of_issue_certification, nonreporting_iga_ffi_certification, iga_country, iga_model, iga_legal_status_treatment, iga_ffi_trustee_or_sponsor, iga_ffi_trustee_is_foreign, treaty_qualified_pension_fund_certification, qualified_retirement_fund_certification, narrow_participation_retirement_fund_certification, section401_a_equivalent_pension_plan_certification, investment_entity_for_retirement_funds_certification, exempt_beneficial_owner_sponsored_retirement_fund_certification, excepted_nonfinancial_group_entity_certification, excepted_nonfinancial_start_up_certification, startup_formation_or_resolution_date, excepted_nonfinancial_entity_in_liquidation_or_bankruptcy_certification, nonfinancial_entity_filing_date, publicly_traded_nffe_certification, publicly_traded_nffe_securities_market, nffe_affiliate_of_publicly_traded_entity_certification, publicly_traded_entity, nffe_affiliate_of_publicly_traded_entity_securities_market, excepted_territory_nffe_certification, active_nffe_certification, passive_nffe_certification, sponsored_direct_reporting_nffe_certification, direct_reporting_nffe_sponsoring_entity, signer_name].hash end # Builds the object from hash @@ -1385,6 +1242,7 @@ def hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + super(attributes) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| @@ -1461,7 +1319,7 @@ def to_body # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash - hash = {} + hash = super self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? diff --git a/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb b/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb index 1474883..9b7447b 100644 --- a/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb @@ -14,9 +14,6 @@ class W9FormBaseResponse # The unique identifier for the form. attr_accessor :id - # The form type. - attr_accessor :type - # The form status. attr_accessor :entry_status @@ -53,11 +50,13 @@ class W9FormBaseResponse # The last updated date of the form. attr_accessor :updated_at + # The type of the response object. + attr_accessor :type + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id' => :'id', - :'type' => :'type', :'entry_status' => :'entryStatus', :'entry_status_date' => :'entryStatusDate', :'reference_id' => :'referenceId', @@ -69,7 +68,8 @@ def self.attribute_map :'signed_date' => :'signedDate', :'e_delivery_consented_at' => :'eDeliveryConsentedAt', :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt' + :'updated_at' => :'updatedAt', + :'type' => :'type' } end @@ -82,7 +82,6 @@ def self.acceptable_attributes def self.openapi_types { :'id' => :'String', - :'type' => :'String', :'entry_status' => :'String', :'entry_status_date' => :'Time', :'reference_id' => :'String', @@ -94,7 +93,8 @@ def self.openapi_types :'signed_date' => :'Time', :'e_delivery_consented_at' => :'Time', :'created_at' => :'Time', - :'updated_at' => :'Time' + :'updated_at' => :'Time', + :'type' => :'String' } end @@ -110,6 +110,11 @@ def self.openapi_nullable ]) end + # discriminator's property name in OpenAPI v3 + def self.openapi_discriminator_name + :'type' + end + # Initializes the object # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) @@ -129,10 +134,6 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - if attributes.key?(:'entry_status') self.entry_status = attributes[:'entry_status'] end @@ -180,6 +181,10 @@ def initialize(attributes = {}) if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -203,7 +208,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && - type == o.type && entry_status == o.entry_status && entry_status_date == o.entry_status_date && reference_id == o.reference_id && @@ -215,7 +219,8 @@ def ==(o) signed_date == o.signed_date && e_delivery_consented_at == o.e_delivery_consented_at && created_at == o.created_at && - updated_at == o.updated_at + updated_at == o.updated_at && + type == o.type end # @see the `==` method @@ -227,7 +232,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, type, entry_status, entry_status_date, reference_id, company_id, display_name, email, archived, signature, signed_date, e_delivery_consented_at, created_at, updated_at].hash + [id, entry_status, entry_status_date, reference_id, company_id, display_name, email, archived, signature, signed_date, e_delivery_consented_at, created_at, updated_at, type].hash end # Builds the object from hash diff --git a/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb b/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb index f218066..6ccf69e 100644 --- a/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb +++ b/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb @@ -10,7 +10,7 @@ require 'time' module AvalaraSdk::A1099::V2 - class W9FormResponse + class W9FormResponse < W9FormBaseResponse # The name of the individual or entity associated with the form. attr_accessor :name @@ -68,48 +68,6 @@ class W9FormResponse # The TIN Match status from IRS. attr_accessor :tin_match_status - # The unique identifier for the form. - attr_accessor :id - - # The form type. - attr_accessor :type - - # The form status. - attr_accessor :entry_status - - # The timestamp for the latest status update. - attr_accessor :entry_status_date - - # A reference identifier for the form. - attr_accessor :reference_id - - # The ID of the associated company. - attr_accessor :company_id - - # The display name associated with the form. - attr_accessor :display_name - - # The email address of the individual associated with the form. - attr_accessor :email - - # Indicates whether the form is archived. - attr_accessor :archived - - # The signature of the form. - attr_accessor :signature - - # The date the form was signed. - attr_accessor :signed_date - - # The date when e-delivery was consented. - attr_accessor :e_delivery_consented_at - - # The creation date of the form. - attr_accessor :created_at - - # The last updated date of the form. - attr_accessor :updated_at - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -131,27 +89,13 @@ def self.attribute_map :'tin' => :'tin', :'backup_withholding' => :'backupWithholding', :'is1099able' => :'is1099able', - :'tin_match_status' => :'tinMatchStatus', - :'id' => :'id', - :'type' => :'type', - :'entry_status' => :'entryStatus', - :'entry_status_date' => :'entryStatusDate', - :'reference_id' => :'referenceId', - :'company_id' => :'companyId', - :'display_name' => :'displayName', - :'email' => :'email', - :'archived' => :'archived', - :'signature' => :'signature', - :'signed_date' => :'signedDate', - :'e_delivery_consented_at' => :'eDeliveryConsentedAt', - :'created_at' => :'createdAt', - :'updated_at' => :'updatedAt' + :'tin_match_status' => :'tinMatchStatus' } end - # Returns all the JSON keys this model knows about + # Returns all the JSON keys this model knows about, including the ones defined in its parent(s) def self.acceptable_attributes - attribute_map.values + attribute_map.values.concat(superclass.acceptable_attributes) end # Attribute type mapping. @@ -175,21 +119,7 @@ def self.openapi_types :'tin' => :'String', :'backup_withholding' => :'Boolean', :'is1099able' => :'Boolean', - :'tin_match_status' => :'TinMatchStatusResponse', - :'id' => :'String', - :'type' => :'String', - :'entry_status' => :'String', - :'entry_status_date' => :'Time', - :'reference_id' => :'String', - :'company_id' => :'String', - :'display_name' => :'String', - :'email' => :'String', - :'archived' => :'Boolean', - :'signature' => :'String', - :'signed_date' => :'Time', - :'e_delivery_consented_at' => :'Time', - :'created_at' => :'Time', - :'updated_at' => :'Time' + :'tin_match_status' => :'TinMatchStatusResponse' } end @@ -205,12 +135,6 @@ def self.openapi_nullable :'state', :'zip', :'account_number', - :'entry_status_date', - :'reference_id', - :'email', - :'signature', - :'signed_date', - :'e_delivery_consented_at', ]) end @@ -236,6 +160,9 @@ def initialize(attributes = {}) h[k.to_sym] = v } + # call parent's initialize + super(attributes) + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -311,69 +238,13 @@ def initialize(attributes = {}) if attributes.key?(:'tin_match_status') self.tin_match_status = attributes[:'tin_match_status'] end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'entry_status') - self.entry_status = attributes[:'entry_status'] - end - - if attributes.key?(:'entry_status_date') - self.entry_status_date = attributes[:'entry_status_date'] - end - - if attributes.key?(:'reference_id') - self.reference_id = attributes[:'reference_id'] - end - - if attributes.key?(:'company_id') - self.company_id = attributes[:'company_id'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'email') - self.email = attributes[:'email'] - end - - if attributes.key?(:'archived') - self.archived = attributes[:'archived'] - end - - if attributes.key?(:'signature') - self.signature = attributes[:'signature'] - end - - if attributes.key?(:'signed_date') - self.signed_date = attributes[:'signed_date'] - end - - if attributes.key?(:'e_delivery_consented_at') - self.e_delivery_consented_at = attributes[:'e_delivery_consented_at'] - end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'updated_at') - self.updated_at = attributes[:'updated_at'] - end end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' - invalid_properties = Array.new + invalid_properties = super invalid_properties end @@ -381,7 +252,7 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' - true + true && super end # Checks equality by comparing each attribute. @@ -407,21 +278,7 @@ def ==(o) tin == o.tin && backup_withholding == o.backup_withholding && is1099able == o.is1099able && - tin_match_status == o.tin_match_status && - id == o.id && - type == o.type && - entry_status == o.entry_status && - entry_status_date == o.entry_status_date && - reference_id == o.reference_id && - company_id == o.company_id && - display_name == o.display_name && - email == o.email && - archived == o.archived && - signature == o.signature && - signed_date == o.signed_date && - e_delivery_consented_at == o.e_delivery_consented_at && - created_at == o.created_at && - updated_at == o.updated_at + tin_match_status == o.tin_match_status && super(o) end # @see the `==` method @@ -433,7 +290,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, business_name, business_classification, business_other, foreign_partner_owner_or_beneficiary, exempt_payee_code, exempt_fatca_code, foreign_country_indicator, address, foreign_address, city, state, zip, account_number, tin_type, tin, backup_withholding, is1099able, tin_match_status, id, type, entry_status, entry_status_date, reference_id, company_id, display_name, email, archived, signature, signed_date, e_delivery_consented_at, created_at, updated_at].hash + [name, business_name, business_classification, business_other, foreign_partner_owner_or_beneficiary, exempt_payee_code, exempt_fatca_code, foreign_country_indicator, address, foreign_address, city, state, zip, account_number, tin_type, tin, backup_withholding, is1099able, tin_match_status].hash end # Builds the object from hash @@ -441,6 +298,7 @@ def hash # @return [Object] Returns the model itself def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) + super(attributes) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| @@ -517,7 +375,7 @@ def to_body # Returns the object in the form of hash # @return [Hash] Returns the object in the form of hash def to_hash - hash = {} + hash = super self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil?