avalara_sdk 25.8.2 → 25.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +18 -79
- data/docs/A1099/V2/CompaniesW9Api.md +18 -18
- data/docs/A1099/V2/CompanyCreateUpdateRequestModel.md +18 -18
- data/docs/A1099/V2/CompanyResponse.md +37 -37
- data/docs/A1099/V2/CoveredIndividual.md +56 -0
- data/docs/A1099/V2/CreateAndSendW9FormEmailRequest.md +55 -0
- data/docs/A1099/V2/CreateCompanyRequest.md +49 -0
- data/docs/A1099/V2/CreateIssuerRequest.md +49 -0
- data/docs/A1099/V2/EntryStatusResponse.md +20 -0
- data/docs/A1099/V2/Form1042S.md +83 -83
- data/docs/A1099/V2/Form1095B.md +72 -62
- data/docs/A1099/V2/Form1095C.md +112 -0
- data/docs/A1099/V2/Form1099Base.md +60 -60
- data/docs/A1099/V2/Form1099Div.md +79 -77
- data/docs/A1099/V2/Form1099Int.md +76 -74
- data/docs/A1099/V2/Form1099K.md +83 -83
- data/docs/A1099/V2/Form1099ListRequest.md +20 -0
- data/docs/A1099/V2/Form1099Misc.md +79 -77
- data/docs/A1099/V2/Form1099Nec.md +64 -64
- data/docs/A1099/V2/Form1099R.md +95 -93
- data/docs/A1099/V2/Forms1099Api.md +45 -41
- data/docs/A1099/V2/FormsW9Api.md +98 -14
- data/docs/A1099/V2/Get1099Form200Response.md +19 -19
- data/docs/A1099/V2/IntermediaryOrFlowThrough.md +11 -11
- data/docs/A1099/V2/IssuerCommand.md +16 -16
- data/docs/A1099/V2/IssuerResponse.md +35 -35
- data/docs/A1099/V2/Issuers1099Api.md +10 -10
- data/docs/A1099/V2/JobResponse.md +56 -0
- data/docs/A1099/V2/JobsApi.md +91 -0
- data/docs/A1099/V2/OfferAndCoverage.md +28 -0
- data/docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md +22 -0
- data/docs/A1099/V2/PrimaryWithholdingAgent.md +4 -4
- data/docs/A1099/V2/StateAndLocalWithholding.md +8 -8
- data/docs/A1099/V2/ValidationError.md +2 -2
- data/docs/A1099/V2/W4FormMinimalRequest.md +30 -0
- data/docs/A1099/V2/W4FormRequest.md +6 -6
- data/docs/A1099/V2/W8BenEFormMinimalRequest.md +28 -0
- data/docs/A1099/V2/W8BenEFormRequest.md +6 -6
- data/docs/A1099/V2/W8BenFormMinimalRequest.md +28 -0
- data/docs/A1099/V2/W8BenFormRequest.md +6 -6
- data/docs/A1099/V2/W8ImyFormMinimalRequest.md +28 -0
- data/docs/A1099/V2/W8ImyFormRequest.md +6 -6
- data/docs/A1099/V2/W9FormBaseMinimalRequest.md +24 -0
- data/docs/A1099/V2/W9FormBaseRequest.md +6 -6
- data/docs/A1099/V2/W9FormBaseResponse.md +3 -3
- data/docs/A1099/V2/W9FormMinimalRequest.md +28 -0
- data/docs/A1099/V2/W9FormRequest.md +6 -6
- data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +27 -27
- data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +89 -57
- data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +144 -6
- data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +21 -21
- data/lib/avalara_sdk/api/A1099/V2/{jobs1099_api.rb → jobs_api.rb} +9 -9
- data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/company_create_update_request_model.rb +58 -17
- data/lib/avalara_sdk/models/A1099/V2/company_response.rb +110 -69
- data/lib/avalara_sdk/models/A1099/V2/{covered_individual_request.rb → covered_individual.rb} +36 -7
- data/lib/avalara_sdk/models/A1099/V2/{i_create_form1099_request.rb → create_and_send_w9_form_email_request.rb} +6 -5
- data/lib/avalara_sdk/models/A1099/V2/{error_response_errors_inner.rb → create_company_request.rb} +3 -3
- data/lib/avalara_sdk/models/A1099/V2/{i_update_form1099_request.rb → create_issuer_request.rb} +3 -5
- data/lib/avalara_sdk/models/A1099/V2/{status_detail.rb → entry_status_response.rb} +20 -18
- data/lib/avalara_sdk/models/A1099/V2/form1042_s.rb +424 -179
- data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +365 -179
- data/lib/avalara_sdk/models/A1099/V2/{form1095_b_response.rb → form1095_c.rb} +259 -111
- data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +286 -177
- data/lib/avalara_sdk/models/A1099/V2/form1099_div.rb +310 -171
- data/lib/avalara_sdk/models/A1099/V2/form1099_int.rb +308 -174
- data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +298 -186
- data/lib/avalara_sdk/models/A1099/V2/{form1099_div_list.rb → form1099_list_request.rb} +49 -22
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +337 -201
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +298 -183
- data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +414 -274
- data/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +9 -9
- data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through.rb +13 -1
- data/lib/avalara_sdk/models/A1099/V2/issuer_command.rb +42 -23
- data/lib/avalara_sdk/models/A1099/V2/issuer_response.rb +77 -46
- data/lib/avalara_sdk/models/A1099/V2/{job_result.rb → job_response.rb} +108 -42
- data/lib/avalara_sdk/models/A1099/V2/{offer_and_coverage_request.rb → offer_and_coverage.rb} +79 -9
- data/lib/avalara_sdk/models/A1099/V2/{paginated_query_result_model.rb → paginated_query_result_model_form1099_base.rb} +4 -4
- data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent.rb +23 -16
- data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb +8 -0
- data/lib/avalara_sdk/models/A1099/V2/validation_error.rb +2 -0
- data/lib/avalara_sdk/models/A1099/V2/w4_form_minimal_request.rb +418 -0
- data/lib/avalara_sdk/models/A1099/V2/w4_form_request.rb +53 -27
- data/lib/avalara_sdk/models/A1099/V2/{company_model.rb → w8_ben_e_form_minimal_request.rb} +139 -170
- data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb +53 -27
- data/lib/avalara_sdk/models/A1099/V2/{base_company_model.rb → w8_ben_form_minimal_request.rb} +148 -122
- data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb +53 -27
- data/lib/avalara_sdk/models/A1099/V2/{attribute.rb → w8_imy_form_minimal_request.rb} +135 -132
- data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_request.rb +53 -27
- data/lib/avalara_sdk/models/A1099/V2/{http_validation_problem_details.rb → w9_form_base_minimal_request.rb} +87 -53
- data/lib/avalara_sdk/models/A1099/V2/w9_form_base_request.rb +60 -27
- data/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +14 -14
- data/lib/avalara_sdk/models/A1099/V2/{company_response_model.rb → w9_form_minimal_request.rb} +140 -148
- data/lib/avalara_sdk/models/A1099/V2/w9_form_request.rb +53 -27
- data/lib/avalara_sdk/version.rb +1 -1
- data/lib/avalara_sdk.rb +22 -105
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
- metadata +37 -103
- data/lib/avalara_sdk/models/A1099/V2/base_form_list_request.rb +0 -210
- data/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +0 -108
- data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +0 -403
- data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference_response.rb +0 -407
- data/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb +0 -108
- data/lib/avalara_sdk/models/A1099/V2/data.rb +0 -237
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_list.rb +0 -238
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb +0 -816
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item_response.rb +0 -980
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb +0 -778
- data/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb +0 -619
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_list.rb +0 -238
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +0 -606
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item_response.rb +0 -765
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +0 -627
- data/lib/avalara_sdk/models/A1099/V2/form1095_c_list.rb +0 -238
- data/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb +0 -662
- data/lib/avalara_sdk/models/A1099/V2/form1099_base_response.rb +0 -726
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +0 -747
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb +0 -931
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +0 -729
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +0 -790
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_list.rb +0 -238
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item.rb +0 -702
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb +0 -887
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_request.rb +0 -684
- data/lib/avalara_sdk/models/A1099/V2/form1099_int_response.rb +0 -773
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_list.rb +0 -238
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +0 -788
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item_response.rb +0 -995
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +0 -770
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb +0 -839
- data/lib/avalara_sdk/models/A1099/V2/form1099_list.rb +0 -219
- data/lib/avalara_sdk/models/A1099/V2/form1099_list_data_inner.rb +0 -55
- data/lib/avalara_sdk/models/A1099/V2/form1099_list_response.rb +0 -220
- data/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb +0 -108
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list.rb +0 -238
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +0 -688
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item_response.rb +0 -886
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +0 -670
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +0 -754
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list.rb +0 -238
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +0 -586
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item_response.rb +0 -765
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +0 -567
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +0 -646
- data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb +0 -228
- data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb +0 -107
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_list.rb +0 -238
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +0 -763
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb +0 -942
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +0 -720
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_response.rb +0 -839
- data/lib/avalara_sdk/models/A1099/V2/form1099_status_detail_response.rb +0 -223
- data/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +0 -502
- data/lib/avalara_sdk/models/A1099/V2/form_request_csv_base.rb +0 -475
- data/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb +0 -548
- data/lib/avalara_sdk/models/A1099/V2/form_request_model.rb +0 -345
- data/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +0 -612
- data/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +0 -530
- data/lib/avalara_sdk/models/A1099/V2/included_base.rb +0 -219
- data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through_request.rb +0 -311
- data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through_response.rb +0 -311
- data/lib/avalara_sdk/models/A1099/V2/link.rb +0 -210
- data/lib/avalara_sdk/models/A1099/V2/paginated_w9_forms_model.rb +0 -231
- data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent_request.rb +0 -221
- data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent_response.rb +0 -221
- data/lib/avalara_sdk/models/A1099/V2/problem_details.rb +0 -251
- data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_request.rb +0 -278
- data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_response.rb +0 -282
- data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_app.rb +0 -231
- data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_response.rb +0 -231
- data/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +0 -108
- data/lib/avalara_sdk/models/A1099/V2/validation_error_app.rb +0 -229
- data/lib/avalara_sdk/models/A1099/V2/validation_error_response.rb +0 -231
- data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response.rb +0 -233
- data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner.rb +0 -274
- data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_addresses_inner.rb +0 -251
- data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_identifiers_inner.rb +0 -221
- data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_supported_document_types_inner.rb +0 -241
- data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request.rb +0 -224
- data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request_data_inner.rb +0 -237
- data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request_metadata.rb +0 -288
- data/lib/avalara_sdk/models/EInvoicing/V1/submit_document_data.rb +0 -216
@@ -1,778 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Avalara 1099 & W-9 API Definition
|
3
|
-
|
4
|
-
### 🔐 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)
|
5
|
-
|
6
|
-
|
7
|
-
=end
|
8
|
-
|
9
|
-
require 'date'
|
10
|
-
require 'time'
|
11
|
-
|
12
|
-
module AvalaraSdk::A1099::V2
|
13
|
-
class Form1042SRequest
|
14
|
-
# Unique form identifier
|
15
|
-
attr_accessor :unique_form_id
|
16
|
-
|
17
|
-
# Recipient's date of birth
|
18
|
-
attr_accessor :recipient_date_of_birth
|
19
|
-
|
20
|
-
# Recipient's GIIN (Global Intermediary Identification Number)
|
21
|
-
attr_accessor :recipient_giin
|
22
|
-
|
23
|
-
# Recipient's foreign TIN
|
24
|
-
attr_accessor :recipient_foreign_tin
|
25
|
-
|
26
|
-
# Limitation on benefits code
|
27
|
-
attr_accessor :lob_code
|
28
|
-
|
29
|
-
# Income code
|
30
|
-
attr_accessor :income_code
|
31
|
-
|
32
|
-
# Gross income
|
33
|
-
attr_accessor :gross_income
|
34
|
-
|
35
|
-
# Withholding indicator
|
36
|
-
attr_accessor :withholding_indicator
|
37
|
-
|
38
|
-
# Country code
|
39
|
-
attr_accessor :tax_country_code
|
40
|
-
|
41
|
-
# Exemption code (Chapter 3)
|
42
|
-
attr_accessor :exemption_code_chap3
|
43
|
-
|
44
|
-
# Exemption code (Chapter 4)
|
45
|
-
attr_accessor :exemption_code_chap4
|
46
|
-
|
47
|
-
# Tax rate (Chapter 3)
|
48
|
-
attr_accessor :tax_rate_chap3
|
49
|
-
|
50
|
-
# Withholding allowance
|
51
|
-
attr_accessor :withholding_allowance
|
52
|
-
|
53
|
-
# Federal tax withheld
|
54
|
-
attr_accessor :federal_tax_withheld
|
55
|
-
|
56
|
-
# Tax not deposited indicator
|
57
|
-
attr_accessor :tax_not_deposited_indicator
|
58
|
-
|
59
|
-
# Academic indicator
|
60
|
-
attr_accessor :academic_indicator
|
61
|
-
|
62
|
-
# Tax withheld by other agents
|
63
|
-
attr_accessor :tax_withheld_other_agents
|
64
|
-
|
65
|
-
# Amount repaid to recipient
|
66
|
-
attr_accessor :amount_repaid
|
67
|
-
|
68
|
-
# Tax paid by withholding agent
|
69
|
-
attr_accessor :tax_paid_agent
|
70
|
-
|
71
|
-
# Chapter 3 status code
|
72
|
-
attr_accessor :chap3_status_code
|
73
|
-
|
74
|
-
# Chapter 4 status code
|
75
|
-
attr_accessor :chap4_status_code
|
76
|
-
|
77
|
-
# Primary withholding agent information
|
78
|
-
attr_accessor :primary_withholding_agent
|
79
|
-
|
80
|
-
# Intermediary or flow-through entity information
|
81
|
-
attr_accessor :intermediary_or_flow_through
|
82
|
-
|
83
|
-
# State and local withholding information
|
84
|
-
attr_accessor :state_and_local_withholding
|
85
|
-
|
86
|
-
attr_accessor :type
|
87
|
-
|
88
|
-
# Issuer ID
|
89
|
-
attr_accessor :issuer_id
|
90
|
-
|
91
|
-
# Reference ID
|
92
|
-
attr_accessor :reference_id
|
93
|
-
|
94
|
-
# Recipient Tax ID Number
|
95
|
-
attr_accessor :recipient_tin
|
96
|
-
|
97
|
-
# Recipient name
|
98
|
-
attr_accessor :recipient_name
|
99
|
-
|
100
|
-
# Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN
|
101
|
-
attr_accessor :tin_type
|
102
|
-
|
103
|
-
# Recipient second name
|
104
|
-
attr_accessor :recipient_second_name
|
105
|
-
|
106
|
-
# Address
|
107
|
-
attr_accessor :address
|
108
|
-
|
109
|
-
# Address line 2
|
110
|
-
attr_accessor :address2
|
111
|
-
|
112
|
-
# City
|
113
|
-
attr_accessor :city
|
114
|
-
|
115
|
-
# US state. Required if CountryCode is \"US\".
|
116
|
-
attr_accessor :state
|
117
|
-
|
118
|
-
# Zip/postal code
|
119
|
-
attr_accessor :zip
|
120
|
-
|
121
|
-
# Recipient email address
|
122
|
-
attr_accessor :email
|
123
|
-
|
124
|
-
# Account number
|
125
|
-
attr_accessor :account_number
|
126
|
-
|
127
|
-
# Office code
|
128
|
-
attr_accessor :office_code
|
129
|
-
|
130
|
-
# Foreign province
|
131
|
-
attr_accessor :non_us_province
|
132
|
-
|
133
|
-
# Country code, as defined at https://www.irs.gov/e-file-providers/country-codes
|
134
|
-
attr_accessor :country_code
|
135
|
-
|
136
|
-
# Boolean indicating that federal e-filing should be scheduled for this form
|
137
|
-
attr_accessor :federal_e_file
|
138
|
-
|
139
|
-
# Boolean indicating that postal mailing to the recipient should be scheduled for this form
|
140
|
-
attr_accessor :postal_mail
|
141
|
-
|
142
|
-
# Boolean indicating that state e-filing should be scheduled for this form
|
143
|
-
attr_accessor :state_e_file
|
144
|
-
|
145
|
-
# Boolean indicating that TIN Matching should be scheduled for this form
|
146
|
-
attr_accessor :tin_match
|
147
|
-
|
148
|
-
# Indicates whether the recipient has no TIN
|
149
|
-
attr_accessor :no_tin
|
150
|
-
|
151
|
-
# Second TIN notice in three years
|
152
|
-
attr_accessor :second_tin_notice
|
153
|
-
|
154
|
-
# Fatca filing requirement
|
155
|
-
attr_accessor :fatca_filing_requirement
|
156
|
-
|
157
|
-
# Boolean indicating that address verification should be scheduled for this form
|
158
|
-
attr_accessor :address_verification
|
159
|
-
|
160
|
-
class EnumAttributeValidator
|
161
|
-
attr_reader :datatype
|
162
|
-
attr_reader :allowable_values
|
163
|
-
|
164
|
-
def initialize(datatype, allowable_values)
|
165
|
-
@allowable_values = allowable_values.map do |value|
|
166
|
-
case datatype.to_s
|
167
|
-
when /Integer/i
|
168
|
-
value.to_i
|
169
|
-
when /Float/i
|
170
|
-
value.to_f
|
171
|
-
else
|
172
|
-
value
|
173
|
-
end
|
174
|
-
end
|
175
|
-
end
|
176
|
-
|
177
|
-
def valid?(value)
|
178
|
-
!value || allowable_values.include?(value)
|
179
|
-
end
|
180
|
-
end
|
181
|
-
|
182
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
183
|
-
def self.attribute_map
|
184
|
-
{
|
185
|
-
:'unique_form_id' => :'uniqueFormId',
|
186
|
-
:'recipient_date_of_birth' => :'recipientDateOfBirth',
|
187
|
-
:'recipient_giin' => :'recipientGiin',
|
188
|
-
:'recipient_foreign_tin' => :'recipientForeignTin',
|
189
|
-
:'lob_code' => :'lobCode',
|
190
|
-
:'income_code' => :'incomeCode',
|
191
|
-
:'gross_income' => :'grossIncome',
|
192
|
-
:'withholding_indicator' => :'withholdingIndicator',
|
193
|
-
:'tax_country_code' => :'taxCountryCode',
|
194
|
-
:'exemption_code_chap3' => :'exemptionCodeChap3',
|
195
|
-
:'exemption_code_chap4' => :'exemptionCodeChap4',
|
196
|
-
:'tax_rate_chap3' => :'taxRateChap3',
|
197
|
-
:'withholding_allowance' => :'withholdingAllowance',
|
198
|
-
:'federal_tax_withheld' => :'federalTaxWithheld',
|
199
|
-
:'tax_not_deposited_indicator' => :'taxNotDepositedIndicator',
|
200
|
-
:'academic_indicator' => :'academicIndicator',
|
201
|
-
:'tax_withheld_other_agents' => :'taxWithheldOtherAgents',
|
202
|
-
:'amount_repaid' => :'amountRepaid',
|
203
|
-
:'tax_paid_agent' => :'taxPaidAgent',
|
204
|
-
:'chap3_status_code' => :'chap3StatusCode',
|
205
|
-
:'chap4_status_code' => :'chap4StatusCode',
|
206
|
-
:'primary_withholding_agent' => :'primaryWithholdingAgent',
|
207
|
-
:'intermediary_or_flow_through' => :'intermediaryOrFlowThrough',
|
208
|
-
:'state_and_local_withholding' => :'stateAndLocalWithholding',
|
209
|
-
:'type' => :'type',
|
210
|
-
:'issuer_id' => :'issuerId',
|
211
|
-
:'reference_id' => :'referenceId',
|
212
|
-
:'recipient_tin' => :'recipientTin',
|
213
|
-
:'recipient_name' => :'recipientName',
|
214
|
-
:'tin_type' => :'tinType',
|
215
|
-
:'recipient_second_name' => :'recipientSecondName',
|
216
|
-
:'address' => :'address',
|
217
|
-
:'address2' => :'address2',
|
218
|
-
:'city' => :'city',
|
219
|
-
:'state' => :'state',
|
220
|
-
:'zip' => :'zip',
|
221
|
-
:'email' => :'email',
|
222
|
-
:'account_number' => :'accountNumber',
|
223
|
-
:'office_code' => :'officeCode',
|
224
|
-
:'non_us_province' => :'nonUsProvince',
|
225
|
-
:'country_code' => :'countryCode',
|
226
|
-
:'federal_e_file' => :'federalEFile',
|
227
|
-
:'postal_mail' => :'postalMail',
|
228
|
-
:'state_e_file' => :'stateEFile',
|
229
|
-
:'tin_match' => :'tinMatch',
|
230
|
-
:'no_tin' => :'noTin',
|
231
|
-
:'second_tin_notice' => :'secondTinNotice',
|
232
|
-
:'fatca_filing_requirement' => :'fatcaFilingRequirement',
|
233
|
-
:'address_verification' => :'addressVerification'
|
234
|
-
}
|
235
|
-
end
|
236
|
-
|
237
|
-
# Returns all the JSON keys this model knows about
|
238
|
-
def self.acceptable_attributes
|
239
|
-
attribute_map.values
|
240
|
-
end
|
241
|
-
|
242
|
-
# Attribute type mapping.
|
243
|
-
def self.openapi_types
|
244
|
-
{
|
245
|
-
:'unique_form_id' => :'String',
|
246
|
-
:'recipient_date_of_birth' => :'Time',
|
247
|
-
:'recipient_giin' => :'String',
|
248
|
-
:'recipient_foreign_tin' => :'String',
|
249
|
-
:'lob_code' => :'String',
|
250
|
-
:'income_code' => :'String',
|
251
|
-
:'gross_income' => :'Float',
|
252
|
-
:'withholding_indicator' => :'String',
|
253
|
-
:'tax_country_code' => :'String',
|
254
|
-
:'exemption_code_chap3' => :'String',
|
255
|
-
:'exemption_code_chap4' => :'String',
|
256
|
-
:'tax_rate_chap3' => :'String',
|
257
|
-
:'withholding_allowance' => :'Float',
|
258
|
-
:'federal_tax_withheld' => :'Float',
|
259
|
-
:'tax_not_deposited_indicator' => :'Boolean',
|
260
|
-
:'academic_indicator' => :'Boolean',
|
261
|
-
:'tax_withheld_other_agents' => :'Float',
|
262
|
-
:'amount_repaid' => :'Float',
|
263
|
-
:'tax_paid_agent' => :'Float',
|
264
|
-
:'chap3_status_code' => :'String',
|
265
|
-
:'chap4_status_code' => :'String',
|
266
|
-
:'primary_withholding_agent' => :'PrimaryWithholdingAgentRequest',
|
267
|
-
:'intermediary_or_flow_through' => :'IntermediaryOrFlowThroughRequest',
|
268
|
-
:'state_and_local_withholding' => :'StateAndLocalWithholdingRequest',
|
269
|
-
:'type' => :'String',
|
270
|
-
:'issuer_id' => :'String',
|
271
|
-
:'reference_id' => :'String',
|
272
|
-
:'recipient_tin' => :'String',
|
273
|
-
:'recipient_name' => :'String',
|
274
|
-
:'tin_type' => :'String',
|
275
|
-
:'recipient_second_name' => :'String',
|
276
|
-
:'address' => :'String',
|
277
|
-
:'address2' => :'String',
|
278
|
-
:'city' => :'String',
|
279
|
-
:'state' => :'String',
|
280
|
-
:'zip' => :'String',
|
281
|
-
:'email' => :'String',
|
282
|
-
:'account_number' => :'String',
|
283
|
-
:'office_code' => :'String',
|
284
|
-
:'non_us_province' => :'String',
|
285
|
-
:'country_code' => :'String',
|
286
|
-
:'federal_e_file' => :'Boolean',
|
287
|
-
:'postal_mail' => :'Boolean',
|
288
|
-
:'state_e_file' => :'Boolean',
|
289
|
-
:'tin_match' => :'Boolean',
|
290
|
-
:'no_tin' => :'Boolean',
|
291
|
-
:'second_tin_notice' => :'Boolean',
|
292
|
-
:'fatca_filing_requirement' => :'Boolean',
|
293
|
-
:'address_verification' => :'Boolean'
|
294
|
-
}
|
295
|
-
end
|
296
|
-
|
297
|
-
# List of attributes with nullable: true
|
298
|
-
def self.openapi_nullable
|
299
|
-
Set.new([
|
300
|
-
:'recipient_date_of_birth',
|
301
|
-
:'recipient_giin',
|
302
|
-
:'recipient_foreign_tin',
|
303
|
-
:'lob_code',
|
304
|
-
:'income_code',
|
305
|
-
:'withholding_indicator',
|
306
|
-
:'tax_country_code',
|
307
|
-
:'exemption_code_chap3',
|
308
|
-
:'exemption_code_chap4',
|
309
|
-
:'tax_rate_chap3',
|
310
|
-
:'withholding_allowance',
|
311
|
-
:'federal_tax_withheld',
|
312
|
-
:'tax_not_deposited_indicator',
|
313
|
-
:'academic_indicator',
|
314
|
-
:'tax_withheld_other_agents',
|
315
|
-
:'amount_repaid',
|
316
|
-
:'tax_paid_agent',
|
317
|
-
:'chap3_status_code',
|
318
|
-
:'chap4_status_code',
|
319
|
-
:'issuer_id',
|
320
|
-
:'reference_id',
|
321
|
-
:'recipient_tin',
|
322
|
-
:'recipient_name',
|
323
|
-
:'recipient_second_name',
|
324
|
-
:'address',
|
325
|
-
:'address2',
|
326
|
-
:'city',
|
327
|
-
:'state',
|
328
|
-
:'zip',
|
329
|
-
:'email',
|
330
|
-
:'account_number',
|
331
|
-
:'office_code',
|
332
|
-
:'non_us_province',
|
333
|
-
:'country_code',
|
334
|
-
:'second_tin_notice',
|
335
|
-
])
|
336
|
-
end
|
337
|
-
|
338
|
-
# List of class defined in allOf (OpenAPI v3)
|
339
|
-
def self.openapi_all_of
|
340
|
-
[
|
341
|
-
:'FormSingleRequestBase'
|
342
|
-
]
|
343
|
-
end
|
344
|
-
|
345
|
-
# Initializes the object
|
346
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
347
|
-
def initialize(attributes = {})
|
348
|
-
if (!attributes.is_a?(Hash))
|
349
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1042SRequest` initialize method"
|
350
|
-
end
|
351
|
-
|
352
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
353
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
354
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
355
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1042SRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
356
|
-
end
|
357
|
-
h[k.to_sym] = v
|
358
|
-
}
|
359
|
-
|
360
|
-
if attributes.key?(:'unique_form_id')
|
361
|
-
self.unique_form_id = attributes[:'unique_form_id']
|
362
|
-
end
|
363
|
-
|
364
|
-
if attributes.key?(:'recipient_date_of_birth')
|
365
|
-
self.recipient_date_of_birth = attributes[:'recipient_date_of_birth']
|
366
|
-
end
|
367
|
-
|
368
|
-
if attributes.key?(:'recipient_giin')
|
369
|
-
self.recipient_giin = attributes[:'recipient_giin']
|
370
|
-
end
|
371
|
-
|
372
|
-
if attributes.key?(:'recipient_foreign_tin')
|
373
|
-
self.recipient_foreign_tin = attributes[:'recipient_foreign_tin']
|
374
|
-
end
|
375
|
-
|
376
|
-
if attributes.key?(:'lob_code')
|
377
|
-
self.lob_code = attributes[:'lob_code']
|
378
|
-
end
|
379
|
-
|
380
|
-
if attributes.key?(:'income_code')
|
381
|
-
self.income_code = attributes[:'income_code']
|
382
|
-
end
|
383
|
-
|
384
|
-
if attributes.key?(:'gross_income')
|
385
|
-
self.gross_income = attributes[:'gross_income']
|
386
|
-
end
|
387
|
-
|
388
|
-
if attributes.key?(:'withholding_indicator')
|
389
|
-
self.withholding_indicator = attributes[:'withholding_indicator']
|
390
|
-
end
|
391
|
-
|
392
|
-
if attributes.key?(:'tax_country_code')
|
393
|
-
self.tax_country_code = attributes[:'tax_country_code']
|
394
|
-
end
|
395
|
-
|
396
|
-
if attributes.key?(:'exemption_code_chap3')
|
397
|
-
self.exemption_code_chap3 = attributes[:'exemption_code_chap3']
|
398
|
-
end
|
399
|
-
|
400
|
-
if attributes.key?(:'exemption_code_chap4')
|
401
|
-
self.exemption_code_chap4 = attributes[:'exemption_code_chap4']
|
402
|
-
end
|
403
|
-
|
404
|
-
if attributes.key?(:'tax_rate_chap3')
|
405
|
-
self.tax_rate_chap3 = attributes[:'tax_rate_chap3']
|
406
|
-
end
|
407
|
-
|
408
|
-
if attributes.key?(:'withholding_allowance')
|
409
|
-
self.withholding_allowance = attributes[:'withholding_allowance']
|
410
|
-
end
|
411
|
-
|
412
|
-
if attributes.key?(:'federal_tax_withheld')
|
413
|
-
self.federal_tax_withheld = attributes[:'federal_tax_withheld']
|
414
|
-
end
|
415
|
-
|
416
|
-
if attributes.key?(:'tax_not_deposited_indicator')
|
417
|
-
self.tax_not_deposited_indicator = attributes[:'tax_not_deposited_indicator']
|
418
|
-
end
|
419
|
-
|
420
|
-
if attributes.key?(:'academic_indicator')
|
421
|
-
self.academic_indicator = attributes[:'academic_indicator']
|
422
|
-
end
|
423
|
-
|
424
|
-
if attributes.key?(:'tax_withheld_other_agents')
|
425
|
-
self.tax_withheld_other_agents = attributes[:'tax_withheld_other_agents']
|
426
|
-
end
|
427
|
-
|
428
|
-
if attributes.key?(:'amount_repaid')
|
429
|
-
self.amount_repaid = attributes[:'amount_repaid']
|
430
|
-
end
|
431
|
-
|
432
|
-
if attributes.key?(:'tax_paid_agent')
|
433
|
-
self.tax_paid_agent = attributes[:'tax_paid_agent']
|
434
|
-
end
|
435
|
-
|
436
|
-
if attributes.key?(:'chap3_status_code')
|
437
|
-
self.chap3_status_code = attributes[:'chap3_status_code']
|
438
|
-
end
|
439
|
-
|
440
|
-
if attributes.key?(:'chap4_status_code')
|
441
|
-
self.chap4_status_code = attributes[:'chap4_status_code']
|
442
|
-
end
|
443
|
-
|
444
|
-
if attributes.key?(:'primary_withholding_agent')
|
445
|
-
self.primary_withholding_agent = attributes[:'primary_withholding_agent']
|
446
|
-
end
|
447
|
-
|
448
|
-
if attributes.key?(:'intermediary_or_flow_through')
|
449
|
-
self.intermediary_or_flow_through = attributes[:'intermediary_or_flow_through']
|
450
|
-
end
|
451
|
-
|
452
|
-
if attributes.key?(:'state_and_local_withholding')
|
453
|
-
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
454
|
-
end
|
455
|
-
|
456
|
-
if attributes.key?(:'type')
|
457
|
-
self.type = attributes[:'type']
|
458
|
-
end
|
459
|
-
|
460
|
-
if attributes.key?(:'issuer_id')
|
461
|
-
self.issuer_id = attributes[:'issuer_id']
|
462
|
-
end
|
463
|
-
|
464
|
-
if attributes.key?(:'reference_id')
|
465
|
-
self.reference_id = attributes[:'reference_id']
|
466
|
-
end
|
467
|
-
|
468
|
-
if attributes.key?(:'recipient_tin')
|
469
|
-
self.recipient_tin = attributes[:'recipient_tin']
|
470
|
-
end
|
471
|
-
|
472
|
-
if attributes.key?(:'recipient_name')
|
473
|
-
self.recipient_name = attributes[:'recipient_name']
|
474
|
-
end
|
475
|
-
|
476
|
-
if attributes.key?(:'tin_type')
|
477
|
-
self.tin_type = attributes[:'tin_type']
|
478
|
-
end
|
479
|
-
|
480
|
-
if attributes.key?(:'recipient_second_name')
|
481
|
-
self.recipient_second_name = attributes[:'recipient_second_name']
|
482
|
-
end
|
483
|
-
|
484
|
-
if attributes.key?(:'address')
|
485
|
-
self.address = attributes[:'address']
|
486
|
-
end
|
487
|
-
|
488
|
-
if attributes.key?(:'address2')
|
489
|
-
self.address2 = attributes[:'address2']
|
490
|
-
end
|
491
|
-
|
492
|
-
if attributes.key?(:'city')
|
493
|
-
self.city = attributes[:'city']
|
494
|
-
end
|
495
|
-
|
496
|
-
if attributes.key?(:'state')
|
497
|
-
self.state = attributes[:'state']
|
498
|
-
end
|
499
|
-
|
500
|
-
if attributes.key?(:'zip')
|
501
|
-
self.zip = attributes[:'zip']
|
502
|
-
end
|
503
|
-
|
504
|
-
if attributes.key?(:'email')
|
505
|
-
self.email = attributes[:'email']
|
506
|
-
end
|
507
|
-
|
508
|
-
if attributes.key?(:'account_number')
|
509
|
-
self.account_number = attributes[:'account_number']
|
510
|
-
end
|
511
|
-
|
512
|
-
if attributes.key?(:'office_code')
|
513
|
-
self.office_code = attributes[:'office_code']
|
514
|
-
end
|
515
|
-
|
516
|
-
if attributes.key?(:'non_us_province')
|
517
|
-
self.non_us_province = attributes[:'non_us_province']
|
518
|
-
end
|
519
|
-
|
520
|
-
if attributes.key?(:'country_code')
|
521
|
-
self.country_code = attributes[:'country_code']
|
522
|
-
end
|
523
|
-
|
524
|
-
if attributes.key?(:'federal_e_file')
|
525
|
-
self.federal_e_file = attributes[:'federal_e_file']
|
526
|
-
end
|
527
|
-
|
528
|
-
if attributes.key?(:'postal_mail')
|
529
|
-
self.postal_mail = attributes[:'postal_mail']
|
530
|
-
end
|
531
|
-
|
532
|
-
if attributes.key?(:'state_e_file')
|
533
|
-
self.state_e_file = attributes[:'state_e_file']
|
534
|
-
end
|
535
|
-
|
536
|
-
if attributes.key?(:'tin_match')
|
537
|
-
self.tin_match = attributes[:'tin_match']
|
538
|
-
end
|
539
|
-
|
540
|
-
if attributes.key?(:'no_tin')
|
541
|
-
self.no_tin = attributes[:'no_tin']
|
542
|
-
end
|
543
|
-
|
544
|
-
if attributes.key?(:'second_tin_notice')
|
545
|
-
self.second_tin_notice = attributes[:'second_tin_notice']
|
546
|
-
end
|
547
|
-
|
548
|
-
if attributes.key?(:'fatca_filing_requirement')
|
549
|
-
self.fatca_filing_requirement = attributes[:'fatca_filing_requirement']
|
550
|
-
end
|
551
|
-
|
552
|
-
if attributes.key?(:'address_verification')
|
553
|
-
self.address_verification = attributes[:'address_verification']
|
554
|
-
end
|
555
|
-
end
|
556
|
-
|
557
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
558
|
-
# @return Array for valid properties with the reasons
|
559
|
-
def list_invalid_properties
|
560
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
561
|
-
invalid_properties = Array.new
|
562
|
-
invalid_properties
|
563
|
-
end
|
564
|
-
|
565
|
-
# Check to see if the all the properties in the model are valid
|
566
|
-
# @return true if the model is valid
|
567
|
-
def valid?
|
568
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
569
|
-
type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
|
570
|
-
return false unless type_validator.valid?(@type)
|
571
|
-
tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
572
|
-
return false unless tin_type_validator.valid?(@tin_type)
|
573
|
-
true
|
574
|
-
end
|
575
|
-
|
576
|
-
# Custom attribute writer method checking allowed values (enum).
|
577
|
-
# @param [Object] type Object to be assigned
|
578
|
-
def type=(type)
|
579
|
-
validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
|
580
|
-
unless validator.valid?(type)
|
581
|
-
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
582
|
-
end
|
583
|
-
@type = type
|
584
|
-
end
|
585
|
-
|
586
|
-
# Custom attribute writer method checking allowed values (enum).
|
587
|
-
# @param [Object] tin_type Object to be assigned
|
588
|
-
def tin_type=(tin_type)
|
589
|
-
validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
590
|
-
unless validator.valid?(tin_type)
|
591
|
-
fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
|
592
|
-
end
|
593
|
-
@tin_type = tin_type
|
594
|
-
end
|
595
|
-
|
596
|
-
# Checks equality by comparing each attribute.
|
597
|
-
# @param [Object] Object to be compared
|
598
|
-
def ==(o)
|
599
|
-
return true if self.equal?(o)
|
600
|
-
self.class == o.class &&
|
601
|
-
unique_form_id == o.unique_form_id &&
|
602
|
-
recipient_date_of_birth == o.recipient_date_of_birth &&
|
603
|
-
recipient_giin == o.recipient_giin &&
|
604
|
-
recipient_foreign_tin == o.recipient_foreign_tin &&
|
605
|
-
lob_code == o.lob_code &&
|
606
|
-
income_code == o.income_code &&
|
607
|
-
gross_income == o.gross_income &&
|
608
|
-
withholding_indicator == o.withholding_indicator &&
|
609
|
-
tax_country_code == o.tax_country_code &&
|
610
|
-
exemption_code_chap3 == o.exemption_code_chap3 &&
|
611
|
-
exemption_code_chap4 == o.exemption_code_chap4 &&
|
612
|
-
tax_rate_chap3 == o.tax_rate_chap3 &&
|
613
|
-
withholding_allowance == o.withholding_allowance &&
|
614
|
-
federal_tax_withheld == o.federal_tax_withheld &&
|
615
|
-
tax_not_deposited_indicator == o.tax_not_deposited_indicator &&
|
616
|
-
academic_indicator == o.academic_indicator &&
|
617
|
-
tax_withheld_other_agents == o.tax_withheld_other_agents &&
|
618
|
-
amount_repaid == o.amount_repaid &&
|
619
|
-
tax_paid_agent == o.tax_paid_agent &&
|
620
|
-
chap3_status_code == o.chap3_status_code &&
|
621
|
-
chap4_status_code == o.chap4_status_code &&
|
622
|
-
primary_withholding_agent == o.primary_withholding_agent &&
|
623
|
-
intermediary_or_flow_through == o.intermediary_or_flow_through &&
|
624
|
-
state_and_local_withholding == o.state_and_local_withholding &&
|
625
|
-
type == o.type &&
|
626
|
-
issuer_id == o.issuer_id &&
|
627
|
-
reference_id == o.reference_id &&
|
628
|
-
recipient_tin == o.recipient_tin &&
|
629
|
-
recipient_name == o.recipient_name &&
|
630
|
-
tin_type == o.tin_type &&
|
631
|
-
recipient_second_name == o.recipient_second_name &&
|
632
|
-
address == o.address &&
|
633
|
-
address2 == o.address2 &&
|
634
|
-
city == o.city &&
|
635
|
-
state == o.state &&
|
636
|
-
zip == o.zip &&
|
637
|
-
email == o.email &&
|
638
|
-
account_number == o.account_number &&
|
639
|
-
office_code == o.office_code &&
|
640
|
-
non_us_province == o.non_us_province &&
|
641
|
-
country_code == o.country_code &&
|
642
|
-
federal_e_file == o.federal_e_file &&
|
643
|
-
postal_mail == o.postal_mail &&
|
644
|
-
state_e_file == o.state_e_file &&
|
645
|
-
tin_match == o.tin_match &&
|
646
|
-
no_tin == o.no_tin &&
|
647
|
-
second_tin_notice == o.second_tin_notice &&
|
648
|
-
fatca_filing_requirement == o.fatca_filing_requirement &&
|
649
|
-
address_verification == o.address_verification
|
650
|
-
end
|
651
|
-
|
652
|
-
# @see the `==` method
|
653
|
-
# @param [Object] Object to be compared
|
654
|
-
def eql?(o)
|
655
|
-
self == o
|
656
|
-
end
|
657
|
-
|
658
|
-
# Calculates hash code according to all attributes.
|
659
|
-
# @return [Integer] Hash code
|
660
|
-
def hash
|
661
|
-
[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
|
662
|
-
end
|
663
|
-
|
664
|
-
# Builds the object from hash
|
665
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
666
|
-
# @return [Object] Returns the model itself
|
667
|
-
def self.build_from_hash(attributes)
|
668
|
-
return nil unless attributes.is_a?(Hash)
|
669
|
-
attributes = attributes.transform_keys(&:to_sym)
|
670
|
-
transformed_hash = {}
|
671
|
-
openapi_types.each_pair do |key, type|
|
672
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
673
|
-
transformed_hash["#{key}"] = nil
|
674
|
-
elsif type =~ /\AArray<(.*)>/i
|
675
|
-
# check to ensure the input is an array given that the attribute
|
676
|
-
# is documented as an array but the input is not
|
677
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
678
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
679
|
-
end
|
680
|
-
elsif !attributes[attribute_map[key]].nil?
|
681
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
682
|
-
end
|
683
|
-
end
|
684
|
-
new(transformed_hash)
|
685
|
-
end
|
686
|
-
|
687
|
-
# Deserializes the data based on type
|
688
|
-
# @param string type Data type
|
689
|
-
# @param string value Value to be deserialized
|
690
|
-
# @return [Object] Deserialized data
|
691
|
-
def self._deserialize(type, value)
|
692
|
-
case type.to_sym
|
693
|
-
when :Time
|
694
|
-
Time.parse(value)
|
695
|
-
when :Date
|
696
|
-
Date.parse(value)
|
697
|
-
when :String
|
698
|
-
value.to_s
|
699
|
-
when :Integer
|
700
|
-
value.to_i
|
701
|
-
when :Float
|
702
|
-
value.to_f
|
703
|
-
when :Boolean
|
704
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
705
|
-
true
|
706
|
-
else
|
707
|
-
false
|
708
|
-
end
|
709
|
-
when :Object
|
710
|
-
# generic object (usually a Hash), return directly
|
711
|
-
value
|
712
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
713
|
-
inner_type = Regexp.last_match[:inner_type]
|
714
|
-
value.map { |v| _deserialize(inner_type, v) }
|
715
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
716
|
-
k_type = Regexp.last_match[:k_type]
|
717
|
-
v_type = Regexp.last_match[:v_type]
|
718
|
-
{}.tap do |hash|
|
719
|
-
value.each do |k, v|
|
720
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
721
|
-
end
|
722
|
-
end
|
723
|
-
else # model
|
724
|
-
# models (e.g. Pet) or oneOf
|
725
|
-
klass = AvalaraSdk::A1099::V2.const_get(type)
|
726
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
727
|
-
end
|
728
|
-
end
|
729
|
-
|
730
|
-
# Returns the string representation of the object
|
731
|
-
# @return [String] String presentation of the object
|
732
|
-
def to_s
|
733
|
-
to_hash.to_s
|
734
|
-
end
|
735
|
-
|
736
|
-
# to_body is an alias to to_hash (backward compatibility)
|
737
|
-
# @return [Hash] Returns the object in the form of hash
|
738
|
-
def to_body
|
739
|
-
to_hash
|
740
|
-
end
|
741
|
-
|
742
|
-
# Returns the object in the form of hash
|
743
|
-
# @return [Hash] Returns the object in the form of hash
|
744
|
-
def to_hash
|
745
|
-
hash = {}
|
746
|
-
self.class.attribute_map.each_pair do |attr, param|
|
747
|
-
value = self.send(attr)
|
748
|
-
if value.nil?
|
749
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
750
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
751
|
-
end
|
752
|
-
|
753
|
-
hash[param] = _to_hash(value)
|
754
|
-
end
|
755
|
-
hash
|
756
|
-
end
|
757
|
-
|
758
|
-
# Outputs non-array value in the form of hash
|
759
|
-
# For object, use to_hash. Otherwise, just return the value
|
760
|
-
# @param [Object] value Any valid value
|
761
|
-
# @return [Hash] Returns the value in the form of hash
|
762
|
-
def _to_hash(value)
|
763
|
-
if value.is_a?(Array)
|
764
|
-
value.compact.map { |v| _to_hash(v) }
|
765
|
-
elsif value.is_a?(Hash)
|
766
|
-
{}.tap do |hash|
|
767
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
768
|
-
end
|
769
|
-
elsif value.respond_to? :to_hash
|
770
|
-
value.to_hash
|
771
|
-
else
|
772
|
-
value
|
773
|
-
end
|
774
|
-
end
|
775
|
-
|
776
|
-
end
|
777
|
-
|
778
|
-
end
|