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
@@ -0,0 +1,418 @@
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 W4FormMinimalRequest
14
+ # The form type (always \"w4\" for this model).
15
+ attr_accessor :type
16
+
17
+ # The email address of the individual associated with the form.
18
+ attr_accessor :email
19
+
20
+ # The first name of the employee.
21
+ attr_accessor :employee_first_name
22
+
23
+ # The last name of the employee.
24
+ attr_accessor :employee_last_name
25
+
26
+ # The office code associated with the form.
27
+ attr_accessor :office_code
28
+
29
+ # The ID of the associated company.
30
+ attr_accessor :company_id
31
+
32
+ # A reference identifier for the form.
33
+ attr_accessor :reference_id
34
+
35
+ class EnumAttributeValidator
36
+ attr_reader :datatype
37
+ attr_reader :allowable_values
38
+
39
+ def initialize(datatype, allowable_values)
40
+ @allowable_values = allowable_values.map do |value|
41
+ case datatype.to_s
42
+ when /Integer/i
43
+ value.to_i
44
+ when /Float/i
45
+ value.to_f
46
+ else
47
+ value
48
+ end
49
+ end
50
+ end
51
+
52
+ def valid?(value)
53
+ !value || allowable_values.include?(value)
54
+ end
55
+ end
56
+
57
+ # Attribute mapping from ruby-style variable name to JSON key.
58
+ def self.attribute_map
59
+ {
60
+ :'type' => :'type',
61
+ :'email' => :'email',
62
+ :'employee_first_name' => :'employeeFirstName',
63
+ :'employee_last_name' => :'employeeLastName',
64
+ :'office_code' => :'officeCode',
65
+ :'company_id' => :'companyId',
66
+ :'reference_id' => :'referenceId'
67
+ }
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'type' => :'String',
79
+ :'email' => :'String',
80
+ :'employee_first_name' => :'String',
81
+ :'employee_last_name' => :'String',
82
+ :'office_code' => :'String',
83
+ :'company_id' => :'String',
84
+ :'reference_id' => :'String'
85
+ }
86
+ end
87
+
88
+ # List of attributes with nullable: true
89
+ def self.openapi_nullable
90
+ Set.new([
91
+ :'office_code',
92
+ :'reference_id'
93
+ ])
94
+ end
95
+
96
+ # List of class defined in allOf (OpenAPI v3)
97
+ def self.openapi_all_of
98
+ [
99
+ :'W9FormBaseMinimalRequest'
100
+ ]
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ def initialize(attributes = {})
106
+ if (!attributes.is_a?(Hash))
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::W4FormMinimalRequest` initialize method"
108
+ end
109
+
110
+ # check to see if the attribute exists and convert string to symbol for hash key
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!self.class.attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::W4FormMinimalRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'type')
119
+ self.type = attributes[:'type']
120
+ end
121
+
122
+ if attributes.key?(:'email')
123
+ self.email = attributes[:'email']
124
+ else
125
+ self.email = nil
126
+ end
127
+
128
+ if attributes.key?(:'employee_first_name')
129
+ self.employee_first_name = attributes[:'employee_first_name']
130
+ else
131
+ self.employee_first_name = nil
132
+ end
133
+
134
+ if attributes.key?(:'employee_last_name')
135
+ self.employee_last_name = attributes[:'employee_last_name']
136
+ else
137
+ self.employee_last_name = nil
138
+ end
139
+
140
+ if attributes.key?(:'office_code')
141
+ self.office_code = attributes[:'office_code']
142
+ end
143
+
144
+ if attributes.key?(:'company_id')
145
+ self.company_id = attributes[:'company_id']
146
+ else
147
+ self.company_id = nil
148
+ end
149
+
150
+ if attributes.key?(:'reference_id')
151
+ self.reference_id = attributes[:'reference_id']
152
+ end
153
+ end
154
+
155
+ # Show invalid properties with the reasons. Usually used together with valid?
156
+ # @return Array for valid properties with the reasons
157
+ def list_invalid_properties
158
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
159
+ invalid_properties = Array.new
160
+ if @email.nil?
161
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
162
+ end
163
+
164
+ if @email.to_s.length < 1
165
+ invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.')
166
+ end
167
+
168
+ if @employee_first_name.nil?
169
+ invalid_properties.push('invalid value for "employee_first_name", employee_first_name cannot be nil.')
170
+ end
171
+
172
+ if @employee_first_name.to_s.length < 1
173
+ invalid_properties.push('invalid value for "employee_first_name", the character length must be great than or equal to 1.')
174
+ end
175
+
176
+ if @employee_last_name.nil?
177
+ invalid_properties.push('invalid value for "employee_last_name", employee_last_name cannot be nil.')
178
+ end
179
+
180
+ if @employee_last_name.to_s.length < 1
181
+ invalid_properties.push('invalid value for "employee_last_name", the character length must be great than or equal to 1.')
182
+ end
183
+
184
+ if @company_id.nil?
185
+ invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
186
+ end
187
+
188
+ if @company_id.to_s.length < 1
189
+ invalid_properties.push('invalid value for "company_id", the character length must be great than or equal to 1.')
190
+ end
191
+
192
+ invalid_properties
193
+ end
194
+
195
+ # Check to see if the all the properties in the model are valid
196
+ # @return true if the model is valid
197
+ def valid?
198
+ warn '[DEPRECATED] the `valid?` method is obsolete'
199
+ type_validator = EnumAttributeValidator.new('String', ["W4", "W8Ben", "W8BenE", "W8Imy", "W9"])
200
+ return false unless type_validator.valid?(@type)
201
+ return false if @email.nil?
202
+ return false if @email.to_s.length < 1
203
+ return false if @employee_first_name.nil?
204
+ return false if @employee_first_name.to_s.length < 1
205
+ return false if @employee_last_name.nil?
206
+ return false if @employee_last_name.to_s.length < 1
207
+ return false if @company_id.nil?
208
+ return false if @company_id.to_s.length < 1
209
+ true
210
+ end
211
+
212
+ # Custom attribute writer method checking allowed values (enum).
213
+ # @param [Object] type Object to be assigned
214
+ def type=(type)
215
+ validator = EnumAttributeValidator.new('String', ["W4", "W8Ben", "W8BenE", "W8Imy", "W9"])
216
+ unless validator.valid?(type)
217
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
218
+ end
219
+ @type = type
220
+ end
221
+
222
+ # Custom attribute writer method with validation
223
+ # @param [Object] email Value to be assigned
224
+ def email=(email)
225
+ if email.nil?
226
+ fail ArgumentError, 'email cannot be nil'
227
+ end
228
+
229
+ if email.to_s.length < 1
230
+ fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.'
231
+ end
232
+
233
+ @email = email
234
+ end
235
+
236
+ # Custom attribute writer method with validation
237
+ # @param [Object] employee_first_name Value to be assigned
238
+ def employee_first_name=(employee_first_name)
239
+ if employee_first_name.nil?
240
+ fail ArgumentError, 'employee_first_name cannot be nil'
241
+ end
242
+
243
+ if employee_first_name.to_s.length < 1
244
+ fail ArgumentError, 'invalid value for "employee_first_name", the character length must be great than or equal to 1.'
245
+ end
246
+
247
+ @employee_first_name = employee_first_name
248
+ end
249
+
250
+ # Custom attribute writer method with validation
251
+ # @param [Object] employee_last_name Value to be assigned
252
+ def employee_last_name=(employee_last_name)
253
+ if employee_last_name.nil?
254
+ fail ArgumentError, 'employee_last_name cannot be nil'
255
+ end
256
+
257
+ if employee_last_name.to_s.length < 1
258
+ fail ArgumentError, 'invalid value for "employee_last_name", the character length must be great than or equal to 1.'
259
+ end
260
+
261
+ @employee_last_name = employee_last_name
262
+ end
263
+
264
+ # Custom attribute writer method with validation
265
+ # @param [Object] company_id Value to be assigned
266
+ def company_id=(company_id)
267
+ if company_id.nil?
268
+ fail ArgumentError, 'company_id cannot be nil'
269
+ end
270
+
271
+ if company_id.to_s.length < 1
272
+ fail ArgumentError, 'invalid value for "company_id", the character length must be great than or equal to 1.'
273
+ end
274
+
275
+ @company_id = company_id
276
+ end
277
+
278
+ # Checks equality by comparing each attribute.
279
+ # @param [Object] Object to be compared
280
+ def ==(o)
281
+ return true if self.equal?(o)
282
+ self.class == o.class &&
283
+ type == o.type &&
284
+ email == o.email &&
285
+ employee_first_name == o.employee_first_name &&
286
+ employee_last_name == o.employee_last_name &&
287
+ office_code == o.office_code &&
288
+ company_id == o.company_id &&
289
+ reference_id == o.reference_id
290
+ end
291
+
292
+ # @see the `==` method
293
+ # @param [Object] Object to be compared
294
+ def eql?(o)
295
+ self == o
296
+ end
297
+
298
+ # Calculates hash code according to all attributes.
299
+ # @return [Integer] Hash code
300
+ def hash
301
+ [type, email, employee_first_name, employee_last_name, office_code, company_id, reference_id].hash
302
+ end
303
+
304
+ # Builds the object from hash
305
+ # @param [Hash] attributes Model attributes in the form of hash
306
+ # @return [Object] Returns the model itself
307
+ def self.build_from_hash(attributes)
308
+ return nil unless attributes.is_a?(Hash)
309
+ attributes = attributes.transform_keys(&:to_sym)
310
+ transformed_hash = {}
311
+ openapi_types.each_pair do |key, type|
312
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
313
+ transformed_hash["#{key}"] = nil
314
+ elsif type =~ /\AArray<(.*)>/i
315
+ # check to ensure the input is an array given that the attribute
316
+ # is documented as an array but the input is not
317
+ if attributes[attribute_map[key]].is_a?(Array)
318
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
319
+ end
320
+ elsif !attributes[attribute_map[key]].nil?
321
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
322
+ end
323
+ end
324
+ new(transformed_hash)
325
+ end
326
+
327
+ # Deserializes the data based on type
328
+ # @param string type Data type
329
+ # @param string value Value to be deserialized
330
+ # @return [Object] Deserialized data
331
+ def self._deserialize(type, value)
332
+ case type.to_sym
333
+ when :Time
334
+ Time.parse(value)
335
+ when :Date
336
+ Date.parse(value)
337
+ when :String
338
+ value.to_s
339
+ when :Integer
340
+ value.to_i
341
+ when :Float
342
+ value.to_f
343
+ when :Boolean
344
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
345
+ true
346
+ else
347
+ false
348
+ end
349
+ when :Object
350
+ # generic object (usually a Hash), return directly
351
+ value
352
+ when /\AArray<(?<inner_type>.+)>\z/
353
+ inner_type = Regexp.last_match[:inner_type]
354
+ value.map { |v| _deserialize(inner_type, v) }
355
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
356
+ k_type = Regexp.last_match[:k_type]
357
+ v_type = Regexp.last_match[:v_type]
358
+ {}.tap do |hash|
359
+ value.each do |k, v|
360
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
361
+ end
362
+ end
363
+ else # model
364
+ # models (e.g. Pet) or oneOf
365
+ klass = AvalaraSdk::A1099::V2.const_get(type)
366
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
367
+ end
368
+ end
369
+
370
+ # Returns the string representation of the object
371
+ # @return [String] String presentation of the object
372
+ def to_s
373
+ to_hash.to_s
374
+ end
375
+
376
+ # to_body is an alias to to_hash (backward compatibility)
377
+ # @return [Hash] Returns the object in the form of hash
378
+ def to_body
379
+ to_hash
380
+ end
381
+
382
+ # Returns the object in the form of hash
383
+ # @return [Hash] Returns the object in the form of hash
384
+ def to_hash
385
+ hash = {}
386
+ self.class.attribute_map.each_pair do |attr, param|
387
+ value = self.send(attr)
388
+ if value.nil?
389
+ is_nullable = self.class.openapi_nullable.include?(attr)
390
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
391
+ end
392
+
393
+ hash[param] = _to_hash(value)
394
+ end
395
+ hash
396
+ end
397
+
398
+ # Outputs non-array value in the form of hash
399
+ # For object, use to_hash. Otherwise, just return the value
400
+ # @param [Object] value Any valid value
401
+ # @return [Hash] Returns the value in the form of hash
402
+ def _to_hash(value)
403
+ if value.is_a?(Array)
404
+ value.compact.map { |v| _to_hash(v) }
405
+ elsif value.is_a?(Hash)
406
+ {}.tap do |hash|
407
+ value.each { |k, v| hash[k] = _to_hash(v) }
408
+ end
409
+ elsif value.respond_to? :to_hash
410
+ value.to_hash
411
+ else
412
+ value
413
+ end
414
+ end
415
+
416
+ end
417
+
418
+ end
@@ -71,6 +71,12 @@ module AvalaraSdk::A1099::V2
71
71
  # The office code associated with the form.
72
72
  attr_accessor :office_code
73
73
 
74
+ # The date when e-delivery was consented.
75
+ attr_accessor :e_delivery_consented_at
76
+
77
+ # The signature of the form.
78
+ attr_accessor :signature
79
+
74
80
  # The ID of the associated company.
75
81
  attr_accessor :company_id
76
82
 
@@ -80,12 +86,6 @@ module AvalaraSdk::A1099::V2
80
86
  # The email address of the individual associated with the form.
81
87
  attr_accessor :email
82
88
 
83
- # The date when e-delivery was consented.
84
- attr_accessor :e_delivery_consented_at
85
-
86
- # The signature of the form.
87
- attr_accessor :signature
88
-
89
89
  class EnumAttributeValidator
90
90
  attr_reader :datatype
91
91
  attr_reader :allowable_values
@@ -131,11 +131,11 @@ module AvalaraSdk::A1099::V2
131
131
  :'additional_withheld' => :'additionalWithheld',
132
132
  :'exempt_from_withholding' => :'exemptFromWithholding',
133
133
  :'office_code' => :'officeCode',
134
+ :'e_delivery_consented_at' => :'eDeliveryConsentedAt',
135
+ :'signature' => :'signature',
134
136
  :'company_id' => :'companyId',
135
137
  :'reference_id' => :'referenceId',
136
- :'email' => :'email',
137
- :'e_delivery_consented_at' => :'eDeliveryConsentedAt',
138
- :'signature' => :'signature'
138
+ :'email' => :'email'
139
139
  }
140
140
  end
141
141
 
@@ -167,11 +167,11 @@ module AvalaraSdk::A1099::V2
167
167
  :'additional_withheld' => :'Float',
168
168
  :'exempt_from_withholding' => :'Boolean',
169
169
  :'office_code' => :'String',
170
+ :'e_delivery_consented_at' => :'Time',
171
+ :'signature' => :'String',
170
172
  :'company_id' => :'String',
171
173
  :'reference_id' => :'String',
172
- :'email' => :'String',
173
- :'e_delivery_consented_at' => :'Time',
174
- :'signature' => :'String'
174
+ :'email' => :'String'
175
175
  }
176
176
  end
177
177
 
@@ -191,10 +191,10 @@ module AvalaraSdk::A1099::V2
191
191
  :'deductions',
192
192
  :'additional_withheld',
193
193
  :'office_code',
194
- :'reference_id',
195
- :'email',
196
194
  :'e_delivery_consented_at',
197
- :'signature'
195
+ :'signature',
196
+ :'reference_id',
197
+ :'email'
198
198
  ])
199
199
  end
200
200
 
@@ -300,8 +300,18 @@ module AvalaraSdk::A1099::V2
300
300
  self.office_code = attributes[:'office_code']
301
301
  end
302
302
 
303
+ if attributes.key?(:'e_delivery_consented_at')
304
+ self.e_delivery_consented_at = attributes[:'e_delivery_consented_at']
305
+ end
306
+
307
+ if attributes.key?(:'signature')
308
+ self.signature = attributes[:'signature']
309
+ end
310
+
303
311
  if attributes.key?(:'company_id')
304
312
  self.company_id = attributes[:'company_id']
313
+ else
314
+ self.company_id = nil
305
315
  end
306
316
 
307
317
  if attributes.key?(:'reference_id')
@@ -311,14 +321,6 @@ module AvalaraSdk::A1099::V2
311
321
  if attributes.key?(:'email')
312
322
  self.email = attributes[:'email']
313
323
  end
314
-
315
- if attributes.key?(:'e_delivery_consented_at')
316
- self.e_delivery_consented_at = attributes[:'e_delivery_consented_at']
317
- end
318
-
319
- if attributes.key?(:'signature')
320
- self.signature = attributes[:'signature']
321
- end
322
324
  end
323
325
 
324
326
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -326,6 +328,14 @@ module AvalaraSdk::A1099::V2
326
328
  def list_invalid_properties
327
329
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
328
330
  invalid_properties = Array.new
331
+ if @company_id.nil?
332
+ invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
333
+ end
334
+
335
+ if @company_id.to_s.length < 1
336
+ invalid_properties.push('invalid value for "company_id", the character length must be great than or equal to 1.')
337
+ end
338
+
329
339
  invalid_properties
330
340
  end
331
341
 
@@ -335,6 +345,8 @@ module AvalaraSdk::A1099::V2
335
345
  warn '[DEPRECATED] the `valid?` method is obsolete'
336
346
  type_validator = EnumAttributeValidator.new('String', ["W4", "W8Ben", "W8BenE", "W8Imy", "W9"])
337
347
  return false unless type_validator.valid?(@type)
348
+ return false if @company_id.nil?
349
+ return false if @company_id.to_s.length < 1
338
350
  true
339
351
  end
340
352
 
@@ -348,6 +360,20 @@ module AvalaraSdk::A1099::V2
348
360
  @type = type
349
361
  end
350
362
 
363
+ # Custom attribute writer method with validation
364
+ # @param [Object] company_id Value to be assigned
365
+ def company_id=(company_id)
366
+ if company_id.nil?
367
+ fail ArgumentError, 'company_id cannot be nil'
368
+ end
369
+
370
+ if company_id.to_s.length < 1
371
+ fail ArgumentError, 'invalid value for "company_id", the character length must be great than or equal to 1.'
372
+ end
373
+
374
+ @company_id = company_id
375
+ end
376
+
351
377
  # Checks equality by comparing each attribute.
352
378
  # @param [Object] Object to be compared
353
379
  def ==(o)
@@ -373,11 +399,11 @@ module AvalaraSdk::A1099::V2
373
399
  additional_withheld == o.additional_withheld &&
374
400
  exempt_from_withholding == o.exempt_from_withholding &&
375
401
  office_code == o.office_code &&
402
+ e_delivery_consented_at == o.e_delivery_consented_at &&
403
+ signature == o.signature &&
376
404
  company_id == o.company_id &&
377
405
  reference_id == o.reference_id &&
378
- email == o.email &&
379
- e_delivery_consented_at == o.e_delivery_consented_at &&
380
- signature == o.signature
406
+ email == o.email
381
407
  end
382
408
 
383
409
  # @see the `==` method
@@ -389,7 +415,7 @@ module AvalaraSdk::A1099::V2
389
415
  # Calculates hash code according to all attributes.
390
416
  # @return [Integer] Hash code
391
417
  def hash
392
- [type, employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, tin_type, tin, address, city, state, zip, marital_status, last_name_differs, num_allowances, other_dependents, non_job_income, deductions, additional_withheld, exempt_from_withholding, office_code, company_id, reference_id, email, e_delivery_consented_at, signature].hash
418
+ [type, employee_first_name, employee_middle_name, employee_last_name, employee_name_suffix, tin_type, tin, address, city, state, zip, marital_status, last_name_differs, num_allowances, other_dependents, non_job_income, deductions, additional_withheld, exempt_from_withholding, office_code, e_delivery_consented_at, signature, company_id, reference_id, email].hash
393
419
  end
394
420
 
395
421
  # Builds the object from hash