Class: Rafflesia::AuthUser

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

Constant Summary collapse

HASH_ATTRS =
{
  email: :email,
  email_verified: :email_verified,
  first_name: :first_name,
  id: :id,
  last_name: :last_name,
  name: :name
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ AuthUser

Returns a new instance of AuthUser.



25
26
27
28
29
30
31
32
33
34
# File 'lib/rafflesia/auth/auth_user.rb', line 25

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @email = hash[:email]
  @email_verified = hash[:email_verified]
  @first_name = hash[:first_name]
  @id = hash[:id]
  @last_name = hash[:last_name]
  @name = hash[:name]
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



17
18
19
# File 'lib/rafflesia/auth/auth_user.rb', line 17

def email
  @email
end

#email_verifiedObject

Returns the value of attribute email_verified.



17
18
19
# File 'lib/rafflesia/auth/auth_user.rb', line 17

def email_verified
  @email_verified
end

#first_nameObject

Returns the value of attribute first_name.



17
18
19
# File 'lib/rafflesia/auth/auth_user.rb', line 17

def first_name
  @first_name
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/rafflesia/auth/auth_user.rb', line 17

def id
  @id
end

#last_nameObject

Returns the value of attribute last_name.



17
18
19
# File 'lib/rafflesia/auth/auth_user.rb', line 17

def last_name
  @last_name
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/rafflesia/auth/auth_user.rb', line 17

def name
  @name
end