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.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -3
  3. data/docs/A1099/V2/BulkUpsert1099FormsRequest.md +3 -1
  4. data/docs/A1099/V2/CompaniesW9Api.md +45 -31
  5. data/docs/A1099/V2/CoveredIndividualReference.md +58 -0
  6. data/docs/A1099/V2/CoveredIndividualRequest.md +54 -0
  7. data/docs/A1099/V2/Form1095B.md +86 -0
  8. data/docs/A1099/V2/Form1095BList.md +20 -0
  9. data/docs/A1099/V2/Form1095BListItem.md +74 -0
  10. data/docs/A1099/V2/Form1095BRequest.md +76 -0
  11. data/docs/A1099/V2/Form1099Base.md +8 -8
  12. data/docs/A1099/V2/Form1099DivListItem.md +11 -11
  13. data/docs/A1099/V2/Form1099DivRequest.md +11 -17
  14. data/docs/A1099/V2/Form1099DivResponse.md +88 -0
  15. data/docs/A1099/V2/Form1099K.md +8 -8
  16. data/docs/A1099/V2/Form1099KListItem.md +11 -11
  17. data/docs/A1099/V2/Form1099KRequest.md +11 -17
  18. data/docs/A1099/V2/Form1099List.md +1 -1
  19. data/docs/A1099/V2/Form1099ListDataInner.md +32 -0
  20. data/docs/A1099/V2/Form1099Misc.md +8 -8
  21. data/docs/A1099/V2/Form1099MiscListItem.md +11 -11
  22. data/docs/A1099/V2/Form1099MiscRequest.md +11 -17
  23. data/docs/A1099/V2/Form1099MiscResponse.md +120 -0
  24. data/docs/A1099/V2/Form1099Nec.md +8 -8
  25. data/docs/A1099/V2/Form1099NecListItem.md +11 -11
  26. data/docs/A1099/V2/Form1099NecRequest.md +11 -17
  27. data/docs/A1099/V2/Form1099NecResponse.md +96 -0
  28. data/docs/A1099/V2/Form1099R.md +8 -8
  29. data/docs/A1099/V2/Form1099RListItem.md +11 -11
  30. data/docs/A1099/V2/Form1099RRequest.md +11 -17
  31. data/docs/A1099/V2/FormRequestBase.md +9 -13
  32. data/docs/A1099/V2/FormRequestCsvBase.md +66 -0
  33. data/docs/A1099/V2/FormResponseBase.md +43 -9
  34. data/docs/A1099/V2/FormSingleRequestBase.md +11 -15
  35. data/docs/A1099/V2/Forms1099Api.md +75 -57
  36. data/docs/A1099/V2/FormsW9Api.md +63 -123
  37. data/docs/A1099/V2/Get1099Form200Response.md +55 -0
  38. data/docs/A1099/V2/IncludedBase.md +20 -0
  39. data/docs/A1099/V2/Issuers1099Api.md +45 -31
  40. data/docs/A1099/V2/Jobs1099Api.md +10 -6
  41. data/docs/A1099/V2/StateAndLocalWithholdingResponse.md +32 -0
  42. data/docs/A1099/V2/StateEfileStatusDetail.md +1 -1
  43. data/docs/A1099/V2/StateEfileStatusDetailApp.md +22 -0
  44. data/docs/A1099/V2/StatusDetail.md +20 -0
  45. data/docs/A1099/V2/Update1099Form200Response.md +53 -0
  46. data/docs/A1099/V2/ValidationErrorApp.md +20 -0
  47. data/docs/EInvoicing/V1/DataInputFieldsApi.md +4 -4
  48. data/docs/EInvoicing/V1/DocumentsApi.md +2 -2
  49. data/docs/EInvoicing/V1/MandatesApi.md +4 -4
  50. data/docs/EInvoicing/V1/SubscriptionsApi.md +4 -4
  51. data/docs/EInvoicing/V1/TradingPartnersApi.md +4 -4
  52. data/lib/avalara_sdk/api/A1099/V2/companies_w9_api.rb +103 -43
  53. data/lib/avalara_sdk/api/A1099/V2/forms1099_api.rb +171 -87
  54. data/lib/avalara_sdk/api/A1099/V2/forms_w9_api.rb +135 -176
  55. data/lib/avalara_sdk/api/A1099/V2/issuers1099_api.rb +103 -43
  56. data/lib/avalara_sdk/api/A1099/V2/jobs1099_api.rb +19 -7
  57. data/lib/avalara_sdk/api/EInvoicing/V1/data_input_fields_api.rb +6 -6
  58. data/lib/avalara_sdk/api/EInvoicing/V1/documents_api.rb +4 -4
  59. data/lib/avalara_sdk/api/EInvoicing/V1/interop_api.rb +1 -1
  60. data/lib/avalara_sdk/api/EInvoicing/V1/mandates_api.rb +6 -6
  61. data/lib/avalara_sdk/api/EInvoicing/V1/subscriptions_api.rb +6 -6
  62. data/lib/avalara_sdk/api/EInvoicing/V1/trading_partners_api.rb +7 -7
  63. data/lib/avalara_sdk/models/A1099/V2/bulk_upsert1099_forms_request.rb +1 -0
  64. data/lib/avalara_sdk/models/A1099/V2/covered_individual_reference.rb +403 -0
  65. data/lib/avalara_sdk/models/A1099/V2/covered_individual_request.rb +378 -0
  66. data/lib/avalara_sdk/models/A1099/V2/form1095_b.rb +572 -0
  67. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list.rb +238 -0
  68. data/lib/avalara_sdk/models/A1099/V2/form1095_b_list_item.rb +538 -0
  69. data/lib/avalara_sdk/models/A1099/V2/form1095_b_request.rb +559 -0
  70. data/lib/avalara_sdk/models/A1099/V2/form1099_base.rb +29 -29
  71. data/lib/avalara_sdk/models/A1099/V2/form1099_div_list_item.rb +78 -36
  72. data/lib/avalara_sdk/models/A1099/V2/form1099_div_request.rb +80 -53
  73. data/lib/avalara_sdk/models/A1099/V2/form1099_div_response.rb +600 -0
  74. data/lib/avalara_sdk/models/A1099/V2/form1099_k.rb +29 -29
  75. data/lib/avalara_sdk/models/A1099/V2/form1099_k_list_item.rb +56 -37
  76. data/lib/avalara_sdk/models/A1099/V2/form1099_k_request.rb +80 -54
  77. data/lib/avalara_sdk/models/A1099/V2/form1099_list.rb +1 -1
  78. data/lib/avalara_sdk/models/A1099/V2/form1099_list_data_inner.rb +20 -68
  79. data/lib/avalara_sdk/models/A1099/V2/form1099_misc.rb +29 -29
  80. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_list_item.rb +78 -36
  81. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_request.rb +80 -53
  82. data/lib/avalara_sdk/models/A1099/V2/form1099_misc_response.rb +744 -0
  83. data/lib/avalara_sdk/models/A1099/V2/form1099_nec.rb +29 -29
  84. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_list_item.rb +78 -36
  85. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_request.rb +80 -53
  86. data/lib/avalara_sdk/models/A1099/V2/form1099_nec_response.rb +636 -0
  87. data/lib/avalara_sdk/models/A1099/V2/form1099_r.rb +29 -29
  88. data/lib/avalara_sdk/models/A1099/V2/form1099_r_list_item.rb +56 -36
  89. data/lib/avalara_sdk/models/A1099/V2/form1099_r_request.rb +80 -53
  90. data/lib/avalara_sdk/models/A1099/V2/form_request_base.rb +68 -44
  91. data/lib/avalara_sdk/models/A1099/V2/form_request_csv_base.rb +475 -0
  92. data/lib/avalara_sdk/models/A1099/V2/form_response_base.rb +252 -31
  93. data/lib/avalara_sdk/models/A1099/V2/form_single_request_base.rb +80 -44
  94. data/lib/avalara_sdk/models/A1099/V2/get1099_form200_response.rb +104 -0
  95. data/lib/avalara_sdk/models/A1099/V2/included_base.rb +219 -0
  96. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_request.rb +1 -0
  97. data/lib/avalara_sdk/models/A1099/V2/state_and_local_withholding_response.rb +274 -0
  98. data/lib/avalara_sdk/models/A1099/V2/state_efile_status_detail_app.rb +231 -0
  99. data/lib/avalara_sdk/models/A1099/V2/status_detail.rb +221 -0
  100. data/lib/avalara_sdk/models/A1099/V2/update1099_form200_response.rb +103 -0
  101. data/lib/avalara_sdk/models/A1099/V2/validation_error_app.rb +229 -0
  102. data/lib/avalara_sdk/version.rb +1 -1
  103. data/lib/avalara_sdk.rb +17 -0
  104. data/spec/integration/a1099_spec.rb +12 -12
  105. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-11.1.3/gem_make.out +5 -5
  106. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.4.1/gem_make.out +5 -5
  107. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debase-0.2.9/gem_make.out +5 -5
  108. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/debug-1.10.0/gem_make.out +5 -5
  109. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/erb-5.0.1/gem_make.out +5 -5
  110. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.0/gem_make.out +5 -5
  111. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/json-2.12.2/gem_make.out +5 -5
  112. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/prism-1.4.0/gem_make.out +5 -5
  113. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.2.6/gem_make.out +5 -5
  114. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  115. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.1.7/gem_make.out +5 -5
  116. metadata +36 -2
@@ -53,17 +53,17 @@ module AvalaraSdk::A1099::V2
53
53
 
54
54
  attr_accessor :email
55
55
 
56
- attr_accessor :type_of_tin
56
+ attr_accessor :tin_type
57
57
 
58
58
  attr_accessor :tin
59
59
 
60
- attr_accessor :first_payee_name
60
+ attr_accessor :recipient_name
61
61
 
62
- attr_accessor :second_payee_name
62
+ attr_accessor :recipient_second_name
63
63
 
64
64
  attr_accessor :address
65
65
 
66
- attr_accessor :address_recipient_second
66
+ attr_accessor :address2
67
67
 
68
68
  attr_accessor :city
69
69
 
@@ -107,12 +107,12 @@ module AvalaraSdk::A1099::V2
107
107
  :'address_verification_status' => :'addressVerificationStatus',
108
108
  :'reference_id' => :'referenceId',
109
109
  :'email' => :'email',
110
- :'type_of_tin' => :'typeOfTin',
110
+ :'tin_type' => :'tinType',
111
111
  :'tin' => :'tin',
112
- :'first_payee_name' => :'firstPayeeName',
113
- :'second_payee_name' => :'secondPayeeName',
112
+ :'recipient_name' => :'recipientName',
113
+ :'recipient_second_name' => :'recipientSecondName',
114
114
  :'address' => :'address',
115
- :'address_recipient_second' => :'addressRecipientSecond',
115
+ :'address2' => :'address2',
116
116
  :'city' => :'city',
117
117
  :'state' => :'state',
118
118
  :'zip' => :'zip',
@@ -154,12 +154,12 @@ module AvalaraSdk::A1099::V2
154
154
  :'address_verification_status' => :'Form1099StatusDetail',
155
155
  :'reference_id' => :'String',
156
156
  :'email' => :'String',
157
- :'type_of_tin' => :'String',
157
+ :'tin_type' => :'String',
158
158
  :'tin' => :'String',
159
- :'first_payee_name' => :'String',
160
- :'second_payee_name' => :'String',
159
+ :'recipient_name' => :'String',
160
+ :'recipient_second_name' => :'String',
161
161
  :'address' => :'String',
162
- :'address_recipient_second' => :'String',
162
+ :'address2' => :'String',
163
163
  :'city' => :'String',
164
164
  :'state' => :'String',
165
165
  :'zip' => :'String',
@@ -185,12 +185,12 @@ module AvalaraSdk::A1099::V2
185
185
  :'address_verification_status',
186
186
  :'reference_id',
187
187
  :'email',
188
- :'type_of_tin',
188
+ :'tin_type',
189
189
  :'tin',
190
- :'first_payee_name',
191
- :'second_payee_name',
190
+ :'recipient_name',
191
+ :'recipient_second_name',
192
192
  :'address',
193
- :'address_recipient_second',
193
+ :'address2',
194
194
  :'city',
195
195
  :'state',
196
196
  :'zip',
@@ -309,28 +309,28 @@ module AvalaraSdk::A1099::V2
309
309
  self.email = attributes[:'email']
310
310
  end
311
311
 
312
- if attributes.key?(:'type_of_tin')
313
- self.type_of_tin = attributes[:'type_of_tin']
312
+ if attributes.key?(:'tin_type')
313
+ self.tin_type = attributes[:'tin_type']
314
314
  end
315
315
 
316
316
  if attributes.key?(:'tin')
317
317
  self.tin = attributes[:'tin']
318
318
  end
319
319
 
320
- if attributes.key?(:'first_payee_name')
321
- self.first_payee_name = attributes[:'first_payee_name']
320
+ if attributes.key?(:'recipient_name')
321
+ self.recipient_name = attributes[:'recipient_name']
322
322
  end
323
323
 
324
- if attributes.key?(:'second_payee_name')
325
- self.second_payee_name = attributes[:'second_payee_name']
324
+ if attributes.key?(:'recipient_second_name')
325
+ self.recipient_second_name = attributes[:'recipient_second_name']
326
326
  end
327
327
 
328
328
  if attributes.key?(:'address')
329
329
  self.address = attributes[:'address']
330
330
  end
331
331
 
332
- if attributes.key?(:'address_recipient_second')
333
- self.address_recipient_second = attributes[:'address_recipient_second']
332
+ if attributes.key?(:'address2')
333
+ self.address2 = attributes[:'address2']
334
334
  end
335
335
 
336
336
  if attributes.key?(:'city')
@@ -425,12 +425,12 @@ module AvalaraSdk::A1099::V2
425
425
  address_verification_status == o.address_verification_status &&
426
426
  reference_id == o.reference_id &&
427
427
  email == o.email &&
428
- type_of_tin == o.type_of_tin &&
428
+ tin_type == o.tin_type &&
429
429
  tin == o.tin &&
430
- first_payee_name == o.first_payee_name &&
431
- second_payee_name == o.second_payee_name &&
430
+ recipient_name == o.recipient_name &&
431
+ recipient_second_name == o.recipient_second_name &&
432
432
  address == o.address &&
433
- address_recipient_second == o.address_recipient_second &&
433
+ address2 == o.address2 &&
434
434
  city == o.city &&
435
435
  state == o.state &&
436
436
  zip == o.zip &&
@@ -451,7 +451,7 @@ module AvalaraSdk::A1099::V2
451
451
  # Calculates hash code according to all attributes.
452
452
  # @return [Integer] Hash code
453
453
  def hash
454
- [nonemployee_compensation, federal_income_tax_withheld, direct_sales_indicator, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, type_of_tin, tin, first_payee_name, second_payee_name, address, address_recipient_second, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash
454
+ [nonemployee_compensation, federal_income_tax_withheld, direct_sales_indicator, id, type, issuer_id, issuer_reference_id, issuer_tin, tax_year, federal_efile, federal_efile_status, state_efile, state_efile_status, postal_mail, postal_mail_status, tin_match, tin_match_status, address_verification, address_verification_status, reference_id, email, tin_type, tin, recipient_name, recipient_second_name, address, address2, city, state, zip, foreign_province, country_code, validation_errors, created_at, updated_at, state_and_local_withholding].hash
455
455
  end
456
456
 
457
457
  # Builds the object from hash
@@ -11,8 +11,6 @@ require 'time'
11
11
 
12
12
  module AvalaraSdk::A1099::V2
13
13
  class Form1099NecListItem
14
- attr_accessor :state_and_local_withholding
15
-
16
14
  attr_accessor :second_tin_notice
17
15
 
18
16
  attr_accessor :nonemployee_compensation
@@ -21,14 +19,14 @@ module AvalaraSdk::A1099::V2
21
19
 
22
20
  attr_accessor :federal_income_tax_withheld
23
21
 
24
- attr_accessor :issuer_id
25
-
26
22
  attr_accessor :issuer_reference_id
27
23
 
28
24
  attr_accessor :issuer_tin
29
25
 
30
26
  attr_accessor :tax_year
31
27
 
28
+ attr_accessor :issuer_id
29
+
32
30
  attr_accessor :reference_id
33
31
 
34
32
  attr_accessor :recipient_name
@@ -39,9 +37,9 @@ module AvalaraSdk::A1099::V2
39
37
 
40
38
  attr_accessor :recipient_second_name
41
39
 
42
- attr_accessor :street_address
40
+ attr_accessor :address
43
41
 
44
- attr_accessor :street_address_line2
42
+ attr_accessor :address2
45
43
 
46
44
  attr_accessor :city
47
45
 
@@ -69,25 +67,48 @@ module AvalaraSdk::A1099::V2
69
67
 
70
68
  attr_accessor :address_verification
71
69
 
70
+ attr_accessor :state_and_local_withholding
71
+
72
+ class EnumAttributeValidator
73
+ attr_reader :datatype
74
+ attr_reader :allowable_values
75
+
76
+ def initialize(datatype, allowable_values)
77
+ @allowable_values = allowable_values.map do |value|
78
+ case datatype.to_s
79
+ when /Integer/i
80
+ value.to_i
81
+ when /Float/i
82
+ value.to_f
83
+ else
84
+ value
85
+ end
86
+ end
87
+ end
88
+
89
+ def valid?(value)
90
+ !value || allowable_values.include?(value)
91
+ end
92
+ end
93
+
72
94
  # Attribute mapping from ruby-style variable name to JSON key.
73
95
  def self.attribute_map
74
96
  {
75
- :'state_and_local_withholding' => :'stateAndLocalWithholding',
76
97
  :'second_tin_notice' => :'secondTinNotice',
77
98
  :'nonemployee_compensation' => :'nonemployeeCompensation',
78
99
  :'payer_made_direct_sales' => :'payerMadeDirectSales',
79
100
  :'federal_income_tax_withheld' => :'federalIncomeTaxWithheld',
80
- :'issuer_id' => :'issuerId',
81
101
  :'issuer_reference_id' => :'issuerReferenceId',
82
102
  :'issuer_tin' => :'issuerTin',
83
103
  :'tax_year' => :'taxYear',
104
+ :'issuer_id' => :'issuerId',
84
105
  :'reference_id' => :'referenceId',
85
106
  :'recipient_name' => :'recipientName',
86
107
  :'recipient_tin' => :'recipientTin',
87
108
  :'tin_type' => :'tinType',
88
109
  :'recipient_second_name' => :'recipientSecondName',
89
- :'street_address' => :'streetAddress',
90
- :'street_address_line2' => :'streetAddressLine2',
110
+ :'address' => :'address',
111
+ :'address2' => :'address2',
91
112
  :'city' => :'city',
92
113
  :'state' => :'state',
93
114
  :'zip' => :'zip',
@@ -100,7 +121,8 @@ module AvalaraSdk::A1099::V2
100
121
  :'postal_mail' => :'postalMail',
101
122
  :'state_e_file' => :'stateEFile',
102
123
  :'tin_match' => :'tinMatch',
103
- :'address_verification' => :'addressVerification'
124
+ :'address_verification' => :'addressVerification',
125
+ :'state_and_local_withholding' => :'stateAndLocalWithholding'
104
126
  }
105
127
  end
106
128
 
@@ -112,22 +134,21 @@ module AvalaraSdk::A1099::V2
112
134
  # Attribute type mapping.
113
135
  def self.openapi_types
114
136
  {
115
- :'state_and_local_withholding' => :'StateAndLocalWithholding',
116
137
  :'second_tin_notice' => :'Boolean',
117
138
  :'nonemployee_compensation' => :'Float',
118
139
  :'payer_made_direct_sales' => :'Boolean',
119
140
  :'federal_income_tax_withheld' => :'Float',
120
- :'issuer_id' => :'String',
121
141
  :'issuer_reference_id' => :'String',
122
142
  :'issuer_tin' => :'String',
123
143
  :'tax_year' => :'Integer',
144
+ :'issuer_id' => :'String',
124
145
  :'reference_id' => :'String',
125
146
  :'recipient_name' => :'String',
126
147
  :'recipient_tin' => :'String',
127
- :'tin_type' => :'Integer',
148
+ :'tin_type' => :'String',
128
149
  :'recipient_second_name' => :'String',
129
- :'street_address' => :'String',
130
- :'street_address_line2' => :'String',
150
+ :'address' => :'String',
151
+ :'address2' => :'String',
131
152
  :'city' => :'String',
132
153
  :'state' => :'String',
133
154
  :'zip' => :'String',
@@ -140,20 +161,29 @@ module AvalaraSdk::A1099::V2
140
161
  :'postal_mail' => :'Boolean',
141
162
  :'state_e_file' => :'Boolean',
142
163
  :'tin_match' => :'Boolean',
143
- :'address_verification' => :'Boolean'
164
+ :'address_verification' => :'Boolean',
165
+ :'state_and_local_withholding' => :'StateAndLocalWithholdingRequest'
144
166
  }
145
167
  end
146
168
 
147
169
  # List of attributes with nullable: true
148
170
  def self.openapi_nullable
149
171
  Set.new([
172
+ :'issuer_id',
173
+ :'reference_id',
174
+ :'recipient_name',
175
+ :'address2',
176
+ :'recipient_email',
177
+ :'account_number',
178
+ :'office_code',
179
+ :'recipient_non_us_province',
150
180
  ])
151
181
  end
152
182
 
153
183
  # List of class defined in allOf (OpenAPI v3)
154
184
  def self.openapi_all_of
155
185
  [
156
- :'FormRequestBase'
186
+ :'FormRequestCsvBase'
157
187
  ]
158
188
  end
159
189
 
@@ -172,10 +202,6 @@ module AvalaraSdk::A1099::V2
172
202
  h[k.to_sym] = v
173
203
  }
174
204
 
175
- if attributes.key?(:'state_and_local_withholding')
176
- self.state_and_local_withholding = attributes[:'state_and_local_withholding']
177
- end
178
-
179
205
  if attributes.key?(:'second_tin_notice')
180
206
  self.second_tin_notice = attributes[:'second_tin_notice']
181
207
  end
@@ -192,10 +218,6 @@ module AvalaraSdk::A1099::V2
192
218
  self.federal_income_tax_withheld = attributes[:'federal_income_tax_withheld']
193
219
  end
194
220
 
195
- if attributes.key?(:'issuer_id')
196
- self.issuer_id = attributes[:'issuer_id']
197
- end
198
-
199
221
  if attributes.key?(:'issuer_reference_id')
200
222
  self.issuer_reference_id = attributes[:'issuer_reference_id']
201
223
  end
@@ -208,6 +230,10 @@ module AvalaraSdk::A1099::V2
208
230
  self.tax_year = attributes[:'tax_year']
209
231
  end
210
232
 
233
+ if attributes.key?(:'issuer_id')
234
+ self.issuer_id = attributes[:'issuer_id']
235
+ end
236
+
211
237
  if attributes.key?(:'reference_id')
212
238
  self.reference_id = attributes[:'reference_id']
213
239
  end
@@ -228,12 +254,12 @@ module AvalaraSdk::A1099::V2
228
254
  self.recipient_second_name = attributes[:'recipient_second_name']
229
255
  end
230
256
 
231
- if attributes.key?(:'street_address')
232
- self.street_address = attributes[:'street_address']
257
+ if attributes.key?(:'address')
258
+ self.address = attributes[:'address']
233
259
  end
234
260
 
235
- if attributes.key?(:'street_address_line2')
236
- self.street_address_line2 = attributes[:'street_address_line2']
261
+ if attributes.key?(:'address2')
262
+ self.address2 = attributes[:'address2']
237
263
  end
238
264
 
239
265
  if attributes.key?(:'city')
@@ -287,6 +313,10 @@ module AvalaraSdk::A1099::V2
287
313
  if attributes.key?(:'address_verification')
288
314
  self.address_verification = attributes[:'address_verification']
289
315
  end
316
+
317
+ if attributes.key?(:'state_and_local_withholding')
318
+ self.state_and_local_withholding = attributes[:'state_and_local_withholding']
319
+ end
290
320
  end
291
321
 
292
322
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -301,30 +331,41 @@ module AvalaraSdk::A1099::V2
301
331
  # @return true if the model is valid
302
332
  def valid?
303
333
  warn '[DEPRECATED] the `valid?` method is obsolete'
334
+ tin_type_validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
335
+ return false unless tin_type_validator.valid?(@tin_type)
304
336
  true
305
337
  end
306
338
 
339
+ # Custom attribute writer method checking allowed values (enum).
340
+ # @param [Object] tin_type Object to be assigned
341
+ def tin_type=(tin_type)
342
+ validator = EnumAttributeValidator.new('String', ["EIN", "SSN", "ITIN", "ATIN"])
343
+ unless validator.valid?(tin_type)
344
+ fail ArgumentError, "invalid value for \"tin_type\", must be one of #{validator.allowable_values}."
345
+ end
346
+ @tin_type = tin_type
347
+ end
348
+
307
349
  # Checks equality by comparing each attribute.
308
350
  # @param [Object] Object to be compared
309
351
  def ==(o)
310
352
  return true if self.equal?(o)
311
353
  self.class == o.class &&
312
- state_and_local_withholding == o.state_and_local_withholding &&
313
354
  second_tin_notice == o.second_tin_notice &&
314
355
  nonemployee_compensation == o.nonemployee_compensation &&
315
356
  payer_made_direct_sales == o.payer_made_direct_sales &&
316
357
  federal_income_tax_withheld == o.federal_income_tax_withheld &&
317
- issuer_id == o.issuer_id &&
318
358
  issuer_reference_id == o.issuer_reference_id &&
319
359
  issuer_tin == o.issuer_tin &&
320
360
  tax_year == o.tax_year &&
361
+ issuer_id == o.issuer_id &&
321
362
  reference_id == o.reference_id &&
322
363
  recipient_name == o.recipient_name &&
323
364
  recipient_tin == o.recipient_tin &&
324
365
  tin_type == o.tin_type &&
325
366
  recipient_second_name == o.recipient_second_name &&
326
- street_address == o.street_address &&
327
- street_address_line2 == o.street_address_line2 &&
367
+ address == o.address &&
368
+ address2 == o.address2 &&
328
369
  city == o.city &&
329
370
  state == o.state &&
330
371
  zip == o.zip &&
@@ -337,7 +378,8 @@ module AvalaraSdk::A1099::V2
337
378
  postal_mail == o.postal_mail &&
338
379
  state_e_file == o.state_e_file &&
339
380
  tin_match == o.tin_match &&
340
- address_verification == o.address_verification
381
+ address_verification == o.address_verification &&
382
+ state_and_local_withholding == o.state_and_local_withholding
341
383
  end
342
384
 
343
385
  # @see the `==` method
@@ -349,7 +391,7 @@ module AvalaraSdk::A1099::V2
349
391
  # Calculates hash code according to all attributes.
350
392
  # @return [Integer] Hash code
351
393
  def hash
352
- [state_and_local_withholding, second_tin_notice, nonemployee_compensation, payer_made_direct_sales, federal_income_tax_withheld, issuer_id, issuer_reference_id, issuer_tin, tax_year, reference_id, recipient_name, recipient_tin, tin_type, recipient_second_name, street_address, street_address_line2, 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].hash
394
+ [second_tin_notice, nonemployee_compensation, payer_made_direct_sales, federal_income_tax_withheld, 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
353
395
  end
354
396
 
355
397
  # Builds the object from hash