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.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +18 -79
  4. data/docs/A1099/V2/CompaniesW9Api.md +18 -18
  5. data/docs/A1099/V2/CompanyCreateUpdateRequestModel.md +18 -18
  6. data/docs/A1099/V2/CompanyResponse.md +37 -37
  7. data/docs/A1099/V2/CoveredIndividual.md +56 -0
  8. data/docs/A1099/V2/CreateAndSendW9FormEmailRequest.md +55 -0
  9. data/docs/A1099/V2/CreateCompanyRequest.md +49 -0
  10. data/docs/A1099/V2/CreateIssuerRequest.md +49 -0
  11. data/docs/A1099/V2/EntryStatusResponse.md +20 -0
  12. data/docs/A1099/V2/Form1042S.md +83 -83
  13. data/docs/A1099/V2/Form1095B.md +72 -62
  14. data/docs/A1099/V2/Form1095C.md +112 -0
  15. data/docs/A1099/V2/Form1099Base.md +60 -60
  16. data/docs/A1099/V2/Form1099Div.md +79 -77
  17. data/docs/A1099/V2/Form1099Int.md +76 -74
  18. data/docs/A1099/V2/Form1099K.md +83 -83
  19. data/docs/A1099/V2/Form1099ListRequest.md +20 -0
  20. data/docs/A1099/V2/Form1099Misc.md +79 -77
  21. data/docs/A1099/V2/Form1099Nec.md +64 -64
  22. data/docs/A1099/V2/Form1099R.md +95 -93
  23. data/docs/A1099/V2/Forms1099Api.md +45 -41
  24. data/docs/A1099/V2/FormsW9Api.md +98 -14
  25. data/docs/A1099/V2/Get1099Form200Response.md +19 -19
  26. data/docs/A1099/V2/IntermediaryOrFlowThrough.md +11 -11
  27. data/docs/A1099/V2/IssuerCommand.md +16 -16
  28. data/docs/A1099/V2/IssuerResponse.md +35 -35
  29. data/docs/A1099/V2/Issuers1099Api.md +10 -10
  30. data/docs/A1099/V2/JobResponse.md +56 -0
  31. data/docs/A1099/V2/JobsApi.md +91 -0
  32. data/docs/A1099/V2/OfferAndCoverage.md +28 -0
  33. data/docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md +22 -0
  34. data/docs/A1099/V2/PrimaryWithholdingAgent.md +4 -4
  35. data/docs/A1099/V2/StateAndLocalWithholding.md +8 -8
  36. data/docs/A1099/V2/ValidationError.md +2 -2
  37. data/docs/A1099/V2/W4FormMinimalRequest.md +30 -0
  38. data/docs/A1099/V2/W4FormRequest.md +6 -6
  39. data/docs/A1099/V2/W8BenEFormMinimalRequest.md +28 -0
  40. data/docs/A1099/V2/W8BenEFormRequest.md +6 -6
  41. data/docs/A1099/V2/W8BenFormMinimalRequest.md +28 -0
  42. data/docs/A1099/V2/W8BenFormRequest.md +6 -6
  43. data/docs/A1099/V2/W8ImyFormMinimalRequest.md +28 -0
  44. data/docs/A1099/V2/W8ImyFormRequest.md +6 -6
  45. data/docs/A1099/V2/W9FormBaseMinimalRequest.md +24 -0
  46. data/docs/A1099/V2/W9FormBaseRequest.md +6 -6
  47. data/docs/A1099/V2/W9FormBaseResponse.md +3 -3
  48. data/docs/A1099/V2/W9FormMinimalRequest.md +28 -0
  49. data/docs/A1099/V2/W9FormRequest.md +6 -6
  50. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +27 -27
  51. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +89 -57
  52. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +144 -6
  53. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +21 -21
  54. data/lib/avalara_sdk/api/A1099/V2/{jobs1099_api.rb → jobs_api.rb} +9 -9
  55. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
  56. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
  57. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  58. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
  59. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
  60. data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
  61. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
  62. data/lib/avalara_sdk/models/A1099/V2/company_create_update_request_model.rb +58 -17
  63. data/lib/avalara_sdk/models/A1099/V2/company_response.rb +110 -69
  64. data/lib/avalara_sdk/models/A1099/V2/{covered_individual_request.rb → covered_individual.rb} +36 -7
  65. data/lib/avalara_sdk/models/A1099/V2/{i_create_form1099_request.rb → create_and_send_w9_form_email_request.rb} +6 -5
  66. data/lib/avalara_sdk/models/A1099/V2/{error_response_errors_inner.rb → create_company_request.rb} +3 -3
  67. data/lib/avalara_sdk/models/A1099/V2/{i_update_form1099_request.rb → create_issuer_request.rb} +3 -5
  68. data/lib/avalara_sdk/models/A1099/V2/{status_detail.rb → entry_status_response.rb} +20 -18
  69. data/lib/avalara_sdk/models/A1099/V2/form1042_s.rb +424 -179
  70. data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +365 -179
  71. data/lib/avalara_sdk/models/A1099/V2/{form1095_b_response.rb → form1095_c.rb} +259 -111
  72. data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +286 -177
  73. data/lib/avalara_sdk/models/A1099/V2/form1099_div.rb +310 -171
  74. data/lib/avalara_sdk/models/A1099/V2/form1099_int.rb +308 -174
  75. data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +298 -186
  76. data/lib/avalara_sdk/models/A1099/V2/{form1099_div_list.rb → form1099_list_request.rb} +49 -22
  77. data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +337 -201
  78. data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +298 -183
  79. data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +414 -274
  80. data/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +9 -9
  81. data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through.rb +13 -1
  82. data/lib/avalara_sdk/models/A1099/V2/issuer_command.rb +42 -23
  83. data/lib/avalara_sdk/models/A1099/V2/issuer_response.rb +77 -46
  84. data/lib/avalara_sdk/models/A1099/V2/{job_result.rb → job_response.rb} +108 -42
  85. data/lib/avalara_sdk/models/A1099/V2/{offer_and_coverage_request.rb → offer_and_coverage.rb} +79 -9
  86. data/lib/avalara_sdk/models/A1099/V2/{paginated_query_result_model.rb → paginated_query_result_model_form1099_base.rb} +4 -4
  87. data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent.rb +23 -16
  88. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb +8 -0
  89. data/lib/avalara_sdk/models/A1099/V2/validation_error.rb +2 -0
  90. data/lib/avalara_sdk/models/A1099/V2/w4_form_minimal_request.rb +418 -0
  91. data/lib/avalara_sdk/models/A1099/V2/w4_form_request.rb +53 -27
  92. data/lib/avalara_sdk/models/A1099/V2/{company_model.rb → w8_ben_e_form_minimal_request.rb} +139 -170
  93. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb +53 -27
  94. data/lib/avalara_sdk/models/A1099/V2/{base_company_model.rb → w8_ben_form_minimal_request.rb} +148 -122
  95. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb +53 -27
  96. data/lib/avalara_sdk/models/A1099/V2/{attribute.rb → w8_imy_form_minimal_request.rb} +135 -132
  97. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_request.rb +53 -27
  98. data/lib/avalara_sdk/models/A1099/V2/{http_validation_problem_details.rb → w9_form_base_minimal_request.rb} +87 -53
  99. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_request.rb +60 -27
  100. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +14 -14
  101. data/lib/avalara_sdk/models/A1099/V2/{company_response_model.rb → w9_form_minimal_request.rb} +140 -148
  102. data/lib/avalara_sdk/models/A1099/V2/w9_form_request.rb +53 -27
  103. data/lib/avalara_sdk/version.rb +1 -1
  104. data/lib/avalara_sdk.rb +22 -105
  105. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
  106. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  107. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
  108. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
  109. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
  110. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
  111. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
  112. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
  113. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  114. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  115. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  116. metadata +37 -103
  117. data/lib/avalara_sdk/models/A1099/V2/base_form_list_request.rb +0 -210
  118. data/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +0 -108
  119. data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +0 -403
  120. data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference_response.rb +0 -407
  121. data/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb +0 -108
  122. data/lib/avalara_sdk/models/A1099/V2/data.rb +0 -237
  123. data/lib/avalara_sdk/models/A1099/V2/form1042_s_list.rb +0 -238
  124. data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb +0 -816
  125. data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item_response.rb +0 -980
  126. data/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb +0 -778
  127. data/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb +0 -619
  128. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list.rb +0 -238
  129. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +0 -606
  130. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item_response.rb +0 -765
  131. data/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +0 -627
  132. data/lib/avalara_sdk/models/A1099/V2/form1095_c_list.rb +0 -238
  133. data/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb +0 -662
  134. data/lib/avalara_sdk/models/A1099/V2/form1099_base_response.rb +0 -726
  135. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +0 -747
  136. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb +0 -931
  137. data/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +0 -729
  138. data/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +0 -790
  139. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list.rb +0 -238
  140. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item.rb +0 -702
  141. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb +0 -887
  142. data/lib/avalara_sdk/models/A1099/V2/form1099_int_request.rb +0 -684
  143. data/lib/avalara_sdk/models/A1099/V2/form1099_int_response.rb +0 -773
  144. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list.rb +0 -238
  145. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +0 -788
  146. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item_response.rb +0 -995
  147. data/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +0 -770
  148. data/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb +0 -839
  149. data/lib/avalara_sdk/models/A1099/V2/form1099_list.rb +0 -219
  150. data/lib/avalara_sdk/models/A1099/V2/form1099_list_data_inner.rb +0 -55
  151. data/lib/avalara_sdk/models/A1099/V2/form1099_list_response.rb +0 -220
  152. data/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb +0 -108
  153. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list.rb +0 -238
  154. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +0 -688
  155. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item_response.rb +0 -886
  156. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +0 -670
  157. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +0 -754
  158. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list.rb +0 -238
  159. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +0 -586
  160. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item_response.rb +0 -765
  161. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +0 -567
  162. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +0 -646
  163. data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb +0 -228
  164. data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb +0 -107
  165. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list.rb +0 -238
  166. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +0 -763
  167. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb +0 -942
  168. data/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +0 -720
  169. data/lib/avalara_sdk/models/A1099/V2/form1099_r_response.rb +0 -839
  170. data/lib/avalara_sdk/models/A1099/V2/form1099_status_detail_response.rb +0 -223
  171. data/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +0 -502
  172. data/lib/avalara_sdk/models/A1099/V2/form_request_csv_base.rb +0 -475
  173. data/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb +0 -548
  174. data/lib/avalara_sdk/models/A1099/V2/form_request_model.rb +0 -345
  175. data/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +0 -612
  176. data/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +0 -530
  177. data/lib/avalara_sdk/models/A1099/V2/included_base.rb +0 -219
  178. data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through_request.rb +0 -311
  179. data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through_response.rb +0 -311
  180. data/lib/avalara_sdk/models/A1099/V2/link.rb +0 -210
  181. data/lib/avalara_sdk/models/A1099/V2/paginated_w9_forms_model.rb +0 -231
  182. data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent_request.rb +0 -221
  183. data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent_response.rb +0 -221
  184. data/lib/avalara_sdk/models/A1099/V2/problem_details.rb +0 -251
  185. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_request.rb +0 -278
  186. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_response.rb +0 -282
  187. data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_app.rb +0 -231
  188. data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_response.rb +0 -231
  189. data/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +0 -108
  190. data/lib/avalara_sdk/models/A1099/V2/validation_error_app.rb +0 -229
  191. data/lib/avalara_sdk/models/A1099/V2/validation_error_response.rb +0 -231
  192. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response.rb +0 -233
  193. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner.rb +0 -274
  194. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_addresses_inner.rb +0 -251
  195. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_identifiers_inner.rb +0 -221
  196. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_supported_document_types_inner.rb +0 -241
  197. data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request.rb +0 -224
  198. data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request_data_inner.rb +0 -237
  199. data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request_metadata.rb +0 -288
  200. data/lib/avalara_sdk/models/EInvoicing/V1/submit_document_data.rb +0 -216
@@ -1,886 +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 Form1099MiscListItemResponse
14
- # Rents
15
- attr_accessor :rents
16
-
17
- # Royalties
18
- attr_accessor :royalties
19
-
20
- # Other income
21
- attr_accessor :other_income
22
-
23
- # Federal income tax withheld
24
- attr_accessor :fed_income_tax_withheld
25
-
26
- # Fishing boat proceeds
27
- attr_accessor :fishing_boat_proceeds
28
-
29
- # Medical and health care payments
30
- attr_accessor :medical_and_health_care_payments
31
-
32
- # Substitute payments in lieu of dividends or interest
33
- attr_accessor :substitute_payments
34
-
35
- # Payer made direct sales totaling $5,000 or more of consumer products to recipient for resale
36
- attr_accessor :direct_sales_indicator
37
-
38
- # Crop insurance proceeds
39
- attr_accessor :crop_insurance_proceeds
40
-
41
- # (Legacy field) Excess golden parachute payments
42
- attr_accessor :excess_golden_parachute_payments
43
-
44
- # Gross proceeds paid to an attorney
45
- attr_accessor :gross_proceeds_paid_to_attorney
46
-
47
- # Fish purchased for resale
48
- attr_accessor :fish_purchased_for_resale
49
-
50
- # Section 409A deferrals
51
- attr_accessor :section409_a_deferrals
52
-
53
- # Nonqualified deferred compensation
54
- attr_accessor :nonqualified_deferred_compensation
55
-
56
- # ID of the form
57
- attr_accessor :id
58
-
59
- # Type of the form. Will be one of: * 940 * 941 * 943 * 944 * 945 * 1042 * 1042-S * 1095-B * 1095-C * 1097-BTC * 1098 * 1098-C * 1098-E * 1098-Q * 1098-T * 3921 * 3922 * 5498 * 5498-ESA * 5498-SA * 1099-MISC * 1099-A * 1099-B * 1099-C * 1099-CAP * 1099-DIV * 1099-G * 1099-INT * 1099-K * 1099-LS * 1099-LTC * 1099-NEC * 1099-OID * 1099-PATR * 1099-Q * 1099-R * 1099-S * 1099-SA * T4A * W-2 * W-2G * 1099-HC
60
- attr_accessor :type
61
-
62
- # Issuer ID
63
- attr_accessor :issuer_id
64
-
65
- # Issuer Reference ID
66
- attr_accessor :issuer_reference_id
67
-
68
- # Issuer TIN
69
- attr_accessor :issuer_tin
70
-
71
- # Tax year
72
- attr_accessor :tax_year
73
-
74
- # Boolean indicating that federal e-filing has been scheduled for this form
75
- attr_accessor :federal_efile
76
-
77
- # Federal e-file status
78
- attr_accessor :federal_efile_status
79
-
80
- # Boolean indicating that state e-filing has been scheduled for this form
81
- attr_accessor :state_efile
82
-
83
- # State e-file status
84
- attr_accessor :state_efile_status
85
-
86
- # Boolean indicating that postal mailing to the recipient has been scheduled for this form
87
- attr_accessor :postal_mail
88
-
89
- # Postal mail to recipient status
90
- attr_accessor :postal_mail_status
91
-
92
- # Boolean indicating that TIN Matching has been scheduled for this form
93
- attr_accessor :tin_match
94
-
95
- # TIN Match status
96
- attr_accessor :tin_match_status
97
-
98
- # Boolean indicating that address verification has been scheduled for this form
99
- attr_accessor :address_verification
100
-
101
- # Address verification status
102
- attr_accessor :address_verification_status
103
-
104
- # EDelivery status
105
- attr_accessor :e_delivery_status
106
-
107
- # Reference ID
108
- attr_accessor :reference_id
109
-
110
- # Recipient email address
111
- attr_accessor :email
112
-
113
- # Type of TIN (Tax ID Number). Will be one of: * SSN * EIN * ITIN * ATIN
114
- attr_accessor :tin_type
115
-
116
- # Recipient Tax ID Number
117
- attr_accessor :tin
118
-
119
- # Indicates whether the recipient has no TIN
120
- attr_accessor :no_tin
121
-
122
- # Second Tin Notice
123
- attr_accessor :second_tin_notice
124
-
125
- # Recipient name
126
- attr_accessor :recipient_name
127
-
128
- # Recipient second name
129
- attr_accessor :recipient_second_name
130
-
131
- # Address
132
- attr_accessor :address
133
-
134
- # Address line 2
135
- attr_accessor :address2
136
-
137
- # City
138
- attr_accessor :city
139
-
140
- # US state
141
- attr_accessor :state
142
-
143
- # Zip/postal code
144
- attr_accessor :zip
145
-
146
- # Foreign province
147
- attr_accessor :non_us_province
148
-
149
- # Country code, as defined at https://www.irs.gov/e-file-providers/country-codes
150
- attr_accessor :country_code
151
-
152
- # Account Number
153
- attr_accessor :account_number
154
-
155
- # Office Code
156
- attr_accessor :office_code
157
-
158
- # FATCA filing requirement
159
- attr_accessor :fatca_filing_requirement
160
-
161
- # Validation errors
162
- attr_accessor :validation_errors
163
-
164
- # Creation time
165
- attr_accessor :created_at
166
-
167
- # Update time
168
- attr_accessor :updated_at
169
-
170
- attr_accessor :state_and_local_withholding
171
-
172
- # Attribute mapping from ruby-style variable name to JSON key.
173
- def self.attribute_map
174
- {
175
- :'rents' => :'rents',
176
- :'royalties' => :'royalties',
177
- :'other_income' => :'otherIncome',
178
- :'fed_income_tax_withheld' => :'fedIncomeTaxWithheld',
179
- :'fishing_boat_proceeds' => :'fishingBoatProceeds',
180
- :'medical_and_health_care_payments' => :'medicalAndHealthCarePayments',
181
- :'substitute_payments' => :'substitutePayments',
182
- :'direct_sales_indicator' => :'directSalesIndicator',
183
- :'crop_insurance_proceeds' => :'cropInsuranceProceeds',
184
- :'excess_golden_parachute_payments' => :'excessGoldenParachutePayments',
185
- :'gross_proceeds_paid_to_attorney' => :'grossProceedsPaidToAttorney',
186
- :'fish_purchased_for_resale' => :'fishPurchasedForResale',
187
- :'section409_a_deferrals' => :'section409ADeferrals',
188
- :'nonqualified_deferred_compensation' => :'nonqualifiedDeferredCompensation',
189
- :'id' => :'id',
190
- :'type' => :'type',
191
- :'issuer_id' => :'issuerId',
192
- :'issuer_reference_id' => :'issuerReferenceId',
193
- :'issuer_tin' => :'issuerTin',
194
- :'tax_year' => :'taxYear',
195
- :'federal_efile' => :'federalEfile',
196
- :'federal_efile_status' => :'federalEfileStatus',
197
- :'state_efile' => :'stateEfile',
198
- :'state_efile_status' => :'stateEfileStatus',
199
- :'postal_mail' => :'postalMail',
200
- :'postal_mail_status' => :'postalMailStatus',
201
- :'tin_match' => :'tinMatch',
202
- :'tin_match_status' => :'tinMatchStatus',
203
- :'address_verification' => :'addressVerification',
204
- :'address_verification_status' => :'addressVerificationStatus',
205
- :'e_delivery_status' => :'eDeliveryStatus',
206
- :'reference_id' => :'referenceId',
207
- :'email' => :'email',
208
- :'tin_type' => :'tinType',
209
- :'tin' => :'tin',
210
- :'no_tin' => :'noTin',
211
- :'second_tin_notice' => :'secondTinNotice',
212
- :'recipient_name' => :'recipientName',
213
- :'recipient_second_name' => :'recipientSecondName',
214
- :'address' => :'address',
215
- :'address2' => :'address2',
216
- :'city' => :'city',
217
- :'state' => :'state',
218
- :'zip' => :'zip',
219
- :'non_us_province' => :'nonUsProvince',
220
- :'country_code' => :'countryCode',
221
- :'account_number' => :'accountNumber',
222
- :'office_code' => :'officeCode',
223
- :'fatca_filing_requirement' => :'fatcaFilingRequirement',
224
- :'validation_errors' => :'validationErrors',
225
- :'created_at' => :'createdAt',
226
- :'updated_at' => :'updatedAt',
227
- :'state_and_local_withholding' => :'stateAndLocalWithholding'
228
- }
229
- end
230
-
231
- # Returns all the JSON keys this model knows about
232
- def self.acceptable_attributes
233
- attribute_map.values
234
- end
235
-
236
- # Attribute type mapping.
237
- def self.openapi_types
238
- {
239
- :'rents' => :'Float',
240
- :'royalties' => :'Float',
241
- :'other_income' => :'Float',
242
- :'fed_income_tax_withheld' => :'Float',
243
- :'fishing_boat_proceeds' => :'Float',
244
- :'medical_and_health_care_payments' => :'Float',
245
- :'substitute_payments' => :'Float',
246
- :'direct_sales_indicator' => :'Boolean',
247
- :'crop_insurance_proceeds' => :'Float',
248
- :'excess_golden_parachute_payments' => :'Float',
249
- :'gross_proceeds_paid_to_attorney' => :'Float',
250
- :'fish_purchased_for_resale' => :'Float',
251
- :'section409_a_deferrals' => :'Float',
252
- :'nonqualified_deferred_compensation' => :'Float',
253
- :'id' => :'String',
254
- :'type' => :'String',
255
- :'issuer_id' => :'Integer',
256
- :'issuer_reference_id' => :'String',
257
- :'issuer_tin' => :'String',
258
- :'tax_year' => :'Integer',
259
- :'federal_efile' => :'Boolean',
260
- :'federal_efile_status' => :'StatusDetail',
261
- :'state_efile' => :'Boolean',
262
- :'state_efile_status' => :'Array<StateEfileStatusDetailResponse>',
263
- :'postal_mail' => :'Boolean',
264
- :'postal_mail_status' => :'StatusDetail',
265
- :'tin_match' => :'Boolean',
266
- :'tin_match_status' => :'StatusDetail',
267
- :'address_verification' => :'Boolean',
268
- :'address_verification_status' => :'StatusDetail',
269
- :'e_delivery_status' => :'StatusDetail',
270
- :'reference_id' => :'String',
271
- :'email' => :'String',
272
- :'tin_type' => :'String',
273
- :'tin' => :'String',
274
- :'no_tin' => :'Boolean',
275
- :'second_tin_notice' => :'Boolean',
276
- :'recipient_name' => :'String',
277
- :'recipient_second_name' => :'String',
278
- :'address' => :'String',
279
- :'address2' => :'String',
280
- :'city' => :'String',
281
- :'state' => :'String',
282
- :'zip' => :'String',
283
- :'non_us_province' => :'String',
284
- :'country_code' => :'String',
285
- :'account_number' => :'String',
286
- :'office_code' => :'String',
287
- :'fatca_filing_requirement' => :'Boolean',
288
- :'validation_errors' => :'Array<ValidationErrorResponse>',
289
- :'created_at' => :'Time',
290
- :'updated_at' => :'Time',
291
- :'state_and_local_withholding' => :'StateAndLocalWithholdingResponse'
292
- }
293
- end
294
-
295
- # List of attributes with nullable: true
296
- def self.openapi_nullable
297
- Set.new([
298
- :'rents',
299
- :'royalties',
300
- :'other_income',
301
- :'fed_income_tax_withheld',
302
- :'fishing_boat_proceeds',
303
- :'medical_and_health_care_payments',
304
- :'substitute_payments',
305
- :'crop_insurance_proceeds',
306
- :'excess_golden_parachute_payments',
307
- :'gross_proceeds_paid_to_attorney',
308
- :'fish_purchased_for_resale',
309
- :'section409_a_deferrals',
310
- :'nonqualified_deferred_compensation',
311
- :'issuer_reference_id',
312
- :'issuer_tin',
313
- :'state_efile_status',
314
- :'postal_mail_status',
315
- :'tin_match_status',
316
- :'address_verification_status',
317
- :'e_delivery_status',
318
- :'reference_id',
319
- :'email',
320
- :'tin_type',
321
- :'tin',
322
- :'second_tin_notice',
323
- :'recipient_name',
324
- :'recipient_second_name',
325
- :'address',
326
- :'address2',
327
- :'city',
328
- :'state',
329
- :'zip',
330
- :'non_us_province',
331
- :'country_code',
332
- :'account_number',
333
- :'office_code',
334
- :'fatca_filing_requirement',
335
- :'validation_errors',
336
- :'state_and_local_withholding'
337
- ])
338
- end
339
-
340
- # List of class defined in allOf (OpenAPI v3)
341
- def self.openapi_all_of
342
- [
343
- :'Form1099BaseResponse'
344
- ]
345
- end
346
-
347
- # Initializes the object
348
- # @param [Hash] attributes Model attributes in the form of hash
349
- def initialize(attributes = {})
350
- if (!attributes.is_a?(Hash))
351
- fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1099MiscListItemResponse` initialize method"
352
- end
353
-
354
- # check to see if the attribute exists and convert string to symbol for hash key
355
- attributes = attributes.each_with_object({}) { |(k, v), h|
356
- if (!self.class.attribute_map.key?(k.to_sym))
357
- fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1099MiscListItemResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
358
- end
359
- h[k.to_sym] = v
360
- }
361
-
362
- if attributes.key?(:'rents')
363
- self.rents = attributes[:'rents']
364
- end
365
-
366
- if attributes.key?(:'royalties')
367
- self.royalties = attributes[:'royalties']
368
- end
369
-
370
- if attributes.key?(:'other_income')
371
- self.other_income = attributes[:'other_income']
372
- end
373
-
374
- if attributes.key?(:'fed_income_tax_withheld')
375
- self.fed_income_tax_withheld = attributes[:'fed_income_tax_withheld']
376
- end
377
-
378
- if attributes.key?(:'fishing_boat_proceeds')
379
- self.fishing_boat_proceeds = attributes[:'fishing_boat_proceeds']
380
- end
381
-
382
- if attributes.key?(:'medical_and_health_care_payments')
383
- self.medical_and_health_care_payments = attributes[:'medical_and_health_care_payments']
384
- end
385
-
386
- if attributes.key?(:'substitute_payments')
387
- self.substitute_payments = attributes[:'substitute_payments']
388
- end
389
-
390
- if attributes.key?(:'direct_sales_indicator')
391
- self.direct_sales_indicator = attributes[:'direct_sales_indicator']
392
- end
393
-
394
- if attributes.key?(:'crop_insurance_proceeds')
395
- self.crop_insurance_proceeds = attributes[:'crop_insurance_proceeds']
396
- end
397
-
398
- if attributes.key?(:'excess_golden_parachute_payments')
399
- self.excess_golden_parachute_payments = attributes[:'excess_golden_parachute_payments']
400
- end
401
-
402
- if attributes.key?(:'gross_proceeds_paid_to_attorney')
403
- self.gross_proceeds_paid_to_attorney = attributes[:'gross_proceeds_paid_to_attorney']
404
- end
405
-
406
- if attributes.key?(:'fish_purchased_for_resale')
407
- self.fish_purchased_for_resale = attributes[:'fish_purchased_for_resale']
408
- end
409
-
410
- if attributes.key?(:'section409_a_deferrals')
411
- self.section409_a_deferrals = attributes[:'section409_a_deferrals']
412
- end
413
-
414
- if attributes.key?(:'nonqualified_deferred_compensation')
415
- self.nonqualified_deferred_compensation = attributes[:'nonqualified_deferred_compensation']
416
- end
417
-
418
- if attributes.key?(:'id')
419
- self.id = attributes[:'id']
420
- else
421
- self.id = nil
422
- end
423
-
424
- if attributes.key?(:'type')
425
- self.type = attributes[:'type']
426
- else
427
- self.type = nil
428
- end
429
-
430
- if attributes.key?(:'issuer_id')
431
- self.issuer_id = attributes[:'issuer_id']
432
- else
433
- self.issuer_id = nil
434
- end
435
-
436
- if attributes.key?(:'issuer_reference_id')
437
- self.issuer_reference_id = attributes[:'issuer_reference_id']
438
- end
439
-
440
- if attributes.key?(:'issuer_tin')
441
- self.issuer_tin = attributes[:'issuer_tin']
442
- end
443
-
444
- if attributes.key?(:'tax_year')
445
- self.tax_year = attributes[:'tax_year']
446
- end
447
-
448
- if attributes.key?(:'federal_efile')
449
- self.federal_efile = attributes[:'federal_efile']
450
- else
451
- self.federal_efile = nil
452
- end
453
-
454
- if attributes.key?(:'federal_efile_status')
455
- self.federal_efile_status = attributes[:'federal_efile_status']
456
- end
457
-
458
- if attributes.key?(:'state_efile')
459
- self.state_efile = attributes[:'state_efile']
460
- else
461
- self.state_efile = nil
462
- end
463
-
464
- if attributes.key?(:'state_efile_status')
465
- if (value = attributes[:'state_efile_status']).is_a?(Array)
466
- self.state_efile_status = value
467
- end
468
- end
469
-
470
- if attributes.key?(:'postal_mail')
471
- self.postal_mail = attributes[:'postal_mail']
472
- else
473
- self.postal_mail = nil
474
- end
475
-
476
- if attributes.key?(:'postal_mail_status')
477
- self.postal_mail_status = attributes[:'postal_mail_status']
478
- end
479
-
480
- if attributes.key?(:'tin_match')
481
- self.tin_match = attributes[:'tin_match']
482
- else
483
- self.tin_match = nil
484
- end
485
-
486
- if attributes.key?(:'tin_match_status')
487
- self.tin_match_status = attributes[:'tin_match_status']
488
- end
489
-
490
- if attributes.key?(:'address_verification')
491
- self.address_verification = attributes[:'address_verification']
492
- else
493
- self.address_verification = nil
494
- end
495
-
496
- if attributes.key?(:'address_verification_status')
497
- self.address_verification_status = attributes[:'address_verification_status']
498
- end
499
-
500
- if attributes.key?(:'e_delivery_status')
501
- self.e_delivery_status = attributes[:'e_delivery_status']
502
- end
503
-
504
- if attributes.key?(:'reference_id')
505
- self.reference_id = attributes[:'reference_id']
506
- end
507
-
508
- if attributes.key?(:'email')
509
- self.email = attributes[:'email']
510
- end
511
-
512
- if attributes.key?(:'tin_type')
513
- self.tin_type = attributes[:'tin_type']
514
- end
515
-
516
- if attributes.key?(:'tin')
517
- self.tin = attributes[:'tin']
518
- end
519
-
520
- if attributes.key?(:'no_tin')
521
- self.no_tin = attributes[:'no_tin']
522
- end
523
-
524
- if attributes.key?(:'second_tin_notice')
525
- self.second_tin_notice = attributes[:'second_tin_notice']
526
- end
527
-
528
- if attributes.key?(:'recipient_name')
529
- self.recipient_name = attributes[:'recipient_name']
530
- end
531
-
532
- if attributes.key?(:'recipient_second_name')
533
- self.recipient_second_name = attributes[:'recipient_second_name']
534
- end
535
-
536
- if attributes.key?(:'address')
537
- self.address = attributes[:'address']
538
- end
539
-
540
- if attributes.key?(:'address2')
541
- self.address2 = attributes[:'address2']
542
- end
543
-
544
- if attributes.key?(:'city')
545
- self.city = attributes[:'city']
546
- end
547
-
548
- if attributes.key?(:'state')
549
- self.state = attributes[:'state']
550
- end
551
-
552
- if attributes.key?(:'zip')
553
- self.zip = attributes[:'zip']
554
- end
555
-
556
- if attributes.key?(:'non_us_province')
557
- self.non_us_province = attributes[:'non_us_province']
558
- end
559
-
560
- if attributes.key?(:'country_code')
561
- self.country_code = attributes[:'country_code']
562
- end
563
-
564
- if attributes.key?(:'account_number')
565
- self.account_number = attributes[:'account_number']
566
- end
567
-
568
- if attributes.key?(:'office_code')
569
- self.office_code = attributes[:'office_code']
570
- end
571
-
572
- if attributes.key?(:'fatca_filing_requirement')
573
- self.fatca_filing_requirement = attributes[:'fatca_filing_requirement']
574
- end
575
-
576
- if attributes.key?(:'validation_errors')
577
- if (value = attributes[:'validation_errors']).is_a?(Array)
578
- self.validation_errors = value
579
- end
580
- end
581
-
582
- if attributes.key?(:'created_at')
583
- self.created_at = attributes[:'created_at']
584
- end
585
-
586
- if attributes.key?(:'updated_at')
587
- self.updated_at = attributes[:'updated_at']
588
- end
589
-
590
- if attributes.key?(:'state_and_local_withholding')
591
- self.state_and_local_withholding = attributes[:'state_and_local_withholding']
592
- end
593
- end
594
-
595
- # Show invalid properties with the reasons. Usually used together with valid?
596
- # @return Array for valid properties with the reasons
597
- def list_invalid_properties
598
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
599
- invalid_properties = Array.new
600
- if @id.nil?
601
- invalid_properties.push('invalid value for "id", id cannot be nil.')
602
- end
603
-
604
- if @id.to_s.length < 1
605
- invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
606
- end
607
-
608
- if @type.nil?
609
- invalid_properties.push('invalid value for "type", type cannot be nil.')
610
- end
611
-
612
- if @type.to_s.length < 1
613
- invalid_properties.push('invalid value for "type", the character length must be great than or equal to 1.')
614
- end
615
-
616
- if @issuer_id.nil?
617
- invalid_properties.push('invalid value for "issuer_id", issuer_id cannot be nil.')
618
- end
619
-
620
- if @federal_efile.nil?
621
- invalid_properties.push('invalid value for "federal_efile", federal_efile cannot be nil.')
622
- end
623
-
624
- if @state_efile.nil?
625
- invalid_properties.push('invalid value for "state_efile", state_efile cannot be nil.')
626
- end
627
-
628
- if @postal_mail.nil?
629
- invalid_properties.push('invalid value for "postal_mail", postal_mail cannot be nil.')
630
- end
631
-
632
- if @tin_match.nil?
633
- invalid_properties.push('invalid value for "tin_match", tin_match cannot be nil.')
634
- end
635
-
636
- if @address_verification.nil?
637
- invalid_properties.push('invalid value for "address_verification", address_verification cannot be nil.')
638
- end
639
-
640
- invalid_properties
641
- end
642
-
643
- # Check to see if the all the properties in the model are valid
644
- # @return true if the model is valid
645
- def valid?
646
- warn '[DEPRECATED] the `valid?` method is obsolete'
647
- return false if @id.nil?
648
- return false if @id.to_s.length < 1
649
- return false if @type.nil?
650
- return false if @type.to_s.length < 1
651
- return false if @issuer_id.nil?
652
- return false if @federal_efile.nil?
653
- return false if @state_efile.nil?
654
- return false if @postal_mail.nil?
655
- return false if @tin_match.nil?
656
- return false if @address_verification.nil?
657
- true
658
- end
659
-
660
- # Custom attribute writer method with validation
661
- # @param [Object] id Value to be assigned
662
- def id=(id)
663
- if id.nil?
664
- fail ArgumentError, 'id cannot be nil'
665
- end
666
-
667
- if id.to_s.length < 1
668
- fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
669
- end
670
-
671
- @id = id
672
- end
673
-
674
- # Custom attribute writer method with validation
675
- # @param [Object] type Value to be assigned
676
- def type=(type)
677
- if type.nil?
678
- fail ArgumentError, 'type cannot be nil'
679
- end
680
-
681
- if type.to_s.length < 1
682
- fail ArgumentError, 'invalid value for "type", the character length must be great than or equal to 1.'
683
- end
684
-
685
- @type = type
686
- end
687
-
688
- # Custom attribute writer method with validation
689
- # @param [Object] state_efile_status Value to be assigned
690
- def state_efile_status=(state_efile_status)
691
- @state_efile_status = state_efile_status
692
- end
693
-
694
- # Custom attribute writer method with validation
695
- # @param [Object] validation_errors Value to be assigned
696
- def validation_errors=(validation_errors)
697
- @validation_errors = validation_errors
698
- end
699
-
700
- # Checks equality by comparing each attribute.
701
- # @param [Object] Object to be compared
702
- def ==(o)
703
- return true if self.equal?(o)
704
- self.class == o.class &&
705
- rents == o.rents &&
706
- royalties == o.royalties &&
707
- other_income == o.other_income &&
708
- fed_income_tax_withheld == o.fed_income_tax_withheld &&
709
- fishing_boat_proceeds == o.fishing_boat_proceeds &&
710
- medical_and_health_care_payments == o.medical_and_health_care_payments &&
711
- substitute_payments == o.substitute_payments &&
712
- direct_sales_indicator == o.direct_sales_indicator &&
713
- crop_insurance_proceeds == o.crop_insurance_proceeds &&
714
- excess_golden_parachute_payments == o.excess_golden_parachute_payments &&
715
- gross_proceeds_paid_to_attorney == o.gross_proceeds_paid_to_attorney &&
716
- fish_purchased_for_resale == o.fish_purchased_for_resale &&
717
- section409_a_deferrals == o.section409_a_deferrals &&
718
- nonqualified_deferred_compensation == o.nonqualified_deferred_compensation &&
719
- id == o.id &&
720
- type == o.type &&
721
- issuer_id == o.issuer_id &&
722
- issuer_reference_id == o.issuer_reference_id &&
723
- issuer_tin == o.issuer_tin &&
724
- tax_year == o.tax_year &&
725
- federal_efile == o.federal_efile &&
726
- federal_efile_status == o.federal_efile_status &&
727
- state_efile == o.state_efile &&
728
- state_efile_status == o.state_efile_status &&
729
- postal_mail == o.postal_mail &&
730
- postal_mail_status == o.postal_mail_status &&
731
- tin_match == o.tin_match &&
732
- tin_match_status == o.tin_match_status &&
733
- address_verification == o.address_verification &&
734
- address_verification_status == o.address_verification_status &&
735
- e_delivery_status == o.e_delivery_status &&
736
- reference_id == o.reference_id &&
737
- email == o.email &&
738
- tin_type == o.tin_type &&
739
- tin == o.tin &&
740
- no_tin == o.no_tin &&
741
- second_tin_notice == o.second_tin_notice &&
742
- recipient_name == o.recipient_name &&
743
- recipient_second_name == o.recipient_second_name &&
744
- address == o.address &&
745
- address2 == o.address2 &&
746
- city == o.city &&
747
- state == o.state &&
748
- zip == o.zip &&
749
- non_us_province == o.non_us_province &&
750
- country_code == o.country_code &&
751
- account_number == o.account_number &&
752
- office_code == o.office_code &&
753
- fatca_filing_requirement == o.fatca_filing_requirement &&
754
- validation_errors == o.validation_errors &&
755
- created_at == o.created_at &&
756
- updated_at == o.updated_at &&
757
- state_and_local_withholding == o.state_and_local_withholding
758
- end
759
-
760
- # @see the `==` method
761
- # @param [Object] Object to be compared
762
- def eql?(o)
763
- self == o
764
- end
765
-
766
- # Calculates hash code according to all attributes.
767
- # @return [Integer] Hash code
768
- def hash
769
- [rents, royalties, other_income, fed_income_tax_withheld, fishing_boat_proceeds, medical_and_health_care_payments, substitute_payments, direct_sales_indicator, crop_insurance_proceeds, excess_golden_parachute_payments, gross_proceeds_paid_to_attorney, fish_purchased_for_resale, section409_a_deferrals, nonqualified_deferred_compensation, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, fatca_filing_requirement, validation_errors, created_at, updated_at, state_and_local_withholding].hash
770
- end
771
-
772
- # Builds the object from hash
773
- # @param [Hash] attributes Model attributes in the form of hash
774
- # @return [Object] Returns the model itself
775
- def self.build_from_hash(attributes)
776
- return nil unless attributes.is_a?(Hash)
777
- attributes = attributes.transform_keys(&:to_sym)
778
- transformed_hash = {}
779
- openapi_types.each_pair do |key, type|
780
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
781
- transformed_hash["#{key}"] = nil
782
- elsif type =~ /\AArray<(.*)>/i
783
- # check to ensure the input is an array given that the attribute
784
- # is documented as an array but the input is not
785
- if attributes[attribute_map[key]].is_a?(Array)
786
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
787
- end
788
- elsif !attributes[attribute_map[key]].nil?
789
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
790
- end
791
- end
792
- new(transformed_hash)
793
- end
794
-
795
- # Deserializes the data based on type
796
- # @param string type Data type
797
- # @param string value Value to be deserialized
798
- # @return [Object] Deserialized data
799
- def self._deserialize(type, value)
800
- case type.to_sym
801
- when :Time
802
- Time.parse(value)
803
- when :Date
804
- Date.parse(value)
805
- when :String
806
- value.to_s
807
- when :Integer
808
- value.to_i
809
- when :Float
810
- value.to_f
811
- when :Boolean
812
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
813
- true
814
- else
815
- false
816
- end
817
- when :Object
818
- # generic object (usually a Hash), return directly
819
- value
820
- when /\AArray<(?<inner_type>.+)>\z/
821
- inner_type = Regexp.last_match[:inner_type]
822
- value.map { |v| _deserialize(inner_type, v) }
823
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
824
- k_type = Regexp.last_match[:k_type]
825
- v_type = Regexp.last_match[:v_type]
826
- {}.tap do |hash|
827
- value.each do |k, v|
828
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
829
- end
830
- end
831
- else # model
832
- # models (e.g. Pet) or oneOf
833
- klass = AvalaraSdk::A1099::V2.const_get(type)
834
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
835
- end
836
- end
837
-
838
- # Returns the string representation of the object
839
- # @return [String] String presentation of the object
840
- def to_s
841
- to_hash.to_s
842
- end
843
-
844
- # to_body is an alias to to_hash (backward compatibility)
845
- # @return [Hash] Returns the object in the form of hash
846
- def to_body
847
- to_hash
848
- end
849
-
850
- # Returns the object in the form of hash
851
- # @return [Hash] Returns the object in the form of hash
852
- def to_hash
853
- hash = {}
854
- self.class.attribute_map.each_pair do |attr, param|
855
- value = self.send(attr)
856
- if value.nil?
857
- is_nullable = self.class.openapi_nullable.include?(attr)
858
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
859
- end
860
-
861
- hash[param] = _to_hash(value)
862
- end
863
- hash
864
- end
865
-
866
- # Outputs non-array value in the form of hash
867
- # For object, use to_hash. Otherwise, just return the value
868
- # @param [Object] value Any valid value
869
- # @return [Hash] Returns the value in the form of hash
870
- def _to_hash(value)
871
- if value.is_a?(Array)
872
- value.compact.map { |v| _to_hash(v) }
873
- elsif value.is_a?(Hash)
874
- {}.tap do |hash|
875
- value.each { |k, v| hash[k] = _to_hash(v) }
876
- end
877
- elsif value.respond_to? :to_hash
878
- value.to_hash
879
- else
880
- value
881
- end
882
- end
883
-
884
- end
885
-
886
- end