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,816 +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 Form1042SListItem
|
14
|
-
# Unique form identifier
|
15
|
-
attr_accessor :unique_form_id
|
16
|
-
|
17
|
-
# No TIN indicator
|
18
|
-
attr_accessor :no_tin
|
19
|
-
|
20
|
-
# Recipient's date of birth
|
21
|
-
attr_accessor :recipient_date_of_birth
|
22
|
-
|
23
|
-
# Recipient's GIIN (Global Intermediary Identification Number)
|
24
|
-
attr_accessor :recipient_giin
|
25
|
-
|
26
|
-
# Recipient's foreign TIN
|
27
|
-
attr_accessor :recipient_foreign_tin
|
28
|
-
|
29
|
-
# Limitation on benefits code
|
30
|
-
attr_accessor :lob_code
|
31
|
-
|
32
|
-
# Income code
|
33
|
-
attr_accessor :income_code
|
34
|
-
|
35
|
-
# Gross income
|
36
|
-
attr_accessor :gross_income
|
37
|
-
|
38
|
-
# Withholding indicator
|
39
|
-
attr_accessor :withholding_indicator
|
40
|
-
|
41
|
-
# Country code
|
42
|
-
attr_accessor :tax_country_code
|
43
|
-
|
44
|
-
# Exemption code (Chapter 3)
|
45
|
-
attr_accessor :exemption_code_chap3
|
46
|
-
|
47
|
-
# Exemption code (Chapter 4)
|
48
|
-
attr_accessor :exemption_code_chap4
|
49
|
-
|
50
|
-
# Tax rate (Chapter 3)
|
51
|
-
attr_accessor :tax_rate_chap3
|
52
|
-
|
53
|
-
# Withholding allowance
|
54
|
-
attr_accessor :withholding_allowance
|
55
|
-
|
56
|
-
# Federal tax withheld
|
57
|
-
attr_accessor :federal_tax_withheld
|
58
|
-
|
59
|
-
# Tax not deposited indicator
|
60
|
-
attr_accessor :tax_not_deposited_indicator
|
61
|
-
|
62
|
-
# Academic indicator
|
63
|
-
attr_accessor :academic_indicator
|
64
|
-
|
65
|
-
# Tax withheld by other agents
|
66
|
-
attr_accessor :tax_withheld_other_agents
|
67
|
-
|
68
|
-
# Amount repaid to recipient
|
69
|
-
attr_accessor :amount_repaid
|
70
|
-
|
71
|
-
# Tax paid by withholding agent
|
72
|
-
attr_accessor :tax_paid_agent
|
73
|
-
|
74
|
-
# Chapter 3 status code
|
75
|
-
attr_accessor :chap3_status_code
|
76
|
-
|
77
|
-
# Chapter 4 status code
|
78
|
-
attr_accessor :chap4_status_code
|
79
|
-
|
80
|
-
# Primary withholding agent information
|
81
|
-
attr_accessor :primary_withholding_agent
|
82
|
-
|
83
|
-
# Intermediary or flow-through entity information
|
84
|
-
attr_accessor :intermediary_or_flow_through
|
85
|
-
|
86
|
-
# Issuer ID
|
87
|
-
attr_accessor :issuer_id
|
88
|
-
|
89
|
-
# Reference ID
|
90
|
-
attr_accessor :reference_id
|
91
|
-
|
92
|
-
# Recipient Tax ID Number
|
93
|
-
attr_accessor :recipient_tin
|
94
|
-
|
95
|
-
# Recipient name
|
96
|
-
attr_accessor :recipient_name
|
97
|
-
|
98
|
-
# Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN
|
99
|
-
attr_accessor :tin_type
|
100
|
-
|
101
|
-
# Recipient second name
|
102
|
-
attr_accessor :recipient_second_name
|
103
|
-
|
104
|
-
# Address
|
105
|
-
attr_accessor :address
|
106
|
-
|
107
|
-
# Address line 2
|
108
|
-
attr_accessor :address2
|
109
|
-
|
110
|
-
# City
|
111
|
-
attr_accessor :city
|
112
|
-
|
113
|
-
# US state. Required if CountryCode is \"US\".
|
114
|
-
attr_accessor :state
|
115
|
-
|
116
|
-
# Zip/postal code
|
117
|
-
attr_accessor :zip
|
118
|
-
|
119
|
-
# Recipient email address
|
120
|
-
attr_accessor :email
|
121
|
-
|
122
|
-
# Account number
|
123
|
-
attr_accessor :account_number
|
124
|
-
|
125
|
-
# Office code
|
126
|
-
attr_accessor :office_code
|
127
|
-
|
128
|
-
# Foreign province
|
129
|
-
attr_accessor :non_us_province
|
130
|
-
|
131
|
-
# Country code, as defined at https://www.irs.gov/e-file-providers/country-codes
|
132
|
-
attr_accessor :country_code
|
133
|
-
|
134
|
-
# Boolean indicating that federal e-filing should be scheduled for this form
|
135
|
-
attr_accessor :federal_e_file
|
136
|
-
|
137
|
-
# Boolean indicating that postal mailing to the recipient should be scheduled for this form
|
138
|
-
attr_accessor :postal_mail
|
139
|
-
|
140
|
-
# Boolean indicating that state e-filing should be scheduled for this form
|
141
|
-
attr_accessor :state_e_file
|
142
|
-
|
143
|
-
# Boolean indicating that TIN Matching should be scheduled for this form
|
144
|
-
attr_accessor :tin_match
|
145
|
-
|
146
|
-
# Second TIN notice in three years
|
147
|
-
attr_accessor :second_tin_notice
|
148
|
-
|
149
|
-
# Fatca filing requirement
|
150
|
-
attr_accessor :fatca_filing_requirement
|
151
|
-
|
152
|
-
# Boolean indicating that address verification should be scheduled for this form
|
153
|
-
attr_accessor :address_verification
|
154
|
-
|
155
|
-
# State and local withholding information
|
156
|
-
attr_accessor :state_and_local_withholding
|
157
|
-
|
158
|
-
class EnumAttributeValidator
|
159
|
-
attr_reader :datatype
|
160
|
-
attr_reader :allowable_values
|
161
|
-
|
162
|
-
def initialize(datatype, allowable_values)
|
163
|
-
@allowable_values = allowable_values.map do |value|
|
164
|
-
case datatype.to_s
|
165
|
-
when /Integer/i
|
166
|
-
value.to_i
|
167
|
-
when /Float/i
|
168
|
-
value.to_f
|
169
|
-
else
|
170
|
-
value
|
171
|
-
end
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
def valid?(value)
|
176
|
-
!value || allowable_values.include?(value)
|
177
|
-
end
|
178
|
-
end
|
179
|
-
|
180
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
181
|
-
def self.attribute_map
|
182
|
-
{
|
183
|
-
:'unique_form_id' => :'uniqueFormId',
|
184
|
-
:'no_tin' => :'noTin',
|
185
|
-
:'recipient_date_of_birth' => :'recipientDateOfBirth',
|
186
|
-
:'recipient_giin' => :'recipientGiin',
|
187
|
-
:'recipient_foreign_tin' => :'recipientForeignTin',
|
188
|
-
:'lob_code' => :'lobCode',
|
189
|
-
:'income_code' => :'incomeCode',
|
190
|
-
:'gross_income' => :'grossIncome',
|
191
|
-
:'withholding_indicator' => :'withholdingIndicator',
|
192
|
-
:'tax_country_code' => :'taxCountryCode',
|
193
|
-
:'exemption_code_chap3' => :'exemptionCodeChap3',
|
194
|
-
:'exemption_code_chap4' => :'exemptionCodeChap4',
|
195
|
-
:'tax_rate_chap3' => :'taxRateChap3',
|
196
|
-
:'withholding_allowance' => :'withholdingAllowance',
|
197
|
-
:'federal_tax_withheld' => :'federalTaxWithheld',
|
198
|
-
:'tax_not_deposited_indicator' => :'taxNotDepositedIndicator',
|
199
|
-
:'academic_indicator' => :'academicIndicator',
|
200
|
-
:'tax_withheld_other_agents' => :'taxWithheldOtherAgents',
|
201
|
-
:'amount_repaid' => :'amountRepaid',
|
202
|
-
:'tax_paid_agent' => :'taxPaidAgent',
|
203
|
-
:'chap3_status_code' => :'chap3StatusCode',
|
204
|
-
:'chap4_status_code' => :'chap4StatusCode',
|
205
|
-
:'primary_withholding_agent' => :'primaryWithholdingAgent',
|
206
|
-
:'intermediary_or_flow_through' => :'intermediaryOrFlowThrough',
|
207
|
-
:'issuer_id' => :'issuerId',
|
208
|
-
:'reference_id' => :'referenceId',
|
209
|
-
:'recipient_tin' => :'recipientTin',
|
210
|
-
:'recipient_name' => :'recipientName',
|
211
|
-
:'tin_type' => :'tinType',
|
212
|
-
:'recipient_second_name' => :'recipientSecondName',
|
213
|
-
:'address' => :'address',
|
214
|
-
:'address2' => :'address2',
|
215
|
-
:'city' => :'city',
|
216
|
-
:'state' => :'state',
|
217
|
-
:'zip' => :'zip',
|
218
|
-
:'email' => :'email',
|
219
|
-
:'account_number' => :'accountNumber',
|
220
|
-
:'office_code' => :'officeCode',
|
221
|
-
:'non_us_province' => :'nonUsProvince',
|
222
|
-
:'country_code' => :'countryCode',
|
223
|
-
:'federal_e_file' => :'federalEFile',
|
224
|
-
:'postal_mail' => :'postalMail',
|
225
|
-
:'state_e_file' => :'stateEFile',
|
226
|
-
:'tin_match' => :'tinMatch',
|
227
|
-
:'second_tin_notice' => :'secondTinNotice',
|
228
|
-
:'fatca_filing_requirement' => :'fatcaFilingRequirement',
|
229
|
-
:'address_verification' => :'addressVerification',
|
230
|
-
:'state_and_local_withholding' => :'stateAndLocalWithholding'
|
231
|
-
}
|
232
|
-
end
|
233
|
-
|
234
|
-
# Returns all the JSON keys this model knows about
|
235
|
-
def self.acceptable_attributes
|
236
|
-
attribute_map.values
|
237
|
-
end
|
238
|
-
|
239
|
-
# Attribute type mapping.
|
240
|
-
def self.openapi_types
|
241
|
-
{
|
242
|
-
:'unique_form_id' => :'String',
|
243
|
-
:'no_tin' => :'Boolean',
|
244
|
-
:'recipient_date_of_birth' => :'Time',
|
245
|
-
:'recipient_giin' => :'String',
|
246
|
-
:'recipient_foreign_tin' => :'String',
|
247
|
-
:'lob_code' => :'String',
|
248
|
-
:'income_code' => :'String',
|
249
|
-
:'gross_income' => :'Float',
|
250
|
-
:'withholding_indicator' => :'String',
|
251
|
-
:'tax_country_code' => :'String',
|
252
|
-
:'exemption_code_chap3' => :'String',
|
253
|
-
:'exemption_code_chap4' => :'String',
|
254
|
-
:'tax_rate_chap3' => :'String',
|
255
|
-
:'withholding_allowance' => :'Float',
|
256
|
-
:'federal_tax_withheld' => :'Float',
|
257
|
-
:'tax_not_deposited_indicator' => :'Boolean',
|
258
|
-
:'academic_indicator' => :'Boolean',
|
259
|
-
:'tax_withheld_other_agents' => :'Float',
|
260
|
-
:'amount_repaid' => :'Float',
|
261
|
-
:'tax_paid_agent' => :'Float',
|
262
|
-
:'chap3_status_code' => :'String',
|
263
|
-
:'chap4_status_code' => :'String',
|
264
|
-
:'primary_withholding_agent' => :'PrimaryWithholdingAgent',
|
265
|
-
:'intermediary_or_flow_through' => :'IntermediaryOrFlowThrough',
|
266
|
-
:'issuer_id' => :'String',
|
267
|
-
:'reference_id' => :'String',
|
268
|
-
:'recipient_tin' => :'String',
|
269
|
-
:'recipient_name' => :'String',
|
270
|
-
:'tin_type' => :'String',
|
271
|
-
:'recipient_second_name' => :'String',
|
272
|
-
:'address' => :'String',
|
273
|
-
:'address2' => :'String',
|
274
|
-
:'city' => :'String',
|
275
|
-
:'state' => :'String',
|
276
|
-
:'zip' => :'String',
|
277
|
-
:'email' => :'String',
|
278
|
-
:'account_number' => :'String',
|
279
|
-
:'office_code' => :'String',
|
280
|
-
:'non_us_province' => :'String',
|
281
|
-
:'country_code' => :'String',
|
282
|
-
:'federal_e_file' => :'Boolean',
|
283
|
-
:'postal_mail' => :'Boolean',
|
284
|
-
:'state_e_file' => :'Boolean',
|
285
|
-
:'tin_match' => :'Boolean',
|
286
|
-
:'second_tin_notice' => :'Boolean',
|
287
|
-
:'fatca_filing_requirement' => :'Boolean',
|
288
|
-
:'address_verification' => :'Boolean',
|
289
|
-
:'state_and_local_withholding' => :'StateAndLocalWithholdingRequest'
|
290
|
-
}
|
291
|
-
end
|
292
|
-
|
293
|
-
# List of attributes with nullable: true
|
294
|
-
def self.openapi_nullable
|
295
|
-
Set.new([
|
296
|
-
:'no_tin',
|
297
|
-
:'recipient_date_of_birth',
|
298
|
-
:'recipient_giin',
|
299
|
-
:'recipient_foreign_tin',
|
300
|
-
:'lob_code',
|
301
|
-
:'exemption_code_chap3',
|
302
|
-
:'exemption_code_chap4',
|
303
|
-
:'tax_rate_chap3',
|
304
|
-
:'withholding_allowance',
|
305
|
-
:'federal_tax_withheld',
|
306
|
-
:'tax_not_deposited_indicator',
|
307
|
-
:'academic_indicator',
|
308
|
-
:'tax_withheld_other_agents',
|
309
|
-
:'amount_repaid',
|
310
|
-
:'tax_paid_agent',
|
311
|
-
:'chap3_status_code',
|
312
|
-
:'chap4_status_code',
|
313
|
-
:'issuer_id',
|
314
|
-
:'reference_id',
|
315
|
-
:'recipient_tin',
|
316
|
-
:'recipient_name',
|
317
|
-
:'recipient_second_name',
|
318
|
-
:'address',
|
319
|
-
:'address2',
|
320
|
-
:'city',
|
321
|
-
:'state',
|
322
|
-
:'zip',
|
323
|
-
:'email',
|
324
|
-
:'account_number',
|
325
|
-
:'office_code',
|
326
|
-
:'non_us_province',
|
327
|
-
:'country_code',
|
328
|
-
:'second_tin_notice',
|
329
|
-
:'state_and_local_withholding'
|
330
|
-
])
|
331
|
-
end
|
332
|
-
|
333
|
-
# List of class defined in allOf (OpenAPI v3)
|
334
|
-
def self.openapi_all_of
|
335
|
-
[
|
336
|
-
:'FormRequestBase'
|
337
|
-
]
|
338
|
-
end
|
339
|
-
|
340
|
-
# Initializes the object
|
341
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
342
|
-
def initialize(attributes = {})
|
343
|
-
if (!attributes.is_a?(Hash))
|
344
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1042SListItem` initialize method"
|
345
|
-
end
|
346
|
-
|
347
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
348
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
349
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
350
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1042SListItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
351
|
-
end
|
352
|
-
h[k.to_sym] = v
|
353
|
-
}
|
354
|
-
|
355
|
-
if attributes.key?(:'unique_form_id')
|
356
|
-
self.unique_form_id = attributes[:'unique_form_id']
|
357
|
-
end
|
358
|
-
|
359
|
-
if attributes.key?(:'no_tin')
|
360
|
-
self.no_tin = attributes[:'no_tin']
|
361
|
-
end
|
362
|
-
|
363
|
-
if attributes.key?(:'recipient_date_of_birth')
|
364
|
-
self.recipient_date_of_birth = attributes[:'recipient_date_of_birth']
|
365
|
-
end
|
366
|
-
|
367
|
-
if attributes.key?(:'recipient_giin')
|
368
|
-
self.recipient_giin = attributes[:'recipient_giin']
|
369
|
-
end
|
370
|
-
|
371
|
-
if attributes.key?(:'recipient_foreign_tin')
|
372
|
-
self.recipient_foreign_tin = attributes[:'recipient_foreign_tin']
|
373
|
-
end
|
374
|
-
|
375
|
-
if attributes.key?(:'lob_code')
|
376
|
-
self.lob_code = attributes[:'lob_code']
|
377
|
-
end
|
378
|
-
|
379
|
-
if attributes.key?(:'income_code')
|
380
|
-
self.income_code = attributes[:'income_code']
|
381
|
-
end
|
382
|
-
|
383
|
-
if attributes.key?(:'gross_income')
|
384
|
-
self.gross_income = attributes[:'gross_income']
|
385
|
-
end
|
386
|
-
|
387
|
-
if attributes.key?(:'withholding_indicator')
|
388
|
-
self.withholding_indicator = attributes[:'withholding_indicator']
|
389
|
-
end
|
390
|
-
|
391
|
-
if attributes.key?(:'tax_country_code')
|
392
|
-
self.tax_country_code = attributes[:'tax_country_code']
|
393
|
-
end
|
394
|
-
|
395
|
-
if attributes.key?(:'exemption_code_chap3')
|
396
|
-
self.exemption_code_chap3 = attributes[:'exemption_code_chap3']
|
397
|
-
end
|
398
|
-
|
399
|
-
if attributes.key?(:'exemption_code_chap4')
|
400
|
-
self.exemption_code_chap4 = attributes[:'exemption_code_chap4']
|
401
|
-
end
|
402
|
-
|
403
|
-
if attributes.key?(:'tax_rate_chap3')
|
404
|
-
self.tax_rate_chap3 = attributes[:'tax_rate_chap3']
|
405
|
-
end
|
406
|
-
|
407
|
-
if attributes.key?(:'withholding_allowance')
|
408
|
-
self.withholding_allowance = attributes[:'withholding_allowance']
|
409
|
-
end
|
410
|
-
|
411
|
-
if attributes.key?(:'federal_tax_withheld')
|
412
|
-
self.federal_tax_withheld = attributes[:'federal_tax_withheld']
|
413
|
-
end
|
414
|
-
|
415
|
-
if attributes.key?(:'tax_not_deposited_indicator')
|
416
|
-
self.tax_not_deposited_indicator = attributes[:'tax_not_deposited_indicator']
|
417
|
-
end
|
418
|
-
|
419
|
-
if attributes.key?(:'academic_indicator')
|
420
|
-
self.academic_indicator = attributes[:'academic_indicator']
|
421
|
-
end
|
422
|
-
|
423
|
-
if attributes.key?(:'tax_withheld_other_agents')
|
424
|
-
self.tax_withheld_other_agents = attributes[:'tax_withheld_other_agents']
|
425
|
-
end
|
426
|
-
|
427
|
-
if attributes.key?(:'amount_repaid')
|
428
|
-
self.amount_repaid = attributes[:'amount_repaid']
|
429
|
-
end
|
430
|
-
|
431
|
-
if attributes.key?(:'tax_paid_agent')
|
432
|
-
self.tax_paid_agent = attributes[:'tax_paid_agent']
|
433
|
-
end
|
434
|
-
|
435
|
-
if attributes.key?(:'chap3_status_code')
|
436
|
-
self.chap3_status_code = attributes[:'chap3_status_code']
|
437
|
-
end
|
438
|
-
|
439
|
-
if attributes.key?(:'chap4_status_code')
|
440
|
-
self.chap4_status_code = attributes[:'chap4_status_code']
|
441
|
-
end
|
442
|
-
|
443
|
-
if attributes.key?(:'primary_withholding_agent')
|
444
|
-
self.primary_withholding_agent = attributes[:'primary_withholding_agent']
|
445
|
-
end
|
446
|
-
|
447
|
-
if attributes.key?(:'intermediary_or_flow_through')
|
448
|
-
self.intermediary_or_flow_through = attributes[:'intermediary_or_flow_through']
|
449
|
-
end
|
450
|
-
|
451
|
-
if attributes.key?(:'issuer_id')
|
452
|
-
self.issuer_id = attributes[:'issuer_id']
|
453
|
-
end
|
454
|
-
|
455
|
-
if attributes.key?(:'reference_id')
|
456
|
-
self.reference_id = attributes[:'reference_id']
|
457
|
-
end
|
458
|
-
|
459
|
-
if attributes.key?(:'recipient_tin')
|
460
|
-
self.recipient_tin = attributes[:'recipient_tin']
|
461
|
-
end
|
462
|
-
|
463
|
-
if attributes.key?(:'recipient_name')
|
464
|
-
self.recipient_name = attributes[:'recipient_name']
|
465
|
-
end
|
466
|
-
|
467
|
-
if attributes.key?(:'tin_type')
|
468
|
-
self.tin_type = attributes[:'tin_type']
|
469
|
-
end
|
470
|
-
|
471
|
-
if attributes.key?(:'recipient_second_name')
|
472
|
-
self.recipient_second_name = attributes[:'recipient_second_name']
|
473
|
-
end
|
474
|
-
|
475
|
-
if attributes.key?(:'address')
|
476
|
-
self.address = attributes[:'address']
|
477
|
-
end
|
478
|
-
|
479
|
-
if attributes.key?(:'address2')
|
480
|
-
self.address2 = attributes[:'address2']
|
481
|
-
end
|
482
|
-
|
483
|
-
if attributes.key?(:'city')
|
484
|
-
self.city = attributes[:'city']
|
485
|
-
end
|
486
|
-
|
487
|
-
if attributes.key?(:'state')
|
488
|
-
self.state = attributes[:'state']
|
489
|
-
end
|
490
|
-
|
491
|
-
if attributes.key?(:'zip')
|
492
|
-
self.zip = attributes[:'zip']
|
493
|
-
end
|
494
|
-
|
495
|
-
if attributes.key?(:'email')
|
496
|
-
self.email = attributes[:'email']
|
497
|
-
end
|
498
|
-
|
499
|
-
if attributes.key?(:'account_number')
|
500
|
-
self.account_number = attributes[:'account_number']
|
501
|
-
end
|
502
|
-
|
503
|
-
if attributes.key?(:'office_code')
|
504
|
-
self.office_code = attributes[:'office_code']
|
505
|
-
end
|
506
|
-
|
507
|
-
if attributes.key?(:'non_us_province')
|
508
|
-
self.non_us_province = attributes[:'non_us_province']
|
509
|
-
end
|
510
|
-
|
511
|
-
if attributes.key?(:'country_code')
|
512
|
-
self.country_code = attributes[:'country_code']
|
513
|
-
end
|
514
|
-
|
515
|
-
if attributes.key?(:'federal_e_file')
|
516
|
-
self.federal_e_file = attributes[:'federal_e_file']
|
517
|
-
end
|
518
|
-
|
519
|
-
if attributes.key?(:'postal_mail')
|
520
|
-
self.postal_mail = attributes[:'postal_mail']
|
521
|
-
end
|
522
|
-
|
523
|
-
if attributes.key?(:'state_e_file')
|
524
|
-
self.state_e_file = attributes[:'state_e_file']
|
525
|
-
end
|
526
|
-
|
527
|
-
if attributes.key?(:'tin_match')
|
528
|
-
self.tin_match = attributes[:'tin_match']
|
529
|
-
end
|
530
|
-
|
531
|
-
if attributes.key?(:'second_tin_notice')
|
532
|
-
self.second_tin_notice = attributes[:'second_tin_notice']
|
533
|
-
end
|
534
|
-
|
535
|
-
if attributes.key?(:'fatca_filing_requirement')
|
536
|
-
self.fatca_filing_requirement = attributes[:'fatca_filing_requirement']
|
537
|
-
end
|
538
|
-
|
539
|
-
if attributes.key?(:'address_verification')
|
540
|
-
self.address_verification = attributes[:'address_verification']
|
541
|
-
end
|
542
|
-
|
543
|
-
if attributes.key?(:'state_and_local_withholding')
|
544
|
-
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
545
|
-
end
|
546
|
-
end
|
547
|
-
|
548
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
549
|
-
# @return Array for valid properties with the reasons
|
550
|
-
def list_invalid_properties
|
551
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
552
|
-
invalid_properties = Array.new
|
553
|
-
invalid_properties
|
554
|
-
end
|
555
|
-
|
556
|
-
# Check to see if the all the properties in the model are valid
|
557
|
-
# @return true if the model is valid
|
558
|
-
def valid?
|
559
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
560
|
-
lob_code_validator = EnumAttributeValidator.new('String', ["Individual", "GovernmentContractingState", "TaxExemptPensionTrust", "TaxExemptCharitableOrganization", "PubliclyTradedCorporation", "SubsidiaryOfPubliclyTradedCorporation", "CompanyOwnershipBaseErosionTest", "CompanyDerivativeBenefitsTest", "CompanyActiveTradeOrBusinessTest", "DiscretionaryDetermination", "Other", "NoLobArticleInTreaty"])
|
561
|
-
return false unless lob_code_validator.valid?(@lob_code)
|
562
|
-
exemption_code_chap3_validator = EnumAttributeValidator.new('String', ["TaxRateDueToBackupWithholding", "EffectivelyConnectedIncome", "ExemptUnderIrc", "IncomeNotFromUsSources", "ExemptUnderTaxTreaty", "PortfolioInterestExemptUnderIrc", "QiThatAssumesPrimaryWithholdingResponsibility", "WfPorWft", "UsBranchTreatedAsUsPerson", "TerritoryFiTreatedAsUsPerson", "QiRepresentsIncomeExempt", "QslThatAssumesPrimaryWithholdingResponsibility", "PayeeSubjectedToChapter4Withholding", "QddThatAssumesPrimaryWithholdingResponsibility", "ExemptUnderSection897L", "ExemptUnderSection892"])
|
563
|
-
return false unless exemption_code_chap3_validator.valid?(@exemption_code_chap3)
|
564
|
-
exemption_code_chap4_validator = EnumAttributeValidator.new('String', ["NotExempt", "GrandfatheredPayment", "EffectivelyConnectedIncome", "PayeeNotSubjectToChapter4Withholding", "ExcludedNonfinancialPayment", "ForeignEntityThatAssumesPrimaryWithholdingResponsibility", "UsPayeesOfParticipatingFfi", "ExemptFromWithholdingUnderIga", "DormantAccount", "OtherPaymentNotSubjectToChapter4Withholding"])
|
565
|
-
return false unless exemption_code_chap4_validator.valid?(@exemption_code_chap4)
|
566
|
-
chap3_status_code_validator = EnumAttributeValidator.new('String', ["USWithholdingAgentFI", "USWithholdingAgentOther", "TerritoryFITreatedAsUSPerson", "TerritoryFINotTreatedAsUSPerson", "USBranchTreatedAsUSPerson", "USBranchNotTreatedAsUSPerson", "USBranchECIPresumptionApplied", "PartnershipOtherThanWithholdingForeignPartnership", "WithholdingForeignPartnership", "TrustOtherThanWithholdingForeignTrust", "WithholdingForeignTrust", "QualifiedIntermediary", "QualifiedSecuritiesLenderQualifiedIntermediary", "QualifiedSecuritiesLenderOther", "Corporation", "Individual", "Estate", "PrivateFoundation", "GovernmentOrInternationalOrganization", "TaxExemptOrganizationSection501cEntities", "UnknownRecipient", "ArtistOrAthlete", "Pension", "ForeignCentralBankOfIssue", "NonqualifiedIntermediary", "HybridEntityMakingTreatyClaim", "WithholdingRatePoolGeneral", "WithholdingRatePoolExemptOrganization", "PAIWithholdingRatePoolGeneral", "PAIWithholdingRatePoolExemptOrganization", "AgencyWithholdingRatePoolGeneral", "AgencyWithholdingRatePoolExemptOrganization", "USWithholdingAgentForeignBranchOfFI", "QualifiedDerivativesDealer", "ForeignGovernmentIntegralPart", "ForeignGovernmentControlledEntity", "PubliclyTradedPartnership", "DisclosingQualifiedIntermediary"])
|
567
|
-
return false unless chap3_status_code_validator.valid?(@chap3_status_code)
|
568
|
-
chap4_status_code_validator = EnumAttributeValidator.new('String', ["UsWithholdingAgentFi", "UsWithholdingAgentOther", "TerritoryFiNotTreatedAsUsPerson", "TerritoryFiTreatedAsUsPerson", "ParticipatingFfiOther", "ParticipatingFfiReportingModel2Ffi", "RegisteredDeemedCompliantFfiReportingModel1Ffi", "RegisteredDeemedCompliantFfiSponsoredEntity", "RegisteredDeemedCompliantFfiOther", "CertifiedDeemedCompliantFfiOther", "CertifiedDeemedCompliantFfiffiWithLowValueAccounts", "CertifiedDeemedCompliantFfiNonRegisteringLocalBank", "CertifiedDeemedCompliantFfiSponsoredEntity", "CertifiedDeemedCompliantFfiInvestmentAdvisorOrManager", "NonparticipatingFfi", "OwnerDocumentedFfi", "UsBranchTreatedAsUsPerson", "UsBranchNotTreatedAsUsPerson", "PassiveNffeIdentifyingSubstantialUsOwners", "PassiveNffeWithNoSubstantialUsOwners", "PubliclyTradedNffeOrAffiliate", "ActiveNffe", "Individual", "Section501CEntities", "ExceptedTerritoryNffe", "ExceptedNffeOther", "ExemptBeneficialOwner", "EntityWhollyOwnedByExemptBeneficialOwners", "UnknownRecipient", "RecalcitrantAccountHolder", "NonreportingIgafii", "DirectReportingNffe", "UsReportableAccount", "NonConsentingUsAccount", "SponsoredDirectReportingNffe", "ExceptedInterAffiliateFfi", "UndocumentedPreexistingObligation", "UsBranchEciPresumptionApplied", "AccountHolderOfExcludedFinancialAccount", "PassiveNffeReportedByFfi", "NffeSubjectTo1472Withholding", "RecalcitrantPoolNoUsIndicia", "RecalcitrantPoolUsIndicia", "RecalcitrantPoolDormantAccount", "RecalcitrantPoolUsPersons", "RecalcitrantPoolPassiveNffEs", "NonparticipatingFfiPool", "UsPayeesPool", "QiRecalcitrantPoolGeneral", "UsWithholdingAgentForeignBranchOfFi"])
|
569
|
-
return false unless chap4_status_code_validator.valid?(@chap4_status_code)
|
570
|
-
tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
571
|
-
return false unless tin_type_validator.valid?(@tin_type)
|
572
|
-
true
|
573
|
-
end
|
574
|
-
|
575
|
-
# Custom attribute writer method checking allowed values (enum).
|
576
|
-
# @param [Object] lob_code Object to be assigned
|
577
|
-
def lob_code=(lob_code)
|
578
|
-
validator = EnumAttributeValidator.new('String', ["Individual", "GovernmentContractingState", "TaxExemptPensionTrust", "TaxExemptCharitableOrganization", "PubliclyTradedCorporation", "SubsidiaryOfPubliclyTradedCorporation", "CompanyOwnershipBaseErosionTest", "CompanyDerivativeBenefitsTest", "CompanyActiveTradeOrBusinessTest", "DiscretionaryDetermination", "Other", "NoLobArticleInTreaty"])
|
579
|
-
unless validator.valid?(lob_code)
|
580
|
-
fail ArgumentError, "invalid value for \"lob_code\", must be one of #{validator.allowable_values}."
|
581
|
-
end
|
582
|
-
@lob_code = lob_code
|
583
|
-
end
|
584
|
-
|
585
|
-
# Custom attribute writer method checking allowed values (enum).
|
586
|
-
# @param [Object] exemption_code_chap3 Object to be assigned
|
587
|
-
def exemption_code_chap3=(exemption_code_chap3)
|
588
|
-
validator = EnumAttributeValidator.new('String', ["TaxRateDueToBackupWithholding", "EffectivelyConnectedIncome", "ExemptUnderIrc", "IncomeNotFromUsSources", "ExemptUnderTaxTreaty", "PortfolioInterestExemptUnderIrc", "QiThatAssumesPrimaryWithholdingResponsibility", "WfPorWft", "UsBranchTreatedAsUsPerson", "TerritoryFiTreatedAsUsPerson", "QiRepresentsIncomeExempt", "QslThatAssumesPrimaryWithholdingResponsibility", "PayeeSubjectedToChapter4Withholding", "QddThatAssumesPrimaryWithholdingResponsibility", "ExemptUnderSection897L", "ExemptUnderSection892"])
|
589
|
-
unless validator.valid?(exemption_code_chap3)
|
590
|
-
fail ArgumentError, "invalid value for \"exemption_code_chap3\", must be one of #{validator.allowable_values}."
|
591
|
-
end
|
592
|
-
@exemption_code_chap3 = exemption_code_chap3
|
593
|
-
end
|
594
|
-
|
595
|
-
# Custom attribute writer method checking allowed values (enum).
|
596
|
-
# @param [Object] exemption_code_chap4 Object to be assigned
|
597
|
-
def exemption_code_chap4=(exemption_code_chap4)
|
598
|
-
validator = EnumAttributeValidator.new('String', ["NotExempt", "GrandfatheredPayment", "EffectivelyConnectedIncome", "PayeeNotSubjectToChapter4Withholding", "ExcludedNonfinancialPayment", "ForeignEntityThatAssumesPrimaryWithholdingResponsibility", "UsPayeesOfParticipatingFfi", "ExemptFromWithholdingUnderIga", "DormantAccount", "OtherPaymentNotSubjectToChapter4Withholding"])
|
599
|
-
unless validator.valid?(exemption_code_chap4)
|
600
|
-
fail ArgumentError, "invalid value for \"exemption_code_chap4\", must be one of #{validator.allowable_values}."
|
601
|
-
end
|
602
|
-
@exemption_code_chap4 = exemption_code_chap4
|
603
|
-
end
|
604
|
-
|
605
|
-
# Custom attribute writer method checking allowed values (enum).
|
606
|
-
# @param [Object] chap3_status_code Object to be assigned
|
607
|
-
def chap3_status_code=(chap3_status_code)
|
608
|
-
validator = EnumAttributeValidator.new('String', ["USWithholdingAgentFI", "USWithholdingAgentOther", "TerritoryFITreatedAsUSPerson", "TerritoryFINotTreatedAsUSPerson", "USBranchTreatedAsUSPerson", "USBranchNotTreatedAsUSPerson", "USBranchECIPresumptionApplied", "PartnershipOtherThanWithholdingForeignPartnership", "WithholdingForeignPartnership", "TrustOtherThanWithholdingForeignTrust", "WithholdingForeignTrust", "QualifiedIntermediary", "QualifiedSecuritiesLenderQualifiedIntermediary", "QualifiedSecuritiesLenderOther", "Corporation", "Individual", "Estate", "PrivateFoundation", "GovernmentOrInternationalOrganization", "TaxExemptOrganizationSection501cEntities", "UnknownRecipient", "ArtistOrAthlete", "Pension", "ForeignCentralBankOfIssue", "NonqualifiedIntermediary", "HybridEntityMakingTreatyClaim", "WithholdingRatePoolGeneral", "WithholdingRatePoolExemptOrganization", "PAIWithholdingRatePoolGeneral", "PAIWithholdingRatePoolExemptOrganization", "AgencyWithholdingRatePoolGeneral", "AgencyWithholdingRatePoolExemptOrganization", "USWithholdingAgentForeignBranchOfFI", "QualifiedDerivativesDealer", "ForeignGovernmentIntegralPart", "ForeignGovernmentControlledEntity", "PubliclyTradedPartnership", "DisclosingQualifiedIntermediary"])
|
609
|
-
unless validator.valid?(chap3_status_code)
|
610
|
-
fail ArgumentError, "invalid value for \"chap3_status_code\", must be one of #{validator.allowable_values}."
|
611
|
-
end
|
612
|
-
@chap3_status_code = chap3_status_code
|
613
|
-
end
|
614
|
-
|
615
|
-
# Custom attribute writer method checking allowed values (enum).
|
616
|
-
# @param [Object] chap4_status_code Object to be assigned
|
617
|
-
def chap4_status_code=(chap4_status_code)
|
618
|
-
validator = EnumAttributeValidator.new('String', ["UsWithholdingAgentFi", "UsWithholdingAgentOther", "TerritoryFiNotTreatedAsUsPerson", "TerritoryFiTreatedAsUsPerson", "ParticipatingFfiOther", "ParticipatingFfiReportingModel2Ffi", "RegisteredDeemedCompliantFfiReportingModel1Ffi", "RegisteredDeemedCompliantFfiSponsoredEntity", "RegisteredDeemedCompliantFfiOther", "CertifiedDeemedCompliantFfiOther", "CertifiedDeemedCompliantFfiffiWithLowValueAccounts", "CertifiedDeemedCompliantFfiNonRegisteringLocalBank", "CertifiedDeemedCompliantFfiSponsoredEntity", "CertifiedDeemedCompliantFfiInvestmentAdvisorOrManager", "NonparticipatingFfi", "OwnerDocumentedFfi", "UsBranchTreatedAsUsPerson", "UsBranchNotTreatedAsUsPerson", "PassiveNffeIdentifyingSubstantialUsOwners", "PassiveNffeWithNoSubstantialUsOwners", "PubliclyTradedNffeOrAffiliate", "ActiveNffe", "Individual", "Section501CEntities", "ExceptedTerritoryNffe", "ExceptedNffeOther", "ExemptBeneficialOwner", "EntityWhollyOwnedByExemptBeneficialOwners", "UnknownRecipient", "RecalcitrantAccountHolder", "NonreportingIgafii", "DirectReportingNffe", "UsReportableAccount", "NonConsentingUsAccount", "SponsoredDirectReportingNffe", "ExceptedInterAffiliateFfi", "UndocumentedPreexistingObligation", "UsBranchEciPresumptionApplied", "AccountHolderOfExcludedFinancialAccount", "PassiveNffeReportedByFfi", "NffeSubjectTo1472Withholding", "RecalcitrantPoolNoUsIndicia", "RecalcitrantPoolUsIndicia", "RecalcitrantPoolDormantAccount", "RecalcitrantPoolUsPersons", "RecalcitrantPoolPassiveNffEs", "NonparticipatingFfiPool", "UsPayeesPool", "QiRecalcitrantPoolGeneral", "UsWithholdingAgentForeignBranchOfFi"])
|
619
|
-
unless validator.valid?(chap4_status_code)
|
620
|
-
fail ArgumentError, "invalid value for \"chap4_status_code\", must be one of #{validator.allowable_values}."
|
621
|
-
end
|
622
|
-
@chap4_status_code = chap4_status_code
|
623
|
-
end
|
624
|
-
|
625
|
-
# Custom attribute writer method checking allowed values (enum).
|
626
|
-
# @param [Object] tin_type Object to be assigned
|
627
|
-
def tin_type=(tin_type)
|
628
|
-
validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
629
|
-
unless validator.valid?(tin_type)
|
630
|
-
fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
|
631
|
-
end
|
632
|
-
@tin_type = tin_type
|
633
|
-
end
|
634
|
-
|
635
|
-
# Checks equality by comparing each attribute.
|
636
|
-
# @param [Object] Object to be compared
|
637
|
-
def ==(o)
|
638
|
-
return true if self.equal?(o)
|
639
|
-
self.class == o.class &&
|
640
|
-
unique_form_id == o.unique_form_id &&
|
641
|
-
no_tin == o.no_tin &&
|
642
|
-
recipient_date_of_birth == o.recipient_date_of_birth &&
|
643
|
-
recipient_giin == o.recipient_giin &&
|
644
|
-
recipient_foreign_tin == o.recipient_foreign_tin &&
|
645
|
-
lob_code == o.lob_code &&
|
646
|
-
income_code == o.income_code &&
|
647
|
-
gross_income == o.gross_income &&
|
648
|
-
withholding_indicator == o.withholding_indicator &&
|
649
|
-
tax_country_code == o.tax_country_code &&
|
650
|
-
exemption_code_chap3 == o.exemption_code_chap3 &&
|
651
|
-
exemption_code_chap4 == o.exemption_code_chap4 &&
|
652
|
-
tax_rate_chap3 == o.tax_rate_chap3 &&
|
653
|
-
withholding_allowance == o.withholding_allowance &&
|
654
|
-
federal_tax_withheld == o.federal_tax_withheld &&
|
655
|
-
tax_not_deposited_indicator == o.tax_not_deposited_indicator &&
|
656
|
-
academic_indicator == o.academic_indicator &&
|
657
|
-
tax_withheld_other_agents == o.tax_withheld_other_agents &&
|
658
|
-
amount_repaid == o.amount_repaid &&
|
659
|
-
tax_paid_agent == o.tax_paid_agent &&
|
660
|
-
chap3_status_code == o.chap3_status_code &&
|
661
|
-
chap4_status_code == o.chap4_status_code &&
|
662
|
-
primary_withholding_agent == o.primary_withholding_agent &&
|
663
|
-
intermediary_or_flow_through == o.intermediary_or_flow_through &&
|
664
|
-
issuer_id == o.issuer_id &&
|
665
|
-
reference_id == o.reference_id &&
|
666
|
-
recipient_tin == o.recipient_tin &&
|
667
|
-
recipient_name == o.recipient_name &&
|
668
|
-
tin_type == o.tin_type &&
|
669
|
-
recipient_second_name == o.recipient_second_name &&
|
670
|
-
address == o.address &&
|
671
|
-
address2 == o.address2 &&
|
672
|
-
city == o.city &&
|
673
|
-
state == o.state &&
|
674
|
-
zip == o.zip &&
|
675
|
-
email == o.email &&
|
676
|
-
account_number == o.account_number &&
|
677
|
-
office_code == o.office_code &&
|
678
|
-
non_us_province == o.non_us_province &&
|
679
|
-
country_code == o.country_code &&
|
680
|
-
federal_e_file == o.federal_e_file &&
|
681
|
-
postal_mail == o.postal_mail &&
|
682
|
-
state_e_file == o.state_e_file &&
|
683
|
-
tin_match == o.tin_match &&
|
684
|
-
second_tin_notice == o.second_tin_notice &&
|
685
|
-
fatca_filing_requirement == o.fatca_filing_requirement &&
|
686
|
-
address_verification == o.address_verification &&
|
687
|
-
state_and_local_withholding == o.state_and_local_withholding
|
688
|
-
end
|
689
|
-
|
690
|
-
# @see the `==` method
|
691
|
-
# @param [Object] Object to be compared
|
692
|
-
def eql?(o)
|
693
|
-
self == o
|
694
|
-
end
|
695
|
-
|
696
|
-
# Calculates hash code according to all attributes.
|
697
|
-
# @return [Integer] Hash code
|
698
|
-
def hash
|
699
|
-
[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
|
700
|
-
end
|
701
|
-
|
702
|
-
# Builds the object from hash
|
703
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
704
|
-
# @return [Object] Returns the model itself
|
705
|
-
def self.build_from_hash(attributes)
|
706
|
-
return nil unless attributes.is_a?(Hash)
|
707
|
-
attributes = attributes.transform_keys(&:to_sym)
|
708
|
-
transformed_hash = {}
|
709
|
-
openapi_types.each_pair do |key, type|
|
710
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
711
|
-
transformed_hash["#{key}"] = nil
|
712
|
-
elsif type =~ /\AArray<(.*)>/i
|
713
|
-
# check to ensure the input is an array given that the attribute
|
714
|
-
# is documented as an array but the input is not
|
715
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
716
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
717
|
-
end
|
718
|
-
elsif !attributes[attribute_map[key]].nil?
|
719
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
720
|
-
end
|
721
|
-
end
|
722
|
-
new(transformed_hash)
|
723
|
-
end
|
724
|
-
|
725
|
-
# Deserializes the data based on type
|
726
|
-
# @param string type Data type
|
727
|
-
# @param string value Value to be deserialized
|
728
|
-
# @return [Object] Deserialized data
|
729
|
-
def self._deserialize(type, value)
|
730
|
-
case type.to_sym
|
731
|
-
when :Time
|
732
|
-
Time.parse(value)
|
733
|
-
when :Date
|
734
|
-
Date.parse(value)
|
735
|
-
when :String
|
736
|
-
value.to_s
|
737
|
-
when :Integer
|
738
|
-
value.to_i
|
739
|
-
when :Float
|
740
|
-
value.to_f
|
741
|
-
when :Boolean
|
742
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
743
|
-
true
|
744
|
-
else
|
745
|
-
false
|
746
|
-
end
|
747
|
-
when :Object
|
748
|
-
# generic object (usually a Hash), return directly
|
749
|
-
value
|
750
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
751
|
-
inner_type = Regexp.last_match[:inner_type]
|
752
|
-
value.map { |v| _deserialize(inner_type, v) }
|
753
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
754
|
-
k_type = Regexp.last_match[:k_type]
|
755
|
-
v_type = Regexp.last_match[:v_type]
|
756
|
-
{}.tap do |hash|
|
757
|
-
value.each do |k, v|
|
758
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
759
|
-
end
|
760
|
-
end
|
761
|
-
else # model
|
762
|
-
# models (e.g. Pet) or oneOf
|
763
|
-
klass = AvalaraSdk::A1099::V2.const_get(type)
|
764
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
765
|
-
end
|
766
|
-
end
|
767
|
-
|
768
|
-
# Returns the string representation of the object
|
769
|
-
# @return [String] String presentation of the object
|
770
|
-
def to_s
|
771
|
-
to_hash.to_s
|
772
|
-
end
|
773
|
-
|
774
|
-
# to_body is an alias to to_hash (backward compatibility)
|
775
|
-
# @return [Hash] Returns the object in the form of hash
|
776
|
-
def to_body
|
777
|
-
to_hash
|
778
|
-
end
|
779
|
-
|
780
|
-
# Returns the object in the form of hash
|
781
|
-
# @return [Hash] Returns the object in the form of hash
|
782
|
-
def to_hash
|
783
|
-
hash = {}
|
784
|
-
self.class.attribute_map.each_pair do |attr, param|
|
785
|
-
value = self.send(attr)
|
786
|
-
if value.nil?
|
787
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
788
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
789
|
-
end
|
790
|
-
|
791
|
-
hash[param] = _to_hash(value)
|
792
|
-
end
|
793
|
-
hash
|
794
|
-
end
|
795
|
-
|
796
|
-
# Outputs non-array value in the form of hash
|
797
|
-
# For object, use to_hash. Otherwise, just return the value
|
798
|
-
# @param [Object] value Any valid value
|
799
|
-
# @return [Hash] Returns the value in the form of hash
|
800
|
-
def _to_hash(value)
|
801
|
-
if value.is_a?(Array)
|
802
|
-
value.compact.map { |v| _to_hash(v) }
|
803
|
-
elsif value.is_a?(Hash)
|
804
|
-
{}.tap do |hash|
|
805
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
806
|
-
end
|
807
|
-
elsif value.respond_to? :to_hash
|
808
|
-
value.to_hash
|
809
|
-
else
|
810
|
-
value
|
811
|
-
end
|
812
|
-
end
|
813
|
-
|
814
|
-
end
|
815
|
-
|
816
|
-
end
|