Class: WorkOS::FlagRuleUpdatedContext

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

Constant Summary collapse

HASH_ATTRS =
{
  client_id: :client_id,
  actor: :actor,
  access_type: :access_type,
  configured_targets: :configured_targets,
  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) ⇒ FlagRuleUpdatedContext

Returns a new instance of FlagRuleUpdatedContext.



22
23
24
25
26
27
28
29
# File 'lib/workos/feature_flags/flag_rule_updated_context.rb', line 22

def initialize(json)
  hash = self.class.normalize(json)
  @client_id = hash[:client_id]
  @actor = hash[:actor] ? WorkOS::FlagRuleUpdatedContextActor.new(hash[:actor]) : nil
  @access_type = hash[:access_type]
  @configured_targets = hash[:configured_targets] ? WorkOS::FlagRuleUpdatedContextConfiguredTarget.new(hash[:configured_targets]) : nil
  @previous_attributes = hash[:previous_attributes] ? WorkOS::FlagRuleUpdatedContextPreviousAttribute.new(hash[:previous_attributes]) : nil
end

Instance Attribute Details

#access_typeObject

Returns the value of attribute access_type.



15
16
17
# File 'lib/workos/feature_flags/flag_rule_updated_context.rb', line 15

def access_type
  @access_type
end

#actorObject

Returns the value of attribute actor.



15
16
17
# File 'lib/workos/feature_flags/flag_rule_updated_context.rb', line 15

def actor
  @actor
end

#client_idObject

Returns the value of attribute client_id.



15
16
17
# File 'lib/workos/feature_flags/flag_rule_updated_context.rb', line 15

def client_id
  @client_id
end

#configured_targetsObject

Returns the value of attribute configured_targets.



15
16
17
# File 'lib/workos/feature_flags/flag_rule_updated_context.rb', line 15

def configured_targets
  @configured_targets
end

#previous_attributesObject

Returns the value of attribute previous_attributes.



15
16
17
# File 'lib/workos/feature_flags/flag_rule_updated_context.rb', line 15

def previous_attributes
  @previous_attributes
end