pingram 1.0.14 → 1.0.16

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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/pingram/api/addresses_api.rb +67 -6
  4. data/lib/pingram/api/default_api.rb +2 -2
  5. data/lib/pingram/api/domains_api.rb +69 -8
  6. data/lib/pingram/api/email_api.rb +2 -2
  7. data/lib/pingram/api/logs_api.rb +10 -10
  8. data/lib/pingram/api/numbers_api.rb +6 -6
  9. data/lib/pingram/api/profile_api.rb +248 -0
  10. data/lib/pingram/api/sms_api.rb +2 -2
  11. data/lib/pingram/api_client.rb +1 -1
  12. data/lib/pingram/models/billing_post_response_body.rb +74 -203
  13. data/lib/pingram/models/domain_dns_check.rb +244 -0
  14. data/lib/pingram/models/domain_dns_check_records_inner.rb +357 -0
  15. data/lib/pingram/models/get_members_response_inner.rb +37 -4
  16. data/lib/pingram/models/mfa_setup_request.rb +189 -0
  17. data/lib/pingram/models/mfa_setup_response.rb +216 -0
  18. data/lib/pingram/models/mfa_status_response.rb +235 -0
  19. data/lib/pingram/models/mfa_verify_request.rb +241 -0
  20. data/lib/pingram/version.rb +1 -1
  21. data/lib/pingram.rb +6 -0
  22. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  23. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  24. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  25. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  26. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  27. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.4.0/gem_make.out +5 -5
  28. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  29. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  30. metadata +8 -2
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- # POST /billing response: account + merged usage limits (when present) + optional session.
17
+ # POST /billing response: organization usage limits + optional Checkout session.
18
18
  class BillingPostResponseBody < ApiModelBase
19
19
  attr_accessor :organization_id
20
20
 
@@ -22,46 +22,24 @@ module Pingram
22
22
 
23
23
  attr_accessor :creator
24
24
 
25
+ attr_accessor :name
26
+
25
27
  attr_accessor :messages_cap
26
28
 
27
29
  attr_accessor :cost_cap
28
30
 
29
- attr_accessor :created_at
31
+ attr_accessor :sms_cap
30
32
 
31
- attr_accessor :updated_at
33
+ attr_accessor :call_cap
32
34
 
33
35
  # ISO date (YYYY-MM-DD) when the billing cycle resets.
34
36
  attr_accessor :anniversary_date
35
37
 
36
38
  attr_accessor :allow_overage
37
39
 
38
- attr_accessor :name
39
-
40
- attr_accessor :sms_cap
41
-
42
- attr_accessor :call_cap
43
-
44
- # Stripe subscription ID.
45
- attr_accessor :stripe_customer_id
46
-
47
- attr_accessor :stripe_subscription_id
48
-
49
- attr_accessor :subscription_status
50
-
51
- # Verification status.
52
- attr_accessor :status
53
-
54
- attr_accessor :pending_downgrade_cost_cap
55
-
56
- attr_accessor :pending_downgrade_messages_cap
57
-
58
- attr_accessor :pending_downgrade_sms_cap
59
-
60
- attr_accessor :pending_downgrade_call_cap
61
-
62
- attr_accessor :pending_downgrade_effective_date
40
+ attr_accessor :created_at
63
41
 
64
- attr_accessor :pending_downgrade_account_type
42
+ attr_accessor :updated_at
65
43
 
66
44
  attr_accessor :session_id
67
45
 
@@ -95,25 +73,15 @@ module Pingram
95
73
  :'organization_id' => :'organizationId',
96
74
  :'organization_type' => :'organizationType',
97
75
  :'creator' => :'creator',
76
+ :'name' => :'name',
98
77
  :'messages_cap' => :'messagesCap',
99
78
  :'cost_cap' => :'costCap',
100
- :'created_at' => :'createdAt',
101
- :'updated_at' => :'updatedAt',
102
- :'anniversary_date' => :'anniversaryDate',
103
- :'allow_overage' => :'allowOverage',
104
- :'name' => :'name',
105
79
  :'sms_cap' => :'smsCap',
106
80
  :'call_cap' => :'callCap',
107
- :'stripe_customer_id' => :'stripeCustomerId',
108
- :'stripe_subscription_id' => :'stripeSubscriptionId',
109
- :'subscription_status' => :'subscriptionStatus',
110
- :'status' => :'status',
111
- :'pending_downgrade_cost_cap' => :'pendingDowngradeCostCap',
112
- :'pending_downgrade_messages_cap' => :'pendingDowngradeMessagesCap',
113
- :'pending_downgrade_sms_cap' => :'pendingDowngradeSmsCap',
114
- :'pending_downgrade_call_cap' => :'pendingDowngradeCallCap',
115
- :'pending_downgrade_effective_date' => :'pendingDowngradeEffectiveDate',
116
- :'pending_downgrade_account_type' => :'pendingDowngradeAccountType',
81
+ :'anniversary_date' => :'anniversaryDate',
82
+ :'allow_overage' => :'allowOverage',
83
+ :'created_at' => :'createdAt',
84
+ :'updated_at' => :'updatedAt',
117
85
  :'session_id' => :'sessionId',
118
86
  :'url' => :'url'
119
87
  }
@@ -135,25 +103,15 @@ module Pingram
135
103
  :'organization_id' => :'String',
136
104
  :'organization_type' => :'String',
137
105
  :'creator' => :'String',
106
+ :'name' => :'String',
138
107
  :'messages_cap' => :'Float',
139
108
  :'cost_cap' => :'Float',
140
- :'created_at' => :'String',
141
- :'updated_at' => :'String',
142
- :'anniversary_date' => :'String',
143
- :'allow_overage' => :'Boolean',
144
- :'name' => :'String',
145
109
  :'sms_cap' => :'Float',
146
110
  :'call_cap' => :'Float',
147
- :'stripe_customer_id' => :'String',
148
- :'stripe_subscription_id' => :'String',
149
- :'subscription_status' => :'String',
150
- :'status' => :'String',
151
- :'pending_downgrade_cost_cap' => :'Float',
152
- :'pending_downgrade_messages_cap' => :'Float',
153
- :'pending_downgrade_sms_cap' => :'Float',
154
- :'pending_downgrade_call_cap' => :'Float',
155
- :'pending_downgrade_effective_date' => :'String',
156
- :'pending_downgrade_account_type' => :'String',
111
+ :'anniversary_date' => :'String',
112
+ :'allow_overage' => :'Boolean',
113
+ :'created_at' => :'String',
114
+ :'updated_at' => :'String',
157
115
  :'session_id' => :'String',
158
116
  :'url' => :'String'
159
117
  }
@@ -162,7 +120,6 @@ module Pingram
162
120
  # List of attributes with nullable: true
163
121
  def self.openapi_nullable
164
122
  Set.new([
165
- :'subscription_status',
166
123
  ])
167
124
  end
168
125
 
@@ -200,6 +157,12 @@ module Pingram
200
157
  self.creator = nil
201
158
  end
202
159
 
160
+ if attributes.key?(:'name')
161
+ self.name = attributes[:'name']
162
+ else
163
+ self.name = nil
164
+ end
165
+
203
166
  if attributes.key?(:'messages_cap')
204
167
  self.messages_cap = attributes[:'messages_cap']
205
168
  else
@@ -212,16 +175,12 @@ module Pingram
212
175
  self.cost_cap = nil
213
176
  end
214
177
 
215
- if attributes.key?(:'created_at')
216
- self.created_at = attributes[:'created_at']
217
- else
218
- self.created_at = nil
178
+ if attributes.key?(:'sms_cap')
179
+ self.sms_cap = attributes[:'sms_cap']
219
180
  end
220
181
 
221
- if attributes.key?(:'updated_at')
222
- self.updated_at = attributes[:'updated_at']
223
- else
224
- self.updated_at = nil
182
+ if attributes.key?(:'call_cap')
183
+ self.call_cap = attributes[:'call_cap']
225
184
  end
226
185
 
227
186
  if attributes.key?(:'anniversary_date')
@@ -236,58 +195,16 @@ module Pingram
236
195
  self.allow_overage = nil
237
196
  end
238
197
 
239
- if attributes.key?(:'name')
240
- self.name = attributes[:'name']
198
+ if attributes.key?(:'created_at')
199
+ self.created_at = attributes[:'created_at']
241
200
  else
242
- self.name = nil
243
- end
244
-
245
- if attributes.key?(:'sms_cap')
246
- self.sms_cap = attributes[:'sms_cap']
247
- end
248
-
249
- if attributes.key?(:'call_cap')
250
- self.call_cap = attributes[:'call_cap']
251
- end
252
-
253
- if attributes.key?(:'stripe_customer_id')
254
- self.stripe_customer_id = attributes[:'stripe_customer_id']
255
- end
256
-
257
- if attributes.key?(:'stripe_subscription_id')
258
- self.stripe_subscription_id = attributes[:'stripe_subscription_id']
259
- end
260
-
261
- if attributes.key?(:'subscription_status')
262
- self.subscription_status = attributes[:'subscription_status']
263
- end
264
-
265
- if attributes.key?(:'status')
266
- self.status = attributes[:'status']
267
- end
268
-
269
- if attributes.key?(:'pending_downgrade_cost_cap')
270
- self.pending_downgrade_cost_cap = attributes[:'pending_downgrade_cost_cap']
271
- end
272
-
273
- if attributes.key?(:'pending_downgrade_messages_cap')
274
- self.pending_downgrade_messages_cap = attributes[:'pending_downgrade_messages_cap']
275
- end
276
-
277
- if attributes.key?(:'pending_downgrade_sms_cap')
278
- self.pending_downgrade_sms_cap = attributes[:'pending_downgrade_sms_cap']
279
- end
280
-
281
- if attributes.key?(:'pending_downgrade_call_cap')
282
- self.pending_downgrade_call_cap = attributes[:'pending_downgrade_call_cap']
283
- end
284
-
285
- if attributes.key?(:'pending_downgrade_effective_date')
286
- self.pending_downgrade_effective_date = attributes[:'pending_downgrade_effective_date']
201
+ self.created_at = nil
287
202
  end
288
203
 
289
- if attributes.key?(:'pending_downgrade_account_type')
290
- self.pending_downgrade_account_type = attributes[:'pending_downgrade_account_type']
204
+ if attributes.key?(:'updated_at')
205
+ self.updated_at = attributes[:'updated_at']
206
+ else
207
+ self.updated_at = nil
291
208
  end
292
209
 
293
210
  if attributes.key?(:'session_id')
@@ -316,6 +233,10 @@ module Pingram
316
233
  invalid_properties.push('invalid value for "creator", creator cannot be nil.')
317
234
  end
318
235
 
236
+ if @name.nil?
237
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
238
+ end
239
+
319
240
  if @messages_cap.nil?
320
241
  invalid_properties.push('invalid value for "messages_cap", messages_cap cannot be nil.')
321
242
  end
@@ -324,14 +245,6 @@ module Pingram
324
245
  invalid_properties.push('invalid value for "cost_cap", cost_cap cannot be nil.')
325
246
  end
326
247
 
327
- if @created_at.nil?
328
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
329
- end
330
-
331
- if @updated_at.nil?
332
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
333
- end
334
-
335
248
  if @anniversary_date.nil?
336
249
  invalid_properties.push('invalid value for "anniversary_date", anniversary_date cannot be nil.')
337
250
  end
@@ -340,8 +253,12 @@ module Pingram
340
253
  invalid_properties.push('invalid value for "allow_overage", allow_overage cannot be nil.')
341
254
  end
342
255
 
343
- if @name.nil?
344
- invalid_properties.push('invalid value for "name", name cannot be nil.')
256
+ if @created_at.nil?
257
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
258
+ end
259
+
260
+ if @updated_at.nil?
261
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
345
262
  end
346
263
 
347
264
  invalid_properties
@@ -356,19 +273,13 @@ module Pingram
356
273
  organization_type_validator = EnumAttributeValidator.new('String', ["free", "paid"])
357
274
  return false unless organization_type_validator.valid?(@organization_type)
358
275
  return false if @creator.nil?
276
+ return false if @name.nil?
359
277
  return false if @messages_cap.nil?
360
278
  return false if @cost_cap.nil?
361
- return false if @created_at.nil?
362
- return false if @updated_at.nil?
363
279
  return false if @anniversary_date.nil?
364
280
  return false if @allow_overage.nil?
365
- return false if @name.nil?
366
- subscription_status_validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
367
- return false unless subscription_status_validator.valid?(@subscription_status)
368
- status_validator = EnumAttributeValidator.new('String', ["verified", "unverified", "blocked"])
369
- return false unless status_validator.valid?(@status)
370
- pending_downgrade_account_type_validator = EnumAttributeValidator.new('String', ["free"])
371
- return false unless pending_downgrade_account_type_validator.valid?(@pending_downgrade_account_type)
281
+ return false if @created_at.nil?
282
+ return false if @updated_at.nil?
372
283
  true
373
284
  end
374
285
 
@@ -402,6 +313,16 @@ module Pingram
402
313
  @creator = creator
403
314
  end
404
315
 
316
+ # Custom attribute writer method with validation
317
+ # @param [Object] name Value to be assigned
318
+ def name=(name)
319
+ if name.nil?
320
+ fail ArgumentError, 'name cannot be nil'
321
+ end
322
+
323
+ @name = name
324
+ end
325
+
405
326
  # Custom attribute writer method with validation
406
327
  # @param [Object] messages_cap Value to be assigned
407
328
  def messages_cap=(messages_cap)
@@ -422,26 +343,6 @@ module Pingram
422
343
  @cost_cap = cost_cap
423
344
  end
424
345
 
425
- # Custom attribute writer method with validation
426
- # @param [Object] created_at Value to be assigned
427
- def created_at=(created_at)
428
- if created_at.nil?
429
- fail ArgumentError, 'created_at cannot be nil'
430
- end
431
-
432
- @created_at = created_at
433
- end
434
-
435
- # Custom attribute writer method with validation
436
- # @param [Object] updated_at Value to be assigned
437
- def updated_at=(updated_at)
438
- if updated_at.nil?
439
- fail ArgumentError, 'updated_at cannot be nil'
440
- end
441
-
442
- @updated_at = updated_at
443
- end
444
-
445
346
  # Custom attribute writer method with validation
446
347
  # @param [Object] anniversary_date Value to be assigned
447
348
  def anniversary_date=(anniversary_date)
@@ -463,43 +364,23 @@ module Pingram
463
364
  end
464
365
 
465
366
  # Custom attribute writer method with validation
466
- # @param [Object] name Value to be assigned
467
- def name=(name)
468
- if name.nil?
469
- fail ArgumentError, 'name cannot be nil'
367
+ # @param [Object] created_at Value to be assigned
368
+ def created_at=(created_at)
369
+ if created_at.nil?
370
+ fail ArgumentError, 'created_at cannot be nil'
470
371
  end
471
372
 
472
- @name = name
473
- end
474
-
475
- # Custom attribute writer method checking allowed values (enum).
476
- # @param [Object] subscription_status Object to be assigned
477
- def subscription_status=(subscription_status)
478
- validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
479
- unless validator.valid?(subscription_status)
480
- fail ArgumentError, "invalid value for \"subscription_status\", must be one of #{validator.allowable_values}."
481
- end
482
- @subscription_status = subscription_status
373
+ @created_at = created_at
483
374
  end
484
375
 
485
- # Custom attribute writer method checking allowed values (enum).
486
- # @param [Object] status Object to be assigned
487
- def status=(status)
488
- validator = EnumAttributeValidator.new('String', ["verified", "unverified", "blocked"])
489
- unless validator.valid?(status)
490
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
376
+ # Custom attribute writer method with validation
377
+ # @param [Object] updated_at Value to be assigned
378
+ def updated_at=(updated_at)
379
+ if updated_at.nil?
380
+ fail ArgumentError, 'updated_at cannot be nil'
491
381
  end
492
- @status = status
493
- end
494
382
 
495
- # Custom attribute writer method checking allowed values (enum).
496
- # @param [Object] pending_downgrade_account_type Object to be assigned
497
- def pending_downgrade_account_type=(pending_downgrade_account_type)
498
- validator = EnumAttributeValidator.new('String', ["free"])
499
- unless validator.valid?(pending_downgrade_account_type)
500
- fail ArgumentError, "invalid value for \"pending_downgrade_account_type\", must be one of #{validator.allowable_values}."
501
- end
502
- @pending_downgrade_account_type = pending_downgrade_account_type
383
+ @updated_at = updated_at
503
384
  end
504
385
 
505
386
  # Checks equality by comparing each attribute.
@@ -510,25 +391,15 @@ module Pingram
510
391
  organization_id == o.organization_id &&
511
392
  organization_type == o.organization_type &&
512
393
  creator == o.creator &&
394
+ name == o.name &&
513
395
  messages_cap == o.messages_cap &&
514
396
  cost_cap == o.cost_cap &&
515
- created_at == o.created_at &&
516
- updated_at == o.updated_at &&
517
- anniversary_date == o.anniversary_date &&
518
- allow_overage == o.allow_overage &&
519
- name == o.name &&
520
397
  sms_cap == o.sms_cap &&
521
398
  call_cap == o.call_cap &&
522
- stripe_customer_id == o.stripe_customer_id &&
523
- stripe_subscription_id == o.stripe_subscription_id &&
524
- subscription_status == o.subscription_status &&
525
- status == o.status &&
526
- pending_downgrade_cost_cap == o.pending_downgrade_cost_cap &&
527
- pending_downgrade_messages_cap == o.pending_downgrade_messages_cap &&
528
- pending_downgrade_sms_cap == o.pending_downgrade_sms_cap &&
529
- pending_downgrade_call_cap == o.pending_downgrade_call_cap &&
530
- pending_downgrade_effective_date == o.pending_downgrade_effective_date &&
531
- pending_downgrade_account_type == o.pending_downgrade_account_type &&
399
+ anniversary_date == o.anniversary_date &&
400
+ allow_overage == o.allow_overage &&
401
+ created_at == o.created_at &&
402
+ updated_at == o.updated_at &&
532
403
  session_id == o.session_id &&
533
404
  url == o.url
534
405
  end
@@ -542,7 +413,7 @@ module Pingram
542
413
  # Calculates hash code according to all attributes.
543
414
  # @return [Integer] Hash code
544
415
  def hash
545
- [organization_id, organization_type, creator, messages_cap, cost_cap, created_at, updated_at, anniversary_date, allow_overage, name, sms_cap, call_cap, stripe_customer_id, stripe_subscription_id, subscription_status, status, pending_downgrade_cost_cap, pending_downgrade_messages_cap, pending_downgrade_sms_cap, pending_downgrade_call_cap, pending_downgrade_effective_date, pending_downgrade_account_type, session_id, url].hash
416
+ [organization_id, organization_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, anniversary_date, allow_overage, created_at, updated_at, session_id, url].hash
546
417
  end
547
418
 
548
419
  # Builds the object from hash
@@ -0,0 +1,244 @@
1
+ =begin
2
+ #Pingram
3
+
4
+ #Internal API for notification delivery and management
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ class DomainDnsCheck < ApiModelBase
18
+ attr_accessor :sender
19
+
20
+ attr_accessor :records
21
+
22
+ attr_accessor :can_start_verification
23
+
24
+ attr_accessor :checked_at
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'sender' => :'sender',
30
+ :'records' => :'records',
31
+ :'can_start_verification' => :'canStartVerification',
32
+ :'checked_at' => :'checkedAt'
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
+ :'sender' => :'String',
50
+ :'records' => :'Array<DomainDnsCheckRecordsInner>',
51
+ :'can_start_verification' => :'Boolean',
52
+ :'checked_at' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::DomainDnsCheck` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::DomainDnsCheck`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'sender')
79
+ self.sender = attributes[:'sender']
80
+ else
81
+ self.sender = nil
82
+ end
83
+
84
+ if attributes.key?(:'records')
85
+ if (value = attributes[:'records']).is_a?(Array)
86
+ self.records = value
87
+ end
88
+ else
89
+ self.records = nil
90
+ end
91
+
92
+ if attributes.key?(:'can_start_verification')
93
+ self.can_start_verification = attributes[:'can_start_verification']
94
+ else
95
+ self.can_start_verification = nil
96
+ end
97
+
98
+ if attributes.key?(:'checked_at')
99
+ self.checked_at = attributes[:'checked_at']
100
+ else
101
+ self.checked_at = nil
102
+ end
103
+ end
104
+
105
+ # Show invalid properties with the reasons. Usually used together with valid?
106
+ # @return Array for valid properties with the reasons
107
+ def list_invalid_properties
108
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
+ invalid_properties = Array.new
110
+ if @sender.nil?
111
+ invalid_properties.push('invalid value for "sender", sender cannot be nil.')
112
+ end
113
+
114
+ if @records.nil?
115
+ invalid_properties.push('invalid value for "records", records cannot be nil.')
116
+ end
117
+
118
+ if @can_start_verification.nil?
119
+ invalid_properties.push('invalid value for "can_start_verification", can_start_verification cannot be nil.')
120
+ end
121
+
122
+ if @checked_at.nil?
123
+ invalid_properties.push('invalid value for "checked_at", checked_at cannot be nil.')
124
+ end
125
+
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ warn '[DEPRECATED] the `valid?` method is obsolete'
133
+ return false if @sender.nil?
134
+ return false if @records.nil?
135
+ return false if @can_start_verification.nil?
136
+ return false if @checked_at.nil?
137
+ true
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] sender Value to be assigned
142
+ def sender=(sender)
143
+ if sender.nil?
144
+ fail ArgumentError, 'sender cannot be nil'
145
+ end
146
+
147
+ @sender = sender
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] records Value to be assigned
152
+ def records=(records)
153
+ if records.nil?
154
+ fail ArgumentError, 'records cannot be nil'
155
+ end
156
+
157
+ @records = records
158
+ end
159
+
160
+ # Custom attribute writer method with validation
161
+ # @param [Object] can_start_verification Value to be assigned
162
+ def can_start_verification=(can_start_verification)
163
+ if can_start_verification.nil?
164
+ fail ArgumentError, 'can_start_verification cannot be nil'
165
+ end
166
+
167
+ @can_start_verification = can_start_verification
168
+ end
169
+
170
+ # Custom attribute writer method with validation
171
+ # @param [Object] checked_at Value to be assigned
172
+ def checked_at=(checked_at)
173
+ if checked_at.nil?
174
+ fail ArgumentError, 'checked_at cannot be nil'
175
+ end
176
+
177
+ @checked_at = checked_at
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param [Object] Object to be compared
182
+ def ==(o)
183
+ return true if self.equal?(o)
184
+ self.class == o.class &&
185
+ sender == o.sender &&
186
+ records == o.records &&
187
+ can_start_verification == o.can_start_verification &&
188
+ checked_at == o.checked_at
189
+ end
190
+
191
+ # @see the `==` method
192
+ # @param [Object] Object to be compared
193
+ def eql?(o)
194
+ self == o
195
+ end
196
+
197
+ # Calculates hash code according to all attributes.
198
+ # @return [Integer] Hash code
199
+ def hash
200
+ [sender, records, can_start_verification, checked_at].hash
201
+ end
202
+
203
+ # Builds the object from hash
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ # @return [Object] Returns the model itself
206
+ def self.build_from_hash(attributes)
207
+ return nil unless attributes.is_a?(Hash)
208
+ attributes = attributes.transform_keys(&:to_sym)
209
+ transformed_hash = {}
210
+ openapi_types.each_pair do |key, type|
211
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
212
+ transformed_hash["#{key}"] = nil
213
+ elsif type =~ /\AArray<(.*)>/i
214
+ # check to ensure the input is an array given that the attribute
215
+ # is documented as an array but the input is not
216
+ if attributes[attribute_map[key]].is_a?(Array)
217
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
218
+ end
219
+ elsif !attributes[attribute_map[key]].nil?
220
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
221
+ end
222
+ end
223
+ new(transformed_hash)
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ if value.nil?
233
+ is_nullable = self.class.openapi_nullable.include?(attr)
234
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
+ end
236
+
237
+ hash[param] = _to_hash(value)
238
+ end
239
+ hash
240
+ end
241
+
242
+ end
243
+
244
+ end