Class: WorkOS::AuthenticationSSOSucceededData

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/user_management/authentication_sso_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,
  sso: :sso
}.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) ⇒ AuthenticationSSOSucceededData

Returns a new instance of AuthenticationSSOSucceededData.



26
27
28
29
30
31
32
33
34
35
# File 'lib/workos/user_management/authentication_sso_succeeded_data.rb', line 26

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]
  @sso = hash[:sso] ? WorkOS::AuthenticationSSOSucceededDataSSO.new(hash[:sso]) : nil
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



17
18
19
# File 'lib/workos/user_management/authentication_sso_succeeded_data.rb', line 17

def email
  @email
end

#ip_addressObject

Returns the value of attribute ip_address.



17
18
19
# File 'lib/workos/user_management/authentication_sso_succeeded_data.rb', line 17

def ip_address
  @ip_address
end

#ssoObject

Returns the value of attribute sso.



17
18
19
# File 'lib/workos/user_management/authentication_sso_succeeded_data.rb', line 17

def sso
  @sso
end

#statusObject

Returns the value of attribute status.



17
18
19
# File 'lib/workos/user_management/authentication_sso_succeeded_data.rb', line 17

def status
  @status
end

#typeObject

Returns the value of attribute type.



17
18
19
# File 'lib/workos/user_management/authentication_sso_succeeded_data.rb', line 17

def type
  @type
end

#user_agentObject

Returns the value of attribute user_agent.



17
18
19
# File 'lib/workos/user_management/authentication_sso_succeeded_data.rb', line 17

def user_agent
  @user_agent
end

#user_idObject

Returns the value of attribute user_id.



17
18
19
# File 'lib/workos/user_management/authentication_sso_succeeded_data.rb', line 17

def user_id
  @user_id
end