avalara_sdk 25.8.2 → 25.9.0

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 (220) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +20 -91
  4. data/docs/A1099/V2/CompaniesW9Api.md +18 -18
  5. data/docs/A1099/V2/CompanyBase.md +50 -0
  6. data/docs/A1099/V2/CompanyCreateUpdateRequestModel.md +18 -18
  7. data/docs/A1099/V2/CompanyRequest.md +50 -0
  8. data/docs/A1099/V2/CompanyResponse.md +37 -37
  9. data/docs/A1099/V2/CoveredIndividual.md +56 -0
  10. data/docs/A1099/V2/CreateAndSendW9FormEmailRequest.md +55 -0
  11. data/docs/A1099/V2/CreateCompanyRequest.md +49 -0
  12. data/docs/A1099/V2/CreateIssuerRequest.md +49 -0
  13. data/docs/A1099/V2/EntryStatusResponse.md +20 -0
  14. data/docs/A1099/V2/Form1042S.md +83 -83
  15. data/docs/A1099/V2/Form1095B.md +72 -62
  16. data/docs/A1099/V2/Form1095C.md +112 -0
  17. data/docs/A1099/V2/Form1099Base.md +60 -60
  18. data/docs/A1099/V2/Form1099Div.md +79 -77
  19. data/docs/A1099/V2/Form1099Int.md +76 -74
  20. data/docs/A1099/V2/Form1099K.md +83 -83
  21. data/docs/A1099/V2/Form1099ListRequest.md +20 -0
  22. data/docs/A1099/V2/Form1099Misc.md +79 -77
  23. data/docs/A1099/V2/Form1099Nec.md +64 -64
  24. data/docs/A1099/V2/Form1099R.md +95 -93
  25. data/docs/A1099/V2/Forms1099Api.md +47 -43
  26. data/docs/A1099/V2/FormsW9Api.md +104 -20
  27. data/docs/A1099/V2/Get1099Form200Response.md +19 -19
  28. data/docs/A1099/V2/IntermediaryOrFlowThrough.md +11 -11
  29. data/docs/A1099/V2/IssuerBase.md +46 -0
  30. data/docs/A1099/V2/IssuerCommand.md +16 -16
  31. data/docs/A1099/V2/IssuerRequest.md +46 -0
  32. data/docs/A1099/V2/IssuerResponse.md +35 -35
  33. data/docs/A1099/V2/Issuers1099Api.md +10 -10
  34. data/docs/A1099/V2/JobResponse.md +56 -0
  35. data/docs/A1099/V2/JobsApi.md +91 -0
  36. data/docs/A1099/V2/OfferAndCoverage.md +28 -0
  37. data/docs/A1099/V2/PaginatedQueryResultModelForm1099Base.md +22 -0
  38. data/docs/A1099/V2/PrimaryWithholdingAgent.md +4 -4
  39. data/docs/A1099/V2/StateAndLocalWithholding.md +8 -8
  40. data/docs/A1099/V2/TinMatchStatusResponse.md +1 -1
  41. data/docs/A1099/V2/ValidationError.md +2 -2
  42. data/docs/A1099/V2/W4FormMinimalRequest.md +30 -0
  43. data/docs/A1099/V2/W4FormRequest.md +16 -16
  44. data/docs/A1099/V2/W4FormResponse.md +48 -20
  45. data/docs/A1099/V2/W8BenEFormMinimalRequest.md +28 -0
  46. data/docs/A1099/V2/W8BenEFormRequest.md +15 -15
  47. data/docs/A1099/V2/W8BenEFormResponse.md +96 -68
  48. data/docs/A1099/V2/W8BenFormMinimalRequest.md +28 -0
  49. data/docs/A1099/V2/W8BenFormRequest.md +11 -11
  50. data/docs/A1099/V2/W8BenFormResponse.md +55 -27
  51. data/docs/A1099/V2/W8ImyFormMinimalRequest.md +28 -0
  52. data/docs/A1099/V2/W8ImyFormRequest.md +15 -15
  53. data/docs/A1099/V2/W8ImyFormResponse.md +118 -90
  54. data/docs/A1099/V2/W9FormBaseMinimalRequest.md +24 -0
  55. data/docs/A1099/V2/W9FormBaseRequest.md +7 -7
  56. data/docs/A1099/V2/W9FormBaseResponse.md +6 -6
  57. data/docs/A1099/V2/W9FormMinimalRequest.md +28 -0
  58. data/docs/A1099/V2/W9FormRequest.md +15 -15
  59. data/docs/A1099/V2/W9FormResponse.md +44 -16
  60. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +27 -27
  61. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +93 -61
  62. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +157 -19
  63. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +21 -21
  64. data/lib/avalara_sdk/api/A1099/V2/{jobs1099_api.rb → jobs_api.rb} +9 -9
  65. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
  66. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
  67. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  68. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
  69. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
  70. data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
  71. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
  72. data/lib/avalara_sdk/api_client.rb +10 -2
  73. data/lib/avalara_sdk/models/A1099/V2/{base_company_model.rb → company_base.rb} +61 -13
  74. data/lib/avalara_sdk/models/A1099/V2/company_create_update_request_model.rb +58 -17
  75. data/lib/avalara_sdk/models/A1099/V2/{company_model.rb → company_request.rb} +62 -64
  76. data/lib/avalara_sdk/models/A1099/V2/company_response.rb +110 -69
  77. data/lib/avalara_sdk/models/A1099/V2/{covered_individual_request.rb → covered_individual.rb} +36 -7
  78. data/lib/avalara_sdk/models/A1099/V2/{i_create_form1099_request.rb → create_and_send_w9_form_email_request.rb} +6 -5
  79. data/lib/avalara_sdk/models/A1099/V2/{error_response_errors_inner.rb → create_company_request.rb} +3 -3
  80. data/lib/avalara_sdk/models/A1099/V2/{i_update_form1099_request.rb → create_issuer_request.rb} +3 -5
  81. data/lib/avalara_sdk/models/A1099/V2/{status_detail.rb → entry_status_response.rb} +20 -18
  82. data/lib/avalara_sdk/models/A1099/V2/error_response.rb +0 -6
  83. data/lib/avalara_sdk/models/A1099/V2/form1042_s.rb +422 -187
  84. data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +359 -194
  85. data/lib/avalara_sdk/models/A1099/V2/{form1095_b_response.rb → form1095_c.rb} +250 -133
  86. data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +283 -185
  87. data/lib/avalara_sdk/models/A1099/V2/form1099_div.rb +307 -179
  88. data/lib/avalara_sdk/models/A1099/V2/form1099_int.rb +307 -183
  89. data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +307 -198
  90. data/lib/avalara_sdk/models/A1099/V2/{http_validation_problem_details.rb → form1099_list_request.rb} +45 -59
  91. data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +334 -209
  92. data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +297 -192
  93. data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +437 -282
  94. data/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +9 -9
  95. data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through.rb +59 -1
  96. data/lib/avalara_sdk/models/A1099/V2/{intermediary_or_flow_through_request.rb → issuer_base.rb} +119 -46
  97. data/lib/avalara_sdk/models/A1099/V2/issuer_command.rb +42 -23
  98. data/lib/avalara_sdk/models/A1099/V2/{company_response_model.rb → issuer_request.rb} +113 -112
  99. data/lib/avalara_sdk/models/A1099/V2/issuer_response.rb +77 -46
  100. data/lib/avalara_sdk/models/A1099/V2/{job_result.rb → job_response.rb} +102 -42
  101. data/lib/avalara_sdk/models/A1099/V2/{offer_and_coverage_request.rb → offer_and_coverage.rb} +79 -9
  102. data/lib/avalara_sdk/models/A1099/V2/{paginated_query_result_model.rb → paginated_query_result_model_form1099_base.rb} +4 -4
  103. data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent.rb +23 -16
  104. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding.rb +8 -0
  105. data/lib/avalara_sdk/models/A1099/V2/validation_error.rb +2 -6
  106. data/lib/avalara_sdk/models/A1099/V2/{attribute.rb → w4_form_minimal_request.rb} +142 -129
  107. data/lib/avalara_sdk/models/A1099/V2/w4_form_request.rb +62 -34
  108. data/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb +191 -15
  109. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_minimal_request.rb +356 -0
  110. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb +68 -33
  111. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb +190 -14
  112. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_minimal_request.rb +356 -0
  113. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb +51 -28
  114. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb +191 -15
  115. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_minimal_request.rb +356 -0
  116. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_request.rb +61 -33
  117. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb +191 -15
  118. data/lib/avalara_sdk/models/A1099/V2/{problem_details.rb → w9_form_base_minimal_request.rb} +61 -35
  119. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_request.rb +35 -28
  120. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +60 -31
  121. data/lib/avalara_sdk/models/A1099/V2/w9_form_minimal_request.rb +356 -0
  122. data/lib/avalara_sdk/models/A1099/V2/w9_form_request.rb +71 -30
  123. data/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb +190 -14
  124. data/lib/avalara_sdk/version.rb +1 -1
  125. data/lib/avalara_sdk.rb +22 -101
  126. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
  127. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  128. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
  129. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
  130. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
  131. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
  132. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
  133. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
  134. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  135. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  136. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  137. metadata +45 -103
  138. data/lib/avalara_sdk/models/A1099/V2/base_form_list_request.rb +0 -210
  139. data/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +0 -108
  140. data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +0 -403
  141. data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference_response.rb +0 -407
  142. data/lib/avalara_sdk/models/A1099/V2/create1099_form201_response.rb +0 -108
  143. data/lib/avalara_sdk/models/A1099/V2/data.rb +0 -237
  144. data/lib/avalara_sdk/models/A1099/V2/form1042_s_list.rb +0 -238
  145. data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item.rb +0 -816
  146. data/lib/avalara_sdk/models/A1099/V2/form1042_s_list_item_response.rb +0 -980
  147. data/lib/avalara_sdk/models/A1099/V2/form1042_s_request.rb +0 -778
  148. data/lib/avalara_sdk/models/A1099/V2/form1042_s_response.rb +0 -619
  149. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list.rb +0 -238
  150. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +0 -606
  151. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item_response.rb +0 -765
  152. data/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +0 -627
  153. data/lib/avalara_sdk/models/A1099/V2/form1095_c_list.rb +0 -238
  154. data/lib/avalara_sdk/models/A1099/V2/form1095_c_list_item.rb +0 -662
  155. data/lib/avalara_sdk/models/A1099/V2/form1099_base_response.rb +0 -726
  156. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list.rb +0 -238
  157. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +0 -747
  158. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item_response.rb +0 -931
  159. data/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +0 -729
  160. data/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +0 -790
  161. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list.rb +0 -238
  162. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item.rb +0 -702
  163. data/lib/avalara_sdk/models/A1099/V2/form1099_int_list_item_response.rb +0 -887
  164. data/lib/avalara_sdk/models/A1099/V2/form1099_int_request.rb +0 -684
  165. data/lib/avalara_sdk/models/A1099/V2/form1099_int_response.rb +0 -773
  166. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list.rb +0 -238
  167. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +0 -788
  168. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item_response.rb +0 -995
  169. data/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +0 -770
  170. data/lib/avalara_sdk/models/A1099/V2/form1099_k_response.rb +0 -839
  171. data/lib/avalara_sdk/models/A1099/V2/form1099_list.rb +0 -219
  172. data/lib/avalara_sdk/models/A1099/V2/form1099_list_data_inner.rb +0 -55
  173. data/lib/avalara_sdk/models/A1099/V2/form1099_list_response.rb +0 -220
  174. data/lib/avalara_sdk/models/A1099/V2/form1099_list_response_value_inner.rb +0 -108
  175. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list.rb +0 -238
  176. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +0 -688
  177. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item_response.rb +0 -886
  178. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +0 -670
  179. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +0 -754
  180. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list.rb +0 -238
  181. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +0 -586
  182. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item_response.rb +0 -765
  183. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +0 -567
  184. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +0 -646
  185. data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result.rb +0 -228
  186. data/lib/avalara_sdk/models/A1099/V2/form1099_proccess_result_processed_forms_inner.rb +0 -107
  187. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list.rb +0 -238
  188. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +0 -763
  189. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item_response.rb +0 -942
  190. data/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +0 -720
  191. data/lib/avalara_sdk/models/A1099/V2/form1099_r_response.rb +0 -839
  192. data/lib/avalara_sdk/models/A1099/V2/form1099_status_detail_response.rb +0 -223
  193. data/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +0 -502
  194. data/lib/avalara_sdk/models/A1099/V2/form_request_csv_base.rb +0 -475
  195. data/lib/avalara_sdk/models/A1099/V2/form_request_list_item_base.rb +0 -548
  196. data/lib/avalara_sdk/models/A1099/V2/form_request_model.rb +0 -345
  197. data/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +0 -612
  198. data/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +0 -530
  199. data/lib/avalara_sdk/models/A1099/V2/included_base.rb +0 -219
  200. data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through_response.rb +0 -311
  201. data/lib/avalara_sdk/models/A1099/V2/link.rb +0 -210
  202. data/lib/avalara_sdk/models/A1099/V2/paginated_w9_forms_model.rb +0 -231
  203. data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent_request.rb +0 -221
  204. data/lib/avalara_sdk/models/A1099/V2/primary_withholding_agent_response.rb +0 -221
  205. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_request.rb +0 -278
  206. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_response.rb +0 -282
  207. data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_app.rb +0 -231
  208. data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_response.rb +0 -231
  209. data/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +0 -108
  210. data/lib/avalara_sdk/models/A1099/V2/validation_error_app.rb +0 -229
  211. data/lib/avalara_sdk/models/A1099/V2/validation_error_response.rb +0 -231
  212. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response.rb +0 -233
  213. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner.rb +0 -274
  214. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_addresses_inner.rb +0 -251
  215. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_identifiers_inner.rb +0 -221
  216. data/lib/avalara_sdk/models/EInvoicing/V1/directory_search_response_value_inner_supported_document_types_inner.rb +0 -241
  217. data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request.rb +0 -224
  218. data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request_data_inner.rb +0 -237
  219. data/lib/avalara_sdk/models/EInvoicing/V1/document_fetch_request_metadata.rb +0 -288
  220. data/lib/avalara_sdk/models/EInvoicing/V1/submit_document_data.rb +0 -216
@@ -10,134 +10,220 @@ require 'date'
10
10
  require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
- class Form1042S
13
+ # Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding
14
+ class Form1042S
15
+ # Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
16
+ attr_accessor :tin_type
17
+
18
+ # Unique form identifier
14
19
  attr_accessor :unique_form_id
15
20
 
21
+ # Recipient's date of birth
16
22
  attr_accessor :recipient_date_of_birth
17
23
 
24
+ # Recipient's Global Intermediary Identification Number (GIIN). A valid GIIN looks like 'XXXXXX.XXXXX.XX.XXX'.
18
25
  attr_accessor :recipient_giin
19
26
 
27
+ # Recipient's foreign TIN. Required if email is specified, must fill either this or Chap3StatusCode.
20
28
  attr_accessor :recipient_foreign_tin
21
29
 
30
+ # Limitation on Benefits (LOB) code for tax treaty purposes. Available values: - 01: Individual (Deprecated - valid only for tax years prior to 2019) - 02: Government - contracting state/political subdivision/local authority - 03: Tax exempt pension trust/Pension fund - 04: Tax exempt/Charitable organization - 05: Publicly-traded corporation - 06: Subsidiary of publicly-traded corporation - 07: Company that meets the ownership and base erosion test - 08: Company that meets the derivative benefits test - 09: Company with an item of income that meets the active trade or business test - 10: Discretionary determination - 11: Other - 12: No LOB article in treaty
22
31
  attr_accessor :lob_code
23
32
 
33
+ # Income code. Available values: Interest: - 01: Interest paid by US obligors - general - 02: Interest paid on real property mortgages - 03: Interest paid to controlling foreign corporations - 04: Interest paid by foreign corporations - 05: Interest on tax-free covenant bonds - 22: Interest paid on deposit with a foreign branch of a domestic corporation or partnership - 29: Deposit interest - 30: Original issue discount (OID) - 31: Short-term OID - 33: Substitute payment - interest - 51: Interest paid on certain actively traded or publicly offered securities(1) - 54: Substitute payments - interest from certain actively traded or publicly offered securities(1) Dividend: - 06: Dividends paid by U.S. corporations - general - 07: Dividends qualifying for direct dividend rate - 08: Dividends paid by foreign corporations - 34: Substitute payment - dividends - 40: Other dividend equivalents under IRC section 871(m) (formerly 871(l)) - 52: Dividends paid on certain actively traded or publicly offered securities(1) - 53: Substitute payments - dividends from certain actively traded or publicly offered securities(1) - 56: Dividend equivalents under IRC section 871(m) as a result of applying the combined transaction rules Other: - 09: Capital gains - 10: Industrial royalties - 11: Motion picture or television copyright royalties - 12: Other royalties (for example, copyright, software, broadcasting, endorsement payments) - 13: Royalties paid on certain publicly offered securities(1) - 14: Real property income and natural resources royalties - 15: Pensions, annuities, alimony, and/or insurance premiums - 16: Scholarship or fellowship grants - 17: Compensation for independent personal services(2) - 18: Compensation for dependent personal services(2) - 19: Compensation for teaching(2) - 20: Compensation during studying and training(2) - 23: Other income - 24: Qualified investment entity (QIE) distributions of capital gains - 25: Trust distributions subject to IRC section 1445 - 26: Unsevered growing crops and timber distributions by a trust subject to IRC section 1445 - 27: Publicly traded partnership distributions subject to IRC section 1446 - 28: Gambling winnings(3) - 32: Notional principal contract income(4) - 35: Substitute payment - other - 36: Capital gains distributions - 37: Return of capital - 38: Eligible deferred compensation items subject to IRC section 877A(d)(1) - 39: Distributions from a nongrantor trust subject to IRC section 877A(f)(1) - 41: Guarantee of indebtedness - 42: Earnings as an artist or athlete - no central withholding agreement(5) - 43: Earnings as an artist or athlete - central withholding agreement(5) - 44: Specified Federal procurement payments - 50: Income previously reported under escrow procedure(6) - 55: Taxable death benefits on life insurance contracts - 57: Amount realized under IRC section 1446(f) - 58: Publicly traded partnership distributions-undetermined
24
34
  attr_accessor :income_code
25
35
 
36
+ # Gross income
26
37
  attr_accessor :gross_income
27
38
 
39
+ # Withholding indicator Available values: - 3: Chapter 3 - 4: Chapter 4
28
40
  attr_accessor :withholding_indicator
29
41
 
42
+ # Country code
30
43
  attr_accessor :tax_country_code
31
44
 
45
+ # Exemption code (Chapter 3). Required if WithholdingIndicator is 3 (Chapter 3). Required when using TaxRateChap3. Available values: - Empty: Tax rate is due to backup withholding - 00: Not exempt - 01: Effectively connected income - 02: Exempt under IRC (other than portfolio interest) - 03: Income is not from US sources - 04: Exempt under tax treaty - 05: Portfolio interest exempt under IRC - 06: QI that assumes primary withholding responsibility - 07: WFP or WFT - 08: U.S. branch treated as U.S. Person - 09: Territory FI treated as U.S. Person - 10: QI represents that income is exempt - 11: QSL that assumes primary withholding responsibility - 12: Payee subjected to chapter 4 withholding - 22: QDD that assumes primary withholding responsibility - 23: Exempt under section 897(l) - 24: Exempt under section 892
32
46
  attr_accessor :exemption_code_chap3
33
47
 
48
+ # Exemption code (Chapter 4). Required if WithholdingIndicator is 4 (Chapter 4). Available values: - 00: Not exempt - 13: Grandfathered payment - 14: Effectively connected income - 15: Payee not subject to chapter 4 withholding - 16: Excluded nonfinancial payment - 17: Foreign Entity that assumes primary withholding responsibility - 18: U.S. Payees - of participating FFI or registered deemed - compliant FFI - 19: Exempt from withholding under IGA(6) - 20: Dormant account(7) - 21: Other - payment not subject to chapter 4 withholding
34
49
  attr_accessor :exemption_code_chap4
35
50
 
51
+ # Tax rate (Chapter 3) - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 00.00: 0.00% - 02.00: 2.00% - 04.00: 4.00% - 04.90: 4.90% - 04.95: 4.95% - 05.00: 5.00% - 07.00: 7.00% - 08.00: 8.00% - 10.00: 10.00% - 12.00: 12.00% - 12.50: 12.50% - 14.00: 14.00% - 15.00: 15.00% - 17.50: 17.50% - 20.00: 20.00% - 21.00: 21.00% - 24.00: 24.00% - 25.00: 25.00% - 27.50: 27.50% - 28.00: 28.00% - 30.00: 30.00% - 37.00: 37.00%
36
52
  attr_accessor :tax_rate_chap3
37
53
 
54
+ # Withholding allowance
38
55
  attr_accessor :withholding_allowance
39
56
 
57
+ # Federal tax withheld
40
58
  attr_accessor :federal_tax_withheld
41
59
 
60
+ # Tax not deposited indicator
42
61
  attr_accessor :tax_not_deposited_indicator
43
62
 
63
+ # Academic indicator
44
64
  attr_accessor :academic_indicator
45
65
 
66
+ # Tax withheld by other agents
46
67
  attr_accessor :tax_withheld_other_agents
47
68
 
69
+ # Amount repaid to recipient
48
70
  attr_accessor :amount_repaid
49
71
 
72
+ # Tax paid by withholding agent
50
73
  attr_accessor :tax_paid_agent
51
74
 
75
+ # Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
52
76
  attr_accessor :chap3_status_code
53
77
 
78
+ # Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
54
79
  attr_accessor :chap4_status_code
55
80
 
81
+ # Primary withholding agent information
56
82
  attr_accessor :primary_withholding_agent
57
83
 
84
+ # Intermediary or flow-through entity information
58
85
  attr_accessor :intermediary_or_flow_through
59
86
 
60
- attr_accessor :id
61
-
87
+ # Form type.
62
88
  attr_accessor :type
63
89
 
90
+ # Form ID. Unique identifier set when the record is created.
91
+ attr_accessor :id
92
+
93
+ # Issuer ID - only required when creating forms
64
94
  attr_accessor :issuer_id
65
95
 
96
+ # Issuer Reference ID - only required when creating forms via $bulk-upsert
66
97
  attr_accessor :issuer_reference_id
67
98
 
99
+ # Issuer TIN - readonly
68
100
  attr_accessor :issuer_tin
69
101
 
102
+ # Tax Year - only required when creating forms via $bulk-upsert
70
103
  attr_accessor :tax_year
71
104
 
72
- attr_accessor :federal_efile
105
+ # Internal reference ID. Never shown to any agency or recipient.
106
+ attr_accessor :reference_id
73
107
 
74
- attr_accessor :federal_efile_status
108
+ # Recipient's Federal Tax Identification Number (TIN).
109
+ attr_accessor :tin
75
110
 
76
- attr_accessor :state_efile
111
+ # Recipient name
112
+ attr_accessor :recipient_name
77
113
 
78
- attr_accessor :state_efile_status
114
+ # Recipient second name
115
+ attr_accessor :recipient_second_name
79
116
 
80
- attr_accessor :postal_mail
117
+ # Address.
118
+ attr_accessor :address
81
119
 
82
- attr_accessor :postal_mail_status
120
+ # Address line 2.
121
+ attr_accessor :address2
83
122
 
84
- attr_accessor :tin_match
123
+ # City.
124
+ attr_accessor :city
85
125
 
86
- attr_accessor :tin_match_status
126
+ # Two-letter US state or Canadian province code (required for US/CA addresses).
127
+ attr_accessor :state
87
128
 
88
- attr_accessor :address_verification
129
+ # ZIP/postal code.
130
+ attr_accessor :zip
89
131
 
90
- attr_accessor :address_verification_status
132
+ # Recipient's Contact email address.
133
+ attr_accessor :email
91
134
 
92
- attr_accessor :e_delivery_status
135
+ # Account number
136
+ attr_accessor :account_number
93
137
 
94
- attr_accessor :reference_id
138
+ # Office code
139
+ attr_accessor :office_code
95
140
 
96
- attr_accessor :email
141
+ # Province or region for non-US/CA addresses.
142
+ attr_accessor :non_us_province
97
143
 
98
- attr_accessor :tin_type
144
+ # Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.
145
+ attr_accessor :country_code
99
146
 
100
- attr_accessor :fatca_filing_requirement
147
+ # Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
148
+ attr_accessor :federal_efile_date
101
149
 
102
- attr_accessor :tin
150
+ # Boolean indicating that postal mailing to the recipient should be scheduled for this form
151
+ attr_accessor :postal_mail
103
152
 
104
- attr_accessor :no_tin
153
+ # Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
154
+ attr_accessor :state_efile_date
105
155
 
106
- attr_accessor :second_tin_notice
156
+ # Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
157
+ attr_accessor :recipient_edelivery_date
107
158
 
108
- attr_accessor :recipient_name
159
+ # Boolean indicating that TIN Matching should be scheduled for this form
160
+ attr_accessor :tin_match
109
161
 
110
- attr_accessor :recipient_second_name
162
+ # No TIN indicator
163
+ attr_accessor :no_tin
111
164
 
112
- attr_accessor :address
165
+ # Boolean indicating that address verification should be scheduled for this form
166
+ attr_accessor :address_verification
113
167
 
114
- attr_accessor :address2
168
+ # State and local withholding information
169
+ attr_accessor :state_and_local_withholding
115
170
 
116
- attr_accessor :city
171
+ # Second TIN notice
172
+ attr_accessor :second_tin_notice
117
173
 
118
- attr_accessor :state
174
+ # Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
175
+ attr_accessor :federal_efile_status
119
176
 
120
- attr_accessor :zip
177
+ # State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
178
+ attr_accessor :state_efile_status
121
179
 
122
- attr_accessor :non_us_province
180
+ # Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
181
+ attr_accessor :postal_mail_status
123
182
 
124
- attr_accessor :country_code
183
+ # TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
184
+ attr_accessor :tin_match_status
125
185
 
126
- attr_accessor :account_number
186
+ # Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
187
+ attr_accessor :address_verification_status
127
188
 
128
- attr_accessor :office_code
189
+ # EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
190
+ attr_accessor :e_delivery_status
129
191
 
192
+ # Validation errors
130
193
  attr_accessor :validation_errors
131
194
 
195
+ # Date time when the record was created.
132
196
  attr_accessor :created_at
133
197
 
198
+ # Date time when the record was last updated.
134
199
  attr_accessor :updated_at
135
200
 
136
- attr_accessor :state_and_local_withholding
201
+ class EnumAttributeValidator
202
+ attr_reader :datatype
203
+ attr_reader :allowable_values
204
+
205
+ def initialize(datatype, allowable_values)
206
+ @allowable_values = allowable_values.map do |value|
207
+ case datatype.to_s
208
+ when /Integer/i
209
+ value.to_i
210
+ when /Float/i
211
+ value.to_f
212
+ else
213
+ value
214
+ end
215
+ end
216
+ end
217
+
218
+ def valid?(value)
219
+ !value || allowable_values.include?(value)
220
+ end
221
+ end
137
222
 
138
223
  # Attribute mapping from ruby-style variable name to JSON key.
139
224
  def self.attribute_map
140
225
  {
226
+ :'tin_type' => :'tinType',
141
227
  :'unique_form_id' => :'uniqueFormId',
142
228
  :'recipient_date_of_birth' => :'recipientDateOfBirth',
143
229
  :'recipient_giin' => :'recipientGiin',
@@ -161,30 +247,14 @@ module AvalaraSdk::A1099::V2
161
247
  :'chap4_status_code' => :'chap4StatusCode',
162
248
  :'primary_withholding_agent' => :'primaryWithholdingAgent',
163
249
  :'intermediary_or_flow_through' => :'intermediaryOrFlowThrough',
164
- :'id' => :'id',
165
250
  :'type' => :'type',
251
+ :'id' => :'id',
166
252
  :'issuer_id' => :'issuerId',
167
253
  :'issuer_reference_id' => :'issuerReferenceId',
168
254
  :'issuer_tin' => :'issuerTin',
169
255
  :'tax_year' => :'taxYear',
170
- :'federal_efile' => :'federalEfile',
171
- :'federal_efile_status' => :'federalEfileStatus',
172
- :'state_efile' => :'stateEfile',
173
- :'state_efile_status' => :'stateEfileStatus',
174
- :'postal_mail' => :'postalMail',
175
- :'postal_mail_status' => :'postalMailStatus',
176
- :'tin_match' => :'tinMatch',
177
- :'tin_match_status' => :'tinMatchStatus',
178
- :'address_verification' => :'addressVerification',
179
- :'address_verification_status' => :'addressVerificationStatus',
180
- :'e_delivery_status' => :'eDeliveryStatus',
181
256
  :'reference_id' => :'referenceId',
182
- :'email' => :'email',
183
- :'tin_type' => :'tinType',
184
- :'fatca_filing_requirement' => :'fatcaFilingRequirement',
185
257
  :'tin' => :'tin',
186
- :'no_tin' => :'noTin',
187
- :'second_tin_notice' => :'secondTinNotice',
188
258
  :'recipient_name' => :'recipientName',
189
259
  :'recipient_second_name' => :'recipientSecondName',
190
260
  :'address' => :'address',
@@ -192,14 +262,29 @@ module AvalaraSdk::A1099::V2
192
262
  :'city' => :'city',
193
263
  :'state' => :'state',
194
264
  :'zip' => :'zip',
195
- :'non_us_province' => :'nonUsProvince',
196
- :'country_code' => :'countryCode',
265
+ :'email' => :'email',
197
266
  :'account_number' => :'accountNumber',
198
267
  :'office_code' => :'officeCode',
268
+ :'non_us_province' => :'nonUsProvince',
269
+ :'country_code' => :'countryCode',
270
+ :'federal_efile_date' => :'federalEfileDate',
271
+ :'postal_mail' => :'postalMail',
272
+ :'state_efile_date' => :'stateEfileDate',
273
+ :'recipient_edelivery_date' => :'recipientEdeliveryDate',
274
+ :'tin_match' => :'tinMatch',
275
+ :'no_tin' => :'noTin',
276
+ :'address_verification' => :'addressVerification',
277
+ :'state_and_local_withholding' => :'stateAndLocalWithholding',
278
+ :'second_tin_notice' => :'secondTinNotice',
279
+ :'federal_efile_status' => :'federalEfileStatus',
280
+ :'state_efile_status' => :'stateEfileStatus',
281
+ :'postal_mail_status' => :'postalMailStatus',
282
+ :'tin_match_status' => :'tinMatchStatus',
283
+ :'address_verification_status' => :'addressVerificationStatus',
284
+ :'e_delivery_status' => :'eDeliveryStatus',
199
285
  :'validation_errors' => :'validationErrors',
200
286
  :'created_at' => :'createdAt',
201
- :'updated_at' => :'updatedAt',
202
- :'state_and_local_withholding' => :'stateAndLocalWithholding'
287
+ :'updated_at' => :'updatedAt'
203
288
  }
204
289
  end
205
290
 
@@ -211,8 +296,9 @@ module AvalaraSdk::A1099::V2
211
296
  # Attribute type mapping.
212
297
  def self.openapi_types
213
298
  {
299
+ :'tin_type' => :'String',
214
300
  :'unique_form_id' => :'String',
215
- :'recipient_date_of_birth' => :'Time',
301
+ :'recipient_date_of_birth' => :'Date',
216
302
  :'recipient_giin' => :'String',
217
303
  :'recipient_foreign_tin' => :'String',
218
304
  :'lob_code' => :'String',
@@ -234,30 +320,14 @@ module AvalaraSdk::A1099::V2
234
320
  :'chap4_status_code' => :'String',
235
321
  :'primary_withholding_agent' => :'PrimaryWithholdingAgent',
236
322
  :'intermediary_or_flow_through' => :'IntermediaryOrFlowThrough',
237
- :'id' => :'String',
238
323
  :'type' => :'String',
239
- :'issuer_id' => :'Integer',
324
+ :'id' => :'String',
325
+ :'issuer_id' => :'String',
240
326
  :'issuer_reference_id' => :'String',
241
327
  :'issuer_tin' => :'String',
242
328
  :'tax_year' => :'Integer',
243
- :'federal_efile' => :'Boolean',
244
- :'federal_efile_status' => :'Form1099StatusDetail',
245
- :'state_efile' => :'Boolean',
246
- :'state_efile_status' => :'Array<StateEfileStatusDetail>',
247
- :'postal_mail' => :'Boolean',
248
- :'postal_mail_status' => :'Form1099StatusDetail',
249
- :'tin_match' => :'Boolean',
250
- :'tin_match_status' => :'Form1099StatusDetail',
251
- :'address_verification' => :'Boolean',
252
- :'address_verification_status' => :'Form1099StatusDetail',
253
- :'e_delivery_status' => :'Form1099StatusDetail',
254
329
  :'reference_id' => :'String',
255
- :'email' => :'String',
256
- :'tin_type' => :'String',
257
- :'fatca_filing_requirement' => :'Boolean',
258
330
  :'tin' => :'String',
259
- :'no_tin' => :'Boolean',
260
- :'second_tin_notice' => :'Boolean',
261
331
  :'recipient_name' => :'String',
262
332
  :'recipient_second_name' => :'String',
263
333
  :'address' => :'String',
@@ -265,24 +335,45 @@ module AvalaraSdk::A1099::V2
265
335
  :'city' => :'String',
266
336
  :'state' => :'String',
267
337
  :'zip' => :'String',
268
- :'non_us_province' => :'String',
269
- :'country_code' => :'String',
338
+ :'email' => :'String',
270
339
  :'account_number' => :'String',
271
340
  :'office_code' => :'String',
341
+ :'non_us_province' => :'String',
342
+ :'country_code' => :'String',
343
+ :'federal_efile_date' => :'Date',
344
+ :'postal_mail' => :'Boolean',
345
+ :'state_efile_date' => :'Date',
346
+ :'recipient_edelivery_date' => :'Date',
347
+ :'tin_match' => :'Boolean',
348
+ :'no_tin' => :'Boolean',
349
+ :'address_verification' => :'Boolean',
350
+ :'state_and_local_withholding' => :'StateAndLocalWithholding',
351
+ :'second_tin_notice' => :'Boolean',
352
+ :'federal_efile_status' => :'Form1099StatusDetail',
353
+ :'state_efile_status' => :'Array<StateEfileStatusDetail>',
354
+ :'postal_mail_status' => :'Form1099StatusDetail',
355
+ :'tin_match_status' => :'Form1099StatusDetail',
356
+ :'address_verification_status' => :'Form1099StatusDetail',
357
+ :'e_delivery_status' => :'Form1099StatusDetail',
272
358
  :'validation_errors' => :'Array<ValidationError>',
273
359
  :'created_at' => :'Time',
274
- :'updated_at' => :'Time',
275
- :'state_and_local_withholding' => :'StateAndLocalWithholding'
360
+ :'updated_at' => :'Time'
276
361
  }
277
362
  end
278
363
 
279
364
  # List of attributes with nullable: true
280
365
  def self.openapi_nullable
281
366
  Set.new([
367
+ :'tin_type',
368
+ :'unique_form_id',
282
369
  :'recipient_date_of_birth',
283
370
  :'recipient_giin',
284
371
  :'recipient_foreign_tin',
285
372
  :'lob_code',
373
+ :'income_code',
374
+ :'gross_income',
375
+ :'withholding_indicator',
376
+ :'tax_country_code',
286
377
  :'exemption_code_chap3',
287
378
  :'exemption_code_chap4',
288
379
  :'tax_rate_chap3',
@@ -295,19 +386,15 @@ module AvalaraSdk::A1099::V2
295
386
  :'tax_paid_agent',
296
387
  :'chap3_status_code',
297
388
  :'chap4_status_code',
389
+ :'primary_withholding_agent',
390
+ :'intermediary_or_flow_through',
391
+ :'id',
392
+ :'issuer_id',
298
393
  :'issuer_reference_id',
299
394
  :'issuer_tin',
300
- :'state_efile_status',
301
- :'postal_mail_status',
302
- :'tin_match_status',
303
- :'address_verification_status',
304
- :'e_delivery_status',
395
+ :'tax_year',
305
396
  :'reference_id',
306
- :'email',
307
- :'tin_type',
308
- :'fatca_filing_requirement',
309
397
  :'tin',
310
- :'second_tin_notice',
311
398
  :'recipient_name',
312
399
  :'recipient_second_name',
313
400
  :'address',
@@ -315,12 +402,27 @@ module AvalaraSdk::A1099::V2
315
402
  :'city',
316
403
  :'state',
317
404
  :'zip',
318
- :'non_us_province',
319
- :'country_code',
405
+ :'email',
320
406
  :'account_number',
321
407
  :'office_code',
408
+ :'non_us_province',
409
+ :'country_code',
410
+ :'federal_efile_date',
411
+ :'postal_mail',
412
+ :'state_efile_date',
413
+ :'recipient_edelivery_date',
414
+ :'tin_match',
415
+ :'no_tin',
416
+ :'address_verification',
417
+ :'state_and_local_withholding',
418
+ :'second_tin_notice',
419
+ :'federal_efile_status',
420
+ :'state_efile_status',
421
+ :'postal_mail_status',
422
+ :'tin_match_status',
423
+ :'address_verification_status',
424
+ :'e_delivery_status',
322
425
  :'validation_errors',
323
- :'state_and_local_withholding'
324
426
  ])
325
427
  end
326
428
 
@@ -346,8 +448,14 @@ module AvalaraSdk::A1099::V2
346
448
  h[k.to_sym] = v
347
449
  }
348
450
 
451
+ if attributes.key?(:'tin_type')
452
+ self.tin_type = attributes[:'tin_type']
453
+ end
454
+
349
455
  if attributes.key?(:'unique_form_id')
350
456
  self.unique_form_id = attributes[:'unique_form_id']
457
+ else
458
+ self.unique_form_id = nil
351
459
  end
352
460
 
353
461
  if attributes.key?(:'recipient_date_of_birth')
@@ -368,18 +476,26 @@ module AvalaraSdk::A1099::V2
368
476
 
369
477
  if attributes.key?(:'income_code')
370
478
  self.income_code = attributes[:'income_code']
479
+ else
480
+ self.income_code = nil
371
481
  end
372
482
 
373
483
  if attributes.key?(:'gross_income')
374
484
  self.gross_income = attributes[:'gross_income']
485
+ else
486
+ self.gross_income = nil
375
487
  end
376
488
 
377
489
  if attributes.key?(:'withholding_indicator')
378
490
  self.withholding_indicator = attributes[:'withholding_indicator']
491
+ else
492
+ self.withholding_indicator = nil
379
493
  end
380
494
 
381
495
  if attributes.key?(:'tax_country_code')
382
496
  self.tax_country_code = attributes[:'tax_country_code']
497
+ else
498
+ self.tax_country_code = nil
383
499
  end
384
500
 
385
501
  if attributes.key?(:'exemption_code_chap3')
@@ -438,12 +554,14 @@ module AvalaraSdk::A1099::V2
438
554
  self.intermediary_or_flow_through = attributes[:'intermediary_or_flow_through']
439
555
  end
440
556
 
441
- if attributes.key?(:'id')
442
- self.id = attributes[:'id']
443
- end
444
-
445
557
  if attributes.key?(:'type')
446
558
  self.type = attributes[:'type']
559
+ else
560
+ self.type = nil
561
+ end
562
+
563
+ if attributes.key?(:'id')
564
+ self.id = attributes[:'id']
447
565
  end
448
566
 
449
567
  if attributes.key?(:'issuer_id')
@@ -462,122 +580,130 @@ module AvalaraSdk::A1099::V2
462
580
  self.tax_year = attributes[:'tax_year']
463
581
  end
464
582
 
465
- if attributes.key?(:'federal_efile')
466
- self.federal_efile = attributes[:'federal_efile']
583
+ if attributes.key?(:'reference_id')
584
+ self.reference_id = attributes[:'reference_id']
467
585
  end
468
586
 
469
- if attributes.key?(:'federal_efile_status')
470
- self.federal_efile_status = attributes[:'federal_efile_status']
587
+ if attributes.key?(:'tin')
588
+ self.tin = attributes[:'tin']
471
589
  end
472
590
 
473
- if attributes.key?(:'state_efile')
474
- self.state_efile = attributes[:'state_efile']
591
+ if attributes.key?(:'recipient_name')
592
+ self.recipient_name = attributes[:'recipient_name']
593
+ else
594
+ self.recipient_name = nil
475
595
  end
476
596
 
477
- if attributes.key?(:'state_efile_status')
478
- if (value = attributes[:'state_efile_status']).is_a?(Array)
479
- self.state_efile_status = value
480
- end
597
+ if attributes.key?(:'recipient_second_name')
598
+ self.recipient_second_name = attributes[:'recipient_second_name']
481
599
  end
482
600
 
483
- if attributes.key?(:'postal_mail')
484
- self.postal_mail = attributes[:'postal_mail']
601
+ if attributes.key?(:'address')
602
+ self.address = attributes[:'address']
603
+ else
604
+ self.address = nil
485
605
  end
486
606
 
487
- if attributes.key?(:'postal_mail_status')
488
- self.postal_mail_status = attributes[:'postal_mail_status']
607
+ if attributes.key?(:'address2')
608
+ self.address2 = attributes[:'address2']
489
609
  end
490
610
 
491
- if attributes.key?(:'tin_match')
492
- self.tin_match = attributes[:'tin_match']
611
+ if attributes.key?(:'city')
612
+ self.city = attributes[:'city']
613
+ else
614
+ self.city = nil
493
615
  end
494
616
 
495
- if attributes.key?(:'tin_match_status')
496
- self.tin_match_status = attributes[:'tin_match_status']
617
+ if attributes.key?(:'state')
618
+ self.state = attributes[:'state']
497
619
  end
498
620
 
499
- if attributes.key?(:'address_verification')
500
- self.address_verification = attributes[:'address_verification']
621
+ if attributes.key?(:'zip')
622
+ self.zip = attributes[:'zip']
501
623
  end
502
624
 
503
- if attributes.key?(:'address_verification_status')
504
- self.address_verification_status = attributes[:'address_verification_status']
625
+ if attributes.key?(:'email')
626
+ self.email = attributes[:'email']
505
627
  end
506
628
 
507
- if attributes.key?(:'e_delivery_status')
508
- self.e_delivery_status = attributes[:'e_delivery_status']
629
+ if attributes.key?(:'account_number')
630
+ self.account_number = attributes[:'account_number']
509
631
  end
510
632
 
511
- if attributes.key?(:'reference_id')
512
- self.reference_id = attributes[:'reference_id']
633
+ if attributes.key?(:'office_code')
634
+ self.office_code = attributes[:'office_code']
513
635
  end
514
636
 
515
- if attributes.key?(:'email')
516
- self.email = attributes[:'email']
637
+ if attributes.key?(:'non_us_province')
638
+ self.non_us_province = attributes[:'non_us_province']
517
639
  end
518
640
 
519
- if attributes.key?(:'tin_type')
520
- self.tin_type = attributes[:'tin_type']
641
+ if attributes.key?(:'country_code')
642
+ self.country_code = attributes[:'country_code']
643
+ else
644
+ self.country_code = nil
521
645
  end
522
646
 
523
- if attributes.key?(:'fatca_filing_requirement')
524
- self.fatca_filing_requirement = attributes[:'fatca_filing_requirement']
647
+ if attributes.key?(:'federal_efile_date')
648
+ self.federal_efile_date = attributes[:'federal_efile_date']
525
649
  end
526
650
 
527
- if attributes.key?(:'tin')
528
- self.tin = attributes[:'tin']
651
+ if attributes.key?(:'postal_mail')
652
+ self.postal_mail = attributes[:'postal_mail']
529
653
  end
530
654
 
531
- if attributes.key?(:'no_tin')
532
- self.no_tin = attributes[:'no_tin']
655
+ if attributes.key?(:'state_efile_date')
656
+ self.state_efile_date = attributes[:'state_efile_date']
533
657
  end
534
658
 
535
- if attributes.key?(:'second_tin_notice')
536
- self.second_tin_notice = attributes[:'second_tin_notice']
659
+ if attributes.key?(:'recipient_edelivery_date')
660
+ self.recipient_edelivery_date = attributes[:'recipient_edelivery_date']
537
661
  end
538
662
 
539
- if attributes.key?(:'recipient_name')
540
- self.recipient_name = attributes[:'recipient_name']
663
+ if attributes.key?(:'tin_match')
664
+ self.tin_match = attributes[:'tin_match']
541
665
  end
542
666
 
543
- if attributes.key?(:'recipient_second_name')
544
- self.recipient_second_name = attributes[:'recipient_second_name']
667
+ if attributes.key?(:'no_tin')
668
+ self.no_tin = attributes[:'no_tin']
545
669
  end
546
670
 
547
- if attributes.key?(:'address')
548
- self.address = attributes[:'address']
671
+ if attributes.key?(:'address_verification')
672
+ self.address_verification = attributes[:'address_verification']
549
673
  end
550
674
 
551
- if attributes.key?(:'address2')
552
- self.address2 = attributes[:'address2']
675
+ if attributes.key?(:'state_and_local_withholding')
676
+ self.state_and_local_withholding = attributes[:'state_and_local_withholding']
553
677
  end
554
678
 
555
- if attributes.key?(:'city')
556
- self.city = attributes[:'city']
679
+ if attributes.key?(:'second_tin_notice')
680
+ self.second_tin_notice = attributes[:'second_tin_notice']
557
681
  end
558
682
 
559
- if attributes.key?(:'state')
560
- self.state = attributes[:'state']
683
+ if attributes.key?(:'federal_efile_status')
684
+ self.federal_efile_status = attributes[:'federal_efile_status']
561
685
  end
562
686
 
563
- if attributes.key?(:'zip')
564
- self.zip = attributes[:'zip']
687
+ if attributes.key?(:'state_efile_status')
688
+ if (value = attributes[:'state_efile_status']).is_a?(Array)
689
+ self.state_efile_status = value
690
+ end
565
691
  end
566
692
 
567
- if attributes.key?(:'non_us_province')
568
- self.non_us_province = attributes[:'non_us_province']
693
+ if attributes.key?(:'postal_mail_status')
694
+ self.postal_mail_status = attributes[:'postal_mail_status']
569
695
  end
570
696
 
571
- if attributes.key?(:'country_code')
572
- self.country_code = attributes[:'country_code']
697
+ if attributes.key?(:'tin_match_status')
698
+ self.tin_match_status = attributes[:'tin_match_status']
573
699
  end
574
700
 
575
- if attributes.key?(:'account_number')
576
- self.account_number = attributes[:'account_number']
701
+ if attributes.key?(:'address_verification_status')
702
+ self.address_verification_status = attributes[:'address_verification_status']
577
703
  end
578
704
 
579
- if attributes.key?(:'office_code')
580
- self.office_code = attributes[:'office_code']
705
+ if attributes.key?(:'e_delivery_status')
706
+ self.e_delivery_status = attributes[:'e_delivery_status']
581
707
  end
582
708
 
583
709
  if attributes.key?(:'validation_errors')
@@ -593,10 +719,6 @@ module AvalaraSdk::A1099::V2
593
719
  if attributes.key?(:'updated_at')
594
720
  self.updated_at = attributes[:'updated_at']
595
721
  end
596
-
597
- if attributes.key?(:'state_and_local_withholding')
598
- self.state_and_local_withholding = attributes[:'state_and_local_withholding']
599
- end
600
722
  end
601
723
 
602
724
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -604,6 +726,10 @@ module AvalaraSdk::A1099::V2
604
726
  def list_invalid_properties
605
727
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
606
728
  invalid_properties = Array.new
729
+ if @type.nil?
730
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
731
+ end
732
+
607
733
  invalid_properties
608
734
  end
609
735
 
@@ -611,19 +737,128 @@ module AvalaraSdk::A1099::V2
611
737
  # @return true if the model is valid
612
738
  def valid?
613
739
  warn '[DEPRECATED] the `valid?` method is obsolete'
740
+ tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
741
+ return false unless tin_type_validator.valid?(@tin_type)
742
+ lob_code_validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"])
743
+ return false unless lob_code_validator.valid?(@lob_code)
744
+ income_code_validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "22", "29", "30", "31", "33", "51", "54", "06", "07", "08", "34", "40", "52", "53", "56", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "23", "24", "25", "26", "27", "28", "32", "35", "36", "37", "38", "39", "41", "42", "43", "44", "50", "55", "57", "58"])
745
+ return false unless income_code_validator.valid?(@income_code)
746
+ withholding_indicator_validator = EnumAttributeValidator.new('String', ["3", "4"])
747
+ return false unless withholding_indicator_validator.valid?(@withholding_indicator)
748
+ exemption_code_chap3_validator = EnumAttributeValidator.new('String', ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "22", "23", "24"])
749
+ return false unless exemption_code_chap3_validator.valid?(@exemption_code_chap3)
750
+ exemption_code_chap4_validator = EnumAttributeValidator.new('String', ["00", "13", "14", "15", "16", "17", "18", "19", "20", "21"])
751
+ return false unless exemption_code_chap4_validator.valid?(@exemption_code_chap4)
752
+ tax_rate_chap3_validator = EnumAttributeValidator.new('String', ["00.00", "02.00", "04.00", "04.90", "04.95", "05.00", "07.00", "08.00", "10.00", "12.00", "12.50", "14.00", "15.00", "17.50", "20.00", "21.00", "24.00", "25.00", "27.50", "28.00", "30.00", "37.00"])
753
+ return false unless tax_rate_chap3_validator.valid?(@tax_rate_chap3)
754
+ chap3_status_code_validator = EnumAttributeValidator.new('String', ["01", "02", "34", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "35", "36", "37", "38", "39"])
755
+ return false unless chap3_status_code_validator.valid?(@chap3_status_code)
756
+ chap4_status_code_validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"])
757
+ return false unless chap4_status_code_validator.valid?(@chap4_status_code)
758
+ return false if @type.nil?
759
+ type_validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B", "Form1042S", "Form1095C", "Form1099Int"])
760
+ return false unless type_validator.valid?(@type)
614
761
  true
615
762
  end
616
763
 
617
- # Custom attribute writer method with validation
618
- # @param [Object] state_efile_status Value to be assigned
619
- def state_efile_status=(state_efile_status)
620
- @state_efile_status = state_efile_status
764
+ # Custom attribute writer method checking allowed values (enum).
765
+ # @param [Object] tin_type Object to be assigned
766
+ def tin_type=(tin_type)
767
+ validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
768
+ unless validator.valid?(tin_type)
769
+ fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
770
+ end
771
+ @tin_type = tin_type
621
772
  end
622
773
 
623
- # Custom attribute writer method with validation
624
- # @param [Object] validation_errors Value to be assigned
625
- def validation_errors=(validation_errors)
626
- @validation_errors = validation_errors
774
+ # Custom attribute writer method checking allowed values (enum).
775
+ # @param [Object] lob_code Object to be assigned
776
+ def lob_code=(lob_code)
777
+ validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"])
778
+ unless validator.valid?(lob_code)
779
+ fail ArgumentError, "invalid value for \"lob_code\", must be one of #{validator.allowable_values}."
780
+ end
781
+ @lob_code = lob_code
782
+ end
783
+
784
+ # Custom attribute writer method checking allowed values (enum).
785
+ # @param [Object] income_code Object to be assigned
786
+ def income_code=(income_code)
787
+ validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "22", "29", "30", "31", "33", "51", "54", "06", "07", "08", "34", "40", "52", "53", "56", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "23", "24", "25", "26", "27", "28", "32", "35", "36", "37", "38", "39", "41", "42", "43", "44", "50", "55", "57", "58"])
788
+ unless validator.valid?(income_code)
789
+ fail ArgumentError, "invalid value for \"income_code\", must be one of #{validator.allowable_values}."
790
+ end
791
+ @income_code = income_code
792
+ end
793
+
794
+ # Custom attribute writer method checking allowed values (enum).
795
+ # @param [Object] withholding_indicator Object to be assigned
796
+ def withholding_indicator=(withholding_indicator)
797
+ validator = EnumAttributeValidator.new('String', ["3", "4"])
798
+ unless validator.valid?(withholding_indicator)
799
+ fail ArgumentError, "invalid value for \"withholding_indicator\", must be one of #{validator.allowable_values}."
800
+ end
801
+ @withholding_indicator = withholding_indicator
802
+ end
803
+
804
+ # Custom attribute writer method checking allowed values (enum).
805
+ # @param [Object] exemption_code_chap3 Object to be assigned
806
+ def exemption_code_chap3=(exemption_code_chap3)
807
+ validator = EnumAttributeValidator.new('String', ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "22", "23", "24"])
808
+ unless validator.valid?(exemption_code_chap3)
809
+ fail ArgumentError, "invalid value for \"exemption_code_chap3\", must be one of #{validator.allowable_values}."
810
+ end
811
+ @exemption_code_chap3 = exemption_code_chap3
812
+ end
813
+
814
+ # Custom attribute writer method checking allowed values (enum).
815
+ # @param [Object] exemption_code_chap4 Object to be assigned
816
+ def exemption_code_chap4=(exemption_code_chap4)
817
+ validator = EnumAttributeValidator.new('String', ["00", "13", "14", "15", "16", "17", "18", "19", "20", "21"])
818
+ unless validator.valid?(exemption_code_chap4)
819
+ fail ArgumentError, "invalid value for \"exemption_code_chap4\", must be one of #{validator.allowable_values}."
820
+ end
821
+ @exemption_code_chap4 = exemption_code_chap4
822
+ end
823
+
824
+ # Custom attribute writer method checking allowed values (enum).
825
+ # @param [Object] tax_rate_chap3 Object to be assigned
826
+ def tax_rate_chap3=(tax_rate_chap3)
827
+ validator = EnumAttributeValidator.new('String', ["00.00", "02.00", "04.00", "04.90", "04.95", "05.00", "07.00", "08.00", "10.00", "12.00", "12.50", "14.00", "15.00", "17.50", "20.00", "21.00", "24.00", "25.00", "27.50", "28.00", "30.00", "37.00"])
828
+ unless validator.valid?(tax_rate_chap3)
829
+ fail ArgumentError, "invalid value for \"tax_rate_chap3\", must be one of #{validator.allowable_values}."
830
+ end
831
+ @tax_rate_chap3 = tax_rate_chap3
832
+ end
833
+
834
+ # Custom attribute writer method checking allowed values (enum).
835
+ # @param [Object] chap3_status_code Object to be assigned
836
+ def chap3_status_code=(chap3_status_code)
837
+ validator = EnumAttributeValidator.new('String', ["01", "02", "34", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "35", "36", "37", "38", "39"])
838
+ unless validator.valid?(chap3_status_code)
839
+ fail ArgumentError, "invalid value for \"chap3_status_code\", must be one of #{validator.allowable_values}."
840
+ end
841
+ @chap3_status_code = chap3_status_code
842
+ end
843
+
844
+ # Custom attribute writer method checking allowed values (enum).
845
+ # @param [Object] chap4_status_code Object to be assigned
846
+ def chap4_status_code=(chap4_status_code)
847
+ validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"])
848
+ unless validator.valid?(chap4_status_code)
849
+ fail ArgumentError, "invalid value for \"chap4_status_code\", must be one of #{validator.allowable_values}."
850
+ end
851
+ @chap4_status_code = chap4_status_code
852
+ end
853
+
854
+ # Custom attribute writer method checking allowed values (enum).
855
+ # @param [Object] type Object to be assigned
856
+ def type=(type)
857
+ validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B", "Form1042S", "Form1095C", "Form1099Int"])
858
+ unless validator.valid?(type)
859
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
860
+ end
861
+ @type = type
627
862
  end
628
863
 
629
864
  # Checks equality by comparing each attribute.
@@ -631,6 +866,7 @@ module AvalaraSdk::A1099::V2
631
866
  def ==(o)
632
867
  return true if self.equal?(o)
633
868
  self.class == o.class &&
869
+ tin_type == o.tin_type &&
634
870
  unique_form_id == o.unique_form_id &&
635
871
  recipient_date_of_birth == o.recipient_date_of_birth &&
636
872
  recipient_giin == o.recipient_giin &&
@@ -654,30 +890,14 @@ module AvalaraSdk::A1099::V2
654
890
  chap4_status_code == o.chap4_status_code &&
655
891
  primary_withholding_agent == o.primary_withholding_agent &&
656
892
  intermediary_or_flow_through == o.intermediary_or_flow_through &&
657
- id == o.id &&
658
893
  type == o.type &&
894
+ id == o.id &&
659
895
  issuer_id == o.issuer_id &&
660
896
  issuer_reference_id == o.issuer_reference_id &&
661
897
  issuer_tin == o.issuer_tin &&
662
898
  tax_year == o.tax_year &&
663
- federal_efile == o.federal_efile &&
664
- federal_efile_status == o.federal_efile_status &&
665
- state_efile == o.state_efile &&
666
- state_efile_status == o.state_efile_status &&
667
- postal_mail == o.postal_mail &&
668
- postal_mail_status == o.postal_mail_status &&
669
- tin_match == o.tin_match &&
670
- tin_match_status == o.tin_match_status &&
671
- address_verification == o.address_verification &&
672
- address_verification_status == o.address_verification_status &&
673
- e_delivery_status == o.e_delivery_status &&
674
899
  reference_id == o.reference_id &&
675
- email == o.email &&
676
- tin_type == o.tin_type &&
677
- fatca_filing_requirement == o.fatca_filing_requirement &&
678
900
  tin == o.tin &&
679
- no_tin == o.no_tin &&
680
- second_tin_notice == o.second_tin_notice &&
681
901
  recipient_name == o.recipient_name &&
682
902
  recipient_second_name == o.recipient_second_name &&
683
903
  address == o.address &&
@@ -685,14 +905,29 @@ module AvalaraSdk::A1099::V2
685
905
  city == o.city &&
686
906
  state == o.state &&
687
907
  zip == o.zip &&
688
- non_us_province == o.non_us_province &&
689
- country_code == o.country_code &&
908
+ email == o.email &&
690
909
  account_number == o.account_number &&
691
910
  office_code == o.office_code &&
911
+ non_us_province == o.non_us_province &&
912
+ country_code == o.country_code &&
913
+ federal_efile_date == o.federal_efile_date &&
914
+ postal_mail == o.postal_mail &&
915
+ state_efile_date == o.state_efile_date &&
916
+ recipient_edelivery_date == o.recipient_edelivery_date &&
917
+ tin_match == o.tin_match &&
918
+ no_tin == o.no_tin &&
919
+ address_verification == o.address_verification &&
920
+ state_and_local_withholding == o.state_and_local_withholding &&
921
+ second_tin_notice == o.second_tin_notice &&
922
+ federal_efile_status == o.federal_efile_status &&
923
+ state_efile_status == o.state_efile_status &&
924
+ postal_mail_status == o.postal_mail_status &&
925
+ tin_match_status == o.tin_match_status &&
926
+ address_verification_status == o.address_verification_status &&
927
+ e_delivery_status == o.e_delivery_status &&
692
928
  validation_errors == o.validation_errors &&
693
929
  created_at == o.created_at &&
694
- updated_at == o.updated_at &&
695
- state_and_local_withholding == o.state_and_local_withholding
930
+ updated_at == o.updated_at
696
931
  end
697
932
 
698
933
  # @see the `==` method
@@ -704,7 +939,7 @@ module AvalaraSdk::A1099::V2
704
939
  # Calculates hash code according to all attributes.
705
940
  # @return [Integer] Hash code
706
941
  def hash
707
- [unique_form_id, recipient_date_of_birth, recipient_giin, recipient_foreign_tin, lob_code, income_code, gross_income, withholding_indicator, tax_country_code, exemption_code_chap3, exemption_code_chap4, tax_rate_chap3, withholding_allowance, federal_tax_withheld, tax_not_deposited_indicator, academic_indicator, tax_withheld_other_agents, amount_repaid, tax_paid_agent, chap3_status_code, chap4_status_code, primary_withholding_agent, intermediary_or_flow_through, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, e_delivery_status, reference_id, email, tin_type, fatca_filing_requirement, tin, no_tin, second_tin_notice, recipient_name, recipient_second_name, address, address2, city, state, zip, non_us_province, country_code, account_number, office_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash
942
+ [tin_type, unique_form_id, recipient_date_of_birth, recipient_giin, recipient_foreign_tin, lob_code, income_code, gross_income, withholding_indicator, tax_country_code, exemption_code_chap3, exemption_code_chap4, tax_rate_chap3, withholding_allowance, federal_tax_withheld, tax_not_deposited_indicator, academic_indicator, tax_withheld_other_agents, amount_repaid, tax_paid_agent, chap3_status_code, chap4_status_code, primary_withholding_agent, intermediary_or_flow_through, type, id, issuer_id, issuer_reference_id, issuer_tin, tax_year, reference_id, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, email, account_number, office_code, non_us_province, country_code, federal_efile_date, postal_mail, state_efile_date, recipient_edelivery_date, tin_match, no_tin, address_verification, state_and_local_withholding, second_tin_notice, federal_efile_status, state_efile_status, postal_mail_status, tin_match_status, address_verification_status, e_delivery_status, validation_errors, created_at, updated_at].hash
708
943
  end
709
944
 
710
945
  # Builds the object from hash