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,411 @@
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 CompanyRequest
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.
18
+ attr_accessor :dba_name
19
+
20
+ # Contact email address. For inquiries by vendors/employees.
21
+ attr_accessor :email
22
+
23
+ # Address.
24
+ attr_accessor :address
25
+
26
+ # City.
27
+ attr_accessor :city
28
+
29
+ # Two-letter US state or Canadian province code (required for US/CA addresses).
30
+ attr_accessor :state
31
+
32
+ # ZIP/postal code.
33
+ attr_accessor :zip
34
+
35
+ # Contact phone number (must contain at least 10 digits, max 15 characters).
36
+ attr_accessor :telephone
37
+
38
+ # Federal Tax Identification Number (TIN). EIN/Tax ID (required for US companies).
39
+ attr_accessor :tin
40
+
41
+ # Internal reference ID. Never shown to any agency or recipient.
42
+ attr_accessor :reference_id
43
+
44
+ # Indicates whether the company authorizes IRS TIN matching.
45
+ attr_accessor :do_tin_match
46
+
47
+ # Group name for organizing companies (creates or finds group by name).
48
+ attr_accessor :group_name
49
+
50
+ # Province or region for non-US/CA addresses.
51
+ attr_accessor :foreign_province
52
+
53
+ # Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.
54
+ attr_accessor :country_code
55
+
56
+ # Boolean to enable automatic reminder emails (default: false).
57
+ attr_accessor :resend_requests
58
+
59
+ # Days between reminder emails (7-365, required if resendRequests is true).
60
+ attr_accessor :resend_interval_days
61
+
62
+ # Maximum number of reminder attempts (1-52, required if resendRequests is true).
63
+ attr_accessor :max_reminder_attempts
64
+
65
+ # Attribute mapping from ruby-style variable name to JSON key.
66
+ def self.attribute_map
67
+ {
68
+ :'name' => :'name',
69
+ :'dba_name' => :'dbaName',
70
+ :'email' => :'email',
71
+ :'address' => :'address',
72
+ :'city' => :'city',
73
+ :'state' => :'state',
74
+ :'zip' => :'zip',
75
+ :'telephone' => :'telephone',
76
+ :'tin' => :'tin',
77
+ :'reference_id' => :'referenceId',
78
+ :'do_tin_match' => :'doTinMatch',
79
+ :'group_name' => :'groupName',
80
+ :'foreign_province' => :'foreignProvince',
81
+ :'country_code' => :'countryCode',
82
+ :'resend_requests' => :'resendRequests',
83
+ :'resend_interval_days' => :'resendIntervalDays',
84
+ :'max_reminder_attempts' => :'maxReminderAttempts'
85
+ }
86
+ end
87
+
88
+ # Returns all the JSON keys this model knows about
89
+ def self.acceptable_attributes
90
+ attribute_map.values
91
+ end
92
+
93
+ # Attribute type mapping.
94
+ def self.openapi_types
95
+ {
96
+ :'name' => :'String',
97
+ :'dba_name' => :'String',
98
+ :'email' => :'String',
99
+ :'address' => :'String',
100
+ :'city' => :'String',
101
+ :'state' => :'String',
102
+ :'zip' => :'String',
103
+ :'telephone' => :'String',
104
+ :'tin' => :'String',
105
+ :'reference_id' => :'String',
106
+ :'do_tin_match' => :'Boolean',
107
+ :'group_name' => :'String',
108
+ :'foreign_province' => :'String',
109
+ :'country_code' => :'String',
110
+ :'resend_requests' => :'Boolean',
111
+ :'resend_interval_days' => :'Integer',
112
+ :'max_reminder_attempts' => :'Integer'
113
+ }
114
+ end
115
+
116
+ # List of attributes with nullable: true
117
+ def self.openapi_nullable
118
+ Set.new([
119
+ :'name',
120
+ :'dba_name',
121
+ :'email',
122
+ :'address',
123
+ :'city',
124
+ :'state',
125
+ :'zip',
126
+ :'telephone',
127
+ :'tin',
128
+ :'reference_id',
129
+ :'do_tin_match',
130
+ :'group_name',
131
+ :'foreign_province',
132
+ :'country_code',
133
+ :'resend_requests',
134
+ :'resend_interval_days',
135
+ :'max_reminder_attempts'
136
+ ])
137
+ end
138
+
139
+ # List of class defined in allOf (OpenAPI v3)
140
+ def self.openapi_all_of
141
+ [
142
+ :'CompanyBase'
143
+ ]
144
+ end
145
+
146
+ # Initializes the object
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ def initialize(attributes = {})
149
+ if (!attributes.is_a?(Hash))
150
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::CompanyRequest` initialize method"
151
+ end
152
+
153
+ # check to see if the attribute exists and convert string to symbol for hash key
154
+ attributes = attributes.each_with_object({}) { |(k, v), h|
155
+ if (!self.class.attribute_map.key?(k.to_sym))
156
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::CompanyRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
157
+ end
158
+ h[k.to_sym] = v
159
+ }
160
+
161
+ if attributes.key?(:'name')
162
+ self.name = attributes[:'name']
163
+ else
164
+ self.name = nil
165
+ end
166
+
167
+ if attributes.key?(:'dba_name')
168
+ self.dba_name = attributes[:'dba_name']
169
+ end
170
+
171
+ if attributes.key?(:'email')
172
+ self.email = attributes[:'email']
173
+ else
174
+ self.email = nil
175
+ end
176
+
177
+ if attributes.key?(:'address')
178
+ self.address = attributes[:'address']
179
+ else
180
+ self.address = nil
181
+ end
182
+
183
+ if attributes.key?(:'city')
184
+ self.city = attributes[:'city']
185
+ else
186
+ self.city = nil
187
+ end
188
+
189
+ if attributes.key?(:'state')
190
+ self.state = attributes[:'state']
191
+ end
192
+
193
+ if attributes.key?(:'zip')
194
+ self.zip = attributes[:'zip']
195
+ else
196
+ self.zip = nil
197
+ end
198
+
199
+ if attributes.key?(:'telephone')
200
+ self.telephone = attributes[:'telephone']
201
+ else
202
+ self.telephone = nil
203
+ end
204
+
205
+ if attributes.key?(:'tin')
206
+ self.tin = attributes[:'tin']
207
+ else
208
+ self.tin = nil
209
+ end
210
+
211
+ if attributes.key?(:'reference_id')
212
+ self.reference_id = attributes[:'reference_id']
213
+ end
214
+
215
+ if attributes.key?(:'do_tin_match')
216
+ self.do_tin_match = attributes[:'do_tin_match']
217
+ end
218
+
219
+ if attributes.key?(:'group_name')
220
+ self.group_name = attributes[:'group_name']
221
+ end
222
+
223
+ if attributes.key?(:'foreign_province')
224
+ self.foreign_province = attributes[:'foreign_province']
225
+ end
226
+
227
+ if attributes.key?(:'country_code')
228
+ self.country_code = attributes[:'country_code']
229
+ else
230
+ self.country_code = nil
231
+ end
232
+
233
+ if attributes.key?(:'resend_requests')
234
+ self.resend_requests = attributes[:'resend_requests']
235
+ end
236
+
237
+ if attributes.key?(:'resend_interval_days')
238
+ self.resend_interval_days = attributes[:'resend_interval_days']
239
+ end
240
+
241
+ if attributes.key?(:'max_reminder_attempts')
242
+ self.max_reminder_attempts = attributes[:'max_reminder_attempts']
243
+ end
244
+ end
245
+
246
+ # Show invalid properties with the reasons. Usually used together with valid?
247
+ # @return Array for valid properties with the reasons
248
+ def list_invalid_properties
249
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
250
+ invalid_properties = Array.new
251
+ invalid_properties
252
+ end
253
+
254
+ # Check to see if the all the properties in the model are valid
255
+ # @return true if the model is valid
256
+ def valid?
257
+ warn '[DEPRECATED] the `valid?` method is obsolete'
258
+ true
259
+ end
260
+
261
+ # Checks equality by comparing each attribute.
262
+ # @param [Object] Object to be compared
263
+ def ==(o)
264
+ return true if self.equal?(o)
265
+ self.class == o.class &&
266
+ name == o.name &&
267
+ dba_name == o.dba_name &&
268
+ email == o.email &&
269
+ address == o.address &&
270
+ city == o.city &&
271
+ state == o.state &&
272
+ zip == o.zip &&
273
+ telephone == o.telephone &&
274
+ tin == o.tin &&
275
+ reference_id == o.reference_id &&
276
+ do_tin_match == o.do_tin_match &&
277
+ group_name == o.group_name &&
278
+ foreign_province == o.foreign_province &&
279
+ country_code == o.country_code &&
280
+ resend_requests == o.resend_requests &&
281
+ resend_interval_days == o.resend_interval_days &&
282
+ max_reminder_attempts == o.max_reminder_attempts
283
+ end
284
+
285
+ # @see the `==` method
286
+ # @param [Object] Object to be compared
287
+ def eql?(o)
288
+ self == o
289
+ end
290
+
291
+ # Calculates hash code according to all attributes.
292
+ # @return [Integer] Hash code
293
+ def hash
294
+ [name, dba_name, email, address, city, state, zip, telephone, tin, reference_id, do_tin_match, group_name, foreign_province, country_code, resend_requests, resend_interval_days, max_reminder_attempts].hash
295
+ end
296
+
297
+ # Builds the object from hash
298
+ # @param [Hash] attributes Model attributes in the form of hash
299
+ # @return [Object] Returns the model itself
300
+ def self.build_from_hash(attributes)
301
+ return nil unless attributes.is_a?(Hash)
302
+ attributes = attributes.transform_keys(&:to_sym)
303
+ transformed_hash = {}
304
+ openapi_types.each_pair do |key, type|
305
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
306
+ transformed_hash["#{key}"] = nil
307
+ elsif type =~ /\AArray<(.*)>/i
308
+ # check to ensure the input is an array given that the attribute
309
+ # is documented as an array but the input is not
310
+ if attributes[attribute_map[key]].is_a?(Array)
311
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
312
+ end
313
+ elsif !attributes[attribute_map[key]].nil?
314
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
315
+ end
316
+ end
317
+ new(transformed_hash)
318
+ end
319
+
320
+ # Deserializes the data based on type
321
+ # @param string type Data type
322
+ # @param string value Value to be deserialized
323
+ # @return [Object] Deserialized data
324
+ def self._deserialize(type, value)
325
+ case type.to_sym
326
+ when :Time
327
+ Time.parse(value)
328
+ when :Date
329
+ Date.parse(value)
330
+ when :String
331
+ value.to_s
332
+ when :Integer
333
+ value.to_i
334
+ when :Float
335
+ value.to_f
336
+ when :Boolean
337
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
338
+ true
339
+ else
340
+ false
341
+ end
342
+ when :Object
343
+ # generic object (usually a Hash), return directly
344
+ value
345
+ when /\AArray<(?<inner_type>.+)>\z/
346
+ inner_type = Regexp.last_match[:inner_type]
347
+ value.map { |v| _deserialize(inner_type, v) }
348
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
349
+ k_type = Regexp.last_match[:k_type]
350
+ v_type = Regexp.last_match[:v_type]
351
+ {}.tap do |hash|
352
+ value.each do |k, v|
353
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
354
+ end
355
+ end
356
+ else # model
357
+ # models (e.g. Pet) or oneOf
358
+ klass = AvalaraSdk::A1099::V2.const_get(type)
359
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
360
+ end
361
+ end
362
+
363
+ # Returns the string representation of the object
364
+ # @return [String] String presentation of the object
365
+ def to_s
366
+ to_hash.to_s
367
+ end
368
+
369
+ # to_body is an alias to to_hash (backward compatibility)
370
+ # @return [Hash] Returns the object in the form of hash
371
+ def to_body
372
+ to_hash
373
+ end
374
+
375
+ # Returns the object in the form of hash
376
+ # @return [Hash] Returns the object in the form of hash
377
+ def to_hash
378
+ hash = {}
379
+ self.class.attribute_map.each_pair do |attr, param|
380
+ value = self.send(attr)
381
+ if value.nil?
382
+ is_nullable = self.class.openapi_nullable.include?(attr)
383
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
384
+ end
385
+
386
+ hash[param] = _to_hash(value)
387
+ end
388
+ hash
389
+ end
390
+
391
+ # Outputs non-array value in the form of hash
392
+ # For object, use to_hash. Otherwise, just return the value
393
+ # @param [Object] value Any valid value
394
+ # @return [Hash] Returns the value in the form of hash
395
+ def _to_hash(value)
396
+ if value.is_a?(Array)
397
+ value.compact.map { |v| _to_hash(v) }
398
+ elsif value.is_a?(Hash)
399
+ {}.tap do |hash|
400
+ value.each { |k, v| hash[k] = _to_hash(v) }
401
+ end
402
+ elsif value.respond_to? :to_hash
403
+ value.to_hash
404
+ else
405
+ value
406
+ end
407
+ end
408
+
409
+ end
410
+
411
+ end
@@ -154,7 +154,7 @@ module AvalaraSdk::A1099::V2
154
154
  # List of class defined in allOf (OpenAPI v3)
155
155
  def self.openapi_all_of
156
156
  [
157
- :'CompanyCreateUpdateRequestModel'
157
+ :'CompanyBase'
158
158
  ]
159
159
  end
160
160
 
@@ -11,8 +11,10 @@ require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
13
  class ErrorResponse
14
+ # A summary of the problem type.
14
15
  attr_accessor :title
15
16
 
17
+ # A list of errors detailing the problem type.
16
18
  attr_accessor :errors
17
19
 
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -85,12 +87,6 @@ module AvalaraSdk::A1099::V2
85
87
  true
86
88
  end
87
89
 
88
- # Custom attribute writer method with validation
89
- # @param [Object] errors Value to be assigned
90
- def errors=(errors)
91
- @errors = errors
92
- end
93
-
94
90
  # Checks equality by comparing each attribute.
95
91
  # @param [Object] Object to be compared
96
92
  def ==(o)
@@ -11,8 +11,10 @@ require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
13
  class ErrorResponseItem
14
+ # An identifier for this occurrence of the problem. It is the name of a request's field when specific to that field. Otherwise, for other types of errors, its value is empty.
14
15
  attr_accessor :type
15
16
 
17
+ # An explanation specific to this occurrence of the problem.
16
18
  attr_accessor :detail
17
19
 
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -12,6 +12,7 @@ require 'time'
12
12
  module AvalaraSdk::A1099::V2
13
13
  # Form 1042-S: Foreign Person's U.S. Source Income Subject to Withholding
14
14
  class Form1042S
15
+ # Tax Identification Number (TIN) type. Available values: - EIN: Employer Identification Number - SSN: Social Security Number - ITIN: Individual Taxpayer Identification Number - ATIN: Adoption Taxpayer Identification Number
15
16
  attr_accessor :tin_type
16
17
 
17
18
  # Unique form identifier
@@ -71,10 +72,10 @@ module AvalaraSdk::A1099::V2
71
72
  # Tax paid by withholding agent
72
73
  attr_accessor :tax_paid_agent
73
74
 
74
- # Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3) Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
75
+ # Chapter 3 status code - Required if WithholdingIndicator is 3 (Chapter 3). Available values: - 01: U.S. Withholding Agent - FI (Deprecated - valid only for tax years prior to 2020) - 02: U.S. Withholding Agent - Other (Deprecated - valid only for tax years prior to 2020) - 03: Territory FI - treated as U.S. Person - 04: Territory FI - not treated as U.S. Person - 05: U.S. branch - treated as U.S. Person - 06: U.S. branch - not treated as U.S. Person - 07: U.S. branch - ECI presumption applied - 08: Partnership other than Withholding Foreign Partnership - 09: Withholding Foreign Partnership - 10: Trust other than Withholding Foreign Trust - 11: Withholding Foreign Trust - 12: Qualified Intermediary - 13: Qualified Securities Lender - Qualified Intermediary - 14: Qualified Securities Lender - Other - 15: Corporation - 16: Individual - 17: Estate - 18: Private Foundation - 19: Government or International Organization - 20: Tax Exempt Organization (Section 501(c) entities) - 21: Unknown Recipient - 22: Artist or Athlete - 23: Pension - 24: Foreign Central Bank of Issue - 25: Nonqualified Intermediary - 26: Hybrid entity making Treaty Claim - 27: Withholding Rate Pool - General - 28: Withholding Rate Pool - Exempt Organization - 29: PAI Withholding Rate Pool - General - 30: PAI Withholding Rate Pool - Exempt Organization - 31: Agency Withholding Rate Pool - General - 32: Agency Withholding Rate Pool - Exempt Organization - 34: U.S. Withholding Agent-Foreign branch of FI (Deprecated - valid only for tax years prior to 2020) - 35: Qualified Derivatives Dealer - 36: Foreign Government - Integral Part - 37: Foreign Government - Controlled Entity - 38: Publicly Traded Partnership - 39: Disclosing Qualified Intermediary
75
76
  attr_accessor :chap3_status_code
76
77
 
77
- # Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
78
+ # Chapter 4 status code. Required if WithholdingIndicator is 4 (Chapter 4). Required if email is specified, must fill either this or RecipientForeignTin. Available values: - 01: U.S. Withholding Agent - FI - 02: U.S. Withholding Agent - Other - 03: Territory FI - not treated as U.S. Person - 04: Territory FI - treated as U.S. Person - 05: Participating FFI - Other - 06: Participating FFI - Reporting Model 2 FFI - 07: Registered Deemed - Compliant FFI-Reporting Model 1 FFI - 08: Registered Deemed - Compliant FFI-Sponsored Entity - 09: Registered Deemed - Compliant FFI-Other - 10: Certified Deemed - Compliant FFI-Other - 11: Certified Deemed - Compliant FFI-FFI with Low Value Accounts - 12: Certified Deemed - Compliant FFI-Non-Registering Local Bank - 13: Certified Deemed - Compliant FFI-Sponsored Entity - 14: Certified Deemed - Compliant FFI-Investment Advisor or Investment Manager - 15: Nonparticipating FFI - 16: Owner-Documented FFI - 17: U.S. Branch - treated as U.S. person - 18: U.S. Branch - not treated as U.S. person (reporting under section 1471) - 19: Passive NFFE identifying Substantial U.S. Owners - 20: Passive NFFE with no Substantial U.S. Owners - 21: Publicly Traded NFFE or Affiliate of Publicly Traded NFFE - 22: Active NFFE - 23: Individual - 24: Section 501(c) Entities - 25: Excepted Territory NFFE - 26: Excepted NFFE - Other - 27: Exempt Beneficial Owner - 28: Entity Wholly Owned by Exempt Beneficial Owners - 29: Unknown Recipient - 30: Recalcitrant Account Holder - 31: Nonreporting IGA FFI - 32: Direct reporting NFFE - 33: U.S. reportable account - 34: Non-consenting U.S. account - 35: Sponsored direct reporting NFFE - 36: Excepted Inter-affiliate FFI - 37: Undocumented Preexisting Obligation - 38: U.S. Branch - ECI presumption applied - 39: Account Holder of Excluded Financial Account - 40: Passive NFFE reported by FFI - 41: NFFE subject to 1472 withholding - 42: Recalcitrant Pool - No U.S. Indicia - 43: Recalcitrant Pool - U.S. Indicia - 44: Recalcitrant Pool - Dormant Account - 45: Recalcitrant Pool - U.S. Persons - 46: Recalcitrant Pool - Passive NFFEs - 47: Nonparticipating FFI Pool - 48: U.S. Payees Pool - 49: QI - Recalcitrant Pool-General - 50: U.S. Withholding Agent-Foreign branch of FI
78
79
  attr_accessor :chap4_status_code
79
80
 
80
81
  # Primary withholding agent information
@@ -83,7 +84,7 @@ module AvalaraSdk::A1099::V2
83
84
  # Intermediary or flow-through entity information
84
85
  attr_accessor :intermediary_or_flow_through
85
86
 
86
- # Form type
87
+ # Form type.
87
88
  attr_accessor :type
88
89
 
89
90
  # Form ID. Unique identifier set when the record is created.
@@ -92,13 +93,13 @@ module AvalaraSdk::A1099::V2
92
93
  # Issuer ID - only required when creating forms
93
94
  attr_accessor :issuer_id
94
95
 
95
- # Issuer Reference ID - only required when creating forms
96
+ # Issuer Reference ID - only required when creating forms via $bulk-upsert
96
97
  attr_accessor :issuer_reference_id
97
98
 
98
99
  # Issuer TIN - readonly
99
100
  attr_accessor :issuer_tin
100
101
 
101
- # Tax Year - only required when creating forms
102
+ # Tax Year - only required when creating forms via $bulk-upsert
102
103
  attr_accessor :tax_year
103
104
 
104
105
  # Internal reference ID. Never shown to any agency or recipient.
@@ -143,16 +144,16 @@ module AvalaraSdk::A1099::V2
143
144
  # Two-letter IRS country code (e.g., 'US', 'CA'), as defined at https://www.irs.gov/e-file-providers/country-codes.
144
145
  attr_accessor :country_code
145
146
 
146
- # Date when federal e-filing should be scheduled for this form
147
+ # Date when federal e-filing should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
147
148
  attr_accessor :federal_efile_date
148
149
 
149
150
  # Boolean indicating that postal mailing to the recipient should be scheduled for this form
150
151
  attr_accessor :postal_mail
151
152
 
152
- # Date when state e-filing should be scheduled for this form
153
+ # Date when state e-filing should be scheduled. Must be on or after federalEfileDate. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
153
154
  attr_accessor :state_efile_date
154
155
 
155
- # Date when recipient e-delivery should be scheduled for this form
156
+ # Date when recipient e-delivery should be scheduled. If set between current date and beginning of blackout period, scheduled to that date. If in the past or blackout period, scheduled to next available date. For blackout period information, see https://www.track1099.com/info/IRS_info. Set to null to leave unscheduled.
156
157
  attr_accessor :recipient_edelivery_date
157
158
 
158
159
  # Boolean indicating that TIN Matching should be scheduled for this form
@@ -170,22 +171,22 @@ module AvalaraSdk::A1099::V2
170
171
  # Second TIN notice
171
172
  attr_accessor :second_tin_notice
172
173
 
173
- # Federal e-file status
174
+ # Federal e-file status. Available values: - unscheduled: Form has not been scheduled for federal e-filing - scheduled: Form is scheduled for federal e-filing - airlock: Form is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - sent: Form has been sent to the IRS - accepted: Form was accepted by the IRS - corrected_scheduled: Correction is scheduled to be sent - corrected_airlock: Correction is in process of being uploaded to the IRS (forms exist in this state for a very short period and cannot be updated while in this state) - corrected: A correction has been sent to the IRS - corrected_accepted: Correction was accepted by the IRS - rejected: Form was rejected by the IRS - corrected_rejected: Correction was rejected by the IRS - held: Form is held and will not be submitted to IRS (used for certain forms submitted only to states)
174
175
  attr_accessor :federal_efile_status
175
176
 
176
- # State e-file status
177
+ # State e-file status. Available values: - unscheduled: Form has not been scheduled for state e-filing - scheduled: Form is scheduled for state e-filing - airlocked: Form is in process of being uploaded to the state - sent: Form has been sent to the state - rejected: Form was rejected by the state - accepted: Form was accepted by the state - corrected_scheduled: Correction is scheduled to be sent - corrected_airlocked: Correction is in process of being uploaded to the state - corrected_sent: Correction has been sent to the state - corrected_rejected: Correction was rejected by the state - corrected_accepted: Correction was accepted by the state
177
178
  attr_accessor :state_efile_status
178
179
 
179
- # Postal mail to recipient status
180
+ # Postal mail to recipient status. Available values: - unscheduled: Postal mail has not been scheduled - pending: Postal mail is pending to be sent - sent: Postal mail has been sent - delivered: Postal mail has been delivered
180
181
  attr_accessor :postal_mail_status
181
182
 
182
- # TIN Match status
183
+ # TIN Match status. Available values: - none: TIN matching has not been performed - pending: TIN matching request is pending - matched: Name/TIN combination matches IRS records - unknown: TIN is missing, invalid, or request contains errors - rejected: Name/TIN combination does not match IRS records or TIN not currently issued
183
184
  attr_accessor :tin_match_status
184
185
 
185
- # Address verification status
186
+ # Address verification status. Available values: - unknown: Address verification has not been checked - pending: Address verification is in progress - failed: Address verification failed - incomplete: Address verification is incomplete - unchanged: User declined address changes - verified: Address has been verified and accepted
186
187
  attr_accessor :address_verification_status
187
188
 
188
- # EDelivery status
189
+ # EDelivery status. Available values: - unscheduled: E-delivery has not been scheduled - scheduled: E-delivery is scheduled to be sent - sent: E-delivery has been sent to recipient - bounced: E-delivery bounced back (invalid email) - refused: E-delivery was refused by recipient - bad_verify: E-delivery failed verification - accepted: E-delivery was accepted by recipient - bad_verify_limit: E-delivery failed verification limit reached - second_delivery: Second e-delivery attempt - undelivered: E-delivery is undelivered (temporary state allowing resend)
189
190
  attr_accessor :e_delivery_status
190
191
 
191
192
  # Validation errors
@@ -414,6 +415,7 @@ module AvalaraSdk::A1099::V2
414
415
  :'no_tin',
415
416
  :'address_verification',
416
417
  :'state_and_local_withholding',
418
+ :'second_tin_notice',
417
419
  :'federal_efile_status',
418
420
  :'state_efile_status',
419
421
  :'postal_mail_status',
@@ -735,7 +737,7 @@ module AvalaraSdk::A1099::V2
735
737
  # @return true if the model is valid
736
738
  def valid?
737
739
  warn '[DEPRECATED] the `valid?` method is obsolete'
738
- tin_type_validator = EnumAttributeValidator.new('String', ["Empty", "EIN", "SSN", "ITIN", "ATIN"])
740
+ tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
739
741
  return false unless tin_type_validator.valid?(@tin_type)
740
742
  lob_code_validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"])
741
743
  return false unless lob_code_validator.valid?(@lob_code)
@@ -754,7 +756,7 @@ module AvalaraSdk::A1099::V2
754
756
  chap4_status_code_validator = EnumAttributeValidator.new('String', ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"])
755
757
  return false unless chap4_status_code_validator.valid?(@chap4_status_code)
756
758
  return false if @type.nil?
757
- type_validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
759
+ type_validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B", "Form1042S", "Form1095C", "Form1099Int"])
758
760
  return false unless type_validator.valid?(@type)
759
761
  true
760
762
  end
@@ -762,7 +764,7 @@ module AvalaraSdk::A1099::V2
762
764
  # Custom attribute writer method checking allowed values (enum).
763
765
  # @param [Object] tin_type Object to be assigned
764
766
  def tin_type=(tin_type)
765
- validator = EnumAttributeValidator.new('String', ["Empty", "EIN", "SSN", "ITIN", "ATIN"])
767
+ validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
766
768
  unless validator.valid?(tin_type)
767
769
  fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
768
770
  end
@@ -852,25 +854,13 @@ module AvalaraSdk::A1099::V2
852
854
  # Custom attribute writer method checking allowed values (enum).
853
855
  # @param [Object] type Object to be assigned
854
856
  def type=(type)
855
- validator = EnumAttributeValidator.new('String', ["1099-NEC", "1099-MISC", "1099-DIV", "1099-R", "1099-K", "1095-B", "1042-S", "1095-C", "1099-INT"])
857
+ validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B", "Form1042S", "Form1095C", "Form1099Int"])
856
858
  unless validator.valid?(type)
857
859
  fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
858
860
  end
859
861
  @type = type
860
862
  end
861
863
 
862
- # Custom attribute writer method with validation
863
- # @param [Object] state_efile_status Value to be assigned
864
- def state_efile_status=(state_efile_status)
865
- @state_efile_status = state_efile_status
866
- end
867
-
868
- # Custom attribute writer method with validation
869
- # @param [Object] validation_errors Value to be assigned
870
- def validation_errors=(validation_errors)
871
- @validation_errors = validation_errors
872
- end
873
-
874
864
  # Checks equality by comparing each attribute.
875
865
  # @param [Object] Object to be compared
876
866
  def ==(o)