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
@@ -10,7 +10,10 @@ require 'date'
10
10
  require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
- class W8BenFormResponse < W9FormBaseResponse
13
+ class W8BenFormResponse
14
+ # The form type (always \"W8Ben\" for this model).
15
+ attr_accessor :type
16
+
14
17
  # The name of the individual or entity associated with the form.
15
18
  attr_accessor :name
16
19
 
@@ -50,7 +53,7 @@ module AvalaraSdk::A1099::V2
50
53
  # The country of the mailing address.
51
54
  attr_accessor :mailing_country
52
55
 
53
- # The type of TIN provided.
56
+ # Tax Identification Number (TIN) type.
54
57
  attr_accessor :tin_type
55
58
 
56
59
  # The taxpayer identification number (TIN).
@@ -89,9 +92,71 @@ module AvalaraSdk::A1099::V2
89
92
  # The capacity in which the signer is signing the form.
90
93
  attr_accessor :signer_capacity
91
94
 
95
+ # The unique identifier for the form.
96
+ attr_accessor :id
97
+
98
+ # The entry status information for the form.
99
+ attr_accessor :entry_status
100
+
101
+ # A reference identifier for the form.
102
+ attr_accessor :reference_id
103
+
104
+ # The ID of the associated company.
105
+ attr_accessor :company_id
106
+
107
+ # The display name associated with the form.
108
+ attr_accessor :display_name
109
+
110
+ # The email address of the individual associated with the form.
111
+ attr_accessor :email
112
+
113
+ # Indicates whether the form is archived.
114
+ attr_accessor :archived
115
+
116
+ # Form ID of previous version.
117
+ attr_accessor :ancestor_id
118
+
119
+ # The signature of the form.
120
+ attr_accessor :signature
121
+
122
+ # The date the form was signed.
123
+ attr_accessor :signed_date
124
+
125
+ # The date when e-delivery was consented.
126
+ attr_accessor :e_delivery_consented_at
127
+
128
+ # The creation date of the form.
129
+ attr_accessor :created_at
130
+
131
+ # The last updated date of the form.
132
+ attr_accessor :updated_at
133
+
134
+ class EnumAttributeValidator
135
+ attr_reader :datatype
136
+ attr_reader :allowable_values
137
+
138
+ def initialize(datatype, allowable_values)
139
+ @allowable_values = allowable_values.map do |value|
140
+ case datatype.to_s
141
+ when /Integer/i
142
+ value.to_i
143
+ when /Float/i
144
+ value.to_f
145
+ else
146
+ value
147
+ end
148
+ end
149
+ end
150
+
151
+ def valid?(value)
152
+ !value || allowable_values.include?(value)
153
+ end
154
+ end
155
+
92
156
  # Attribute mapping from ruby-style variable name to JSON key.
93
157
  def self.attribute_map
94
158
  {
159
+ :'type' => :'type',
95
160
  :'name' => :'name',
96
161
  :'citizenship_country' => :'citizenshipCountry',
97
162
  :'residence_address' => :'residenceAddress',
@@ -117,18 +182,32 @@ module AvalaraSdk::A1099::V2
117
182
  :'withholding_rate' => :'withholdingRate',
118
183
  :'income_type' => :'incomeType',
119
184
  :'signer_name' => :'signerName',
120
- :'signer_capacity' => :'signerCapacity'
185
+ :'signer_capacity' => :'signerCapacity',
186
+ :'id' => :'id',
187
+ :'entry_status' => :'entryStatus',
188
+ :'reference_id' => :'referenceId',
189
+ :'company_id' => :'companyId',
190
+ :'display_name' => :'displayName',
191
+ :'email' => :'email',
192
+ :'archived' => :'archived',
193
+ :'ancestor_id' => :'ancestorId',
194
+ :'signature' => :'signature',
195
+ :'signed_date' => :'signedDate',
196
+ :'e_delivery_consented_at' => :'eDeliveryConsentedAt',
197
+ :'created_at' => :'createdAt',
198
+ :'updated_at' => :'updatedAt'
121
199
  }
122
200
  end
123
201
 
124
- # Returns all the JSON keys this model knows about, including the ones defined in its parent(s)
202
+ # Returns all the JSON keys this model knows about
125
203
  def self.acceptable_attributes
126
- attribute_map.values.concat(superclass.acceptable_attributes)
204
+ attribute_map.values
127
205
  end
128
206
 
129
207
  # Attribute type mapping.
130
208
  def self.openapi_types
131
209
  {
210
+ :'type' => :'String',
132
211
  :'name' => :'String',
133
212
  :'citizenship_country' => :'String',
134
213
  :'residence_address' => :'String',
@@ -154,7 +233,20 @@ module AvalaraSdk::A1099::V2
154
233
  :'withholding_rate' => :'String',
155
234
  :'income_type' => :'String',
156
235
  :'signer_name' => :'String',
157
- :'signer_capacity' => :'String'
236
+ :'signer_capacity' => :'String',
237
+ :'id' => :'String',
238
+ :'entry_status' => :'EntryStatusResponse',
239
+ :'reference_id' => :'String',
240
+ :'company_id' => :'String',
241
+ :'display_name' => :'String',
242
+ :'email' => :'String',
243
+ :'archived' => :'Boolean',
244
+ :'ancestor_id' => :'String',
245
+ :'signature' => :'String',
246
+ :'signed_date' => :'Time',
247
+ :'e_delivery_consented_at' => :'Time',
248
+ :'created_at' => :'Time',
249
+ :'updated_at' => :'Time'
158
250
  }
159
251
  end
160
252
 
@@ -177,7 +269,13 @@ module AvalaraSdk::A1099::V2
177
269
  :'withholding_rate',
178
270
  :'income_type',
179
271
  :'signer_name',
180
- :'signer_capacity'
272
+ :'signer_capacity',
273
+ :'reference_id',
274
+ :'email',
275
+ :'ancestor_id',
276
+ :'signature',
277
+ :'signed_date',
278
+ :'e_delivery_consented_at',
181
279
  ])
182
280
  end
183
281
 
@@ -203,8 +301,9 @@ module AvalaraSdk::A1099::V2
203
301
  h[k.to_sym] = v
204
302
  }
205
303
 
206
- # call parent's initialize
207
- super(attributes)
304
+ if attributes.key?(:'type')
305
+ self.type = attributes[:'type']
306
+ end
208
307
 
209
308
  if attributes.key?(:'name')
210
309
  self.name = attributes[:'name']
@@ -309,13 +408,65 @@ module AvalaraSdk::A1099::V2
309
408
  if attributes.key?(:'signer_capacity')
310
409
  self.signer_capacity = attributes[:'signer_capacity']
311
410
  end
411
+
412
+ if attributes.key?(:'id')
413
+ self.id = attributes[:'id']
414
+ end
415
+
416
+ if attributes.key?(:'entry_status')
417
+ self.entry_status = attributes[:'entry_status']
418
+ end
419
+
420
+ if attributes.key?(:'reference_id')
421
+ self.reference_id = attributes[:'reference_id']
422
+ end
423
+
424
+ if attributes.key?(:'company_id')
425
+ self.company_id = attributes[:'company_id']
426
+ end
427
+
428
+ if attributes.key?(:'display_name')
429
+ self.display_name = attributes[:'display_name']
430
+ end
431
+
432
+ if attributes.key?(:'email')
433
+ self.email = attributes[:'email']
434
+ end
435
+
436
+ if attributes.key?(:'archived')
437
+ self.archived = attributes[:'archived']
438
+ end
439
+
440
+ if attributes.key?(:'ancestor_id')
441
+ self.ancestor_id = attributes[:'ancestor_id']
442
+ end
443
+
444
+ if attributes.key?(:'signature')
445
+ self.signature = attributes[:'signature']
446
+ end
447
+
448
+ if attributes.key?(:'signed_date')
449
+ self.signed_date = attributes[:'signed_date']
450
+ end
451
+
452
+ if attributes.key?(:'e_delivery_consented_at')
453
+ self.e_delivery_consented_at = attributes[:'e_delivery_consented_at']
454
+ end
455
+
456
+ if attributes.key?(:'created_at')
457
+ self.created_at = attributes[:'created_at']
458
+ end
459
+
460
+ if attributes.key?(:'updated_at')
461
+ self.updated_at = attributes[:'updated_at']
462
+ end
312
463
  end
313
464
 
314
465
  # Show invalid properties with the reasons. Usually used together with valid?
315
466
  # @return Array for valid properties with the reasons
316
467
  def list_invalid_properties
317
468
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
318
- invalid_properties = super
469
+ invalid_properties = Array.new
319
470
  invalid_properties
320
471
  end
321
472
 
@@ -323,7 +474,19 @@ module AvalaraSdk::A1099::V2
323
474
  # @return true if the model is valid
324
475
  def valid?
325
476
  warn '[DEPRECATED] the `valid?` method is obsolete'
326
- true && super
477
+ type_validator = EnumAttributeValidator.new('String', ["W4", "W8Ben", "W8BenE", "W8Imy", "W9"])
478
+ return false unless type_validator.valid?(@type)
479
+ true
480
+ end
481
+
482
+ # Custom attribute writer method checking allowed values (enum).
483
+ # @param [Object] type Object to be assigned
484
+ def type=(type)
485
+ validator = EnumAttributeValidator.new('String', ["W4", "W8Ben", "W8BenE", "W8Imy", "W9"])
486
+ unless validator.valid?(type)
487
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
488
+ end
489
+ @type = type
327
490
  end
328
491
 
329
492
  # Checks equality by comparing each attribute.
@@ -331,6 +494,7 @@ module AvalaraSdk::A1099::V2
331
494
  def ==(o)
332
495
  return true if self.equal?(o)
333
496
  self.class == o.class &&
497
+ type == o.type &&
334
498
  name == o.name &&
335
499
  citizenship_country == o.citizenship_country &&
336
500
  residence_address == o.residence_address &&
@@ -356,7 +520,20 @@ module AvalaraSdk::A1099::V2
356
520
  withholding_rate == o.withholding_rate &&
357
521
  income_type == o.income_type &&
358
522
  signer_name == o.signer_name &&
359
- signer_capacity == o.signer_capacity && super(o)
523
+ signer_capacity == o.signer_capacity &&
524
+ id == o.id &&
525
+ entry_status == o.entry_status &&
526
+ reference_id == o.reference_id &&
527
+ company_id == o.company_id &&
528
+ display_name == o.display_name &&
529
+ email == o.email &&
530
+ archived == o.archived &&
531
+ ancestor_id == o.ancestor_id &&
532
+ signature == o.signature &&
533
+ signed_date == o.signed_date &&
534
+ e_delivery_consented_at == o.e_delivery_consented_at &&
535
+ created_at == o.created_at &&
536
+ updated_at == o.updated_at
360
537
  end
361
538
 
362
539
  # @see the `==` method
@@ -368,7 +545,7 @@ module AvalaraSdk::A1099::V2
368
545
  # Calculates hash code according to all attributes.
369
546
  # @return [Integer] Hash code
370
547
  def hash
371
- [name, citizenship_country, residence_address, residence_city, residence_state, residence_zip, residence_country, residence_is_mailing, mailing_address, mailing_city, mailing_state, mailing_zip, mailing_country, tin_type, tin, foreign_tin_not_required, foreign_tin, reference_number, birthday, treaty_country, treaty_article, treaty_reasons, withholding_rate, income_type, signer_name, signer_capacity].hash
548
+ [type, name, citizenship_country, residence_address, residence_city, residence_state, residence_zip, residence_country, residence_is_mailing, mailing_address, mailing_city, mailing_state, mailing_zip, mailing_country, tin_type, tin, foreign_tin_not_required, foreign_tin, reference_number, birthday, treaty_country, treaty_article, treaty_reasons, withholding_rate, income_type, signer_name, signer_capacity, id, entry_status, reference_id, company_id, display_name, email, archived, ancestor_id, signature, signed_date, e_delivery_consented_at, created_at, updated_at].hash
372
549
  end
373
550
 
374
551
  # Builds the object from hash
@@ -376,7 +553,6 @@ module AvalaraSdk::A1099::V2
376
553
  # @return [Object] Returns the model itself
377
554
  def self.build_from_hash(attributes)
378
555
  return nil unless attributes.is_a?(Hash)
379
- super(attributes)
380
556
  attributes = attributes.transform_keys(&:to_sym)
381
557
  transformed_hash = {}
382
558
  openapi_types.each_pair do |key, type|
@@ -453,7 +629,7 @@ module AvalaraSdk::A1099::V2
453
629
  # Returns the object in the form of hash
454
630
  # @return [Hash] Returns the object in the form of hash
455
631
  def to_hash
456
- hash = super
632
+ hash = {}
457
633
  self.class.attribute_map.each_pair do |attr, param|
458
634
  value = self.send(attr)
459
635
  if value.nil?
@@ -23,7 +23,7 @@ module AvalaraSdk::A1099::V2
23
23
  # A reference number for the form.
24
24
  attr_accessor :reference_number
25
25
 
26
- # The ID of the associated company.
26
+ # The ID of the associated company. Required when creating a form.
27
27
  attr_accessor :company_id
28
28
 
29
29
  # A reference identifier for the form.
@@ -132,8 +132,6 @@ module AvalaraSdk::A1099::V2
132
132
 
133
133
  if attributes.key?(:'company_id')
134
134
  self.company_id = attributes[:'company_id']
135
- else
136
- self.company_id = nil
137
135
  end
138
136
 
139
137
  if attributes.key?(:'reference_id')
@@ -162,14 +160,6 @@ module AvalaraSdk::A1099::V2
162
160
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
163
161
  end
164
162
 
165
- if @company_id.nil?
166
- invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
167
- end
168
-
169
- if @company_id.to_s.length < 1
170
- invalid_properties.push('invalid value for "company_id", the character length must be great than or equal to 1.')
171
- end
172
-
173
163
  invalid_properties
174
164
  end
175
165
 
@@ -183,8 +173,6 @@ module AvalaraSdk::A1099::V2
183
173
  return false if @email.to_s.length < 1
184
174
  return false if @name.nil?
185
175
  return false if @name.to_s.length < 1
186
- return false if @company_id.nil?
187
- return false if @company_id.to_s.length < 1
188
176
  true
189
177
  end
190
178
 
@@ -226,20 +214,6 @@ module AvalaraSdk::A1099::V2
226
214
  @name = name
227
215
  end
228
216
 
229
- # Custom attribute writer method with validation
230
- # @param [Object] company_id Value to be assigned
231
- def company_id=(company_id)
232
- if company_id.nil?
233
- fail ArgumentError, 'company_id cannot be nil'
234
- end
235
-
236
- if company_id.to_s.length < 1
237
- fail ArgumentError, 'invalid value for "company_id", the character length must be great than or equal to 1.'
238
- end
239
-
240
- @company_id = company_id
241
- end
242
-
243
217
  # Checks equality by comparing each attribute.
244
218
  # @param [Object] Object to be compared
245
219
  def ==(o)
@@ -23,10 +23,10 @@ module AvalaraSdk::A1099::V2
23
23
  # The name of the disregarded entity receiving the payment (if applicable).
24
24
  attr_accessor :disregarded_entity
25
25
 
26
- # The entity type.
26
+ # The entity type. Available values: - 1: QI (including a QDD). Complete Part III. - 2: Nonqualified intermediary. Complete Part IV. - 3: Territory financial institution. Complete Part V. - 4: U.S. branch. Complete Part VI. - 5: Withholding foreign partnership. Complete Part VII. - 6: Withholding foreign trust. Complete Part VII. - 7: Nonwithholding foreign partnership. Complete Part VIII. - 8: Nonwithholding foreign simple trust. Complete Part VIII. - 9: Nonwithholding foreign grantor trust. Complete Part VIII.
27
27
  attr_accessor :entity_type
28
28
 
29
- # The FATCA status.
29
+ # The FATCA status. Available values: - 1: Nonparticipating foreign financial institution (FFI) (including an FFI related to a Reporting IGA FFI other than a deemed-compliant FFI, participating FFI, or exempt beneficial owner). Complete Part IX (if applicable). - 2: Participating FFI. - 3: Reporting Model 1 FFI. - 4: Reporting Model 2 FFI. - 5: Registered deemed-compliant FFI (other than a reporting Model 1 FFI, sponsored FFI, or nonreporting IGA FFI covered in Part XIX). - 6: Territory financial institution. Complete Part V. - 7: Sponsored FFI (other than a certified deemed-compliant sponsored, closely held investment vehicle). Complete Part X. - 8: Certified deemed-compliant nonregistering local bank. Complete Part XII. - 9: Certified deemed-compliant FFI with only low-value accounts. Complete Part XIII. - 10: Certified deemed-compliant sponsored, closely held investment vehicle. Complete Part XIV. - 11: Certified deemed-compliant limited life debt investment entity. Complete Part XV. - 12: Certain investment entities that do not maintain financial accounts. Complete Part XVI. - 13: Owner-documented FFI. Complete Part XI. - 14: Restricted distributor. Complete Part XVII. - 15: Foreign central bank of issue. Complete Part XVIII. - 16: Nonreporting IGA FFI. Complete Part XIX. - 17: Exempt retirement plans. Complete Part XX. - 18: Excepted nonfinancial group entity. Complete Part XXI. - 19: Excepted nonfinancial start-up company. Complete Part XXII. - 20: Excepted nonfinancial entity in liquidation or bankruptcy. Complete Part XXIII. - 21: Publicly traded NFFE or NFFE affiliate of a publicly traded corporation. Complete Part XXIV. - 22: Excepted territory NFFE. Complete Part XXV. - 23: Active NFFE. Complete Part XXVI. - 24: Passive NFFE. Complete Part XXVII. - 25: Direct reporting NFFE. - 26: Sponsored direct reporting NFFE. Complete Part XXVIII.
30
30
  attr_accessor :fatca_status
31
31
 
32
32
  # The residential address of the individual or entity.
@@ -62,7 +62,7 @@ module AvalaraSdk::A1099::V2
62
62
  # The country of the mailing address.
63
63
  attr_accessor :mailing_country
64
64
 
65
- # The type of TIN provided.
65
+ # Tax Identification Number (TIN) type. Available values: - QI-EIN: Qualified Intermediary EIN - WP-EIN: Withholding Partnership EIN - WT-EIN: Withholding Trust EIN - EIN: Employer Identification Number
66
66
  attr_accessor :tin_type
67
67
 
68
68
  # The taxpayer identification number (TIN).
@@ -77,7 +77,7 @@ module AvalaraSdk::A1099::V2
77
77
  # A reference number for the form.
78
78
  attr_accessor :reference_number
79
79
 
80
- # The FATCA status of disregarded entity or branch receiving payment.
80
+ # The FATCA status of disregarded entity or branch receiving payment. Available values: - 1: Branch treated as nonparticipating FFI. - 2: Participating FFI. - 3: Reporting Model 1 FFI. - 4: Reporting Model 2 FFI. - 5: U.S. Branch
81
81
  attr_accessor :disregarded_entity_fatca_status
82
82
 
83
83
  # The address for disregarded entities.
@@ -269,7 +269,7 @@ module AvalaraSdk::A1099::V2
269
269
  # The country for the applicable IGA with the United States.
270
270
  attr_accessor :iga_country
271
271
 
272
- # The applicable IGA model.
272
+ # The applicable IGA model. Available values: - 1: Model 1 IGA - 2: Model 2 IGA
273
273
  attr_accessor :iga_model
274
274
 
275
275
  # Specifies how the applicable IGA is treated under the IGA provisions or Treasury regulations.
@@ -353,7 +353,7 @@ module AvalaraSdk::A1099::V2
353
353
  # The signature of the form.
354
354
  attr_accessor :signature
355
355
 
356
- # The ID of the associated company.
356
+ # The ID of the associated company. Required when creating a form.
357
357
  attr_accessor :company_id
358
358
 
359
359
  # A reference identifier for the form.
@@ -775,10 +775,14 @@ module AvalaraSdk::A1099::V2
775
775
 
776
776
  if attributes.key?(:'name')
777
777
  self.name = attributes[:'name']
778
+ else
779
+ self.name = nil
778
780
  end
779
781
 
780
782
  if attributes.key?(:'citizenship_country')
781
783
  self.citizenship_country = attributes[:'citizenship_country']
784
+ else
785
+ self.citizenship_country = nil
782
786
  end
783
787
 
784
788
  if attributes.key?(:'disregarded_entity')
@@ -787,6 +791,8 @@ module AvalaraSdk::A1099::V2
787
791
 
788
792
  if attributes.key?(:'entity_type')
789
793
  self.entity_type = attributes[:'entity_type']
794
+ else
795
+ self.entity_type = nil
790
796
  end
791
797
 
792
798
  if attributes.key?(:'fatca_status')
@@ -811,6 +817,8 @@ module AvalaraSdk::A1099::V2
811
817
 
812
818
  if attributes.key?(:'residence_country')
813
819
  self.residence_country = attributes[:'residence_country']
820
+ else
821
+ self.residence_country = nil
814
822
  end
815
823
 
816
824
  if attributes.key?(:'residence_is_mailing')
@@ -1227,8 +1235,6 @@ module AvalaraSdk::A1099::V2
1227
1235
 
1228
1236
  if attributes.key?(:'company_id')
1229
1237
  self.company_id = attributes[:'company_id']
1230
- else
1231
- self.company_id = nil
1232
1238
  end
1233
1239
 
1234
1240
  if attributes.key?(:'reference_id')
@@ -1245,12 +1251,20 @@ module AvalaraSdk::A1099::V2
1245
1251
  def list_invalid_properties
1246
1252
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
1247
1253
  invalid_properties = Array.new
1248
- if @company_id.nil?
1249
- invalid_properties.push('invalid value for "company_id", company_id cannot be nil.')
1254
+ if @name.nil?
1255
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
1256
+ end
1257
+
1258
+ if @citizenship_country.nil?
1259
+ invalid_properties.push('invalid value for "citizenship_country", citizenship_country cannot be nil.')
1250
1260
  end
1251
1261
 
1252
- if @company_id.to_s.length < 1
1253
- invalid_properties.push('invalid value for "company_id", the character length must be great than or equal to 1.')
1262
+ if @entity_type.nil?
1263
+ invalid_properties.push('invalid value for "entity_type", entity_type cannot be nil.')
1264
+ end
1265
+
1266
+ if @residence_country.nil?
1267
+ invalid_properties.push('invalid value for "residence_country", residence_country cannot be nil.')
1254
1268
  end
1255
1269
 
1256
1270
  invalid_properties
@@ -1262,8 +1276,10 @@ module AvalaraSdk::A1099::V2
1262
1276
  warn '[DEPRECATED] the `valid?` method is obsolete'
1263
1277
  type_validator = EnumAttributeValidator.new('String', ["W4", "W8Ben", "W8BenE", "W8Imy", "W9"])
1264
1278
  return false unless type_validator.valid?(@type)
1265
- return false if @company_id.nil?
1266
- return false if @company_id.to_s.length < 1
1279
+ return false if @name.nil?
1280
+ return false if @citizenship_country.nil?
1281
+ return false if @entity_type.nil?
1282
+ return false if @residence_country.nil?
1267
1283
  true
1268
1284
  end
1269
1285
 
@@ -1277,20 +1293,6 @@ module AvalaraSdk::A1099::V2
1277
1293
  @type = type
1278
1294
  end
1279
1295
 
1280
- # Custom attribute writer method with validation
1281
- # @param [Object] company_id Value to be assigned
1282
- def company_id=(company_id)
1283
- if company_id.nil?
1284
- fail ArgumentError, 'company_id cannot be nil'
1285
- end
1286
-
1287
- if company_id.to_s.length < 1
1288
- fail ArgumentError, 'invalid value for "company_id", the character length must be great than or equal to 1.'
1289
- end
1290
-
1291
- @company_id = company_id
1292
- end
1293
-
1294
1296
  # Checks equality by comparing each attribute.
1295
1297
  # @param [Object] Object to be compared
1296
1298
  def ==(o)