Class: WorkOS::SessionRevokedData

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

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  id: :id,
  impersonator: :impersonator,
  ip_address: :ip_address,
  organization_id: :organization_id,
  user_agent: :user_agent,
  user_id: :user_id,
  auth_method: :auth_method,
  status: :status,
  expires_at: :expires_at,
  ended_at: :ended_at,
  created_at: :created_at,
  updated_at: :updated_at
}.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) ⇒ SessionRevokedData

Returns a new instance of SessionRevokedData.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/workos/user_management/session_revoked_data.rb', line 38

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @id = hash[:id]
  @impersonator = hash[:impersonator] ? WorkOS::SessionRevokedDataImpersonator.new(hash[:impersonator]) : nil
  @ip_address = hash[:ip_address]
  @organization_id = hash[:organization_id]
  @user_agent = hash[:user_agent]
  @user_id = hash[:user_id]
  @auth_method = hash[:auth_method]
  @status = hash[:status]
  @expires_at = hash[:expires_at]
  @ended_at = hash[:ended_at]
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
end

Instance Attribute Details

#auth_methodObject

Returns the value of attribute auth_method.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def auth_method
  @auth_method
end

#created_atObject

Returns the value of attribute created_at.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def created_at
  @created_at
end

#ended_atObject

Returns the value of attribute ended_at.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def ended_at
  @ended_at
end

#expires_atObject

Returns the value of attribute expires_at.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def expires_at
  @expires_at
end

#idObject

Returns the value of attribute id.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def id
  @id
end

#impersonatorObject

Returns the value of attribute impersonator.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def impersonator
  @impersonator
end

#ip_addressObject

Returns the value of attribute ip_address.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def ip_address
  @ip_address
end

#objectObject

Returns the value of attribute object.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def object
  @object
end

#organization_idObject

Returns the value of attribute organization_id.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def organization_id
  @organization_id
end

#statusObject

Returns the value of attribute status.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def status
  @status
end

#updated_atObject

Returns the value of attribute updated_at.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def updated_at
  @updated_at
end

#user_agentObject

Returns the value of attribute user_agent.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def user_agent
  @user_agent
end

#user_idObject

Returns the value of attribute user_id.



23
24
25
# File 'lib/workos/user_management/session_revoked_data.rb', line 23

def user_id
  @user_id
end