plainrouter-sdk 0.1.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 (75) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +202 -0
  3. data/README.md +59 -0
  4. data/lib/plainrouter/client.rb +44 -0
  5. data/lib/plainrouter/openapi/api/event_api.rb +213 -0
  6. data/lib/plainrouter/openapi/api/operations_api.rb +542 -0
  7. data/lib/plainrouter/openapi/api/sandbox_api.rb +272 -0
  8. data/lib/plainrouter/openapi/api_client.rb +441 -0
  9. data/lib/plainrouter/openapi/api_error.rb +58 -0
  10. data/lib/plainrouter/openapi/api_model_base.rb +88 -0
  11. data/lib/plainrouter/openapi/configuration.rb +399 -0
  12. data/lib/plainrouter/openapi/models/create_event200_response.rb +190 -0
  13. data/lib/plainrouter/openapi/models/create_event_request.rb +103 -0
  14. data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +344 -0
  15. data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +346 -0
  16. data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +104 -0
  17. data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +186 -0
  18. data/lib/plainrouter/openapi/models/create_sandbox_key201_response.rb +320 -0
  19. data/lib/plainrouter/openapi/models/create_sandbox_key201_response_use.rb +216 -0
  20. data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +268 -0
  21. data/lib/plainrouter/openapi/models/delete_user_data_request.rb +225 -0
  22. data/lib/plainrouter/openapi/models/delivery_status.rb +49 -0
  23. data/lib/plainrouter/openapi/models/destination.rb +354 -0
  24. data/lib/plainrouter/openapi/models/destination_credential_source.rb +40 -0
  25. data/lib/plainrouter/openapi/models/destination_status.rb +40 -0
  26. data/lib/plainrouter/openapi/models/destination_type.rb +39 -0
  27. data/lib/plainrouter/openapi/models/emq_snapshot.rb +344 -0
  28. data/lib/plainrouter/openapi/models/error_message.rb +164 -0
  29. data/lib/plainrouter/openapi/models/event.rb +782 -0
  30. data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +166 -0
  31. data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +342 -0
  32. data/lib/plainrouter/openapi/models/get_event200_response.rb +218 -0
  33. data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +440 -0
  34. data/lib/plainrouter/openapi/models/get_event200_response_event.rb +624 -0
  35. data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +103 -0
  36. data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +414 -0
  37. data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +178 -0
  38. data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +596 -0
  39. data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +596 -0
  40. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +192 -0
  41. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +476 -0
  42. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +216 -0
  43. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +190 -0
  44. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +103 -0
  45. data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +372 -0
  46. data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +242 -0
  47. data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +242 -0
  48. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +242 -0
  49. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +216 -0
  50. data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +40 -0
  51. data/lib/plainrouter/openapi/models/list_events200_response.rb +190 -0
  52. data/lib/plainrouter/openapi/models/list_events200_response_events.rb +382 -0
  53. data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +202 -0
  54. data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +228 -0
  55. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +190 -0
  56. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +252 -0
  57. data/lib/plainrouter/openapi/models/reconciliation_report.rb +464 -0
  58. data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +242 -0
  59. data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +199 -0
  60. data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +224 -0
  61. data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +103 -0
  62. data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +224 -0
  63. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +190 -0
  64. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +338 -0
  65. data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +189 -0
  66. data/lib/plainrouter/openapi/models/traffic_class.rb +40 -0
  67. data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +320 -0
  68. data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +194 -0
  69. data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +166 -0
  70. data/lib/plainrouter/openapi/models/validation_error.rb +192 -0
  71. data/lib/plainrouter/openapi/version.rb +15 -0
  72. data/lib/plainrouter/openapi.rb +102 -0
  73. data/lib/plainrouter/version.rb +6 -0
  74. data/lib/plainrouter.rb +10 -0
  75. metadata +176 -0
@@ -0,0 +1,624 @@
1
+ =begin
2
+ #PlainRouter Conversion API
3
+
4
+ #PlainRouter public Signals Conversion API.
5
+
6
+ The version of the OpenAPI document: 0.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PlainRouter::OpenAPI
17
+ class GetEvent200ResponseEvent < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :signal_tracker_id
21
+
22
+ attr_accessor :parent_event_id
23
+
24
+ attr_accessor :event_name
25
+
26
+ attr_accessor :event_time
27
+
28
+ attr_accessor :action_source
29
+
30
+ attr_accessor :event_class
31
+
32
+ attr_accessor :order_id
33
+
34
+ attr_accessor :value_amount
35
+
36
+ attr_accessor :value_currency
37
+
38
+ attr_accessor :created_at
39
+
40
+ attr_accessor :consent_basis
41
+
42
+ attr_accessor :measurement_class
43
+
44
+ attr_accessor :attribution_join
45
+
46
+ attr_accessor :enforcement_scope
47
+
48
+ attr_accessor :consent_normalization_version
49
+
50
+ attr_accessor :consent
51
+
52
+ attr_accessor :user_data_hashed
53
+
54
+ attr_accessor :click_ids
55
+
56
+ attr_accessor :session
57
+
58
+ attr_accessor :value_data
59
+
60
+ attr_accessor :event_source
61
+
62
+ attr_accessor :payload_expired
63
+
64
+ attr_accessor :deliveries
65
+
66
+ # Attribute mapping from ruby-style variable name to JSON key.
67
+ def self.attribute_map
68
+ {
69
+ :'id' => :'id',
70
+ :'signal_tracker_id' => :'signal_tracker_id',
71
+ :'parent_event_id' => :'parent_event_id',
72
+ :'event_name' => :'event_name',
73
+ :'event_time' => :'event_time',
74
+ :'action_source' => :'action_source',
75
+ :'event_class' => :'event_class',
76
+ :'order_id' => :'order_id',
77
+ :'value_amount' => :'value_amount',
78
+ :'value_currency' => :'value_currency',
79
+ :'created_at' => :'created_at',
80
+ :'consent_basis' => :'consent_basis',
81
+ :'measurement_class' => :'measurement_class',
82
+ :'attribution_join' => :'attribution_join',
83
+ :'enforcement_scope' => :'enforcement_scope',
84
+ :'consent_normalization_version' => :'consent_normalization_version',
85
+ :'consent' => :'consent',
86
+ :'user_data_hashed' => :'user_data_hashed',
87
+ :'click_ids' => :'click_ids',
88
+ :'session' => :'session',
89
+ :'value_data' => :'value_data',
90
+ :'event_source' => :'event_source',
91
+ :'payload_expired' => :'payload_expired',
92
+ :'deliveries' => :'deliveries'
93
+ }
94
+ end
95
+
96
+ # Returns attribute mapping this model knows about
97
+ def self.acceptable_attribute_map
98
+ attribute_map
99
+ end
100
+
101
+ # Returns all the JSON keys this model knows about
102
+ def self.acceptable_attributes
103
+ acceptable_attribute_map.values
104
+ end
105
+
106
+ # Attribute type mapping.
107
+ def self.openapi_types
108
+ {
109
+ :'id' => :'String',
110
+ :'signal_tracker_id' => :'String',
111
+ :'parent_event_id' => :'String',
112
+ :'event_name' => :'String',
113
+ :'event_time' => :'String',
114
+ :'action_source' => :'String',
115
+ :'event_class' => :'String',
116
+ :'order_id' => :'String',
117
+ :'value_amount' => :'Integer',
118
+ :'value_currency' => :'String',
119
+ :'created_at' => :'String',
120
+ :'consent_basis' => :'String',
121
+ :'measurement_class' => :'String',
122
+ :'attribution_join' => :'String',
123
+ :'enforcement_scope' => :'String',
124
+ :'consent_normalization_version' => :'String',
125
+ :'consent' => :'GetEvent200ResponseEventConsent',
126
+ :'user_data_hashed' => :'GetEvent200ResponseEventConsent',
127
+ :'click_ids' => :'GetEvent200ResponseEventConsent',
128
+ :'session' => :'GetEvent200ResponseEventConsent',
129
+ :'value_data' => :'GetEvent200ResponseEventConsent',
130
+ :'event_source' => :'String',
131
+ :'payload_expired' => :'Boolean',
132
+ :'deliveries' => :'Array<GetEvent200ResponseEventDeliveriesInner>'
133
+ }
134
+ end
135
+
136
+ # List of attributes with nullable: true
137
+ def self.openapi_nullable
138
+ Set.new([
139
+ :'parent_event_id',
140
+ :'order_id',
141
+ :'value_amount',
142
+ :'value_currency',
143
+ :'consent',
144
+ :'user_data_hashed',
145
+ :'click_ids',
146
+ :'session',
147
+ :'value_data',
148
+ :'event_source',
149
+ ])
150
+ end
151
+
152
+ # Initializes the object
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ def initialize(attributes = {})
155
+ if (!attributes.is_a?(Hash))
156
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetEvent200ResponseEvent` initialize method"
157
+ end
158
+
159
+ # check to see if the attribute exists and convert string to symbol for hash key
160
+ acceptable_attribute_map = self.class.acceptable_attribute_map
161
+ attributes = attributes.each_with_object({}) { |(k, v), h|
162
+ if (!acceptable_attribute_map.key?(k.to_sym))
163
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetEvent200ResponseEvent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
164
+ end
165
+ h[k.to_sym] = v
166
+ }
167
+
168
+ if attributes.key?(:'id')
169
+ self.id = attributes[:'id']
170
+ else
171
+ self.id = nil
172
+ end
173
+
174
+ if attributes.key?(:'signal_tracker_id')
175
+ self.signal_tracker_id = attributes[:'signal_tracker_id']
176
+ else
177
+ self.signal_tracker_id = nil
178
+ end
179
+
180
+ if attributes.key?(:'parent_event_id')
181
+ self.parent_event_id = attributes[:'parent_event_id']
182
+ else
183
+ self.parent_event_id = nil
184
+ end
185
+
186
+ if attributes.key?(:'event_name')
187
+ self.event_name = attributes[:'event_name']
188
+ else
189
+ self.event_name = nil
190
+ end
191
+
192
+ if attributes.key?(:'event_time')
193
+ self.event_time = attributes[:'event_time']
194
+ else
195
+ self.event_time = nil
196
+ end
197
+
198
+ if attributes.key?(:'action_source')
199
+ self.action_source = attributes[:'action_source']
200
+ else
201
+ self.action_source = nil
202
+ end
203
+
204
+ if attributes.key?(:'event_class')
205
+ self.event_class = attributes[:'event_class']
206
+ else
207
+ self.event_class = nil
208
+ end
209
+
210
+ if attributes.key?(:'order_id')
211
+ self.order_id = attributes[:'order_id']
212
+ else
213
+ self.order_id = nil
214
+ end
215
+
216
+ if attributes.key?(:'value_amount')
217
+ self.value_amount = attributes[:'value_amount']
218
+ else
219
+ self.value_amount = nil
220
+ end
221
+
222
+ if attributes.key?(:'value_currency')
223
+ self.value_currency = attributes[:'value_currency']
224
+ else
225
+ self.value_currency = nil
226
+ end
227
+
228
+ if attributes.key?(:'created_at')
229
+ self.created_at = attributes[:'created_at']
230
+ else
231
+ self.created_at = nil
232
+ end
233
+
234
+ if attributes.key?(:'consent_basis')
235
+ self.consent_basis = attributes[:'consent_basis']
236
+ else
237
+ self.consent_basis = nil
238
+ end
239
+
240
+ if attributes.key?(:'measurement_class')
241
+ self.measurement_class = attributes[:'measurement_class']
242
+ else
243
+ self.measurement_class = nil
244
+ end
245
+
246
+ if attributes.key?(:'attribution_join')
247
+ self.attribution_join = attributes[:'attribution_join']
248
+ else
249
+ self.attribution_join = nil
250
+ end
251
+
252
+ if attributes.key?(:'enforcement_scope')
253
+ self.enforcement_scope = attributes[:'enforcement_scope']
254
+ else
255
+ self.enforcement_scope = nil
256
+ end
257
+
258
+ if attributes.key?(:'consent_normalization_version')
259
+ self.consent_normalization_version = attributes[:'consent_normalization_version']
260
+ else
261
+ self.consent_normalization_version = nil
262
+ end
263
+
264
+ if attributes.key?(:'consent')
265
+ self.consent = attributes[:'consent']
266
+ else
267
+ self.consent = nil
268
+ end
269
+
270
+ if attributes.key?(:'user_data_hashed')
271
+ self.user_data_hashed = attributes[:'user_data_hashed']
272
+ else
273
+ self.user_data_hashed = nil
274
+ end
275
+
276
+ if attributes.key?(:'click_ids')
277
+ self.click_ids = attributes[:'click_ids']
278
+ else
279
+ self.click_ids = nil
280
+ end
281
+
282
+ if attributes.key?(:'session')
283
+ self.session = attributes[:'session']
284
+ else
285
+ self.session = nil
286
+ end
287
+
288
+ if attributes.key?(:'value_data')
289
+ self.value_data = attributes[:'value_data']
290
+ else
291
+ self.value_data = nil
292
+ end
293
+
294
+ if attributes.key?(:'event_source')
295
+ self.event_source = attributes[:'event_source']
296
+ else
297
+ self.event_source = nil
298
+ end
299
+
300
+ if attributes.key?(:'payload_expired')
301
+ self.payload_expired = attributes[:'payload_expired']
302
+ else
303
+ self.payload_expired = nil
304
+ end
305
+
306
+ if attributes.key?(:'deliveries')
307
+ if (value = attributes[:'deliveries']).is_a?(Array)
308
+ self.deliveries = value
309
+ end
310
+ else
311
+ self.deliveries = nil
312
+ end
313
+ end
314
+
315
+ # Show invalid properties with the reasons. Usually used together with valid?
316
+ # @return Array for valid properties with the reasons
317
+ def list_invalid_properties
318
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
319
+ invalid_properties = Array.new
320
+ if @id.nil?
321
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
322
+ end
323
+
324
+ if @signal_tracker_id.nil?
325
+ invalid_properties.push('invalid value for "signal_tracker_id", signal_tracker_id cannot be nil.')
326
+ end
327
+
328
+ if @event_name.nil?
329
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
330
+ end
331
+
332
+ if @event_time.nil?
333
+ invalid_properties.push('invalid value for "event_time", event_time cannot be nil.')
334
+ end
335
+
336
+ if @action_source.nil?
337
+ invalid_properties.push('invalid value for "action_source", action_source cannot be nil.')
338
+ end
339
+
340
+ if @event_class.nil?
341
+ invalid_properties.push('invalid value for "event_class", event_class cannot be nil.')
342
+ end
343
+
344
+ if @created_at.nil?
345
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
346
+ end
347
+
348
+ if @consent_basis.nil?
349
+ invalid_properties.push('invalid value for "consent_basis", consent_basis cannot be nil.')
350
+ end
351
+
352
+ if @measurement_class.nil?
353
+ invalid_properties.push('invalid value for "measurement_class", measurement_class cannot be nil.')
354
+ end
355
+
356
+ if @attribution_join.nil?
357
+ invalid_properties.push('invalid value for "attribution_join", attribution_join cannot be nil.')
358
+ end
359
+
360
+ if @enforcement_scope.nil?
361
+ invalid_properties.push('invalid value for "enforcement_scope", enforcement_scope cannot be nil.')
362
+ end
363
+
364
+ if @consent_normalization_version.nil?
365
+ invalid_properties.push('invalid value for "consent_normalization_version", consent_normalization_version cannot be nil.')
366
+ end
367
+
368
+ if @payload_expired.nil?
369
+ invalid_properties.push('invalid value for "payload_expired", payload_expired cannot be nil.')
370
+ end
371
+
372
+ if @deliveries.nil?
373
+ invalid_properties.push('invalid value for "deliveries", deliveries cannot be nil.')
374
+ end
375
+
376
+ invalid_properties
377
+ end
378
+
379
+ # Check to see if the all the properties in the model are valid
380
+ # @return true if the model is valid
381
+ def valid?
382
+ warn '[DEPRECATED] the `valid?` method is obsolete'
383
+ return false if @id.nil?
384
+ return false if @signal_tracker_id.nil?
385
+ return false if @event_name.nil?
386
+ return false if @event_time.nil?
387
+ return false if @action_source.nil?
388
+ return false if @event_class.nil?
389
+ return false if @created_at.nil?
390
+ return false if @consent_basis.nil?
391
+ return false if @measurement_class.nil?
392
+ return false if @attribution_join.nil?
393
+ return false if @enforcement_scope.nil?
394
+ return false if @consent_normalization_version.nil?
395
+ return false if @payload_expired.nil?
396
+ return false if @deliveries.nil?
397
+ true
398
+ end
399
+
400
+ # Custom attribute writer method with validation
401
+ # @param [Object] id Value to be assigned
402
+ def id=(id)
403
+ if id.nil?
404
+ fail ArgumentError, 'id cannot be nil'
405
+ end
406
+
407
+ @id = id
408
+ end
409
+
410
+ # Custom attribute writer method with validation
411
+ # @param [Object] signal_tracker_id Value to be assigned
412
+ def signal_tracker_id=(signal_tracker_id)
413
+ if signal_tracker_id.nil?
414
+ fail ArgumentError, 'signal_tracker_id cannot be nil'
415
+ end
416
+
417
+ @signal_tracker_id = signal_tracker_id
418
+ end
419
+
420
+ # Custom attribute writer method with validation
421
+ # @param [Object] event_name Value to be assigned
422
+ def event_name=(event_name)
423
+ if event_name.nil?
424
+ fail ArgumentError, 'event_name cannot be nil'
425
+ end
426
+
427
+ @event_name = event_name
428
+ end
429
+
430
+ # Custom attribute writer method with validation
431
+ # @param [Object] event_time Value to be assigned
432
+ def event_time=(event_time)
433
+ if event_time.nil?
434
+ fail ArgumentError, 'event_time cannot be nil'
435
+ end
436
+
437
+ @event_time = event_time
438
+ end
439
+
440
+ # Custom attribute writer method with validation
441
+ # @param [Object] action_source Value to be assigned
442
+ def action_source=(action_source)
443
+ if action_source.nil?
444
+ fail ArgumentError, 'action_source cannot be nil'
445
+ end
446
+
447
+ @action_source = action_source
448
+ end
449
+
450
+ # Custom attribute writer method with validation
451
+ # @param [Object] event_class Value to be assigned
452
+ def event_class=(event_class)
453
+ if event_class.nil?
454
+ fail ArgumentError, 'event_class cannot be nil'
455
+ end
456
+
457
+ @event_class = event_class
458
+ end
459
+
460
+ # Custom attribute writer method with validation
461
+ # @param [Object] created_at Value to be assigned
462
+ def created_at=(created_at)
463
+ if created_at.nil?
464
+ fail ArgumentError, 'created_at cannot be nil'
465
+ end
466
+
467
+ @created_at = created_at
468
+ end
469
+
470
+ # Custom attribute writer method with validation
471
+ # @param [Object] consent_basis Value to be assigned
472
+ def consent_basis=(consent_basis)
473
+ if consent_basis.nil?
474
+ fail ArgumentError, 'consent_basis cannot be nil'
475
+ end
476
+
477
+ @consent_basis = consent_basis
478
+ end
479
+
480
+ # Custom attribute writer method with validation
481
+ # @param [Object] measurement_class Value to be assigned
482
+ def measurement_class=(measurement_class)
483
+ if measurement_class.nil?
484
+ fail ArgumentError, 'measurement_class cannot be nil'
485
+ end
486
+
487
+ @measurement_class = measurement_class
488
+ end
489
+
490
+ # Custom attribute writer method with validation
491
+ # @param [Object] attribution_join Value to be assigned
492
+ def attribution_join=(attribution_join)
493
+ if attribution_join.nil?
494
+ fail ArgumentError, 'attribution_join cannot be nil'
495
+ end
496
+
497
+ @attribution_join = attribution_join
498
+ end
499
+
500
+ # Custom attribute writer method with validation
501
+ # @param [Object] enforcement_scope Value to be assigned
502
+ def enforcement_scope=(enforcement_scope)
503
+ if enforcement_scope.nil?
504
+ fail ArgumentError, 'enforcement_scope cannot be nil'
505
+ end
506
+
507
+ @enforcement_scope = enforcement_scope
508
+ end
509
+
510
+ # Custom attribute writer method with validation
511
+ # @param [Object] consent_normalization_version Value to be assigned
512
+ def consent_normalization_version=(consent_normalization_version)
513
+ if consent_normalization_version.nil?
514
+ fail ArgumentError, 'consent_normalization_version cannot be nil'
515
+ end
516
+
517
+ @consent_normalization_version = consent_normalization_version
518
+ end
519
+
520
+ # Custom attribute writer method with validation
521
+ # @param [Object] payload_expired Value to be assigned
522
+ def payload_expired=(payload_expired)
523
+ if payload_expired.nil?
524
+ fail ArgumentError, 'payload_expired cannot be nil'
525
+ end
526
+
527
+ @payload_expired = payload_expired
528
+ end
529
+
530
+ # Custom attribute writer method with validation
531
+ # @param [Object] deliveries Value to be assigned
532
+ def deliveries=(deliveries)
533
+ if deliveries.nil?
534
+ fail ArgumentError, 'deliveries cannot be nil'
535
+ end
536
+
537
+ @deliveries = deliveries
538
+ end
539
+
540
+ # Checks equality by comparing each attribute.
541
+ # @param [Object] Object to be compared
542
+ def ==(o)
543
+ return true if self.equal?(o)
544
+ self.class == o.class &&
545
+ id == o.id &&
546
+ signal_tracker_id == o.signal_tracker_id &&
547
+ parent_event_id == o.parent_event_id &&
548
+ event_name == o.event_name &&
549
+ event_time == o.event_time &&
550
+ action_source == o.action_source &&
551
+ event_class == o.event_class &&
552
+ order_id == o.order_id &&
553
+ value_amount == o.value_amount &&
554
+ value_currency == o.value_currency &&
555
+ created_at == o.created_at &&
556
+ consent_basis == o.consent_basis &&
557
+ measurement_class == o.measurement_class &&
558
+ attribution_join == o.attribution_join &&
559
+ enforcement_scope == o.enforcement_scope &&
560
+ consent_normalization_version == o.consent_normalization_version &&
561
+ consent == o.consent &&
562
+ user_data_hashed == o.user_data_hashed &&
563
+ click_ids == o.click_ids &&
564
+ session == o.session &&
565
+ value_data == o.value_data &&
566
+ event_source == o.event_source &&
567
+ payload_expired == o.payload_expired &&
568
+ deliveries == o.deliveries
569
+ end
570
+
571
+ # @see the `==` method
572
+ # @param [Object] Object to be compared
573
+ def eql?(o)
574
+ self == o
575
+ end
576
+
577
+ # Calculates hash code according to all attributes.
578
+ # @return [Integer] Hash code
579
+ def hash
580
+ [id, signal_tracker_id, parent_event_id, event_name, event_time, action_source, event_class, order_id, value_amount, value_currency, created_at, consent_basis, measurement_class, attribution_join, enforcement_scope, consent_normalization_version, consent, user_data_hashed, click_ids, session, value_data, event_source, payload_expired, deliveries].hash
581
+ end
582
+
583
+ # Builds the object from hash
584
+ # @param [Hash] attributes Model attributes in the form of hash
585
+ # @return [Object] Returns the model itself
586
+ def self.build_from_hash(attributes)
587
+ return nil unless attributes.is_a?(Hash)
588
+ attributes = attributes.transform_keys(&:to_sym)
589
+ transformed_hash = {}
590
+ openapi_types.each_pair do |key, type|
591
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
592
+ transformed_hash["#{key}"] = nil
593
+ elsif type =~ /\AArray<(.*)>/i
594
+ # check to ensure the input is an array given that the attribute
595
+ # is documented as an array but the input is not
596
+ if attributes[attribute_map[key]].is_a?(Array)
597
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
598
+ end
599
+ elsif !attributes[attribute_map[key]].nil?
600
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
601
+ end
602
+ end
603
+ new(transformed_hash)
604
+ end
605
+
606
+ # Returns the object in the form of hash
607
+ # @return [Hash] Returns the object in the form of hash
608
+ def to_hash
609
+ hash = {}
610
+ self.class.attribute_map.each_pair do |attr, param|
611
+ value = self.send(attr)
612
+ if value.nil?
613
+ is_nullable = self.class.openapi_nullable.include?(attr)
614
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
615
+ end
616
+
617
+ hash[param] = _to_hash(value)
618
+ end
619
+ hash
620
+ end
621
+
622
+ end
623
+
624
+ end