avalara_sdk 25.8.3 → 25.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) 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/Form1042S.md +16 -16
  8. data/docs/A1099/V2/Form1095B.md +15 -15
  9. data/docs/A1099/V2/Form1095C.md +14 -14
  10. data/docs/A1099/V2/Form1099Base.md +14 -14
  11. data/docs/A1099/V2/Form1099Div.md +15 -15
  12. data/docs/A1099/V2/Form1099Int.md +16 -16
  13. data/docs/A1099/V2/Form1099K.md +20 -20
  14. data/docs/A1099/V2/Form1099ListRequest.md +1 -1
  15. data/docs/A1099/V2/Form1099Misc.md +15 -15
  16. data/docs/A1099/V2/Form1099Nec.md +17 -17
  17. data/docs/A1099/V2/Form1099R.md +17 -17
  18. data/docs/A1099/V2/Forms1099Api.md +12 -12
  19. data/docs/A1099/V2/FormsW9Api.md +17 -17
  20. data/docs/A1099/V2/IntermediaryOrFlowThrough.md +2 -2
  21. data/docs/A1099/V2/IssuerBase.md +46 -0
  22. data/docs/A1099/V2/IssuerRequest.md +46 -0
  23. data/docs/A1099/V2/Issuers1099Api.md +9 -9
  24. data/docs/A1099/V2/JobResponse.md +1 -1
  25. data/docs/A1099/V2/JobsApi.md +1 -1
  26. data/docs/A1099/V2/TinMatchStatusResponse.md +1 -1
  27. data/docs/A1099/V2/W4FormMinimalRequest.md +2 -2
  28. data/docs/A1099/V2/W4FormRequest.md +11 -11
  29. data/docs/A1099/V2/W4FormResponse.md +48 -20
  30. data/docs/A1099/V2/W8BenEFormMinimalRequest.md +2 -2
  31. data/docs/A1099/V2/W8BenEFormRequest.md +10 -10
  32. data/docs/A1099/V2/W8BenEFormResponse.md +96 -68
  33. data/docs/A1099/V2/W8BenFormMinimalRequest.md +2 -2
  34. data/docs/A1099/V2/W8BenFormRequest.md +6 -6
  35. data/docs/A1099/V2/W8BenFormResponse.md +55 -27
  36. data/docs/A1099/V2/W8ImyFormMinimalRequest.md +2 -2
  37. data/docs/A1099/V2/W8ImyFormRequest.md +10 -10
  38. data/docs/A1099/V2/W8ImyFormResponse.md +118 -90
  39. data/docs/A1099/V2/W9FormBaseMinimalRequest.md +2 -2
  40. data/docs/A1099/V2/W9FormBaseRequest.md +2 -2
  41. data/docs/A1099/V2/W9FormBaseResponse.md +3 -3
  42. data/docs/A1099/V2/W9FormMinimalRequest.md +2 -2
  43. data/docs/A1099/V2/W9FormRequest.md +10 -10
  44. data/docs/A1099/V2/W9FormResponse.md +44 -16
  45. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +21 -21
  46. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +7 -7
  47. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +16 -16
  48. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +21 -21
  49. data/lib/avalara_sdk/api/A1099/V2/jobs_api.rb +1 -1
  50. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +1 -1
  51. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +1 -1
  52. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  53. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +1 -1
  54. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +1 -1
  55. data/lib/avalara_sdk/api/EInvoicing/V1/tax_identifiers_api.rb +1 -1
  56. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +1 -1
  57. data/lib/avalara_sdk/api_client.rb +10 -2
  58. data/lib/avalara_sdk/models/A1099/V2/company_base.rb +404 -0
  59. data/lib/avalara_sdk/models/A1099/V2/company_request.rb +411 -0
  60. data/lib/avalara_sdk/models/A1099/V2/company_response.rb +1 -1
  61. data/lib/avalara_sdk/models/A1099/V2/error_response.rb +0 -6
  62. data/lib/avalara_sdk/models/A1099/V2/form1042_s.rb +20 -30
  63. data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +19 -40
  64. data/lib/avalara_sdk/models/A1099/V2/form1095_c.rb +18 -49
  65. data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +18 -29
  66. data/lib/avalara_sdk/models/A1099/V2/form1099_div.rb +20 -31
  67. data/lib/avalara_sdk/models/A1099/V2/form1099_int.rb +22 -32
  68. data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +35 -38
  69. data/lib/avalara_sdk/models/A1099/V2/form1099_list_request.rb +2 -12
  70. data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +20 -31
  71. data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +23 -33
  72. data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +48 -33
  73. data/lib/avalara_sdk/models/A1099/V2/intermediary_or_flow_through.rb +48 -2
  74. data/lib/avalara_sdk/models/A1099/V2/issuer_base.rb +384 -0
  75. data/lib/avalara_sdk/models/A1099/V2/issuer_request.rb +391 -0
  76. data/lib/avalara_sdk/models/A1099/V2/issuer_response.rb +1 -1
  77. data/lib/avalara_sdk/models/A1099/V2/job_response.rb +0 -6
  78. data/lib/avalara_sdk/models/A1099/V2/validation_error.rb +0 -6
  79. data/lib/avalara_sdk/models/A1099/V2/w4_form_minimal_request.rb +1 -27
  80. data/lib/avalara_sdk/models/A1099/V2/w4_form_request.rb +31 -29
  81. data/lib/avalara_sdk/models/A1099/V2/w4_form_response.rb +191 -15
  82. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_minimal_request.rb +1 -27
  83. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_request.rb +37 -28
  84. data/lib/avalara_sdk/models/A1099/V2/w8_ben_e_form_response.rb +190 -14
  85. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_minimal_request.rb +1 -27
  86. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_request.rb +20 -23
  87. data/lib/avalara_sdk/models/A1099/V2/w8_ben_form_response.rb +191 -15
  88. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_minimal_request.rb +1 -27
  89. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_request.rb +30 -28
  90. data/lib/avalara_sdk/models/A1099/V2/w8_imy_form_response.rb +191 -15
  91. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_minimal_request.rb +1 -27
  92. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_request.rb +1 -27
  93. data/lib/avalara_sdk/models/A1099/V2/w9_form_base_response.rb +47 -18
  94. data/lib/avalara_sdk/models/A1099/V2/w9_form_minimal_request.rb +1 -27
  95. data/lib/avalara_sdk/models/A1099/V2/w9_form_request.rb +40 -25
  96. data/lib/avalara_sdk/models/A1099/V2/w9_form_response.rb +190 -14
  97. data/lib/avalara_sdk/version.rb +1 -1
  98. data/lib/avalara_sdk.rb +8 -4
  99. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
  100. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  101. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
  102. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
  103. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
  104. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
  105. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
  106. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
  107. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  108. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  109. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  110. metadata +10 -2
@@ -0,0 +1,384 @@
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 IssuerBase
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
+ # Initializes the object
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ def initialize(attributes = {})
130
+ if (!attributes.is_a?(Hash))
131
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AvalaraSdk::A1099::V2::IssuerBase` initialize method"
132
+ end
133
+
134
+ # check to see if the attribute exists and convert string to symbol for hash key
135
+ attributes = attributes.each_with_object({}) { |(k, v), h|
136
+ if (!self.class.attribute_map.key?(k.to_sym))
137
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AvalaraSdk::A1099::V2::IssuerBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
138
+ end
139
+ h[k.to_sym] = v
140
+ }
141
+
142
+ if attributes.key?(:'name')
143
+ self.name = attributes[:'name']
144
+ else
145
+ self.name = nil
146
+ end
147
+
148
+ if attributes.key?(:'dba_name')
149
+ self.dba_name = attributes[:'dba_name']
150
+ end
151
+
152
+ if attributes.key?(:'tin')
153
+ self.tin = attributes[:'tin']
154
+ end
155
+
156
+ if attributes.key?(:'reference_id')
157
+ self.reference_id = attributes[:'reference_id']
158
+ end
159
+
160
+ if attributes.key?(:'telephone')
161
+ self.telephone = attributes[:'telephone']
162
+ else
163
+ self.telephone = nil
164
+ end
165
+
166
+ if attributes.key?(:'tax_year')
167
+ self.tax_year = attributes[:'tax_year']
168
+ else
169
+ self.tax_year = nil
170
+ end
171
+
172
+ if attributes.key?(:'country_code')
173
+ self.country_code = attributes[:'country_code']
174
+ end
175
+
176
+ if attributes.key?(:'email')
177
+ self.email = attributes[:'email']
178
+ else
179
+ self.email = nil
180
+ end
181
+
182
+ if attributes.key?(:'address')
183
+ self.address = attributes[:'address']
184
+ else
185
+ self.address = nil
186
+ end
187
+
188
+ if attributes.key?(:'city')
189
+ self.city = attributes[:'city']
190
+ else
191
+ self.city = nil
192
+ end
193
+
194
+ if attributes.key?(:'state')
195
+ self.state = attributes[:'state']
196
+ else
197
+ self.state = nil
198
+ end
199
+
200
+ if attributes.key?(:'zip')
201
+ self.zip = attributes[:'zip']
202
+ else
203
+ self.zip = nil
204
+ end
205
+
206
+ if attributes.key?(:'foreign_province')
207
+ self.foreign_province = attributes[:'foreign_province']
208
+ end
209
+
210
+ if attributes.key?(:'transfer_agent_name')
211
+ self.transfer_agent_name = attributes[:'transfer_agent_name']
212
+ end
213
+
214
+ if attributes.key?(:'last_filing')
215
+ self.last_filing = attributes[:'last_filing']
216
+ else
217
+ self.last_filing = nil
218
+ end
219
+ end
220
+
221
+ # Show invalid properties with the reasons. Usually used together with valid?
222
+ # @return Array for valid properties with the reasons
223
+ def list_invalid_properties
224
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
225
+ invalid_properties = Array.new
226
+ invalid_properties
227
+ end
228
+
229
+ # Check to see if the all the properties in the model are valid
230
+ # @return true if the model is valid
231
+ def valid?
232
+ warn '[DEPRECATED] the `valid?` method is obsolete'
233
+ true
234
+ end
235
+
236
+ # Checks equality by comparing each attribute.
237
+ # @param [Object] Object to be compared
238
+ def ==(o)
239
+ return true if self.equal?(o)
240
+ self.class == o.class &&
241
+ name == o.name &&
242
+ dba_name == o.dba_name &&
243
+ tin == o.tin &&
244
+ reference_id == o.reference_id &&
245
+ telephone == o.telephone &&
246
+ tax_year == o.tax_year &&
247
+ country_code == o.country_code &&
248
+ email == o.email &&
249
+ address == o.address &&
250
+ city == o.city &&
251
+ state == o.state &&
252
+ zip == o.zip &&
253
+ foreign_province == o.foreign_province &&
254
+ transfer_agent_name == o.transfer_agent_name &&
255
+ last_filing == o.last_filing
256
+ end
257
+
258
+ # @see the `==` method
259
+ # @param [Object] Object to be compared
260
+ def eql?(o)
261
+ self == o
262
+ end
263
+
264
+ # Calculates hash code according to all attributes.
265
+ # @return [Integer] Hash code
266
+ def hash
267
+ [name, dba_name, tin, reference_id, telephone, tax_year, country_code, email, address, city, state, zip, foreign_province, transfer_agent_name, last_filing].hash
268
+ end
269
+
270
+ # Builds the object from hash
271
+ # @param [Hash] attributes Model attributes in the form of hash
272
+ # @return [Object] Returns the model itself
273
+ def self.build_from_hash(attributes)
274
+ return nil unless attributes.is_a?(Hash)
275
+ attributes = attributes.transform_keys(&:to_sym)
276
+ transformed_hash = {}
277
+ openapi_types.each_pair do |key, type|
278
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
279
+ transformed_hash["#{key}"] = nil
280
+ elsif type =~ /\AArray<(.*)>/i
281
+ # check to ensure the input is an array given that the attribute
282
+ # is documented as an array but the input is not
283
+ if attributes[attribute_map[key]].is_a?(Array)
284
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
285
+ end
286
+ elsif !attributes[attribute_map[key]].nil?
287
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
288
+ end
289
+ end
290
+ new(transformed_hash)
291
+ end
292
+
293
+ # Deserializes the data based on type
294
+ # @param string type Data type
295
+ # @param string value Value to be deserialized
296
+ # @return [Object] Deserialized data
297
+ def self._deserialize(type, value)
298
+ case type.to_sym
299
+ when :Time
300
+ Time.parse(value)
301
+ when :Date
302
+ Date.parse(value)
303
+ when :String
304
+ value.to_s
305
+ when :Integer
306
+ value.to_i
307
+ when :Float
308
+ value.to_f
309
+ when :Boolean
310
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
311
+ true
312
+ else
313
+ false
314
+ end
315
+ when :Object
316
+ # generic object (usually a Hash), return directly
317
+ value
318
+ when /\AArray<(?<inner_type>.+)>\z/
319
+ inner_type = Regexp.last_match[:inner_type]
320
+ value.map { |v| _deserialize(inner_type, v) }
321
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
322
+ k_type = Regexp.last_match[:k_type]
323
+ v_type = Regexp.last_match[:v_type]
324
+ {}.tap do |hash|
325
+ value.each do |k, v|
326
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
327
+ end
328
+ end
329
+ else # model
330
+ # models (e.g. Pet) or oneOf
331
+ klass = AvalaraSdk::A1099::V2.const_get(type)
332
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
333
+ end
334
+ end
335
+
336
+ # Returns the string representation of the object
337
+ # @return [String] String presentation of the object
338
+ def to_s
339
+ to_hash.to_s
340
+ end
341
+
342
+ # to_body is an alias to to_hash (backward compatibility)
343
+ # @return [Hash] Returns the object in the form of hash
344
+ def to_body
345
+ to_hash
346
+ end
347
+
348
+ # Returns the object in the form of hash
349
+ # @return [Hash] Returns the object in the form of hash
350
+ def to_hash
351
+ hash = {}
352
+ self.class.attribute_map.each_pair do |attr, param|
353
+ value = self.send(attr)
354
+ if value.nil?
355
+ is_nullable = self.class.openapi_nullable.include?(attr)
356
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
357
+ end
358
+
359
+ hash[param] = _to_hash(value)
360
+ end
361
+ hash
362
+ end
363
+
364
+ # Outputs non-array value in the form of hash
365
+ # For object, use to_hash. Otherwise, just return the value
366
+ # @param [Object] value Any valid value
367
+ # @return [Hash] Returns the value in the form of hash
368
+ def _to_hash(value)
369
+ if value.is_a?(Array)
370
+ value.compact.map { |v| _to_hash(v) }
371
+ elsif value.is_a?(Hash)
372
+ {}.tap do |hash|
373
+ value.each { |k, v| hash[k] = _to_hash(v) }
374
+ end
375
+ elsif value.respond_to? :to_hash
376
+ value.to_hash
377
+ else
378
+ value
379
+ end
380
+ end
381
+
382
+ end
383
+
384
+ end