avalara_sdk 25.8.3 → 25.10.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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +4 -14
  4. data/docs/A1099/V2/CompaniesW9Api.md +9 -9
  5. data/docs/A1099/V2/CompanyBase.md +50 -0
  6. data/docs/A1099/V2/CompanyRequest.md +50 -0
  7. data/docs/A1099/V2/ErrorResponse.md +2 -2
  8. data/docs/A1099/V2/ErrorResponseItem.md +2 -2
  9. data/docs/A1099/V2/Form1042S.md +16 -16
  10. data/docs/A1099/V2/Form1095B.md +15 -15
  11. data/docs/A1099/V2/Form1095C.md +14 -14
  12. data/docs/A1099/V2/Form1099Base.md +14 -14
  13. data/docs/A1099/V2/Form1099Div.md +15 -15
  14. data/docs/A1099/V2/Form1099Int.md +16 -16
  15. data/docs/A1099/V2/Form1099K.md +20 -20
  16. data/docs/A1099/V2/Form1099ListRequest.md +1 -1
  17. data/docs/A1099/V2/Form1099Misc.md +15 -15
  18. data/docs/A1099/V2/Form1099Nec.md +17 -17
  19. data/docs/A1099/V2/Form1099R.md +17 -17
  20. data/docs/A1099/V2/Forms1099Api.md +12 -12
  21. data/docs/A1099/V2/FormsW9Api.md +17 -17
  22. data/docs/A1099/V2/IntermediaryOrFlowThrough.md +2 -2
  23. data/docs/A1099/V2/IssuerBase.md +46 -0
  24. data/docs/A1099/V2/IssuerRequest.md +46 -0
  25. data/docs/A1099/V2/Issuers1099Api.md +9 -9
  26. data/docs/A1099/V2/JobResponse.md +1 -1
  27. data/docs/A1099/V2/JobsApi.md +1 -1
  28. data/docs/A1099/V2/TinMatchStatusResponse.md +1 -1
  29. data/docs/A1099/V2/W4FormMinimalRequest.md +2 -2
  30. data/docs/A1099/V2/W4FormRequest.md +11 -11
  31. data/docs/A1099/V2/W4FormResponse.md +48 -20
  32. data/docs/A1099/V2/W8BenEFormMinimalRequest.md +2 -2
  33. data/docs/A1099/V2/W8BenEFormRequest.md +10 -10
  34. data/docs/A1099/V2/W8BenEFormResponse.md +96 -68
  35. data/docs/A1099/V2/W8BenFormMinimalRequest.md +2 -2
  36. data/docs/A1099/V2/W8BenFormRequest.md +6 -6
  37. data/docs/A1099/V2/W8BenFormResponse.md +55 -27
  38. data/docs/A1099/V2/W8ImyFormMinimalRequest.md +2 -2
  39. data/docs/A1099/V2/W8ImyFormRequest.md +10 -10
  40. data/docs/A1099/V2/W8ImyFormResponse.md +118 -90
  41. data/docs/A1099/V2/W9FormBaseMinimalRequest.md +2 -2
  42. data/docs/A1099/V2/W9FormBaseRequest.md +2 -2
  43. data/docs/A1099/V2/W9FormBaseResponse.md +3 -3
  44. data/docs/A1099/V2/W9FormMinimalRequest.md +2 -2
  45. data/docs/A1099/V2/W9FormRequest.md +12 -12
  46. data/docs/A1099/V2/W9FormResponse.md +44 -16
  47. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +21 -21
  48. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +7 -7
  49. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +16 -16
  50. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +21 -21
  51. data/lib/avalara_sdk/api/A1099/V2/jobs_api.rb +1 -1
  52. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
  53. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
  54. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  55. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
  56. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
  57. data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
  58. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
  59. data/lib/avalara_sdk/api_client.rb +10 -2
  60. data/lib/avalara_sdk/models/A1099/V2/company_base.rb +404 -0
  61. data/lib/avalara_sdk/models/A1099/V2/company_request.rb +411 -0
  62. data/lib/avalara_sdk/models/A1099/V2/company_response.rb +1 -1
  63. data/lib/avalara_sdk/models/A1099/V2/error_response.rb +2 -6
  64. data/lib/avalara_sdk/models/A1099/V2/error_response_item.rb +2 -0
  65. data/lib/avalara_sdk/models/A1099/V2/form1042_s.rb +20 -30
  66. data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +19 -40
  67. data/lib/avalara_sdk/models/A1099/V2/form1095_c.rb +18 -49
  68. data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +18 -29
  69. data/lib/avalara_sdk/models/A1099/V2/form1099_div.rb +20 -31
  70. data/lib/avalara_sdk/models/A1099/V2/form1099_int.rb +22 -32
  71. data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +35 -38
  72. data/lib/avalara_sdk/models/A1099/V2/form1099_list_request.rb +2 -12
  73. data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +20 -31
  74. data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +23 -33
  75. data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +48 -33
  76. data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through.rb +48 -2
  77. data/lib/avalara_sdk/models/A1099/V2/issuer_base.rb +384 -0
  78. data/lib/avalara_sdk/models/A1099/V2/issuer_request.rb +391 -0
  79. data/lib/avalara_sdk/models/A1099/V2/issuer_response.rb +1 -1
  80. data/lib/avalara_sdk/models/A1099/V2/job_response.rb +0 -6
  81. data/lib/avalara_sdk/models/A1099/V2/validation_error.rb +0 -6
  82. data/lib/avalara_sdk/models/A1099/V2/w4_form_minimal_request.rb +1 -27
  83. data/lib/avalara_sdk/models/A1099/V2/w4_form_request.rb +50 -24
  84. data/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb +191 -15
  85. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_minimal_request.rb +1 -27
  86. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb +37 -28
  87. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb +190 -14
  88. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_minimal_request.rb +1 -27
  89. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb +20 -23
  90. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb +191 -15
  91. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_minimal_request.rb +1 -27
  92. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_request.rb +72 -22
  93. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb +191 -15
  94. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_minimal_request.rb +1 -27
  95. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_request.rb +1 -27
  96. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +47 -18
  97. data/lib/avalara_sdk/models/A1099/V2/w9_form_minimal_request.rb +1 -27
  98. data/lib/avalara_sdk/models/A1099/V2/w9_form_request.rb +61 -22
  99. data/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb +190 -14
  100. data/lib/avalara_sdk/version.rb +1 -1
  101. data/lib/avalara_sdk.rb +8 -4
  102. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
  103. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  104. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
  105. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
  106. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
  107. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
  108. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
  109. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
  110. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  111. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  112. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  113. metadata +10 -2
@@ -0,0 +1,391 @@
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 IssuerRequest
14
+ # Legal name. Not the DBA name.
15
+ attr_accessor :name
16
+
17
+ # Doing Business As (DBA) name or continuation of a long legal name. Use either this or 'transferAgentName'.
18
+ attr_accessor :dba_name
19
+
20
+ # Federal Tax Identification Number (TIN).
21
+ attr_accessor :tin
22
+
23
+ # Internal reference ID. Never shown to any agency or recipient. If present, it will prefix download filenames. Allowed characters: letters, numbers, dashes, underscores, and spaces.
24
+ attr_accessor :reference_id
25
+
26
+ # Contact phone number (must contain at least 10 digits, max 15 characters). For recipient inquiries.
27
+ attr_accessor :telephone
28
+
29
+ # Tax year for which the forms are being filed (e.g., 2024). Must be within current tax year and current tax year - 4.
30
+ attr_accessor :tax_year
31
+
32
+ # Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes. If there is a transfer agent, use the transfer agent's shipping address.
33
+ attr_accessor :country_code
34
+
35
+ # Contact email address. For recipient inquiries.
36
+ attr_accessor :email
37
+
38
+ # Address.
39
+ attr_accessor :address
40
+
41
+ # City.
42
+ attr_accessor :city
43
+
44
+ # Two-letter US state or Canadian province code (required for US/CA addresses).
45
+ attr_accessor :state
46
+
47
+ # ZIP/postal code.
48
+ attr_accessor :zip
49
+
50
+ # Province or region for non-US/CA addresses.
51
+ attr_accessor :foreign_province
52
+
53
+ # Name of the transfer agent, if applicable — optional; use either this or 'dbaName'.
54
+ attr_accessor :transfer_agent_name
55
+
56
+ # Indicates if this is the issuer's final year filing.
57
+ attr_accessor :last_filing
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'name' => :'name',
63
+ :'dba_name' => :'dbaName',
64
+ :'tin' => :'tin',
65
+ :'reference_id' => :'referenceId',
66
+ :'telephone' => :'telephone',
67
+ :'tax_year' => :'taxYear',
68
+ :'country_code' => :'countryCode',
69
+ :'email' => :'email',
70
+ :'address' => :'address',
71
+ :'city' => :'city',
72
+ :'state' => :'state',
73
+ :'zip' => :'zip',
74
+ :'foreign_province' => :'foreignProvince',
75
+ :'transfer_agent_name' => :'transferAgentName',
76
+ :'last_filing' => :'lastFiling'
77
+ }
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ attribute_map.values
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.openapi_types
87
+ {
88
+ :'name' => :'String',
89
+ :'dba_name' => :'String',
90
+ :'tin' => :'String',
91
+ :'reference_id' => :'String',
92
+ :'telephone' => :'String',
93
+ :'tax_year' => :'Integer',
94
+ :'country_code' => :'String',
95
+ :'email' => :'String',
96
+ :'address' => :'String',
97
+ :'city' => :'String',
98
+ :'state' => :'String',
99
+ :'zip' => :'String',
100
+ :'foreign_province' => :'String',
101
+ :'transfer_agent_name' => :'String',
102
+ :'last_filing' => :'Boolean'
103
+ }
104
+ end
105
+
106
+ # List of attributes with nullable: true
107
+ def self.openapi_nullable
108
+ Set.new([
109
+ :'name',
110
+ :'dba_name',
111
+ :'tin',
112
+ :'reference_id',
113
+ :'telephone',
114
+ :'tax_year',
115
+ :'country_code',
116
+ :'email',
117
+ :'address',
118
+ :'city',
119
+ :'state',
120
+ :'zip',
121
+ :'foreign_province',
122
+ :'transfer_agent_name',
123
+ :'last_filing'
124
+ ])
125
+ end
126
+
127
+ # List of class defined in allOf (OpenAPI v3)
128
+ def self.openapi_all_of
129
+ [
130
+ :'IssuerBase'
131
+ ]
132
+ end
133
+
134
+ # Initializes the object
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ def initialize(attributes = {})
137
+ if (!attributes.is_a?(Hash))
138
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::IssuerRequest` initialize method"
139
+ end
140
+
141
+ # check to see if the attribute exists and convert string to symbol for hash key
142
+ attributes = attributes.each_with_object({}) { |(k, v), h|
143
+ if (!self.class.attribute_map.key?(k.to_sym))
144
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::IssuerRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
145
+ end
146
+ h[k.to_sym] = v
147
+ }
148
+
149
+ if attributes.key?(:'name')
150
+ self.name = attributes[:'name']
151
+ else
152
+ self.name = nil
153
+ end
154
+
155
+ if attributes.key?(:'dba_name')
156
+ self.dba_name = attributes[:'dba_name']
157
+ end
158
+
159
+ if attributes.key?(:'tin')
160
+ self.tin = attributes[:'tin']
161
+ end
162
+
163
+ if attributes.key?(:'reference_id')
164
+ self.reference_id = attributes[:'reference_id']
165
+ end
166
+
167
+ if attributes.key?(:'telephone')
168
+ self.telephone = attributes[:'telephone']
169
+ else
170
+ self.telephone = nil
171
+ end
172
+
173
+ if attributes.key?(:'tax_year')
174
+ self.tax_year = attributes[:'tax_year']
175
+ else
176
+ self.tax_year = nil
177
+ end
178
+
179
+ if attributes.key?(:'country_code')
180
+ self.country_code = attributes[:'country_code']
181
+ end
182
+
183
+ if attributes.key?(:'email')
184
+ self.email = attributes[:'email']
185
+ else
186
+ self.email = nil
187
+ end
188
+
189
+ if attributes.key?(:'address')
190
+ self.address = attributes[:'address']
191
+ else
192
+ self.address = nil
193
+ end
194
+
195
+ if attributes.key?(:'city')
196
+ self.city = attributes[:'city']
197
+ else
198
+ self.city = nil
199
+ end
200
+
201
+ if attributes.key?(:'state')
202
+ self.state = attributes[:'state']
203
+ else
204
+ self.state = nil
205
+ end
206
+
207
+ if attributes.key?(:'zip')
208
+ self.zip = attributes[:'zip']
209
+ else
210
+ self.zip = nil
211
+ end
212
+
213
+ if attributes.key?(:'foreign_province')
214
+ self.foreign_province = attributes[:'foreign_province']
215
+ end
216
+
217
+ if attributes.key?(:'transfer_agent_name')
218
+ self.transfer_agent_name = attributes[:'transfer_agent_name']
219
+ end
220
+
221
+ if attributes.key?(:'last_filing')
222
+ self.last_filing = attributes[:'last_filing']
223
+ else
224
+ self.last_filing = nil
225
+ end
226
+ end
227
+
228
+ # Show invalid properties with the reasons. Usually used together with valid?
229
+ # @return Array for valid properties with the reasons
230
+ def list_invalid_properties
231
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
232
+ invalid_properties = Array.new
233
+ invalid_properties
234
+ end
235
+
236
+ # Check to see if the all the properties in the model are valid
237
+ # @return true if the model is valid
238
+ def valid?
239
+ warn '[DEPRECATED] the `valid?` method is obsolete'
240
+ true
241
+ end
242
+
243
+ # Checks equality by comparing each attribute.
244
+ # @param [Object] Object to be compared
245
+ def ==(o)
246
+ return true if self.equal?(o)
247
+ self.class == o.class &&
248
+ name == o.name &&
249
+ dba_name == o.dba_name &&
250
+ tin == o.tin &&
251
+ reference_id == o.reference_id &&
252
+ telephone == o.telephone &&
253
+ tax_year == o.tax_year &&
254
+ country_code == o.country_code &&
255
+ email == o.email &&
256
+ address == o.address &&
257
+ city == o.city &&
258
+ state == o.state &&
259
+ zip == o.zip &&
260
+ foreign_province == o.foreign_province &&
261
+ transfer_agent_name == o.transfer_agent_name &&
262
+ last_filing == o.last_filing
263
+ end
264
+
265
+ # @see the `==` method
266
+ # @param [Object] Object to be compared
267
+ def eql?(o)
268
+ self == o
269
+ end
270
+
271
+ # Calculates hash code according to all attributes.
272
+ # @return [Integer] Hash code
273
+ def hash
274
+ [name, dba_name, tin, reference_id, telephone, tax_year, country_code, email, address, city, state, zip, foreign_province, transfer_agent_name, last_filing].hash
275
+ end
276
+
277
+ # Builds the object from hash
278
+ # @param [Hash] attributes Model attributes in the form of hash
279
+ # @return [Object] Returns the model itself
280
+ def self.build_from_hash(attributes)
281
+ return nil unless attributes.is_a?(Hash)
282
+ attributes = attributes.transform_keys(&:to_sym)
283
+ transformed_hash = {}
284
+ openapi_types.each_pair do |key, type|
285
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
286
+ transformed_hash["#{key}"] = nil
287
+ elsif type =~ /\AArray<(.*)>/i
288
+ # check to ensure the input is an array given that the attribute
289
+ # is documented as an array but the input is not
290
+ if attributes[attribute_map[key]].is_a?(Array)
291
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
292
+ end
293
+ elsif !attributes[attribute_map[key]].nil?
294
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
295
+ end
296
+ end
297
+ new(transformed_hash)
298
+ end
299
+
300
+ # Deserializes the data based on type
301
+ # @param string type Data type
302
+ # @param string value Value to be deserialized
303
+ # @return [Object] Deserialized data
304
+ def self._deserialize(type, value)
305
+ case type.to_sym
306
+ when :Time
307
+ Time.parse(value)
308
+ when :Date
309
+ Date.parse(value)
310
+ when :String
311
+ value.to_s
312
+ when :Integer
313
+ value.to_i
314
+ when :Float
315
+ value.to_f
316
+ when :Boolean
317
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
318
+ true
319
+ else
320
+ false
321
+ end
322
+ when :Object
323
+ # generic object (usually a Hash), return directly
324
+ value
325
+ when /\AArray<(?<inner_type>.+)>\z/
326
+ inner_type = Regexp.last_match[:inner_type]
327
+ value.map { |v| _deserialize(inner_type, v) }
328
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
329
+ k_type = Regexp.last_match[:k_type]
330
+ v_type = Regexp.last_match[:v_type]
331
+ {}.tap do |hash|
332
+ value.each do |k, v|
333
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
334
+ end
335
+ end
336
+ else # model
337
+ # models (e.g. Pet) or oneOf
338
+ klass = AvalaraSdk::A1099::V2.const_get(type)
339
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
340
+ end
341
+ end
342
+
343
+ # Returns the string representation of the object
344
+ # @return [String] String presentation of the object
345
+ def to_s
346
+ to_hash.to_s
347
+ end
348
+
349
+ # to_body is an alias to to_hash (backward compatibility)
350
+ # @return [Hash] Returns the object in the form of hash
351
+ def to_body
352
+ to_hash
353
+ end
354
+
355
+ # Returns the object in the form of hash
356
+ # @return [Hash] Returns the object in the form of hash
357
+ def to_hash
358
+ hash = {}
359
+ self.class.attribute_map.each_pair do |attr, param|
360
+ value = self.send(attr)
361
+ if value.nil?
362
+ is_nullable = self.class.openapi_nullable.include?(attr)
363
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
364
+ end
365
+
366
+ hash[param] = _to_hash(value)
367
+ end
368
+ hash
369
+ end
370
+
371
+ # Outputs non-array value in the form of hash
372
+ # For object, use to_hash. Otherwise, just return the value
373
+ # @param [Object] value Any valid value
374
+ # @return [Hash] Returns the value in the form of hash
375
+ def _to_hash(value)
376
+ if value.is_a?(Array)
377
+ value.compact.map { |v| _to_hash(v) }
378
+ elsif value.is_a?(Hash)
379
+ {}.tap do |hash|
380
+ value.each { |k, v| hash[k] = _to_hash(v) }
381
+ end
382
+ elsif value.respond_to? :to_hash
383
+ value.to_hash
384
+ else
385
+ value
386
+ end
387
+ end
388
+
389
+ end
390
+
391
+ end
@@ -142,7 +142,7 @@ module AvalaraSdk::A1099::V2
142
142
  # List of class defined in allOf (OpenAPI v3)
143
143
  def self.openapi_all_of
144
144
  [
145
- :'IssuerCommand'
145
+ :'IssuerBase'
146
146
  ]
147
147
  end
148
148
 
@@ -285,12 +285,6 @@ module AvalaraSdk::A1099::V2
285
285
  @status = status
286
286
  end
287
287
 
288
- # Custom attribute writer method with validation
289
- # @param [Object] processed_forms Value to be assigned
290
- def processed_forms=(processed_forms)
291
- @processed_forms = processed_forms
292
- end
293
-
294
288
  # Checks equality by comparing each attribute.
295
289
  # @param [Object] Object to be compared
296
290
  def ==(o)
@@ -87,12 +87,6 @@ module AvalaraSdk::A1099::V2
87
87
  true
88
88
  end
89
89
 
90
- # Custom attribute writer method with validation
91
- # @param [Object] errors Value to be assigned
92
- def errors=(errors)
93
- @errors = errors
94
- end
95
-
96
90
  # Checks equality by comparing each attribute.
97
91
  # @param [Object] Object to be compared
98
92
  def ==(o)
@@ -26,7 +26,7 @@ module AvalaraSdk::A1099::V2
26
26
  # The office code associated with the form.
27
27
  attr_accessor :office_code
28
28
 
29
- # The ID of the associated company.
29
+ # The ID of the associated company. Required when creating a form.
30
30
  attr_accessor :company_id
31
31
 
32
32
  # A reference identifier for the form.
@@ -143,8 +143,6 @@ module AvalaraSdk::A1099::V2
143
143
 
144
144
  if attributes.key?(:'company_id')
145
145
  self.company_id = attributes[:'company_id']
146
- else
147
- self.company_id = nil
148
146
  end
149
147
 
150
148
  if attributes.key?(:'reference_id')
@@ -181,14 +179,6 @@ module AvalaraSdk::A1099::V2
181
179
  invalid_properties.push('invalid value for "employee_last_name", the character length must be great than or equal to 1.')
182
180
  end
183
181
 
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
182
  invalid_properties
193
183
  end
194
184
 
@@ -204,8 +194,6 @@ module AvalaraSdk::A1099::V2
204
194
  return false if @employee_first_name.to_s.length < 1
205
195
  return false if @employee_last_name.nil?
206
196
  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
197
  true
210
198
  end
211
199
 
@@ -261,20 +249,6 @@ module AvalaraSdk::A1099::V2
261
249
  @employee_last_name = employee_last_name
262
250
  end
263
251
 
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
252
  # Checks equality by comparing each attribute.
279
253
  # @param [Object] Object to be compared
280
254
  def ==(o)
@@ -26,25 +26,25 @@ module AvalaraSdk::A1099::V2
26
26
  # The name suffix of the employee.
27
27
  attr_accessor :employee_name_suffix
28
28
 
29
- # The type of TIN provided.
29
+ # Tax Identification Number (TIN) type.
30
30
  attr_accessor :tin_type
31
31
 
32
32
  # The taxpayer identification number (TIN).
33
33
  attr_accessor :tin
34
34
 
35
- # The address of the employee.
35
+ # The address of the employee. Required unless exempt.
36
36
  attr_accessor :address
37
37
 
38
- # The city of residence of the employee.
38
+ # The city of residence of the employee. Required unless exempt.
39
39
  attr_accessor :city
40
40
 
41
- # The state of residence of the employee.
41
+ # The state of residence of the employee. Required unless exempt.
42
42
  attr_accessor :state
43
43
 
44
- # The ZIP code of residence of the employee.
44
+ # The ZIP code of residence of the employee. Required unless exempt.
45
45
  attr_accessor :zip
46
46
 
47
- # The marital status of the employee.
47
+ # The marital status of the employee. Required unless exempt. Available values: - Single: Single or Married filing separately - Married: Married filing jointly or qualifying surviving spouse - MarriedBut: Head of household. Check only if you're unmarried and pay more than half the costs of keeping up a home for yourself and a qualifying individual.
48
48
  attr_accessor :marital_status
49
49
 
50
50
  # Indicates whether the last name differs from prior records.
@@ -77,7 +77,7 @@ module AvalaraSdk::A1099::V2
77
77
  # The signature of the form.
78
78
  attr_accessor :signature
79
79
 
80
- # The ID of the associated company.
80
+ # The ID of the associated company. Required when creating a form.
81
81
  attr_accessor :company_id
82
82
 
83
83
  # A reference identifier for the form.
@@ -226,6 +226,8 @@ module AvalaraSdk::A1099::V2
226
226
 
227
227
  if attributes.key?(:'employee_first_name')
228
228
  self.employee_first_name = attributes[:'employee_first_name']
229
+ else
230
+ self.employee_first_name = nil
229
231
  end
230
232
 
231
233
  if attributes.key?(:'employee_middle_name')
@@ -234,6 +236,8 @@ module AvalaraSdk::A1099::V2
234
236
 
235
237
  if attributes.key?(:'employee_last_name')
236
238
  self.employee_last_name = attributes[:'employee_last_name']
239
+ else
240
+ self.employee_last_name = nil
237
241
  end
238
242
 
239
243
  if attributes.key?(:'employee_name_suffix')
@@ -242,10 +246,14 @@ module AvalaraSdk::A1099::V2
242
246
 
243
247
  if attributes.key?(:'tin_type')
244
248
  self.tin_type = attributes[:'tin_type']
249
+ else
250
+ self.tin_type = nil
245
251
  end
246
252
 
247
253
  if attributes.key?(:'tin')
248
254
  self.tin = attributes[:'tin']
255
+ else
256
+ self.tin = nil
249
257
  end
250
258
 
251
259
  if attributes.key?(:'address')
@@ -310,8 +318,6 @@ module AvalaraSdk::A1099::V2
310
318
 
311
319
  if attributes.key?(:'company_id')
312
320
  self.company_id = attributes[:'company_id']
313
- else
314
- self.company_id = nil
315
321
  end
316
322
 
317
323
  if attributes.key?(:'reference_id')
@@ -328,12 +334,20 @@ module AvalaraSdk::A1099::V2
328
334
  def list_invalid_properties
329
335
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
330
336
  invalid_properties = Array.new
331
- if @company_id.nil?
332
- invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
337
+ if @employee_first_name.nil?
338
+ invalid_properties.push('invalid value for "employee_first_name", employee_first_name cannot be nil.')
339
+ end
340
+
341
+ if @employee_last_name.nil?
342
+ invalid_properties.push('invalid value for "employee_last_name", employee_last_name cannot be nil.')
333
343
  end
334
344
 
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.')
345
+ if @tin_type.nil?
346
+ invalid_properties.push('invalid value for "tin_type", tin_type cannot be nil.')
347
+ end
348
+
349
+ if @tin.nil?
350
+ invalid_properties.push('invalid value for "tin", tin cannot be nil.')
337
351
  end
338
352
 
339
353
  invalid_properties
@@ -345,8 +359,14 @@ module AvalaraSdk::A1099::V2
345
359
  warn '[DEPRECATED] the `valid?` method is obsolete'
346
360
  type_validator = EnumAttributeValidator.new('String', ["W4", "W8Ben", "W8BenE", "W8Imy", "W9"])
347
361
  return false unless type_validator.valid?(@type)
348
- return false if @company_id.nil?
349
- return false if @company_id.to_s.length < 1
362
+ return false if @employee_first_name.nil?
363
+ return false if @employee_last_name.nil?
364
+ return false if @tin_type.nil?
365
+ return false if @tin.nil?
366
+ state_validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
367
+ return false unless state_validator.valid?(@state)
368
+ marital_status_validator = EnumAttributeValidator.new('String', ["Single", "Married", "MarriedBut"])
369
+ return false unless marital_status_validator.valid?(@marital_status)
350
370
  true
351
371
  end
352
372
 
@@ -360,18 +380,24 @@ module AvalaraSdk::A1099::V2
360
380
  @type = type
361
381
  end
362
382
 
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'
383
+ # Custom attribute writer method checking allowed values (enum).
384
+ # @param [Object] state Object to be assigned
385
+ def state=(state)
386
+ validator = EnumAttributeValidator.new('String', ["AA", "AE", "AK", "AL", "AP", "AR", "AS", "AZ", "CA", "CO", "CT", "DC", "DE", "FL", "FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VI", "VT", "WA", "WI", "WV", "WY"])
387
+ unless validator.valid?(state)
388
+ fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
368
389
  end
390
+ @state = state
391
+ end
369
392
 
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.'
393
+ # Custom attribute writer method checking allowed values (enum).
394
+ # @param [Object] marital_status Object to be assigned
395
+ def marital_status=(marital_status)
396
+ validator = EnumAttributeValidator.new('String', ["Single", "Married", "MarriedBut"])
397
+ unless validator.valid?(marital_status)
398
+ fail ArgumentError, "invalid value for \"marital_status\", must be one of #{validator.allowable_values}."
372
399
  end
373
-
374
- @company_id = company_id
400
+ @marital_status = marital_status
375
401
  end
376
402
 
377
403
  # Checks equality by comparing each attribute.