Class: WorkOS::AuthenticationMagicAuthSucceededData

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/user_management/authentication_magic_auth_succeeded_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  type: :type,
  status: :status,
  ip_address: :ip_address,
  user_agent: :user_agent,
  user_id: :user_id,
  email: :email
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ AuthenticationMagicAuthSucceededData

Returns a new instance of AuthenticationMagicAuthSucceededData.



24
25
26
27
28
29
30
31
32
# File 'lib/workos/user_management/authentication_magic_auth_succeeded_data.rb', line 24

def initialize(json)
  hash = self.class.normalize(json)
  @type = hash[:type]
  @status = hash[:status]
  @ip_address = hash[:ip_address]
  @user_agent = hash[:user_agent]
  @user_id = hash[:user_id]
  @email = hash[:email]
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



16
17
18
# File 'lib/workos/user_management/authentication_magic_auth_succeeded_data.rb', line 16

def email
  @email
end

#ip_addressObject

Returns the value of attribute ip_address.



16
17
18
# File 'lib/workos/user_management/authentication_magic_auth_succeeded_data.rb', line 16

def ip_address
  @ip_address
end

#statusObject

Returns the value of attribute status.



16
17
18
# File 'lib/workos/user_management/authentication_magic_auth_succeeded_data.rb', line 16

def status
  @status
end

#typeObject

Returns the value of attribute type.



16
17
18
# File 'lib/workos/user_management/authentication_magic_auth_succeeded_data.rb', line 16

def type
  @type
end

#user_agentObject

Returns the value of attribute user_agent.



16
17
18
# File 'lib/workos/user_management/authentication_magic_auth_succeeded_data.rb', line 16

def user_agent
  @user_agent
end

#user_idObject

Returns the value of attribute user_id.



16
17
18
# File 'lib/workos/user_management/authentication_magic_auth_succeeded_data.rb', line 16

def user_id
  @user_id
end