Class: WorkOS::FlagUpdatedContextPreviousAttributeData

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

Constant Summary collapse

HASH_ATTRS =
{
  name: :name,
  description: :description,
  tags: :tags,
  enabled: :enabled,
  default_value: :default_value
}.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) ⇒ FlagUpdatedContextPreviousAttributeData

Returns a new instance of FlagUpdatedContextPreviousAttributeData.



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

def initialize(json)
  hash = self.class.normalize(json)
  @name = hash[:name]
  @description = hash[:description]
  @tags = hash[:tags] || []
  @enabled = hash[:enabled]
  @default_value = hash[:default_value]
end

Instance Attribute Details

#default_valueObject

Returns the value of attribute default_value.



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

def default_value
  @default_value
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#enabledObject

Returns the value of attribute enabled.



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

def enabled
  @enabled
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#tagsObject

Returns the value of attribute tags.



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

def tags
  @tags
end