Class: WorkOS::EventContextGoogleAnalyticsSession

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/shared/event_context_google_analytics_session.rb

Constant Summary collapse

HASH_ATTRS =
{
  containerId: :container_id,
  sessionId: :session_id,
  sessionNumber: :session_number
}.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) ⇒ EventContextGoogleAnalyticsSession

Returns a new instance of EventContextGoogleAnalyticsSession.



18
19
20
21
22
23
# File 'lib/workos/shared/event_context_google_analytics_session.rb', line 18

def initialize(json)
  hash = self.class.normalize(json)
  @container_id = hash[:containerId]
  @session_id = hash[:sessionId]
  @session_number = hash[:sessionNumber]
end

Instance Attribute Details

#container_idObject

Returns the value of attribute container_id.



13
14
15
# File 'lib/workos/shared/event_context_google_analytics_session.rb', line 13

def container_id
  @container_id
end

#session_idObject

Returns the value of attribute session_id.



13
14
15
# File 'lib/workos/shared/event_context_google_analytics_session.rb', line 13

def session_id
  @session_id
end

#session_numberObject

Returns the value of attribute session_number.



13
14
15
# File 'lib/workos/shared/event_context_google_analytics_session.rb', line 13

def session_number
  @session_number
end