avalara_sdk 25.6.0 → 25.7.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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -3
  3. data/docs/A1099/V2/BulkUpsert1099FormsRequest.md +3 -1
  4. data/docs/A1099/V2/CompaniesW9Api.md +45 -31
  5. data/docs/A1099/V2/CoveredIndividualReference.md +58 -0
  6. data/docs/A1099/V2/CoveredIndividualRequest.md +54 -0
  7. data/docs/A1099/V2/Form1095B.md +86 -0
  8. data/docs/A1099/V2/Form1095BList.md +20 -0
  9. data/docs/A1099/V2/Form1095BListItem.md +74 -0
  10. data/docs/A1099/V2/Form1095BRequest.md +76 -0
  11. data/docs/A1099/V2/Form1099Base.md +8 -8
  12. data/docs/A1099/V2/Form1099DivListItem.md +11 -11
  13. data/docs/A1099/V2/Form1099DivRequest.md +11 -17
  14. data/docs/A1099/V2/Form1099DivResponse.md +88 -0
  15. data/docs/A1099/V2/Form1099K.md +8 -8
  16. data/docs/A1099/V2/Form1099KListItem.md +11 -11
  17. data/docs/A1099/V2/Form1099KRequest.md +11 -17
  18. data/docs/A1099/V2/Form1099List.md +1 -1
  19. data/docs/A1099/V2/Form1099ListDataInner.md +32 -0
  20. data/docs/A1099/V2/Form1099Misc.md +8 -8
  21. data/docs/A1099/V2/Form1099MiscListItem.md +11 -11
  22. data/docs/A1099/V2/Form1099MiscRequest.md +11 -17
  23. data/docs/A1099/V2/Form1099MiscResponse.md +120 -0
  24. data/docs/A1099/V2/Form1099Nec.md +8 -8
  25. data/docs/A1099/V2/Form1099NecListItem.md +11 -11
  26. data/docs/A1099/V2/Form1099NecRequest.md +11 -17
  27. data/docs/A1099/V2/Form1099NecResponse.md +96 -0
  28. data/docs/A1099/V2/Form1099R.md +8 -8
  29. data/docs/A1099/V2/Form1099RListItem.md +11 -11
  30. data/docs/A1099/V2/Form1099RRequest.md +11 -17
  31. data/docs/A1099/V2/FormRequestBase.md +9 -13
  32. data/docs/A1099/V2/FormRequestCsvBase.md +66 -0
  33. data/docs/A1099/V2/FormResponseBase.md +43 -9
  34. data/docs/A1099/V2/FormSingleRequestBase.md +11 -15
  35. data/docs/A1099/V2/Forms1099Api.md +75 -57
  36. data/docs/A1099/V2/FormsW9Api.md +63 -123
  37. data/docs/A1099/V2/Get1099Form200Response.md +55 -0
  38. data/docs/A1099/V2/IncludedBase.md +20 -0
  39. data/docs/A1099/V2/Issuers1099Api.md +45 -31
  40. data/docs/A1099/V2/Jobs1099Api.md +10 -6
  41. data/docs/A1099/V2/StateAndLocalWithholdingResponse.md +32 -0
  42. data/docs/A1099/V2/StateEfileStatusDetail.md +1 -1
  43. data/docs/A1099/V2/StateEfileStatusDetailApp.md +22 -0
  44. data/docs/A1099/V2/StatusDetail.md +20 -0
  45. data/docs/A1099/V2/Update1099Form200Response.md +53 -0
  46. data/docs/A1099/V2/ValidationErrorApp.md +20 -0
  47. data/docs/EInvoicing/V1/DataInputFieldsApi.md +4 -4
  48. data/docs/EInvoicing/V1/DocumentsApi.md +2 -2
  49. data/docs/EInvoicing/V1/MandatesApi.md +4 -4
  50. data/docs/EInvoicing/V1/SubscriptionsApi.md +4 -4
  51. data/docs/EInvoicing/V1/TradingPartnersApi.md +4 -4
  52. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +103 -43
  53. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +171 -87
  54. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +135 -176
  55. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +103 -43
  56. data/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb +19 -7
  57. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +6 -6
  58. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +4 -4
  59. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  60. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +6 -6
  61. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +6 -6
  62. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +7 -7
  63. data/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +1 -0
  64. data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +403 -0
  65. data/lib/avalara_sdk/models/A1099/V2/covered_individual_request.rb +378 -0
  66. data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +572 -0
  67. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list.rb +238 -0
  68. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +538 -0
  69. data/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +559 -0
  70. data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +29 -29
  71. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +78 -36
  72. data/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +80 -53
  73. data/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +600 -0
  74. data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +29 -29
  75. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +56 -37
  76. data/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +80 -54
  77. data/lib/avalara_sdk/models/A1099/V2/form1099_list.rb +1 -1
  78. data/lib/avalara_sdk/models/A1099/V2/form1099_list_data_inner.rb +20 -68
  79. data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +29 -29
  80. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +78 -36
  81. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +80 -53
  82. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +744 -0
  83. data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +29 -29
  84. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +78 -36
  85. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +80 -53
  86. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +636 -0
  87. data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +29 -29
  88. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +56 -36
  89. data/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +80 -53
  90. data/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +68 -44
  91. data/lib/avalara_sdk/models/A1099/V2/form_request_csv_base.rb +475 -0
  92. data/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +252 -31
  93. data/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +80 -44
  94. data/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +104 -0
  95. data/lib/avalara_sdk/models/A1099/V2/included_base.rb +219 -0
  96. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_request.rb +1 -0
  97. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_response.rb +274 -0
  98. data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_app.rb +231 -0
  99. data/lib/avalara_sdk/models/A1099/V2/status_detail.rb +221 -0
  100. data/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +103 -0
  101. data/lib/avalara_sdk/models/A1099/V2/validation_error_app.rb +229 -0
  102. data/lib/avalara_sdk/version.rb +1 -1
  103. data/lib/avalara_sdk.rb +17 -0
  104. data/spec/integration/a1099_spec.rb +12 -12
  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 +36 -2
@@ -0,0 +1,572 @@
1
+ =begin
2
+ #Avalara 1099 & W-9 API Definition
3
+
4
+ ### 🔐 Authentication Use **username/password** or generate a **license key** from: *Avalara Portal → 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 Form1095B
14
+ attr_accessor :origin_of_health_coverage_code
15
+
16
+ attr_accessor :covered_individuals
17
+
18
+ attr_accessor :id
19
+
20
+ attr_accessor :type
21
+
22
+ attr_accessor :issuer_id
23
+
24
+ attr_accessor :issuer_reference_id
25
+
26
+ attr_accessor :issuer_tin
27
+
28
+ attr_accessor :tax_year
29
+
30
+ attr_accessor :federal_efile
31
+
32
+ attr_accessor :federal_efile_status
33
+
34
+ attr_accessor :state_efile
35
+
36
+ attr_accessor :state_efile_status
37
+
38
+ attr_accessor :postal_mail
39
+
40
+ attr_accessor :postal_mail_status
41
+
42
+ attr_accessor :tin_match
43
+
44
+ attr_accessor :tin_match_status
45
+
46
+ attr_accessor :address_verification
47
+
48
+ attr_accessor :address_verification_status
49
+
50
+ attr_accessor :reference_id
51
+
52
+ attr_accessor :email
53
+
54
+ attr_accessor :tin_type
55
+
56
+ attr_accessor :tin
57
+
58
+ attr_accessor :recipient_name
59
+
60
+ attr_accessor :recipient_second_name
61
+
62
+ attr_accessor :address
63
+
64
+ attr_accessor :address2
65
+
66
+ attr_accessor :city
67
+
68
+ attr_accessor :state
69
+
70
+ attr_accessor :zip
71
+
72
+ attr_accessor :foreign_province
73
+
74
+ attr_accessor :country_code
75
+
76
+ attr_accessor :validation_errors
77
+
78
+ attr_accessor :created_at
79
+
80
+ attr_accessor :updated_at
81
+
82
+ attr_accessor :state_and_local_withholding
83
+
84
+ # Attribute mapping from ruby-style variable name to JSON key.
85
+ def self.attribute_map
86
+ {
87
+ :'origin_of_health_coverage_code' => :'originOfHealthCoverageCode',
88
+ :'covered_individuals' => :'coveredIndividuals',
89
+ :'id' => :'id',
90
+ :'type' => :'type',
91
+ :'issuer_id' => :'issuerId',
92
+ :'issuer_reference_id' => :'issuerReferenceId',
93
+ :'issuer_tin' => :'issuerTin',
94
+ :'tax_year' => :'taxYear',
95
+ :'federal_efile' => :'federalEfile',
96
+ :'federal_efile_status' => :'federalEfileStatus',
97
+ :'state_efile' => :'stateEfile',
98
+ :'state_efile_status' => :'stateEfileStatus',
99
+ :'postal_mail' => :'postalMail',
100
+ :'postal_mail_status' => :'postalMailStatus',
101
+ :'tin_match' => :'tinMatch',
102
+ :'tin_match_status' => :'tinMatchStatus',
103
+ :'address_verification' => :'addressVerification',
104
+ :'address_verification_status' => :'addressVerificationStatus',
105
+ :'reference_id' => :'referenceId',
106
+ :'email' => :'email',
107
+ :'tin_type' => :'tinType',
108
+ :'tin' => :'tin',
109
+ :'recipient_name' => :'recipientName',
110
+ :'recipient_second_name' => :'recipientSecondName',
111
+ :'address' => :'address',
112
+ :'address2' => :'address2',
113
+ :'city' => :'city',
114
+ :'state' => :'state',
115
+ :'zip' => :'zip',
116
+ :'foreign_province' => :'foreignProvince',
117
+ :'country_code' => :'countryCode',
118
+ :'validation_errors' => :'validationErrors',
119
+ :'created_at' => :'createdAt',
120
+ :'updated_at' => :'updatedAt',
121
+ :'state_and_local_withholding' => :'stateAndLocalWithholding'
122
+ }
123
+ end
124
+
125
+ # Returns all the JSON keys this model knows about
126
+ def self.acceptable_attributes
127
+ attribute_map.values
128
+ end
129
+
130
+ # Attribute type mapping.
131
+ def self.openapi_types
132
+ {
133
+ :'origin_of_health_coverage_code' => :'String',
134
+ :'covered_individuals' => :'Array<CoveredIndividualReference>',
135
+ :'id' => :'String',
136
+ :'type' => :'String',
137
+ :'issuer_id' => :'Integer',
138
+ :'issuer_reference_id' => :'String',
139
+ :'issuer_tin' => :'String',
140
+ :'tax_year' => :'Integer',
141
+ :'federal_efile' => :'Boolean',
142
+ :'federal_efile_status' => :'Form1099StatusDetail',
143
+ :'state_efile' => :'Boolean',
144
+ :'state_efile_status' => :'Array<StateEfileStatusDetail>',
145
+ :'postal_mail' => :'Boolean',
146
+ :'postal_mail_status' => :'Form1099StatusDetail',
147
+ :'tin_match' => :'Boolean',
148
+ :'tin_match_status' => :'Form1099StatusDetail',
149
+ :'address_verification' => :'Boolean',
150
+ :'address_verification_status' => :'Form1099StatusDetail',
151
+ :'reference_id' => :'String',
152
+ :'email' => :'String',
153
+ :'tin_type' => :'String',
154
+ :'tin' => :'String',
155
+ :'recipient_name' => :'String',
156
+ :'recipient_second_name' => :'String',
157
+ :'address' => :'String',
158
+ :'address2' => :'String',
159
+ :'city' => :'String',
160
+ :'state' => :'String',
161
+ :'zip' => :'String',
162
+ :'foreign_province' => :'String',
163
+ :'country_code' => :'String',
164
+ :'validation_errors' => :'Array<ValidationError>',
165
+ :'created_at' => :'Time',
166
+ :'updated_at' => :'Time',
167
+ :'state_and_local_withholding' => :'StateAndLocalWithholding'
168
+ }
169
+ end
170
+
171
+ # List of attributes with nullable: true
172
+ def self.openapi_nullable
173
+ Set.new([
174
+ :'issuer_reference_id',
175
+ :'issuer_tin',
176
+ :'state_efile_status',
177
+ :'postal_mail_status',
178
+ :'tin_match_status',
179
+ :'address_verification_status',
180
+ :'reference_id',
181
+ :'email',
182
+ :'tin_type',
183
+ :'tin',
184
+ :'recipient_name',
185
+ :'recipient_second_name',
186
+ :'address',
187
+ :'address2',
188
+ :'city',
189
+ :'state',
190
+ :'zip',
191
+ :'foreign_province',
192
+ :'country_code',
193
+ :'validation_errors',
194
+ :'state_and_local_withholding'
195
+ ])
196
+ end
197
+
198
+ # List of class defined in allOf (OpenAPI v3)
199
+ def self.openapi_all_of
200
+ [
201
+ :'Form1099Base'
202
+ ]
203
+ end
204
+
205
+ # Initializes the object
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ def initialize(attributes = {})
208
+ if (!attributes.is_a?(Hash))
209
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::Form1095B` initialize method"
210
+ end
211
+
212
+ # check to see if the attribute exists and convert string to symbol for hash key
213
+ attributes = attributes.each_with_object({}) { |(k, v), h|
214
+ if (!self.class.attribute_map.key?(k.to_sym))
215
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::Form1095B`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
216
+ end
217
+ h[k.to_sym] = v
218
+ }
219
+
220
+ if attributes.key?(:'origin_of_health_coverage_code')
221
+ self.origin_of_health_coverage_code = attributes[:'origin_of_health_coverage_code']
222
+ end
223
+
224
+ if attributes.key?(:'covered_individuals')
225
+ if (value = attributes[:'covered_individuals']).is_a?(Array)
226
+ self.covered_individuals = value
227
+ end
228
+ end
229
+
230
+ if attributes.key?(:'id')
231
+ self.id = attributes[:'id']
232
+ end
233
+
234
+ if attributes.key?(:'type')
235
+ self.type = attributes[:'type']
236
+ end
237
+
238
+ if attributes.key?(:'issuer_id')
239
+ self.issuer_id = attributes[:'issuer_id']
240
+ end
241
+
242
+ if attributes.key?(:'issuer_reference_id')
243
+ self.issuer_reference_id = attributes[:'issuer_reference_id']
244
+ end
245
+
246
+ if attributes.key?(:'issuer_tin')
247
+ self.issuer_tin = attributes[:'issuer_tin']
248
+ end
249
+
250
+ if attributes.key?(:'tax_year')
251
+ self.tax_year = attributes[:'tax_year']
252
+ end
253
+
254
+ if attributes.key?(:'federal_efile')
255
+ self.federal_efile = attributes[:'federal_efile']
256
+ end
257
+
258
+ if attributes.key?(:'federal_efile_status')
259
+ self.federal_efile_status = attributes[:'federal_efile_status']
260
+ end
261
+
262
+ if attributes.key?(:'state_efile')
263
+ self.state_efile = attributes[:'state_efile']
264
+ end
265
+
266
+ if attributes.key?(:'state_efile_status')
267
+ if (value = attributes[:'state_efile_status']).is_a?(Array)
268
+ self.state_efile_status = value
269
+ end
270
+ end
271
+
272
+ if attributes.key?(:'postal_mail')
273
+ self.postal_mail = attributes[:'postal_mail']
274
+ end
275
+
276
+ if attributes.key?(:'postal_mail_status')
277
+ self.postal_mail_status = attributes[:'postal_mail_status']
278
+ end
279
+
280
+ if attributes.key?(:'tin_match')
281
+ self.tin_match = attributes[:'tin_match']
282
+ end
283
+
284
+ if attributes.key?(:'tin_match_status')
285
+ self.tin_match_status = attributes[:'tin_match_status']
286
+ end
287
+
288
+ if attributes.key?(:'address_verification')
289
+ self.address_verification = attributes[:'address_verification']
290
+ end
291
+
292
+ if attributes.key?(:'address_verification_status')
293
+ self.address_verification_status = attributes[:'address_verification_status']
294
+ end
295
+
296
+ if attributes.key?(:'reference_id')
297
+ self.reference_id = attributes[:'reference_id']
298
+ end
299
+
300
+ if attributes.key?(:'email')
301
+ self.email = attributes[:'email']
302
+ end
303
+
304
+ if attributes.key?(:'tin_type')
305
+ self.tin_type = attributes[:'tin_type']
306
+ end
307
+
308
+ if attributes.key?(:'tin')
309
+ self.tin = attributes[:'tin']
310
+ end
311
+
312
+ if attributes.key?(:'recipient_name')
313
+ self.recipient_name = attributes[:'recipient_name']
314
+ end
315
+
316
+ if attributes.key?(:'recipient_second_name')
317
+ self.recipient_second_name = attributes[:'recipient_second_name']
318
+ end
319
+
320
+ if attributes.key?(:'address')
321
+ self.address = attributes[:'address']
322
+ end
323
+
324
+ if attributes.key?(:'address2')
325
+ self.address2 = attributes[:'address2']
326
+ end
327
+
328
+ if attributes.key?(:'city')
329
+ self.city = attributes[:'city']
330
+ end
331
+
332
+ if attributes.key?(:'state')
333
+ self.state = attributes[:'state']
334
+ end
335
+
336
+ if attributes.key?(:'zip')
337
+ self.zip = attributes[:'zip']
338
+ end
339
+
340
+ if attributes.key?(:'foreign_province')
341
+ self.foreign_province = attributes[:'foreign_province']
342
+ end
343
+
344
+ if attributes.key?(:'country_code')
345
+ self.country_code = attributes[:'country_code']
346
+ end
347
+
348
+ if attributes.key?(:'validation_errors')
349
+ if (value = attributes[:'validation_errors']).is_a?(Array)
350
+ self.validation_errors = value
351
+ end
352
+ end
353
+
354
+ if attributes.key?(:'created_at')
355
+ self.created_at = attributes[:'created_at']
356
+ end
357
+
358
+ if attributes.key?(:'updated_at')
359
+ self.updated_at = attributes[:'updated_at']
360
+ end
361
+
362
+ if attributes.key?(:'state_and_local_withholding')
363
+ self.state_and_local_withholding = attributes[:'state_and_local_withholding']
364
+ end
365
+ end
366
+
367
+ # Show invalid properties with the reasons. Usually used together with valid?
368
+ # @return Array for valid properties with the reasons
369
+ def list_invalid_properties
370
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
371
+ invalid_properties = Array.new
372
+ invalid_properties
373
+ end
374
+
375
+ # Check to see if the all the properties in the model are valid
376
+ # @return true if the model is valid
377
+ def valid?
378
+ warn '[DEPRECATED] the `valid?` method is obsolete'
379
+ true
380
+ end
381
+
382
+ # Custom attribute writer method with validation
383
+ # @param [Object] covered_individuals Value to be assigned
384
+ def covered_individuals=(covered_individuals)
385
+ if covered_individuals.nil?
386
+ fail ArgumentError, 'covered_individuals cannot be nil'
387
+ end
388
+
389
+ @covered_individuals = covered_individuals
390
+ end
391
+
392
+ # Custom attribute writer method with validation
393
+ # @param [Object] state_efile_status Value to be assigned
394
+ def state_efile_status=(state_efile_status)
395
+ @state_efile_status = state_efile_status
396
+ end
397
+
398
+ # Custom attribute writer method with validation
399
+ # @param [Object] validation_errors Value to be assigned
400
+ def validation_errors=(validation_errors)
401
+ @validation_errors = validation_errors
402
+ end
403
+
404
+ # Checks equality by comparing each attribute.
405
+ # @param [Object] Object to be compared
406
+ def ==(o)
407
+ return true if self.equal?(o)
408
+ self.class == o.class &&
409
+ origin_of_health_coverage_code == o.origin_of_health_coverage_code &&
410
+ covered_individuals == o.covered_individuals &&
411
+ id == o.id &&
412
+ type == o.type &&
413
+ issuer_id == o.issuer_id &&
414
+ issuer_reference_id == o.issuer_reference_id &&
415
+ issuer_tin == o.issuer_tin &&
416
+ tax_year == o.tax_year &&
417
+ federal_efile == o.federal_efile &&
418
+ federal_efile_status == o.federal_efile_status &&
419
+ state_efile == o.state_efile &&
420
+ state_efile_status == o.state_efile_status &&
421
+ postal_mail == o.postal_mail &&
422
+ postal_mail_status == o.postal_mail_status &&
423
+ tin_match == o.tin_match &&
424
+ tin_match_status == o.tin_match_status &&
425
+ address_verification == o.address_verification &&
426
+ address_verification_status == o.address_verification_status &&
427
+ reference_id == o.reference_id &&
428
+ email == o.email &&
429
+ tin_type == o.tin_type &&
430
+ tin == o.tin &&
431
+ recipient_name == o.recipient_name &&
432
+ recipient_second_name == o.recipient_second_name &&
433
+ address == o.address &&
434
+ address2 == o.address2 &&
435
+ city == o.city &&
436
+ state == o.state &&
437
+ zip == o.zip &&
438
+ foreign_province == o.foreign_province &&
439
+ country_code == o.country_code &&
440
+ validation_errors == o.validation_errors &&
441
+ created_at == o.created_at &&
442
+ updated_at == o.updated_at &&
443
+ state_and_local_withholding == o.state_and_local_withholding
444
+ end
445
+
446
+ # @see the `==` method
447
+ # @param [Object] Object to be compared
448
+ def eql?(o)
449
+ self == o
450
+ end
451
+
452
+ # Calculates hash code according to all attributes.
453
+ # @return [Integer] Hash code
454
+ def hash
455
+ [origin_of_health_coverage_code, covered_individuals, 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, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash
456
+ end
457
+
458
+ # Builds the object from hash
459
+ # @param [Hash] attributes Model attributes in the form of hash
460
+ # @return [Object] Returns the model itself
461
+ def self.build_from_hash(attributes)
462
+ return nil unless attributes.is_a?(Hash)
463
+ attributes = attributes.transform_keys(&:to_sym)
464
+ transformed_hash = {}
465
+ openapi_types.each_pair do |key, type|
466
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
467
+ transformed_hash["#{key}"] = nil
468
+ elsif type =~ /\AArray<(.*)>/i
469
+ # check to ensure the input is an array given that the attribute
470
+ # is documented as an array but the input is not
471
+ if attributes[attribute_map[key]].is_a?(Array)
472
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
473
+ end
474
+ elsif !attributes[attribute_map[key]].nil?
475
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
476
+ end
477
+ end
478
+ new(transformed_hash)
479
+ end
480
+
481
+ # Deserializes the data based on type
482
+ # @param string type Data type
483
+ # @param string value Value to be deserialized
484
+ # @return [Object] Deserialized data
485
+ def self._deserialize(type, value)
486
+ case type.to_sym
487
+ when :Time
488
+ Time.parse(value)
489
+ when :Date
490
+ Date.parse(value)
491
+ when :String
492
+ value.to_s
493
+ when :Integer
494
+ value.to_i
495
+ when :Float
496
+ value.to_f
497
+ when :Boolean
498
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
499
+ true
500
+ else
501
+ false
502
+ end
503
+ when :Object
504
+ # generic object (usually a Hash), return directly
505
+ value
506
+ when /\AArray<(?<inner_type>.+)>\z/
507
+ inner_type = Regexp.last_match[:inner_type]
508
+ value.map { |v| _deserialize(inner_type, v) }
509
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
510
+ k_type = Regexp.last_match[:k_type]
511
+ v_type = Regexp.last_match[:v_type]
512
+ {}.tap do |hash|
513
+ value.each do |k, v|
514
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
515
+ end
516
+ end
517
+ else # model
518
+ # models (e.g. Pet) or oneOf
519
+ klass = AvalaraSdk::A1099::V2.const_get(type)
520
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
521
+ end
522
+ end
523
+
524
+ # Returns the string representation of the object
525
+ # @return [String] String presentation of the object
526
+ def to_s
527
+ to_hash.to_s
528
+ end
529
+
530
+ # to_body is an alias to to_hash (backward compatibility)
531
+ # @return [Hash] Returns the object in the form of hash
532
+ def to_body
533
+ to_hash
534
+ end
535
+
536
+ # Returns the object in the form of hash
537
+ # @return [Hash] Returns the object in the form of hash
538
+ def to_hash
539
+ hash = {}
540
+ self.class.attribute_map.each_pair do |attr, param|
541
+ value = self.send(attr)
542
+ if value.nil?
543
+ is_nullable = self.class.openapi_nullable.include?(attr)
544
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
545
+ end
546
+
547
+ hash[param] = _to_hash(value)
548
+ end
549
+ hash
550
+ end
551
+
552
+ # Outputs non-array value in the form of hash
553
+ # For object, use to_hash. Otherwise, just return the value
554
+ # @param [Object] value Any valid value
555
+ # @return [Hash] Returns the value in the form of hash
556
+ def _to_hash(value)
557
+ if value.is_a?(Array)
558
+ value.compact.map { |v| _to_hash(v) }
559
+ elsif value.is_a?(Hash)
560
+ {}.tap do |hash|
561
+ value.each { |k, v| hash[k] = _to_hash(v) }
562
+ end
563
+ elsif value.respond_to? :to_hash
564
+ value.to_hash
565
+ else
566
+ value
567
+ end
568
+ end
569
+
570
+ end
571
+
572
+ end