Class: Identisure::AgeVerification::Pending

Inherits:
Object
  • Object
show all
Defined in:
lib/identisure/age_verification.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, url: nil, min_age: nil, max_age: nil) ⇒ Pending

Returns a new instance of Pending.



30
31
32
# File 'lib/identisure/age_verification.rb', line 30

def initialize(id:, url: nil, min_age: nil, max_age: nil)
  @id = id; @url = url; @min_age = min_age; @max_age = max_age
end

Instance Attribute Details

#id ⇒ Object (readonly)

Returns the value of attribute id.



28
29
30
# File 'lib/identisure/age_verification.rb', line 28

def id
  @id
end

#max_age ⇒ Object (readonly)

Returns the value of attribute max_age.



28
29
30
# File 'lib/identisure/age_verification.rb', line 28

def max_age
  @max_age
end

#min_age ⇒ Object (readonly)

Returns the value of attribute min_age.



28
29
30
# File 'lib/identisure/age_verification.rb', line 28

def min_age
  @min_age
end

#url ⇒ Object (readonly)

Returns the value of attribute url.



28
29
30
# File 'lib/identisure/age_verification.rb', line 28

def url
  @url
end

Class Method Details

.from_json(d) ⇒ Object



36
37
38
# File 'lib/identisure/age_verification.rb', line 36

def self.from_json(d)
  new(id: d['id'], url: d['url'], min_age: d['minAge'], max_age: d['maxAge'])
end

Instance Method Details

#deconstruct_keys(_) ⇒ Object



34
# File 'lib/identisure/age_verification.rb', line 34

def deconstruct_keys(_) = { id: @id, url: @url, min_age: @min_age, max_age: @max_age }