Class: WorkOS::FlagCreatedData
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::FlagCreatedData
- Defined in:
- lib/workos/feature_flags/flag_created_data.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, id: :id, environment_id: :environment_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.
-
#environment_id ⇒ Object
Returns the value of attribute environment_id.
-
#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) ⇒ FlagCreatedData
constructor
A new instance of FlagCreatedData.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ FlagCreatedData
Returns a new instance of FlagCreatedData.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 36 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @id = hash[:id] @environment_id = hash[:environment_id] @slug = hash[:slug] @name = hash[:name] @description = hash[:description] @owner = hash[:owner] ? WorkOS::FlagCreatedDataOwner.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.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def created_at @created_at end |
#default_value ⇒ Object
Returns the value of attribute default_value.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def default_value @default_value end |
#description ⇒ Object
Returns the value of attribute description.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def description @description end |
#enabled ⇒ Object
Returns the value of attribute enabled.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def enabled @enabled end |
#environment_id ⇒ Object
Returns the value of attribute environment_id.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def environment_id @environment_id end |
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def name @name end |
#object ⇒ Object
Returns the value of attribute object.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def object @object end |
#owner ⇒ Object
Returns the value of attribute owner.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def owner @owner end |
#slug ⇒ Object
Returns the value of attribute slug.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def slug @slug end |
#tags ⇒ Object
Returns the value of attribute tags.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def @tags end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
22 23 24 |
# File 'lib/workos/feature_flags/flag_created_data.rb', line 22 def updated_at @updated_at end |