Class: WorkOS::FlagUpdatedContext

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

Constant Summary collapse

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

Returns a new instance of FlagUpdatedContext.



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

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

Instance Attribute Details

#actorObject

Returns the value of attribute actor.



13
14
15
# File 'lib/workos/feature_flags/flag_updated_context.rb', line 13

def actor
  @actor
end

#client_idObject

Returns the value of attribute client_id.



13
14
15
# File 'lib/workos/feature_flags/flag_updated_context.rb', line 13

def client_id
  @client_id
end

#previous_attributesObject

Returns the value of attribute previous_attributes.



13
14
15
# File 'lib/workos/feature_flags/flag_updated_context.rb', line 13

def previous_attributes
  @previous_attributes
end