Class: WorkOS::FlagCreatedContext

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/feature_flags/flag_created_context.rb

Constant Summary collapse

HASH_ATTRS =
{
  client_id: :client_id,
  actor: :actor
}.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) ⇒ FlagCreatedContext

Returns a new instance of FlagCreatedContext.



16
17
18
19
20
# File 'lib/workos/feature_flags/flag_created_context.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @client_id = hash[:client_id]
  @actor = hash[:actor] ? WorkOS::FlagCreatedContextActor.new(hash[:actor]) : nil
end

Instance Attribute Details

#actorObject

Returns the value of attribute actor.



12
13
14
# File 'lib/workos/feature_flags/flag_created_context.rb', line 12

def actor
  @actor
end

#client_idObject

Returns the value of attribute client_id.



12
13
14
# File 'lib/workos/feature_flags/flag_created_context.rb', line 12

def client_id
  @client_id
end