trustcomponent 0.0.1.beta.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 (86) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +21 -0
  3. data/README.md +78 -0
  4. data/lib/trustcomponent/captcha.rb +24 -0
  5. data/lib/trustcomponent/client.rb +44 -0
  6. data/lib/trustcomponent/errors.rb +58 -0
  7. data/lib/trustcomponent/http_middleware.rb +83 -0
  8. data/lib/trustcomponent.rb +15 -0
  9. data/lib/trustcomponent_generated/api/analytics_server_events_api.rb +90 -0
  10. data/lib/trustcomponent_generated/api/analytics_websites_api.rb +527 -0
  11. data/lib/trustcomponent_generated/api/captcha_verifications_api.rb +88 -0
  12. data/lib/trustcomponent_generated/api/monitoring_heartbeats_api.rb +89 -0
  13. data/lib/trustcomponent_generated/api/platform_events_api.rb +106 -0
  14. data/lib/trustcomponent_generated/api/tax_validation_schedules_api.rb +147 -0
  15. data/lib/trustcomponent_generated/api/tax_validation_validation_results_api.rb +83 -0
  16. data/lib/trustcomponent_generated/api/tax_validation_validations_api.rb +156 -0
  17. data/lib/trustcomponent_generated/api_client.rb +441 -0
  18. data/lib/trustcomponent_generated/api_error.rb +58 -0
  19. data/lib/trustcomponent_generated/api_model_base.rb +88 -0
  20. data/lib/trustcomponent_generated/configuration.rb +400 -0
  21. data/lib/trustcomponent_generated/models/analytics_event_category_enum.rb +52 -0
  22. data/lib/trustcomponent_generated/models/analytics_realtime.rb +251 -0
  23. data/lib/trustcomponent_generated/models/analytics_realtime_page.rb +193 -0
  24. data/lib/trustcomponent_generated/models/analytics_realtime_point.rb +193 -0
  25. data/lib/trustcomponent_generated/models/analytics_server_event_batch_create_params.rb +295 -0
  26. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_commerce_create_params.rb +366 -0
  27. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_commerce_product_create_params.rb +298 -0
  28. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_create_params.rb +508 -0
  29. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_error_create_params.rb +269 -0
  30. data/lib/trustcomponent_generated/models/analytics_server_event_batch_event_refund_create_params.rb +211 -0
  31. data/lib/trustcomponent_generated/models/analytics_server_event_batch_result.rb +194 -0
  32. data/lib/trustcomponent_generated/models/analytics_server_event_batch_result_drop_reason_enum.rb +52 -0
  33. data/lib/trustcomponent_generated/models/analytics_server_event_batch_result_dropped.rb +213 -0
  34. data/lib/trustcomponent_generated/models/analytics_stats_breakdown.rb +351 -0
  35. data/lib/trustcomponent_generated/models/analytics_stats_breakdown_row.rb +201 -0
  36. data/lib/trustcomponent_generated/models/analytics_stats_breakdown_row_page.rb +226 -0
  37. data/lib/trustcomponent_generated/models/analytics_stats_conversions.rb +249 -0
  38. data/lib/trustcomponent_generated/models/analytics_stats_conversions_goal.rb +260 -0
  39. data/lib/trustcomponent_generated/models/analytics_stats_conversions_goal_revenue.rb +193 -0
  40. data/lib/trustcomponent_generated/models/analytics_stats_dimension_enum.rb +69 -0
  41. data/lib/trustcomponent_generated/models/analytics_stats_filter_match_mode_enum.rb +40 -0
  42. data/lib/trustcomponent_generated/models/analytics_stats_filter_operator_enum.rb +45 -0
  43. data/lib/trustcomponent_generated/models/analytics_stats_granularity_enum.rb +40 -0
  44. data/lib/trustcomponent_generated/models/analytics_stats_overview.rb +282 -0
  45. data/lib/trustcomponent_generated/models/analytics_stats_timeseries.rb +270 -0
  46. data/lib/trustcomponent_generated/models/analytics_stats_timeseries_point.rb +192 -0
  47. data/lib/trustcomponent_generated/models/analytics_stats_totals.rb +307 -0
  48. data/lib/trustcomponent_generated/models/analytics_website.rb +249 -0
  49. data/lib/trustcomponent_generated/models/analytics_websites_page.rb +249 -0
  50. data/lib/trustcomponent_generated/models/captcha_verification_result.rb +350 -0
  51. data/lib/trustcomponent_generated/models/platform_event.rb +439 -0
  52. data/lib/trustcomponent_generated/models/platform_event_actor.rb +218 -0
  53. data/lib/trustcomponent_generated/models/platform_event_actor_automation.rb +214 -0
  54. data/lib/trustcomponent_generated/models/platform_event_actor_automation_kind_enum.rb +41 -0
  55. data/lib/trustcomponent_generated/models/platform_event_actor_type_enum.rb +43 -0
  56. data/lib/trustcomponent_generated/models/platform_event_change.rb +263 -0
  57. data/lib/trustcomponent_generated/models/platform_event_change_operation_enum.rb +43 -0
  58. data/lib/trustcomponent_generated/models/platform_event_origin.rb +263 -0
  59. data/lib/trustcomponent_generated/models/platform_event_ref.rb +204 -0
  60. data/lib/trustcomponent_generated/models/platform_event_source_enum.rb +44 -0
  61. data/lib/trustcomponent_generated/models/platform_events_page.rb +314 -0
  62. data/lib/trustcomponent_generated/models/tax_validation_match_status_enum.rb +44 -0
  63. data/lib/trustcomponent_generated/models/tax_validation_provider_enum.rb +46 -0
  64. data/lib/trustcomponent_generated/models/tax_validation_provider_status_enum.rb +51 -0
  65. data/lib/trustcomponent_generated/models/tax_validation_schedule.rb +423 -0
  66. data/lib/trustcomponent_generated/models/tax_validation_schedule_create_params.rb +321 -0
  67. data/lib/trustcomponent_generated/models/tax_validation_tax_address.rb +188 -0
  68. data/lib/trustcomponent_generated/models/tax_validation_tax_identifier_scheme_enum.rb +49 -0
  69. data/lib/trustcomponent_generated/models/tax_validation_validation.rb +372 -0
  70. data/lib/trustcomponent_generated/models/tax_validation_validation_address_match.rb +290 -0
  71. data/lib/trustcomponent_generated/models/tax_validation_validation_batch_create_params.rb +176 -0
  72. data/lib/trustcomponent_generated/models/tax_validation_validation_create_params.rb +292 -0
  73. data/lib/trustcomponent_generated/models/tax_validation_validation_frequency_enum.rb +41 -0
  74. data/lib/trustcomponent_generated/models/tax_validation_validation_input.rb +322 -0
  75. data/lib/trustcomponent_generated/models/tax_validation_validation_match.rb +238 -0
  76. data/lib/trustcomponent_generated/models/tax_validation_validation_mode_enum.rb +40 -0
  77. data/lib/trustcomponent_generated/models/tax_validation_validation_outcome_enum.rb +44 -0
  78. data/lib/trustcomponent_generated/models/tax_validation_validation_request_status_enum.rb +44 -0
  79. data/lib/trustcomponent_generated/models/tax_validation_validation_response_data.rb +177 -0
  80. data/lib/trustcomponent_generated/models/tax_validation_validation_result.rb +459 -0
  81. data/lib/trustcomponent_generated/models/tax_validation_validation_schedule_attach_params.rb +225 -0
  82. data/lib/trustcomponent_generated/models/tax_validation_verification_method_enum.rb +40 -0
  83. data/lib/trustcomponent_generated/modules.rb +51 -0
  84. data/lib/trustcomponent_generated/version.rb +15 -0
  85. data/lib/trustcomponent_generated.rb +110 -0
  86. metadata +190 -0
@@ -0,0 +1,177 @@
1
+ =begin
2
+ #TrustComponent API
3
+
4
+ #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
+
6
+ The version of the OpenAPI document: 0.0.1-beta.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrustComponent::Generated
17
+ class TaxValidationValidationResponseData < ApiModelBase
18
+ attr_accessor :company_name
19
+
20
+ attr_accessor :address
21
+
22
+ attr_accessor :source_reference
23
+
24
+ attr_accessor :provider_message
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'company_name' => :'companyName',
30
+ :'address' => :'address',
31
+ :'source_reference' => :'sourceReference',
32
+ :'provider_message' => :'providerMessage'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'company_name' => :'String',
50
+ :'address' => :'TaxValidationTaxAddress',
51
+ :'source_reference' => :'String',
52
+ :'provider_message' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'company_name',
60
+ :'source_reference',
61
+ :'provider_message'
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrustComponent::Generated::TaxValidationValidationResponseData` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ acceptable_attribute_map = self.class.acceptable_attribute_map
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!acceptable_attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrustComponent::Generated::TaxValidationValidationResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'company_name')
82
+ self.company_name = attributes[:'company_name']
83
+ end
84
+
85
+ if attributes.key?(:'address')
86
+ self.address = attributes[:'address']
87
+ end
88
+
89
+ if attributes.key?(:'source_reference')
90
+ self.source_reference = attributes[:'source_reference']
91
+ end
92
+
93
+ if attributes.key?(:'provider_message')
94
+ self.provider_message = attributes[:'provider_message']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ warn '[DEPRECATED] the `valid?` method is obsolete'
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ company_name == o.company_name &&
119
+ address == o.address &&
120
+ source_reference == o.source_reference &&
121
+ provider_message == o.provider_message
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ def hash
133
+ [company_name, address, source_reference, provider_message].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def self.build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
142
+ transformed_hash = {}
143
+ openapi_types.each_pair do |key, type|
144
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = nil
146
+ elsif type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[attribute_map[key]].is_a?(Array)
150
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
151
+ end
152
+ elsif !attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
154
+ end
155
+ end
156
+ new(transformed_hash)
157
+ end
158
+
159
+ # Returns the object in the form of hash
160
+ # @return [Hash] Returns the object in the form of hash
161
+ def to_hash
162
+ hash = {}
163
+ self.class.attribute_map.each_pair do |attr, param|
164
+ value = self.send(attr)
165
+ if value.nil?
166
+ is_nullable = self.class.openapi_nullable.include?(attr)
167
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
168
+ end
169
+
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ end
176
+
177
+ end
@@ -0,0 +1,459 @@
1
+ =begin
2
+ #TrustComponent API
3
+
4
+ #The public API of every TrustComponent module, authenticated with an API key (`ak_…`). Each operation carries its own version in its path.
5
+
6
+ The version of the OpenAPI document: 0.0.1-beta.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module TrustComponent::Generated
17
+ class TaxValidationValidationResult < ApiModelBase
18
+ attr_accessor :validation_result_id
19
+
20
+ attr_accessor :tax_identifier_id
21
+
22
+ attr_accessor :created_at
23
+
24
+ attr_accessor :checked_at
25
+
26
+ attr_accessor :input
27
+
28
+ attr_accessor :outcome
29
+
30
+ attr_accessor :provider
31
+
32
+ attr_accessor :provider_status
33
+
34
+ attr_accessor :verification_method
35
+
36
+ attr_accessor :match
37
+
38
+ attr_accessor :response_data
39
+
40
+ attr_accessor :comment
41
+
42
+ attr_accessor :idempotency_key
43
+
44
+ attr_accessor :correlation_id
45
+
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'validation_result_id' => :'validationResultId',
72
+ :'tax_identifier_id' => :'taxIdentifierId',
73
+ :'created_at' => :'createdAt',
74
+ :'checked_at' => :'checkedAt',
75
+ :'input' => :'input',
76
+ :'outcome' => :'outcome',
77
+ :'provider' => :'provider',
78
+ :'provider_status' => :'providerStatus',
79
+ :'verification_method' => :'verificationMethod',
80
+ :'match' => :'match',
81
+ :'response_data' => :'responseData',
82
+ :'comment' => :'comment',
83
+ :'idempotency_key' => :'idempotencyKey',
84
+ :'correlation_id' => :'correlationId'
85
+ }
86
+ end
87
+
88
+ # Returns attribute mapping this model knows about
89
+ def self.acceptable_attribute_map
90
+ attribute_map
91
+ end
92
+
93
+ # Returns all the JSON keys this model knows about
94
+ def self.acceptable_attributes
95
+ acceptable_attribute_map.values
96
+ end
97
+
98
+ # Attribute type mapping.
99
+ def self.openapi_types
100
+ {
101
+ :'validation_result_id' => :'String',
102
+ :'tax_identifier_id' => :'String',
103
+ :'created_at' => :'String',
104
+ :'checked_at' => :'String',
105
+ :'input' => :'TaxValidationValidationInput',
106
+ :'outcome' => :'TaxValidationValidationOutcomeEnum',
107
+ :'provider' => :'TaxValidationProviderEnum',
108
+ :'provider_status' => :'TaxValidationProviderStatusEnum',
109
+ :'verification_method' => :'TaxValidationVerificationMethodEnum',
110
+ :'match' => :'TaxValidationValidationMatch',
111
+ :'response_data' => :'TaxValidationValidationResponseData',
112
+ :'comment' => :'String',
113
+ :'idempotency_key' => :'String',
114
+ :'correlation_id' => :'String'
115
+ }
116
+ end
117
+
118
+ # List of attributes with nullable: true
119
+ def self.openapi_nullable
120
+ Set.new([
121
+ :'comment',
122
+ :'idempotency_key',
123
+ :'correlation_id'
124
+ ])
125
+ end
126
+
127
+ # Initializes the object
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ def initialize(attributes = {})
130
+ if (!attributes.is_a?(Hash))
131
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TrustComponent::Generated::TaxValidationValidationResult` initialize method"
132
+ end
133
+
134
+ # check to see if the attribute exists and convert string to symbol for hash key
135
+ acceptable_attribute_map = self.class.acceptable_attribute_map
136
+ attributes = attributes.each_with_object({}) { |(k, v), h|
137
+ if (!acceptable_attribute_map.key?(k.to_sym))
138
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TrustComponent::Generated::TaxValidationValidationResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
139
+ end
140
+ h[k.to_sym] = v
141
+ }
142
+
143
+ if attributes.key?(:'validation_result_id')
144
+ self.validation_result_id = attributes[:'validation_result_id']
145
+ else
146
+ self.validation_result_id = nil
147
+ end
148
+
149
+ if attributes.key?(:'tax_identifier_id')
150
+ self.tax_identifier_id = attributes[:'tax_identifier_id']
151
+ else
152
+ self.tax_identifier_id = nil
153
+ end
154
+
155
+ if attributes.key?(:'created_at')
156
+ self.created_at = attributes[:'created_at']
157
+ else
158
+ self.created_at = nil
159
+ end
160
+
161
+ if attributes.key?(:'checked_at')
162
+ self.checked_at = attributes[:'checked_at']
163
+ else
164
+ self.checked_at = nil
165
+ end
166
+
167
+ if attributes.key?(:'input')
168
+ self.input = attributes[:'input']
169
+ else
170
+ self.input = nil
171
+ end
172
+
173
+ if attributes.key?(:'outcome')
174
+ self.outcome = attributes[:'outcome']
175
+ else
176
+ self.outcome = nil
177
+ end
178
+
179
+ if attributes.key?(:'provider')
180
+ self.provider = attributes[:'provider']
181
+ else
182
+ self.provider = nil
183
+ end
184
+
185
+ if attributes.key?(:'provider_status')
186
+ self.provider_status = attributes[:'provider_status']
187
+ else
188
+ self.provider_status = nil
189
+ end
190
+
191
+ if attributes.key?(:'verification_method')
192
+ self.verification_method = attributes[:'verification_method']
193
+ else
194
+ self.verification_method = nil
195
+ end
196
+
197
+ if attributes.key?(:'match')
198
+ self.match = attributes[:'match']
199
+ else
200
+ self.match = nil
201
+ end
202
+
203
+ if attributes.key?(:'response_data')
204
+ self.response_data = attributes[:'response_data']
205
+ end
206
+
207
+ if attributes.key?(:'comment')
208
+ self.comment = attributes[:'comment']
209
+ end
210
+
211
+ if attributes.key?(:'idempotency_key')
212
+ self.idempotency_key = attributes[:'idempotency_key']
213
+ end
214
+
215
+ if attributes.key?(:'correlation_id')
216
+ self.correlation_id = attributes[:'correlation_id']
217
+ end
218
+ end
219
+
220
+ # Show invalid properties with the reasons. Usually used together with valid?
221
+ # @return Array for valid properties with the reasons
222
+ def list_invalid_properties
223
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
224
+ invalid_properties = Array.new
225
+ if @validation_result_id.nil?
226
+ invalid_properties.push('invalid value for "validation_result_id", validation_result_id cannot be nil.')
227
+ end
228
+
229
+ if @tax_identifier_id.nil?
230
+ invalid_properties.push('invalid value for "tax_identifier_id", tax_identifier_id cannot be nil.')
231
+ end
232
+
233
+ if @created_at.nil?
234
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
235
+ end
236
+
237
+ if @checked_at.nil?
238
+ invalid_properties.push('invalid value for "checked_at", checked_at cannot be nil.')
239
+ end
240
+
241
+ if @input.nil?
242
+ invalid_properties.push('invalid value for "input", input cannot be nil.')
243
+ end
244
+
245
+ if @outcome.nil?
246
+ invalid_properties.push('invalid value for "outcome", outcome cannot be nil.')
247
+ end
248
+
249
+ if @provider.nil?
250
+ invalid_properties.push('invalid value for "provider", provider cannot be nil.')
251
+ end
252
+
253
+ if @provider_status.nil?
254
+ invalid_properties.push('invalid value for "provider_status", provider_status cannot be nil.')
255
+ end
256
+
257
+ if @verification_method.nil?
258
+ invalid_properties.push('invalid value for "verification_method", verification_method cannot be nil.')
259
+ end
260
+
261
+ if @match.nil?
262
+ invalid_properties.push('invalid value for "match", match cannot be nil.')
263
+ end
264
+
265
+ invalid_properties
266
+ end
267
+
268
+ # Check to see if the all the properties in the model are valid
269
+ # @return true if the model is valid
270
+ def valid?
271
+ warn '[DEPRECATED] the `valid?` method is obsolete'
272
+ return false if @validation_result_id.nil?
273
+ return false if @tax_identifier_id.nil?
274
+ return false if @created_at.nil?
275
+ return false if @checked_at.nil?
276
+ return false if @input.nil?
277
+ return false if @outcome.nil?
278
+ return false if @provider.nil?
279
+ return false if @provider_status.nil?
280
+ return false if @verification_method.nil?
281
+ return false if @match.nil?
282
+ true
283
+ end
284
+
285
+ # Custom attribute writer method with validation
286
+ # @param [Object] validation_result_id Value to be assigned
287
+ def validation_result_id=(validation_result_id)
288
+ if validation_result_id.nil?
289
+ fail ArgumentError, 'validation_result_id cannot be nil'
290
+ end
291
+
292
+ @validation_result_id = validation_result_id
293
+ end
294
+
295
+ # Custom attribute writer method with validation
296
+ # @param [Object] tax_identifier_id Value to be assigned
297
+ def tax_identifier_id=(tax_identifier_id)
298
+ if tax_identifier_id.nil?
299
+ fail ArgumentError, 'tax_identifier_id cannot be nil'
300
+ end
301
+
302
+ @tax_identifier_id = tax_identifier_id
303
+ end
304
+
305
+ # Custom attribute writer method with validation
306
+ # @param [Object] created_at Value to be assigned
307
+ def created_at=(created_at)
308
+ if created_at.nil?
309
+ fail ArgumentError, 'created_at cannot be nil'
310
+ end
311
+
312
+ @created_at = created_at
313
+ end
314
+
315
+ # Custom attribute writer method with validation
316
+ # @param [Object] checked_at Value to be assigned
317
+ def checked_at=(checked_at)
318
+ if checked_at.nil?
319
+ fail ArgumentError, 'checked_at cannot be nil'
320
+ end
321
+
322
+ @checked_at = checked_at
323
+ end
324
+
325
+ # Custom attribute writer method with validation
326
+ # @param [Object] input Value to be assigned
327
+ def input=(input)
328
+ if input.nil?
329
+ fail ArgumentError, 'input cannot be nil'
330
+ end
331
+
332
+ @input = input
333
+ end
334
+
335
+ # Custom attribute writer method with validation
336
+ # @param [Object] outcome Value to be assigned
337
+ def outcome=(outcome)
338
+ if outcome.nil?
339
+ fail ArgumentError, 'outcome cannot be nil'
340
+ end
341
+
342
+ @outcome = outcome
343
+ end
344
+
345
+ # Custom attribute writer method with validation
346
+ # @param [Object] provider Value to be assigned
347
+ def provider=(provider)
348
+ if provider.nil?
349
+ fail ArgumentError, 'provider cannot be nil'
350
+ end
351
+
352
+ @provider = provider
353
+ end
354
+
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] provider_status Value to be assigned
357
+ def provider_status=(provider_status)
358
+ if provider_status.nil?
359
+ fail ArgumentError, 'provider_status cannot be nil'
360
+ end
361
+
362
+ @provider_status = provider_status
363
+ end
364
+
365
+ # Custom attribute writer method with validation
366
+ # @param [Object] verification_method Value to be assigned
367
+ def verification_method=(verification_method)
368
+ if verification_method.nil?
369
+ fail ArgumentError, 'verification_method cannot be nil'
370
+ end
371
+
372
+ @verification_method = verification_method
373
+ end
374
+
375
+ # Custom attribute writer method with validation
376
+ # @param [Object] match Value to be assigned
377
+ def match=(match)
378
+ if match.nil?
379
+ fail ArgumentError, 'match cannot be nil'
380
+ end
381
+
382
+ @match = match
383
+ end
384
+
385
+ # Checks equality by comparing each attribute.
386
+ # @param [Object] Object to be compared
387
+ def ==(o)
388
+ return true if self.equal?(o)
389
+ self.class == o.class &&
390
+ validation_result_id == o.validation_result_id &&
391
+ tax_identifier_id == o.tax_identifier_id &&
392
+ created_at == o.created_at &&
393
+ checked_at == o.checked_at &&
394
+ input == o.input &&
395
+ outcome == o.outcome &&
396
+ provider == o.provider &&
397
+ provider_status == o.provider_status &&
398
+ verification_method == o.verification_method &&
399
+ match == o.match &&
400
+ response_data == o.response_data &&
401
+ comment == o.comment &&
402
+ idempotency_key == o.idempotency_key &&
403
+ correlation_id == o.correlation_id
404
+ end
405
+
406
+ # @see the `==` method
407
+ # @param [Object] Object to be compared
408
+ def eql?(o)
409
+ self == o
410
+ end
411
+
412
+ # Calculates hash code according to all attributes.
413
+ # @return [Integer] Hash code
414
+ def hash
415
+ [validation_result_id, tax_identifier_id, created_at, checked_at, input, outcome, provider, provider_status, verification_method, match, response_data, comment, idempotency_key, correlation_id].hash
416
+ end
417
+
418
+ # Builds the object from hash
419
+ # @param [Hash] attributes Model attributes in the form of hash
420
+ # @return [Object] Returns the model itself
421
+ def self.build_from_hash(attributes)
422
+ return nil unless attributes.is_a?(Hash)
423
+ attributes = attributes.transform_keys(&:to_sym)
424
+ transformed_hash = {}
425
+ openapi_types.each_pair do |key, type|
426
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
427
+ transformed_hash["#{key}"] = nil
428
+ elsif type =~ /\AArray<(.*)>/i
429
+ # check to ensure the input is an array given that the attribute
430
+ # is documented as an array but the input is not
431
+ if attributes[attribute_map[key]].is_a?(Array)
432
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
433
+ end
434
+ elsif !attributes[attribute_map[key]].nil?
435
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
436
+ end
437
+ end
438
+ new(transformed_hash)
439
+ end
440
+
441
+ # Returns the object in the form of hash
442
+ # @return [Hash] Returns the object in the form of hash
443
+ def to_hash
444
+ hash = {}
445
+ self.class.attribute_map.each_pair do |attr, param|
446
+ value = self.send(attr)
447
+ if value.nil?
448
+ is_nullable = self.class.openapi_nullable.include?(attr)
449
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
450
+ end
451
+
452
+ hash[param] = _to_hash(value)
453
+ end
454
+ hash
455
+ end
456
+
457
+ end
458
+
459
+ end