avalara_sdk 25.6.0 → 25.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -3
- data/docs/A1099/V2/BulkUpsert1099FormsRequest.md +3 -1
- data/docs/A1099/V2/CompaniesW9Api.md +45 -31
- data/docs/A1099/V2/CoveredIndividualReference.md +58 -0
- data/docs/A1099/V2/CoveredIndividualRequest.md +54 -0
- data/docs/A1099/V2/Form1095B.md +86 -0
- data/docs/A1099/V2/Form1095BList.md +20 -0
- data/docs/A1099/V2/Form1095BListItem.md +74 -0
- data/docs/A1099/V2/Form1095BRequest.md +76 -0
- data/docs/A1099/V2/Form1099Base.md +8 -8
- data/docs/A1099/V2/Form1099DivListItem.md +11 -11
- data/docs/A1099/V2/Form1099DivRequest.md +11 -17
- data/docs/A1099/V2/Form1099DivResponse.md +88 -0
- data/docs/A1099/V2/Form1099K.md +8 -8
- data/docs/A1099/V2/Form1099KListItem.md +11 -11
- data/docs/A1099/V2/Form1099KRequest.md +11 -17
- data/docs/A1099/V2/Form1099List.md +1 -1
- data/docs/A1099/V2/Form1099ListDataInner.md +32 -0
- data/docs/A1099/V2/Form1099Misc.md +8 -8
- data/docs/A1099/V2/Form1099MiscListItem.md +11 -11
- data/docs/A1099/V2/Form1099MiscRequest.md +11 -17
- data/docs/A1099/V2/Form1099MiscResponse.md +120 -0
- data/docs/A1099/V2/Form1099Nec.md +8 -8
- data/docs/A1099/V2/Form1099NecListItem.md +11 -11
- data/docs/A1099/V2/Form1099NecRequest.md +11 -17
- data/docs/A1099/V2/Form1099NecResponse.md +96 -0
- data/docs/A1099/V2/Form1099R.md +8 -8
- data/docs/A1099/V2/Form1099RListItem.md +11 -11
- data/docs/A1099/V2/Form1099RRequest.md +11 -17
- data/docs/A1099/V2/FormRequestBase.md +9 -13
- data/docs/A1099/V2/FormRequestCsvBase.md +66 -0
- data/docs/A1099/V2/FormResponseBase.md +43 -9
- data/docs/A1099/V2/FormSingleRequestBase.md +11 -15
- data/docs/A1099/V2/Forms1099Api.md +75 -57
- data/docs/A1099/V2/FormsW9Api.md +63 -123
- data/docs/A1099/V2/Get1099Form200Response.md +55 -0
- data/docs/A1099/V2/IncludedBase.md +20 -0
- data/docs/A1099/V2/Issuers1099Api.md +45 -31
- data/docs/A1099/V2/Jobs1099Api.md +10 -6
- data/docs/A1099/V2/StateAndLocalWithholdingResponse.md +32 -0
- data/docs/A1099/V2/StateEfileStatusDetail.md +1 -1
- data/docs/A1099/V2/StateEfileStatusDetailApp.md +22 -0
- data/docs/A1099/V2/StatusDetail.md +20 -0
- data/docs/A1099/V2/Update1099Form200Response.md +53 -0
- data/docs/A1099/V2/ValidationErrorApp.md +20 -0
- data/docs/EInvoicing/V1/DataInputFieldsApi.md +4 -4
- data/docs/EInvoicing/V1/DocumentsApi.md +2 -2
- data/docs/EInvoicing/V1/MandatesApi.md +4 -4
- data/docs/EInvoicing/V1/SubscriptionsApi.md +4 -4
- data/docs/EInvoicing/V1/TradingPartnersApi.md +4 -4
- data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +103 -43
- data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +171 -87
- data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +135 -176
- data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +103 -43
- data/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb +19 -7
- data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +6 -6
- data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +4 -4
- data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
- data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +6 -6
- data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +6 -6
- data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +7 -7
- data/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +1 -0
- data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +403 -0
- data/lib/avalara_sdk/models/A1099/V2/covered_individual_request.rb +378 -0
- data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +572 -0
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_list.rb +238 -0
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +538 -0
- data/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +559 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +29 -29
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +78 -36
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +80 -53
- data/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +600 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +29 -29
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +56 -37
- data/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +80 -54
- data/lib/avalara_sdk/models/A1099/V2/form1099_list.rb +1 -1
- data/lib/avalara_sdk/models/A1099/V2/form1099_list_data_inner.rb +20 -68
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +29 -29
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +78 -36
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +80 -53
- data/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +744 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +29 -29
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +78 -36
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +80 -53
- data/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +636 -0
- data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +29 -29
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +56 -36
- data/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +80 -53
- data/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +68 -44
- data/lib/avalara_sdk/models/A1099/V2/form_request_csv_base.rb +475 -0
- data/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +252 -31
- data/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +80 -44
- data/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +104 -0
- data/lib/avalara_sdk/models/A1099/V2/included_base.rb +219 -0
- data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_request.rb +1 -0
- data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_response.rb +274 -0
- data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_app.rb +231 -0
- data/lib/avalara_sdk/models/A1099/V2/status_detail.rb +221 -0
- data/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +103 -0
- data/lib/avalara_sdk/models/A1099/V2/validation_error_app.rb +229 -0
- data/lib/avalara_sdk/version.rb +1 -1
- data/lib/avalara_sdk.rb +17 -0
- data/spec/integration/a1099_spec.rb +12 -12
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
- metadata +36 -2
@@ -49,16 +49,14 @@ module AvalaraSdk::A1099::V2
|
|
49
49
|
|
50
50
|
attr_accessor :fatca_filing_requirement
|
51
51
|
|
52
|
-
attr_accessor :state_and_local_withholding
|
53
|
-
|
54
|
-
attr_accessor :issuer_id
|
55
|
-
|
56
52
|
attr_accessor :issuer_reference_id
|
57
53
|
|
58
54
|
attr_accessor :issuer_tin
|
59
55
|
|
60
56
|
attr_accessor :tax_year
|
61
57
|
|
58
|
+
attr_accessor :issuer_id
|
59
|
+
|
62
60
|
attr_accessor :reference_id
|
63
61
|
|
64
62
|
attr_accessor :recipient_name
|
@@ -69,9 +67,9 @@ module AvalaraSdk::A1099::V2
|
|
69
67
|
|
70
68
|
attr_accessor :recipient_second_name
|
71
69
|
|
72
|
-
attr_accessor :
|
70
|
+
attr_accessor :address
|
73
71
|
|
74
|
-
attr_accessor :
|
72
|
+
attr_accessor :address2
|
75
73
|
|
76
74
|
attr_accessor :city
|
77
75
|
|
@@ -99,6 +97,30 @@ module AvalaraSdk::A1099::V2
|
|
99
97
|
|
100
98
|
attr_accessor :address_verification
|
101
99
|
|
100
|
+
attr_accessor :state_and_local_withholding
|
101
|
+
|
102
|
+
class EnumAttributeValidator
|
103
|
+
attr_reader :datatype
|
104
|
+
attr_reader :allowable_values
|
105
|
+
|
106
|
+
def initialize(datatype, allowable_values)
|
107
|
+
@allowable_values = allowable_values.map do |value|
|
108
|
+
case datatype.to_s
|
109
|
+
when /Integer/i
|
110
|
+
value.to_i
|
111
|
+
when /Float/i
|
112
|
+
value.to_f
|
113
|
+
else
|
114
|
+
value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def valid?(value)
|
120
|
+
!value || allowable_values.include?(value)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
102
124
|
# Attribute mapping from ruby-style variable name to JSON key.
|
103
125
|
def self.attribute_map
|
104
126
|
{
|
@@ -121,18 +143,17 @@ module AvalaraSdk::A1099::V2
|
|
121
143
|
:'exempt_interest_dividends' => :'exemptInterestDividends',
|
122
144
|
:'specified_private_activity_bond_interest_dividends' => :'specifiedPrivateActivityBondInterestDividends',
|
123
145
|
:'fatca_filing_requirement' => :'fatcaFilingRequirement',
|
124
|
-
:'state_and_local_withholding' => :'stateAndLocalWithholding',
|
125
|
-
:'issuer_id' => :'issuerId',
|
126
146
|
:'issuer_reference_id' => :'issuerReferenceId',
|
127
147
|
:'issuer_tin' => :'issuerTin',
|
128
148
|
:'tax_year' => :'taxYear',
|
149
|
+
:'issuer_id' => :'issuerId',
|
129
150
|
:'reference_id' => :'referenceId',
|
130
151
|
:'recipient_name' => :'recipientName',
|
131
152
|
:'recipient_tin' => :'recipientTin',
|
132
153
|
:'tin_type' => :'tinType',
|
133
154
|
:'recipient_second_name' => :'recipientSecondName',
|
134
|
-
:'
|
135
|
-
:'
|
155
|
+
:'address' => :'address',
|
156
|
+
:'address2' => :'address2',
|
136
157
|
:'city' => :'city',
|
137
158
|
:'state' => :'state',
|
138
159
|
:'zip' => :'zip',
|
@@ -145,7 +166,8 @@ module AvalaraSdk::A1099::V2
|
|
145
166
|
:'postal_mail' => :'postalMail',
|
146
167
|
:'state_e_file' => :'stateEFile',
|
147
168
|
:'tin_match' => :'tinMatch',
|
148
|
-
:'address_verification' => :'addressVerification'
|
169
|
+
:'address_verification' => :'addressVerification',
|
170
|
+
:'state_and_local_withholding' => :'stateAndLocalWithholding'
|
149
171
|
}
|
150
172
|
end
|
151
173
|
|
@@ -176,18 +198,17 @@ module AvalaraSdk::A1099::V2
|
|
176
198
|
:'exempt_interest_dividends' => :'String',
|
177
199
|
:'specified_private_activity_bond_interest_dividends' => :'String',
|
178
200
|
:'fatca_filing_requirement' => :'String',
|
179
|
-
:'state_and_local_withholding' => :'StateAndLocalWithholding',
|
180
|
-
:'issuer_id' => :'String',
|
181
201
|
:'issuer_reference_id' => :'String',
|
182
202
|
:'issuer_tin' => :'String',
|
183
203
|
:'tax_year' => :'Integer',
|
204
|
+
:'issuer_id' => :'String',
|
184
205
|
:'reference_id' => :'String',
|
185
206
|
:'recipient_name' => :'String',
|
186
207
|
:'recipient_tin' => :'String',
|
187
|
-
:'tin_type' => :'
|
208
|
+
:'tin_type' => :'String',
|
188
209
|
:'recipient_second_name' => :'String',
|
189
|
-
:'
|
190
|
-
:'
|
210
|
+
:'address' => :'String',
|
211
|
+
:'address2' => :'String',
|
191
212
|
:'city' => :'String',
|
192
213
|
:'state' => :'String',
|
193
214
|
:'zip' => :'String',
|
@@ -200,20 +221,29 @@ module AvalaraSdk::A1099::V2
|
|
200
221
|
:'postal_mail' => :'Boolean',
|
201
222
|
:'state_e_file' => :'Boolean',
|
202
223
|
:'tin_match' => :'Boolean',
|
203
|
-
:'address_verification' => :'Boolean'
|
224
|
+
:'address_verification' => :'Boolean',
|
225
|
+
:'state_and_local_withholding' => :'StateAndLocalWithholdingRequest'
|
204
226
|
}
|
205
227
|
end
|
206
228
|
|
207
229
|
# List of attributes with nullable: true
|
208
230
|
def self.openapi_nullable
|
209
231
|
Set.new([
|
232
|
+
:'issuer_id',
|
233
|
+
:'reference_id',
|
234
|
+
:'recipient_name',
|
235
|
+
:'address2',
|
236
|
+
:'recipient_email',
|
237
|
+
:'account_number',
|
238
|
+
:'office_code',
|
239
|
+
:'recipient_non_us_province',
|
210
240
|
])
|
211
241
|
end
|
212
242
|
|
213
243
|
# List of class defined in allOf (OpenAPI v3)
|
214
244
|
def self.openapi_all_of
|
215
245
|
[
|
216
|
-
:'
|
246
|
+
:'FormRequestCsvBase'
|
217
247
|
]
|
218
248
|
end
|
219
249
|
|
@@ -308,14 +338,6 @@ module AvalaraSdk::A1099::V2
|
|
308
338
|
self.fatca_filing_requirement = attributes[:'fatca_filing_requirement']
|
309
339
|
end
|
310
340
|
|
311
|
-
if attributes.key?(:'state_and_local_withholding')
|
312
|
-
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
313
|
-
end
|
314
|
-
|
315
|
-
if attributes.key?(:'issuer_id')
|
316
|
-
self.issuer_id = attributes[:'issuer_id']
|
317
|
-
end
|
318
|
-
|
319
341
|
if attributes.key?(:'issuer_reference_id')
|
320
342
|
self.issuer_reference_id = attributes[:'issuer_reference_id']
|
321
343
|
end
|
@@ -328,6 +350,10 @@ module AvalaraSdk::A1099::V2
|
|
328
350
|
self.tax_year = attributes[:'tax_year']
|
329
351
|
end
|
330
352
|
|
353
|
+
if attributes.key?(:'issuer_id')
|
354
|
+
self.issuer_id = attributes[:'issuer_id']
|
355
|
+
end
|
356
|
+
|
331
357
|
if attributes.key?(:'reference_id')
|
332
358
|
self.reference_id = attributes[:'reference_id']
|
333
359
|
end
|
@@ -348,12 +374,12 @@ module AvalaraSdk::A1099::V2
|
|
348
374
|
self.recipient_second_name = attributes[:'recipient_second_name']
|
349
375
|
end
|
350
376
|
|
351
|
-
if attributes.key?(:'
|
352
|
-
self.
|
377
|
+
if attributes.key?(:'address')
|
378
|
+
self.address = attributes[:'address']
|
353
379
|
end
|
354
380
|
|
355
|
-
if attributes.key?(:'
|
356
|
-
self.
|
381
|
+
if attributes.key?(:'address2')
|
382
|
+
self.address2 = attributes[:'address2']
|
357
383
|
end
|
358
384
|
|
359
385
|
if attributes.key?(:'city')
|
@@ -407,6 +433,10 @@ module AvalaraSdk::A1099::V2
|
|
407
433
|
if attributes.key?(:'address_verification')
|
408
434
|
self.address_verification = attributes[:'address_verification']
|
409
435
|
end
|
436
|
+
|
437
|
+
if attributes.key?(:'state_and_local_withholding')
|
438
|
+
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
439
|
+
end
|
410
440
|
end
|
411
441
|
|
412
442
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -421,9 +451,21 @@ module AvalaraSdk::A1099::V2
|
|
421
451
|
# @return true if the model is valid
|
422
452
|
def valid?
|
423
453
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
454
|
+
tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
455
|
+
return false unless tin_type_validator.valid?(@tin_type)
|
424
456
|
true
|
425
457
|
end
|
426
458
|
|
459
|
+
# Custom attribute writer method checking allowed values (enum).
|
460
|
+
# @param [Object] tin_type Object to be assigned
|
461
|
+
def tin_type=(tin_type)
|
462
|
+
validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
463
|
+
unless validator.valid?(tin_type)
|
464
|
+
fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
|
465
|
+
end
|
466
|
+
@tin_type = tin_type
|
467
|
+
end
|
468
|
+
|
427
469
|
# Checks equality by comparing each attribute.
|
428
470
|
# @param [Object] Object to be compared
|
429
471
|
def ==(o)
|
@@ -448,18 +490,17 @@ module AvalaraSdk::A1099::V2
|
|
448
490
|
exempt_interest_dividends == o.exempt_interest_dividends &&
|
449
491
|
specified_private_activity_bond_interest_dividends == o.specified_private_activity_bond_interest_dividends &&
|
450
492
|
fatca_filing_requirement == o.fatca_filing_requirement &&
|
451
|
-
state_and_local_withholding == o.state_and_local_withholding &&
|
452
|
-
issuer_id == o.issuer_id &&
|
453
493
|
issuer_reference_id == o.issuer_reference_id &&
|
454
494
|
issuer_tin == o.issuer_tin &&
|
455
495
|
tax_year == o.tax_year &&
|
496
|
+
issuer_id == o.issuer_id &&
|
456
497
|
reference_id == o.reference_id &&
|
457
498
|
recipient_name == o.recipient_name &&
|
458
499
|
recipient_tin == o.recipient_tin &&
|
459
500
|
tin_type == o.tin_type &&
|
460
501
|
recipient_second_name == o.recipient_second_name &&
|
461
|
-
|
462
|
-
|
502
|
+
address == o.address &&
|
503
|
+
address2 == o.address2 &&
|
463
504
|
city == o.city &&
|
464
505
|
state == o.state &&
|
465
506
|
zip == o.zip &&
|
@@ -472,7 +513,8 @@ module AvalaraSdk::A1099::V2
|
|
472
513
|
postal_mail == o.postal_mail &&
|
473
514
|
state_e_file == o.state_e_file &&
|
474
515
|
tin_match == o.tin_match &&
|
475
|
-
address_verification == o.address_verification
|
516
|
+
address_verification == o.address_verification &&
|
517
|
+
state_and_local_withholding == o.state_and_local_withholding
|
476
518
|
end
|
477
519
|
|
478
520
|
# @see the `==` method
|
@@ -484,7 +526,7 @@ module AvalaraSdk::A1099::V2
|
|
484
526
|
# Calculates hash code according to all attributes.
|
485
527
|
# @return [Integer] Hash code
|
486
528
|
def hash
|
487
|
-
[total_ordinary_dividends, qualified_dividends, total_capital_gain_distr, unrecap_sec1250_gain, section1202_gain, collectibles_gain, section897_ordinary_dividends, section897_capital_gain, nondividend_distributions, federal_income_tax_withheld, section199_a_dividends, investment_expenses, foreign_tax_paid, foreign_country_or_us_possession, cash_liquidation_distributions, noncash_liquidation_distributions, exempt_interest_dividends, specified_private_activity_bond_interest_dividends, fatca_filing_requirement,
|
529
|
+
[total_ordinary_dividends, qualified_dividends, total_capital_gain_distr, unrecap_sec1250_gain, section1202_gain, collectibles_gain, section897_ordinary_dividends, section897_capital_gain, nondividend_distributions, federal_income_tax_withheld, section199_a_dividends, investment_expenses, foreign_tax_paid, foreign_country_or_us_possession, cash_liquidation_distributions, noncash_liquidation_distributions, exempt_interest_dividends, specified_private_activity_bond_interest_dividends, fatca_filing_requirement, issuer_reference_id, issuer_tin, tax_year, issuer_id, reference_id, recipient_name, recipient_tin, tin_type, recipient_second_name, address, address2, city, state, zip, recipient_email, account_number, office_code, recipient_non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, address_verification, state_and_local_withholding].hash
|
488
530
|
end
|
489
531
|
|
490
532
|
# Builds the object from hash
|
@@ -49,18 +49,10 @@ module AvalaraSdk::A1099::V2
|
|
49
49
|
|
50
50
|
attr_accessor :fatca_filing_requirement
|
51
51
|
|
52
|
-
attr_accessor :state_and_local_withholding
|
53
|
-
|
54
52
|
attr_accessor :type
|
55
53
|
|
56
54
|
attr_accessor :issuer_id
|
57
55
|
|
58
|
-
attr_accessor :issuer_reference_id
|
59
|
-
|
60
|
-
attr_accessor :issuer_tin
|
61
|
-
|
62
|
-
attr_accessor :tax_year
|
63
|
-
|
64
56
|
attr_accessor :reference_id
|
65
57
|
|
66
58
|
attr_accessor :recipient_name
|
@@ -71,9 +63,9 @@ module AvalaraSdk::A1099::V2
|
|
71
63
|
|
72
64
|
attr_accessor :recipient_second_name
|
73
65
|
|
74
|
-
attr_accessor :
|
66
|
+
attr_accessor :address
|
75
67
|
|
76
|
-
attr_accessor :
|
68
|
+
attr_accessor :address2
|
77
69
|
|
78
70
|
attr_accessor :city
|
79
71
|
|
@@ -101,6 +93,30 @@ module AvalaraSdk::A1099::V2
|
|
101
93
|
|
102
94
|
attr_accessor :address_verification
|
103
95
|
|
96
|
+
attr_accessor :state_and_local_withholding
|
97
|
+
|
98
|
+
class EnumAttributeValidator
|
99
|
+
attr_reader :datatype
|
100
|
+
attr_reader :allowable_values
|
101
|
+
|
102
|
+
def initialize(datatype, allowable_values)
|
103
|
+
@allowable_values = allowable_values.map do |value|
|
104
|
+
case datatype.to_s
|
105
|
+
when /Integer/i
|
106
|
+
value.to_i
|
107
|
+
when /Float/i
|
108
|
+
value.to_f
|
109
|
+
else
|
110
|
+
value
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
def valid?(value)
|
116
|
+
!value || allowable_values.include?(value)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
104
120
|
# Attribute mapping from ruby-style variable name to JSON key.
|
105
121
|
def self.attribute_map
|
106
122
|
{
|
@@ -123,19 +139,15 @@ module AvalaraSdk::A1099::V2
|
|
123
139
|
:'exempt_interest_dividends' => :'exemptInterestDividends',
|
124
140
|
:'specified_private_activity_bond_interest_dividends' => :'specifiedPrivateActivityBondInterestDividends',
|
125
141
|
:'fatca_filing_requirement' => :'fatcaFilingRequirement',
|
126
|
-
:'state_and_local_withholding' => :'stateAndLocalWithholding',
|
127
142
|
:'type' => :'type',
|
128
143
|
:'issuer_id' => :'issuerId',
|
129
|
-
:'issuer_reference_id' => :'issuerReferenceId',
|
130
|
-
:'issuer_tin' => :'issuerTin',
|
131
|
-
:'tax_year' => :'taxYear',
|
132
144
|
:'reference_id' => :'referenceId',
|
133
145
|
:'recipient_name' => :'recipientName',
|
134
146
|
:'recipient_tin' => :'recipientTin',
|
135
147
|
:'tin_type' => :'tinType',
|
136
148
|
:'recipient_second_name' => :'recipientSecondName',
|
137
|
-
:'
|
138
|
-
:'
|
149
|
+
:'address' => :'address',
|
150
|
+
:'address2' => :'address2',
|
139
151
|
:'city' => :'city',
|
140
152
|
:'state' => :'state',
|
141
153
|
:'zip' => :'zip',
|
@@ -148,7 +160,8 @@ module AvalaraSdk::A1099::V2
|
|
148
160
|
:'postal_mail' => :'postalMail',
|
149
161
|
:'state_e_file' => :'stateEFile',
|
150
162
|
:'tin_match' => :'tinMatch',
|
151
|
-
:'address_verification' => :'addressVerification'
|
163
|
+
:'address_verification' => :'addressVerification',
|
164
|
+
:'state_and_local_withholding' => :'stateAndLocalWithholding'
|
152
165
|
}
|
153
166
|
end
|
154
167
|
|
@@ -179,19 +192,15 @@ module AvalaraSdk::A1099::V2
|
|
179
192
|
:'exempt_interest_dividends' => :'String',
|
180
193
|
:'specified_private_activity_bond_interest_dividends' => :'String',
|
181
194
|
:'fatca_filing_requirement' => :'String',
|
182
|
-
:'state_and_local_withholding' => :'StateAndLocalWithholdingRequest',
|
183
195
|
:'type' => :'String',
|
184
196
|
:'issuer_id' => :'String',
|
185
|
-
:'issuer_reference_id' => :'String',
|
186
|
-
:'issuer_tin' => :'String',
|
187
|
-
:'tax_year' => :'Integer',
|
188
197
|
:'reference_id' => :'String',
|
189
198
|
:'recipient_name' => :'String',
|
190
199
|
:'recipient_tin' => :'String',
|
191
|
-
:'tin_type' => :'
|
200
|
+
:'tin_type' => :'String',
|
192
201
|
:'recipient_second_name' => :'String',
|
193
|
-
:'
|
194
|
-
:'
|
202
|
+
:'address' => :'String',
|
203
|
+
:'address2' => :'String',
|
195
204
|
:'city' => :'String',
|
196
205
|
:'state' => :'String',
|
197
206
|
:'zip' => :'String',
|
@@ -204,13 +213,22 @@ module AvalaraSdk::A1099::V2
|
|
204
213
|
:'postal_mail' => :'Boolean',
|
205
214
|
:'state_e_file' => :'Boolean',
|
206
215
|
:'tin_match' => :'Boolean',
|
207
|
-
:'address_verification' => :'Boolean'
|
216
|
+
:'address_verification' => :'Boolean',
|
217
|
+
:'state_and_local_withholding' => :'StateAndLocalWithholdingRequest'
|
208
218
|
}
|
209
219
|
end
|
210
220
|
|
211
221
|
# List of attributes with nullable: true
|
212
222
|
def self.openapi_nullable
|
213
223
|
Set.new([
|
224
|
+
:'issuer_id',
|
225
|
+
:'reference_id',
|
226
|
+
:'recipient_name',
|
227
|
+
:'address2',
|
228
|
+
:'recipient_email',
|
229
|
+
:'account_number',
|
230
|
+
:'office_code',
|
231
|
+
:'recipient_non_us_province',
|
214
232
|
])
|
215
233
|
end
|
216
234
|
|
@@ -312,10 +330,6 @@ module AvalaraSdk::A1099::V2
|
|
312
330
|
self.fatca_filing_requirement = attributes[:'fatca_filing_requirement']
|
313
331
|
end
|
314
332
|
|
315
|
-
if attributes.key?(:'state_and_local_withholding')
|
316
|
-
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
317
|
-
end
|
318
|
-
|
319
333
|
if attributes.key?(:'type')
|
320
334
|
self.type = attributes[:'type']
|
321
335
|
end
|
@@ -324,18 +338,6 @@ module AvalaraSdk::A1099::V2
|
|
324
338
|
self.issuer_id = attributes[:'issuer_id']
|
325
339
|
end
|
326
340
|
|
327
|
-
if attributes.key?(:'issuer_reference_id')
|
328
|
-
self.issuer_reference_id = attributes[:'issuer_reference_id']
|
329
|
-
end
|
330
|
-
|
331
|
-
if attributes.key?(:'issuer_tin')
|
332
|
-
self.issuer_tin = attributes[:'issuer_tin']
|
333
|
-
end
|
334
|
-
|
335
|
-
if attributes.key?(:'tax_year')
|
336
|
-
self.tax_year = attributes[:'tax_year']
|
337
|
-
end
|
338
|
-
|
339
341
|
if attributes.key?(:'reference_id')
|
340
342
|
self.reference_id = attributes[:'reference_id']
|
341
343
|
end
|
@@ -356,12 +358,12 @@ module AvalaraSdk::A1099::V2
|
|
356
358
|
self.recipient_second_name = attributes[:'recipient_second_name']
|
357
359
|
end
|
358
360
|
|
359
|
-
if attributes.key?(:'
|
360
|
-
self.
|
361
|
+
if attributes.key?(:'address')
|
362
|
+
self.address = attributes[:'address']
|
361
363
|
end
|
362
364
|
|
363
|
-
if attributes.key?(:'
|
364
|
-
self.
|
365
|
+
if attributes.key?(:'address2')
|
366
|
+
self.address2 = attributes[:'address2']
|
365
367
|
end
|
366
368
|
|
367
369
|
if attributes.key?(:'city')
|
@@ -415,6 +417,10 @@ module AvalaraSdk::A1099::V2
|
|
415
417
|
if attributes.key?(:'address_verification')
|
416
418
|
self.address_verification = attributes[:'address_verification']
|
417
419
|
end
|
420
|
+
|
421
|
+
if attributes.key?(:'state_and_local_withholding')
|
422
|
+
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
423
|
+
end
|
418
424
|
end
|
419
425
|
|
420
426
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -429,9 +435,33 @@ module AvalaraSdk::A1099::V2
|
|
429
435
|
# @return true if the model is valid
|
430
436
|
def valid?
|
431
437
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
438
|
+
type_validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B"])
|
439
|
+
return false unless type_validator.valid?(@type)
|
440
|
+
tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
441
|
+
return false unless tin_type_validator.valid?(@tin_type)
|
432
442
|
true
|
433
443
|
end
|
434
444
|
|
445
|
+
# Custom attribute writer method checking allowed values (enum).
|
446
|
+
# @param [Object] type Object to be assigned
|
447
|
+
def type=(type)
|
448
|
+
validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B"])
|
449
|
+
unless validator.valid?(type)
|
450
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
451
|
+
end
|
452
|
+
@type = type
|
453
|
+
end
|
454
|
+
|
455
|
+
# Custom attribute writer method checking allowed values (enum).
|
456
|
+
# @param [Object] tin_type Object to be assigned
|
457
|
+
def tin_type=(tin_type)
|
458
|
+
validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
459
|
+
unless validator.valid?(tin_type)
|
460
|
+
fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
|
461
|
+
end
|
462
|
+
@tin_type = tin_type
|
463
|
+
end
|
464
|
+
|
435
465
|
# Checks equality by comparing each attribute.
|
436
466
|
# @param [Object] Object to be compared
|
437
467
|
def ==(o)
|
@@ -456,19 +486,15 @@ module AvalaraSdk::A1099::V2
|
|
456
486
|
exempt_interest_dividends == o.exempt_interest_dividends &&
|
457
487
|
specified_private_activity_bond_interest_dividends == o.specified_private_activity_bond_interest_dividends &&
|
458
488
|
fatca_filing_requirement == o.fatca_filing_requirement &&
|
459
|
-
state_and_local_withholding == o.state_and_local_withholding &&
|
460
489
|
type == o.type &&
|
461
490
|
issuer_id == o.issuer_id &&
|
462
|
-
issuer_reference_id == o.issuer_reference_id &&
|
463
|
-
issuer_tin == o.issuer_tin &&
|
464
|
-
tax_year == o.tax_year &&
|
465
491
|
reference_id == o.reference_id &&
|
466
492
|
recipient_name == o.recipient_name &&
|
467
493
|
recipient_tin == o.recipient_tin &&
|
468
494
|
tin_type == o.tin_type &&
|
469
495
|
recipient_second_name == o.recipient_second_name &&
|
470
|
-
|
471
|
-
|
496
|
+
address == o.address &&
|
497
|
+
address2 == o.address2 &&
|
472
498
|
city == o.city &&
|
473
499
|
state == o.state &&
|
474
500
|
zip == o.zip &&
|
@@ -481,7 +507,8 @@ module AvalaraSdk::A1099::V2
|
|
481
507
|
postal_mail == o.postal_mail &&
|
482
508
|
state_e_file == o.state_e_file &&
|
483
509
|
tin_match == o.tin_match &&
|
484
|
-
address_verification == o.address_verification
|
510
|
+
address_verification == o.address_verification &&
|
511
|
+
state_and_local_withholding == o.state_and_local_withholding
|
485
512
|
end
|
486
513
|
|
487
514
|
# @see the `==` method
|
@@ -493,7 +520,7 @@ module AvalaraSdk::A1099::V2
|
|
493
520
|
# Calculates hash code according to all attributes.
|
494
521
|
# @return [Integer] Hash code
|
495
522
|
def hash
|
496
|
-
[total_ordinary_dividends, qualified_dividends, total_capital_gain_distr, unrecap_sec1250_gain, section1202_gain, collectibles_gain, section897_ordinary_dividends, section897_capital_gain, nondividend_distributions, federal_income_tax_withheld, section199_a_dividends, investment_expenses, foreign_tax_paid, foreign_country_or_us_possession, cash_liquidation_distributions, noncash_liquidation_distributions, exempt_interest_dividends, specified_private_activity_bond_interest_dividends, fatca_filing_requirement,
|
523
|
+
[total_ordinary_dividends, qualified_dividends, total_capital_gain_distr, unrecap_sec1250_gain, section1202_gain, collectibles_gain, section897_ordinary_dividends, section897_capital_gain, nondividend_distributions, federal_income_tax_withheld, section199_a_dividends, investment_expenses, foreign_tax_paid, foreign_country_or_us_possession, cash_liquidation_distributions, noncash_liquidation_distributions, exempt_interest_dividends, specified_private_activity_bond_interest_dividends, fatca_filing_requirement, type, issuer_id, reference_id, recipient_name, recipient_tin, tin_type, recipient_second_name, address, address2, city, state, zip, recipient_email, account_number, office_code, recipient_non_us_province, country_code, federal_e_file, postal_mail, state_e_file, tin_match, address_verification, state_and_local_withholding].hash
|
497
524
|
end
|
498
525
|
|
499
526
|
# Builds the object from hash
|