Class: WorkOS::FeatureFlag
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::FeatureFlag
- Defined in:
- lib/workos/feature_flags/feature_flag.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, id: :id, slug: :slug, name: :name, description: :description, owner: :owner, tags: :tags, enabled: :enabled, default_value: :default_value, created_at: :created_at, updated_at: :updated_at }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#default_value ⇒ Object
Returns the value of attribute default_value.
-
#description ⇒ Object
Returns the value of attribute description.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#slug ⇒ Object
Returns the value of attribute slug.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ FeatureFlag
constructor
A new instance of FeatureFlag.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ FeatureFlag
Returns a new instance of FeatureFlag.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 34 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @id = hash[:id] @slug = hash[:slug] @name = hash[:name] @description = hash[:description] @owner = hash[:owner] ? WorkOS::FeatureFlagOwner.new(hash[:owner]) : nil @tags = hash[:tags] || [] @enabled = hash[:enabled] @default_value = hash[:default_value] @created_at = hash[:created_at] @updated_at = hash[:updated_at] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def created_at @created_at end |
#default_value ⇒ Object
Returns the value of attribute default_value.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def default_value @default_value end |
#description ⇒ Object
Returns the value of attribute description.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def description @description end |
#enabled ⇒ Object
Returns the value of attribute enabled.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def name @name end |
#object ⇒ Object
Returns the value of attribute object.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def object @object end |
#owner ⇒ Object
Returns the value of attribute owner.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def owner @owner end |
#slug ⇒ Object
Returns the value of attribute slug.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def slug @slug end |
#tags ⇒ Object
Returns the value of attribute tags.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def @tags end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
21 22 23 |
# File 'lib/workos/feature_flags/feature_flag.rb', line 21 def updated_at @updated_at end |