Class: Rafflesia::MagicAuthStartData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/auth/magic_auth_start_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  code: :code,
  email: :email,
  expires_in_seconds: :expires_in_seconds
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ MagicAuthStartData

Returns a new instance of MagicAuthStartData.



19
20
21
22
23
24
25
# File 'lib/rafflesia/auth/magic_auth_start_data.rb', line 19

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @code = hash[:code]
  @email = hash[:email]
  @expires_in_seconds = hash[:expires_in_seconds]
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



14
15
16
# File 'lib/rafflesia/auth/magic_auth_start_data.rb', line 14

def code
  @code
end

#emailObject

Returns the value of attribute email.



14
15
16
# File 'lib/rafflesia/auth/magic_auth_start_data.rb', line 14

def email
  @email
end

#expires_in_secondsObject

Returns the value of attribute expires_in_seconds.



14
15
16
# File 'lib/rafflesia/auth/magic_auth_start_data.rb', line 14

def expires_in_seconds
  @expires_in_seconds
end