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
@@ -11,8 +11,6 @@ require 'time'
|
|
11
11
|
|
12
12
|
module AvalaraSdk::A1099::V2
|
13
13
|
class Form1099MiscListItem
|
14
|
-
attr_accessor :state_and_local_withholding
|
15
|
-
|
16
14
|
attr_accessor :second_tin_notice
|
17
15
|
|
18
16
|
attr_accessor :rents
|
@@ -45,14 +43,14 @@ module AvalaraSdk::A1099::V2
|
|
45
43
|
|
46
44
|
attr_accessor :nonqualified_deferred_compensation
|
47
45
|
|
48
|
-
attr_accessor :issuer_id
|
49
|
-
|
50
46
|
attr_accessor :issuer_reference_id
|
51
47
|
|
52
48
|
attr_accessor :issuer_tin
|
53
49
|
|
54
50
|
attr_accessor :tax_year
|
55
51
|
|
52
|
+
attr_accessor :issuer_id
|
53
|
+
|
56
54
|
attr_accessor :reference_id
|
57
55
|
|
58
56
|
attr_accessor :recipient_name
|
@@ -63,9 +61,9 @@ module AvalaraSdk::A1099::V2
|
|
63
61
|
|
64
62
|
attr_accessor :recipient_second_name
|
65
63
|
|
66
|
-
attr_accessor :
|
64
|
+
attr_accessor :address
|
67
65
|
|
68
|
-
attr_accessor :
|
66
|
+
attr_accessor :address2
|
69
67
|
|
70
68
|
attr_accessor :city
|
71
69
|
|
@@ -93,10 +91,33 @@ module AvalaraSdk::A1099::V2
|
|
93
91
|
|
94
92
|
attr_accessor :address_verification
|
95
93
|
|
94
|
+
attr_accessor :state_and_local_withholding
|
95
|
+
|
96
|
+
class EnumAttributeValidator
|
97
|
+
attr_reader :datatype
|
98
|
+
attr_reader :allowable_values
|
99
|
+
|
100
|
+
def initialize(datatype, allowable_values)
|
101
|
+
@allowable_values = allowable_values.map do |value|
|
102
|
+
case datatype.to_s
|
103
|
+
when /Integer/i
|
104
|
+
value.to_i
|
105
|
+
when /Float/i
|
106
|
+
value.to_f
|
107
|
+
else
|
108
|
+
value
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def valid?(value)
|
114
|
+
!value || allowable_values.include?(value)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
96
118
|
# Attribute mapping from ruby-style variable name to JSON key.
|
97
119
|
def self.attribute_map
|
98
120
|
{
|
99
|
-
:'state_and_local_withholding' => :'stateAndLocalWithholding',
|
100
121
|
:'second_tin_notice' => :'secondTinNotice',
|
101
122
|
:'rents' => :'rents',
|
102
123
|
:'royalties' => :'royalties',
|
@@ -113,17 +134,17 @@ module AvalaraSdk::A1099::V2
|
|
113
134
|
:'fatca_filing_requirement' => :'fatcaFilingRequirement',
|
114
135
|
:'excess_golden_parachute_payments' => :'excessGoldenParachutePayments',
|
115
136
|
:'nonqualified_deferred_compensation' => :'nonqualifiedDeferredCompensation',
|
116
|
-
:'issuer_id' => :'issuerId',
|
117
137
|
:'issuer_reference_id' => :'issuerReferenceId',
|
118
138
|
:'issuer_tin' => :'issuerTin',
|
119
139
|
:'tax_year' => :'taxYear',
|
140
|
+
:'issuer_id' => :'issuerId',
|
120
141
|
:'reference_id' => :'referenceId',
|
121
142
|
:'recipient_name' => :'recipientName',
|
122
143
|
:'recipient_tin' => :'recipientTin',
|
123
144
|
:'tin_type' => :'tinType',
|
124
145
|
:'recipient_second_name' => :'recipientSecondName',
|
125
|
-
:'
|
126
|
-
:'
|
146
|
+
:'address' => :'address',
|
147
|
+
:'address2' => :'address2',
|
127
148
|
:'city' => :'city',
|
128
149
|
:'state' => :'state',
|
129
150
|
:'zip' => :'zip',
|
@@ -136,7 +157,8 @@ module AvalaraSdk::A1099::V2
|
|
136
157
|
:'postal_mail' => :'postalMail',
|
137
158
|
:'state_e_file' => :'stateEFile',
|
138
159
|
:'tin_match' => :'tinMatch',
|
139
|
-
:'address_verification' => :'addressVerification'
|
160
|
+
:'address_verification' => :'addressVerification',
|
161
|
+
:'state_and_local_withholding' => :'stateAndLocalWithholding'
|
140
162
|
}
|
141
163
|
end
|
142
164
|
|
@@ -148,7 +170,6 @@ module AvalaraSdk::A1099::V2
|
|
148
170
|
# Attribute type mapping.
|
149
171
|
def self.openapi_types
|
150
172
|
{
|
151
|
-
:'state_and_local_withholding' => :'StateAndLocalWithholding',
|
152
173
|
:'second_tin_notice' => :'Boolean',
|
153
174
|
:'rents' => :'Float',
|
154
175
|
:'royalties' => :'Float',
|
@@ -165,17 +186,17 @@ module AvalaraSdk::A1099::V2
|
|
165
186
|
:'fatca_filing_requirement' => :'Boolean',
|
166
187
|
:'excess_golden_parachute_payments' => :'Float',
|
167
188
|
:'nonqualified_deferred_compensation' => :'Float',
|
168
|
-
:'issuer_id' => :'String',
|
169
189
|
:'issuer_reference_id' => :'String',
|
170
190
|
:'issuer_tin' => :'String',
|
171
191
|
:'tax_year' => :'Integer',
|
192
|
+
:'issuer_id' => :'String',
|
172
193
|
:'reference_id' => :'String',
|
173
194
|
:'recipient_name' => :'String',
|
174
195
|
:'recipient_tin' => :'String',
|
175
|
-
:'tin_type' => :'
|
196
|
+
:'tin_type' => :'String',
|
176
197
|
:'recipient_second_name' => :'String',
|
177
|
-
:'
|
178
|
-
:'
|
198
|
+
:'address' => :'String',
|
199
|
+
:'address2' => :'String',
|
179
200
|
:'city' => :'String',
|
180
201
|
:'state' => :'String',
|
181
202
|
:'zip' => :'String',
|
@@ -188,20 +209,29 @@ module AvalaraSdk::A1099::V2
|
|
188
209
|
:'postal_mail' => :'Boolean',
|
189
210
|
:'state_e_file' => :'Boolean',
|
190
211
|
:'tin_match' => :'Boolean',
|
191
|
-
:'address_verification' => :'Boolean'
|
212
|
+
:'address_verification' => :'Boolean',
|
213
|
+
:'state_and_local_withholding' => :'StateAndLocalWithholdingRequest'
|
192
214
|
}
|
193
215
|
end
|
194
216
|
|
195
217
|
# List of attributes with nullable: true
|
196
218
|
def self.openapi_nullable
|
197
219
|
Set.new([
|
220
|
+
:'issuer_id',
|
221
|
+
:'reference_id',
|
222
|
+
:'recipient_name',
|
223
|
+
:'address2',
|
224
|
+
:'recipient_email',
|
225
|
+
:'account_number',
|
226
|
+
:'office_code',
|
227
|
+
:'recipient_non_us_province',
|
198
228
|
])
|
199
229
|
end
|
200
230
|
|
201
231
|
# List of class defined in allOf (OpenAPI v3)
|
202
232
|
def self.openapi_all_of
|
203
233
|
[
|
204
|
-
:'
|
234
|
+
:'FormRequestCsvBase'
|
205
235
|
]
|
206
236
|
end
|
207
237
|
|
@@ -220,10 +250,6 @@ module AvalaraSdk::A1099::V2
|
|
220
250
|
h[k.to_sym] = v
|
221
251
|
}
|
222
252
|
|
223
|
-
if attributes.key?(:'state_and_local_withholding')
|
224
|
-
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
225
|
-
end
|
226
|
-
|
227
253
|
if attributes.key?(:'second_tin_notice')
|
228
254
|
self.second_tin_notice = attributes[:'second_tin_notice']
|
229
255
|
end
|
@@ -288,10 +314,6 @@ module AvalaraSdk::A1099::V2
|
|
288
314
|
self.nonqualified_deferred_compensation = attributes[:'nonqualified_deferred_compensation']
|
289
315
|
end
|
290
316
|
|
291
|
-
if attributes.key?(:'issuer_id')
|
292
|
-
self.issuer_id = attributes[:'issuer_id']
|
293
|
-
end
|
294
|
-
|
295
317
|
if attributes.key?(:'issuer_reference_id')
|
296
318
|
self.issuer_reference_id = attributes[:'issuer_reference_id']
|
297
319
|
end
|
@@ -304,6 +326,10 @@ module AvalaraSdk::A1099::V2
|
|
304
326
|
self.tax_year = attributes[:'tax_year']
|
305
327
|
end
|
306
328
|
|
329
|
+
if attributes.key?(:'issuer_id')
|
330
|
+
self.issuer_id = attributes[:'issuer_id']
|
331
|
+
end
|
332
|
+
|
307
333
|
if attributes.key?(:'reference_id')
|
308
334
|
self.reference_id = attributes[:'reference_id']
|
309
335
|
end
|
@@ -324,12 +350,12 @@ module AvalaraSdk::A1099::V2
|
|
324
350
|
self.recipient_second_name = attributes[:'recipient_second_name']
|
325
351
|
end
|
326
352
|
|
327
|
-
if attributes.key?(:'
|
328
|
-
self.
|
353
|
+
if attributes.key?(:'address')
|
354
|
+
self.address = attributes[:'address']
|
329
355
|
end
|
330
356
|
|
331
|
-
if attributes.key?(:'
|
332
|
-
self.
|
357
|
+
if attributes.key?(:'address2')
|
358
|
+
self.address2 = attributes[:'address2']
|
333
359
|
end
|
334
360
|
|
335
361
|
if attributes.key?(:'city')
|
@@ -383,6 +409,10 @@ module AvalaraSdk::A1099::V2
|
|
383
409
|
if attributes.key?(:'address_verification')
|
384
410
|
self.address_verification = attributes[:'address_verification']
|
385
411
|
end
|
412
|
+
|
413
|
+
if attributes.key?(:'state_and_local_withholding')
|
414
|
+
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
415
|
+
end
|
386
416
|
end
|
387
417
|
|
388
418
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -397,15 +427,26 @@ module AvalaraSdk::A1099::V2
|
|
397
427
|
# @return true if the model is valid
|
398
428
|
def valid?
|
399
429
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
430
|
+
tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
431
|
+
return false unless tin_type_validator.valid?(@tin_type)
|
400
432
|
true
|
401
433
|
end
|
402
434
|
|
435
|
+
# Custom attribute writer method checking allowed values (enum).
|
436
|
+
# @param [Object] tin_type Object to be assigned
|
437
|
+
def tin_type=(tin_type)
|
438
|
+
validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
439
|
+
unless validator.valid?(tin_type)
|
440
|
+
fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
|
441
|
+
end
|
442
|
+
@tin_type = tin_type
|
443
|
+
end
|
444
|
+
|
403
445
|
# Checks equality by comparing each attribute.
|
404
446
|
# @param [Object] Object to be compared
|
405
447
|
def ==(o)
|
406
448
|
return true if self.equal?(o)
|
407
449
|
self.class == o.class &&
|
408
|
-
state_and_local_withholding == o.state_and_local_withholding &&
|
409
450
|
second_tin_notice == o.second_tin_notice &&
|
410
451
|
rents == o.rents &&
|
411
452
|
royalties == o.royalties &&
|
@@ -422,17 +463,17 @@ module AvalaraSdk::A1099::V2
|
|
422
463
|
fatca_filing_requirement == o.fatca_filing_requirement &&
|
423
464
|
excess_golden_parachute_payments == o.excess_golden_parachute_payments &&
|
424
465
|
nonqualified_deferred_compensation == o.nonqualified_deferred_compensation &&
|
425
|
-
issuer_id == o.issuer_id &&
|
426
466
|
issuer_reference_id == o.issuer_reference_id &&
|
427
467
|
issuer_tin == o.issuer_tin &&
|
428
468
|
tax_year == o.tax_year &&
|
469
|
+
issuer_id == o.issuer_id &&
|
429
470
|
reference_id == o.reference_id &&
|
430
471
|
recipient_name == o.recipient_name &&
|
431
472
|
recipient_tin == o.recipient_tin &&
|
432
473
|
tin_type == o.tin_type &&
|
433
474
|
recipient_second_name == o.recipient_second_name &&
|
434
|
-
|
435
|
-
|
475
|
+
address == o.address &&
|
476
|
+
address2 == o.address2 &&
|
436
477
|
city == o.city &&
|
437
478
|
state == o.state &&
|
438
479
|
zip == o.zip &&
|
@@ -445,7 +486,8 @@ module AvalaraSdk::A1099::V2
|
|
445
486
|
postal_mail == o.postal_mail &&
|
446
487
|
state_e_file == o.state_e_file &&
|
447
488
|
tin_match == o.tin_match &&
|
448
|
-
address_verification == o.address_verification
|
489
|
+
address_verification == o.address_verification &&
|
490
|
+
state_and_local_withholding == o.state_and_local_withholding
|
449
491
|
end
|
450
492
|
|
451
493
|
# @see the `==` method
|
@@ -457,7 +499,7 @@ module AvalaraSdk::A1099::V2
|
|
457
499
|
# Calculates hash code according to all attributes.
|
458
500
|
# @return [Integer] Hash code
|
459
501
|
def hash
|
460
|
-
[
|
502
|
+
[second_tin_notice, rents, royalties, other_income, fed_income_tax_withheld, fishing_boat_proceeds, medical_health_care_payments, payer_made_direct_sales, substitute_payments, crop_insurance_proceeds, gross_proceeds_paid_to_attorney, fish_purchased_for_resale, section409_a_deferrals, fatca_filing_requirement, excess_golden_parachute_payments, nonqualified_deferred_compensation, 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
|
461
503
|
end
|
462
504
|
|
463
505
|
# Builds the object from hash
|
@@ -11,8 +11,6 @@ require 'time'
|
|
11
11
|
|
12
12
|
module AvalaraSdk::A1099::V2
|
13
13
|
class Form1099MiscRequest
|
14
|
-
attr_accessor :state_and_local_withholding
|
15
|
-
|
16
14
|
attr_accessor :second_tin_notice
|
17
15
|
|
18
16
|
attr_accessor :rents
|
@@ -49,12 +47,6 @@ module AvalaraSdk::A1099::V2
|
|
49
47
|
|
50
48
|
attr_accessor :issuer_id
|
51
49
|
|
52
|
-
attr_accessor :issuer_reference_id
|
53
|
-
|
54
|
-
attr_accessor :issuer_tin
|
55
|
-
|
56
|
-
attr_accessor :tax_year
|
57
|
-
|
58
50
|
attr_accessor :reference_id
|
59
51
|
|
60
52
|
attr_accessor :recipient_name
|
@@ -65,9 +57,9 @@ module AvalaraSdk::A1099::V2
|
|
65
57
|
|
66
58
|
attr_accessor :recipient_second_name
|
67
59
|
|
68
|
-
attr_accessor :
|
60
|
+
attr_accessor :address
|
69
61
|
|
70
|
-
attr_accessor :
|
62
|
+
attr_accessor :address2
|
71
63
|
|
72
64
|
attr_accessor :city
|
73
65
|
|
@@ -95,10 +87,33 @@ module AvalaraSdk::A1099::V2
|
|
95
87
|
|
96
88
|
attr_accessor :address_verification
|
97
89
|
|
90
|
+
attr_accessor :state_and_local_withholding
|
91
|
+
|
92
|
+
class EnumAttributeValidator
|
93
|
+
attr_reader :datatype
|
94
|
+
attr_reader :allowable_values
|
95
|
+
|
96
|
+
def initialize(datatype, allowable_values)
|
97
|
+
@allowable_values = allowable_values.map do |value|
|
98
|
+
case datatype.to_s
|
99
|
+
when /Integer/i
|
100
|
+
value.to_i
|
101
|
+
when /Float/i
|
102
|
+
value.to_f
|
103
|
+
else
|
104
|
+
value
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def valid?(value)
|
110
|
+
!value || allowable_values.include?(value)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
98
114
|
# Attribute mapping from ruby-style variable name to JSON key.
|
99
115
|
def self.attribute_map
|
100
116
|
{
|
101
|
-
:'state_and_local_withholding' => :'stateAndLocalWithholding',
|
102
117
|
:'second_tin_notice' => :'secondTinNotice',
|
103
118
|
:'rents' => :'rents',
|
104
119
|
:'royalties' => :'royalties',
|
@@ -117,16 +132,13 @@ module AvalaraSdk::A1099::V2
|
|
117
132
|
:'nonqualified_deferred_compensation' => :'nonqualifiedDeferredCompensation',
|
118
133
|
:'type' => :'type',
|
119
134
|
:'issuer_id' => :'issuerId',
|
120
|
-
:'issuer_reference_id' => :'issuerReferenceId',
|
121
|
-
:'issuer_tin' => :'issuerTin',
|
122
|
-
:'tax_year' => :'taxYear',
|
123
135
|
:'reference_id' => :'referenceId',
|
124
136
|
:'recipient_name' => :'recipientName',
|
125
137
|
:'recipient_tin' => :'recipientTin',
|
126
138
|
:'tin_type' => :'tinType',
|
127
139
|
:'recipient_second_name' => :'recipientSecondName',
|
128
|
-
:'
|
129
|
-
:'
|
140
|
+
:'address' => :'address',
|
141
|
+
:'address2' => :'address2',
|
130
142
|
:'city' => :'city',
|
131
143
|
:'state' => :'state',
|
132
144
|
:'zip' => :'zip',
|
@@ -139,7 +151,8 @@ module AvalaraSdk::A1099::V2
|
|
139
151
|
:'postal_mail' => :'postalMail',
|
140
152
|
:'state_e_file' => :'stateEFile',
|
141
153
|
:'tin_match' => :'tinMatch',
|
142
|
-
:'address_verification' => :'addressVerification'
|
154
|
+
:'address_verification' => :'addressVerification',
|
155
|
+
:'state_and_local_withholding' => :'stateAndLocalWithholding'
|
143
156
|
}
|
144
157
|
end
|
145
158
|
|
@@ -151,7 +164,6 @@ module AvalaraSdk::A1099::V2
|
|
151
164
|
# Attribute type mapping.
|
152
165
|
def self.openapi_types
|
153
166
|
{
|
154
|
-
:'state_and_local_withholding' => :'StateAndLocalWithholdingRequest',
|
155
167
|
:'second_tin_notice' => :'Boolean',
|
156
168
|
:'rents' => :'Float',
|
157
169
|
:'royalties' => :'Float',
|
@@ -170,16 +182,13 @@ module AvalaraSdk::A1099::V2
|
|
170
182
|
:'nonqualified_deferred_compensation' => :'Float',
|
171
183
|
:'type' => :'String',
|
172
184
|
:'issuer_id' => :'String',
|
173
|
-
:'issuer_reference_id' => :'String',
|
174
|
-
:'issuer_tin' => :'String',
|
175
|
-
:'tax_year' => :'Integer',
|
176
185
|
:'reference_id' => :'String',
|
177
186
|
:'recipient_name' => :'String',
|
178
187
|
:'recipient_tin' => :'String',
|
179
|
-
:'tin_type' => :'
|
188
|
+
:'tin_type' => :'String',
|
180
189
|
:'recipient_second_name' => :'String',
|
181
|
-
:'
|
182
|
-
:'
|
190
|
+
:'address' => :'String',
|
191
|
+
:'address2' => :'String',
|
183
192
|
:'city' => :'String',
|
184
193
|
:'state' => :'String',
|
185
194
|
:'zip' => :'String',
|
@@ -192,13 +201,22 @@ module AvalaraSdk::A1099::V2
|
|
192
201
|
:'postal_mail' => :'Boolean',
|
193
202
|
:'state_e_file' => :'Boolean',
|
194
203
|
:'tin_match' => :'Boolean',
|
195
|
-
:'address_verification' => :'Boolean'
|
204
|
+
:'address_verification' => :'Boolean',
|
205
|
+
:'state_and_local_withholding' => :'StateAndLocalWithholdingRequest'
|
196
206
|
}
|
197
207
|
end
|
198
208
|
|
199
209
|
# List of attributes with nullable: true
|
200
210
|
def self.openapi_nullable
|
201
211
|
Set.new([
|
212
|
+
:'issuer_id',
|
213
|
+
:'reference_id',
|
214
|
+
:'recipient_name',
|
215
|
+
:'address2',
|
216
|
+
:'recipient_email',
|
217
|
+
:'account_number',
|
218
|
+
:'office_code',
|
219
|
+
:'recipient_non_us_province',
|
202
220
|
])
|
203
221
|
end
|
204
222
|
|
@@ -224,10 +242,6 @@ module AvalaraSdk::A1099::V2
|
|
224
242
|
h[k.to_sym] = v
|
225
243
|
}
|
226
244
|
|
227
|
-
if attributes.key?(:'state_and_local_withholding')
|
228
|
-
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
229
|
-
end
|
230
|
-
|
231
245
|
if attributes.key?(:'second_tin_notice')
|
232
246
|
self.second_tin_notice = attributes[:'second_tin_notice']
|
233
247
|
end
|
@@ -300,18 +314,6 @@ module AvalaraSdk::A1099::V2
|
|
300
314
|
self.issuer_id = attributes[:'issuer_id']
|
301
315
|
end
|
302
316
|
|
303
|
-
if attributes.key?(:'issuer_reference_id')
|
304
|
-
self.issuer_reference_id = attributes[:'issuer_reference_id']
|
305
|
-
end
|
306
|
-
|
307
|
-
if attributes.key?(:'issuer_tin')
|
308
|
-
self.issuer_tin = attributes[:'issuer_tin']
|
309
|
-
end
|
310
|
-
|
311
|
-
if attributes.key?(:'tax_year')
|
312
|
-
self.tax_year = attributes[:'tax_year']
|
313
|
-
end
|
314
|
-
|
315
317
|
if attributes.key?(:'reference_id')
|
316
318
|
self.reference_id = attributes[:'reference_id']
|
317
319
|
end
|
@@ -332,12 +334,12 @@ module AvalaraSdk::A1099::V2
|
|
332
334
|
self.recipient_second_name = attributes[:'recipient_second_name']
|
333
335
|
end
|
334
336
|
|
335
|
-
if attributes.key?(:'
|
336
|
-
self.
|
337
|
+
if attributes.key?(:'address')
|
338
|
+
self.address = attributes[:'address']
|
337
339
|
end
|
338
340
|
|
339
|
-
if attributes.key?(:'
|
340
|
-
self.
|
341
|
+
if attributes.key?(:'address2')
|
342
|
+
self.address2 = attributes[:'address2']
|
341
343
|
end
|
342
344
|
|
343
345
|
if attributes.key?(:'city')
|
@@ -391,6 +393,10 @@ module AvalaraSdk::A1099::V2
|
|
391
393
|
if attributes.key?(:'address_verification')
|
392
394
|
self.address_verification = attributes[:'address_verification']
|
393
395
|
end
|
396
|
+
|
397
|
+
if attributes.key?(:'state_and_local_withholding')
|
398
|
+
self.state_and_local_withholding = attributes[:'state_and_local_withholding']
|
399
|
+
end
|
394
400
|
end
|
395
401
|
|
396
402
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -405,15 +411,38 @@ module AvalaraSdk::A1099::V2
|
|
405
411
|
# @return true if the model is valid
|
406
412
|
def valid?
|
407
413
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
414
|
+
type_validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B"])
|
415
|
+
return false unless type_validator.valid?(@type)
|
416
|
+
tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
417
|
+
return false unless tin_type_validator.valid?(@tin_type)
|
408
418
|
true
|
409
419
|
end
|
410
420
|
|
421
|
+
# Custom attribute writer method checking allowed values (enum).
|
422
|
+
# @param [Object] type Object to be assigned
|
423
|
+
def type=(type)
|
424
|
+
validator = EnumAttributeValidator.new('String', ["Form1099Nec", "Form1099Misc", "Form1099Div", "Form1099R", "Form1099K", "Form1095B"])
|
425
|
+
unless validator.valid?(type)
|
426
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
427
|
+
end
|
428
|
+
@type = type
|
429
|
+
end
|
430
|
+
|
431
|
+
# Custom attribute writer method checking allowed values (enum).
|
432
|
+
# @param [Object] tin_type Object to be assigned
|
433
|
+
def tin_type=(tin_type)
|
434
|
+
validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
|
435
|
+
unless validator.valid?(tin_type)
|
436
|
+
fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
|
437
|
+
end
|
438
|
+
@tin_type = tin_type
|
439
|
+
end
|
440
|
+
|
411
441
|
# Checks equality by comparing each attribute.
|
412
442
|
# @param [Object] Object to be compared
|
413
443
|
def ==(o)
|
414
444
|
return true if self.equal?(o)
|
415
445
|
self.class == o.class &&
|
416
|
-
state_and_local_withholding == o.state_and_local_withholding &&
|
417
446
|
second_tin_notice == o.second_tin_notice &&
|
418
447
|
rents == o.rents &&
|
419
448
|
royalties == o.royalties &&
|
@@ -432,16 +461,13 @@ module AvalaraSdk::A1099::V2
|
|
432
461
|
nonqualified_deferred_compensation == o.nonqualified_deferred_compensation &&
|
433
462
|
type == o.type &&
|
434
463
|
issuer_id == o.issuer_id &&
|
435
|
-
issuer_reference_id == o.issuer_reference_id &&
|
436
|
-
issuer_tin == o.issuer_tin &&
|
437
|
-
tax_year == o.tax_year &&
|
438
464
|
reference_id == o.reference_id &&
|
439
465
|
recipient_name == o.recipient_name &&
|
440
466
|
recipient_tin == o.recipient_tin &&
|
441
467
|
tin_type == o.tin_type &&
|
442
468
|
recipient_second_name == o.recipient_second_name &&
|
443
|
-
|
444
|
-
|
469
|
+
address == o.address &&
|
470
|
+
address2 == o.address2 &&
|
445
471
|
city == o.city &&
|
446
472
|
state == o.state &&
|
447
473
|
zip == o.zip &&
|
@@ -454,7 +480,8 @@ module AvalaraSdk::A1099::V2
|
|
454
480
|
postal_mail == o.postal_mail &&
|
455
481
|
state_e_file == o.state_e_file &&
|
456
482
|
tin_match == o.tin_match &&
|
457
|
-
address_verification == o.address_verification
|
483
|
+
address_verification == o.address_verification &&
|
484
|
+
state_and_local_withholding == o.state_and_local_withholding
|
458
485
|
end
|
459
486
|
|
460
487
|
# @see the `==` method
|
@@ -466,7 +493,7 @@ module AvalaraSdk::A1099::V2
|
|
466
493
|
# Calculates hash code according to all attributes.
|
467
494
|
# @return [Integer] Hash code
|
468
495
|
def hash
|
469
|
-
[
|
496
|
+
[second_tin_notice, rents, royalties, other_income, fed_income_tax_withheld, fishing_boat_proceeds, medical_health_care_payments, payer_made_direct_sales, substitute_payments, crop_insurance_proceeds, gross_proceeds_paid_to_attorney, fish_purchased_for_resale, section409_a_deferrals, fatca_filing_requirement, excess_golden_parachute_payments, nonqualified_deferred_compensation, 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
|
470
497
|
end
|
471
498
|
|
472
499
|
# Builds the object from hash
|