Class: WorkOS::AuditLogEventContext

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/audit_logs/audit_log_event_context.rb

Constant Summary collapse

HASH_ATTRS =
{
  location: :location,
  user_agent: :user_agent
}.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) ⇒ AuditLogEventContext

Returns a new instance of AuditLogEventContext.



16
17
18
19
20
# File 'lib/workos/audit_logs/audit_log_event_context.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @location = hash[:location]
  @user_agent = hash[:user_agent]
end

Instance Attribute Details

#locationObject

Returns the value of attribute location.



12
13
14
# File 'lib/workos/audit_logs/audit_log_event_context.rb', line 12

def location
  @location
end

#user_agentObject

Returns the value of attribute user_agent.



12
13
14
# File 'lib/workos/audit_logs/audit_log_event_context.rb', line 12

def user_agent
  @user_agent
end