Class: WorkOS::FlagTarget
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::FlagTarget
- Defined in:
- lib/workos/feature_flags/flag_target.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, id: :id, flag_id: :flag_id, flag_slug: :flag_slug, environment_id: :environment_id, target_type: :target_type, target_id: :target_id, created_at: :created_at, updated_at: :updated_at, rule_id: :rule_id, value_type: :value_type, value: :value }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#environment_id ⇒ Object
Returns the value of attribute environment_id.
-
#flag_id ⇒ Object
Returns the value of attribute flag_id.
-
#flag_slug ⇒ Object
Returns the value of attribute flag_slug.
-
#id ⇒ Object
Returns the value of attribute id.
-
#object ⇒ Object
Returns the value of attribute object.
-
#rule_id ⇒ Object
Returns the value of attribute rule_id.
-
#target_id ⇒ Object
Returns the value of attribute target_id.
-
#target_type ⇒ Object
Returns the value of attribute target_type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#value ⇒ Object
Returns the value of attribute value.
-
#value_type ⇒ Object
Returns the value of attribute value_type.
Instance Method Summary collapse
-
#initialize(json) ⇒ FlagTarget
constructor
A new instance of FlagTarget.
Constructor Details
#initialize(json) ⇒ FlagTarget
Returns a new instance of FlagTarget.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/workos/feature_flags/flag_target.rb', line 36 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @id = hash[:id] @flag_id = hash[:flag_id] @flag_slug = hash[:flag_slug] @environment_id = hash[:environment_id] @target_type = hash[:target_type] @target_id = hash[:target_id] @created_at = hash[:created_at] @updated_at = hash[:updated_at] @rule_id = hash[:rule_id] @value_type = hash[:value_type] @value = hash[:value] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def created_at @created_at end |
#environment_id ⇒ Object
Returns the value of attribute environment_id.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def environment_id @environment_id end |
#flag_id ⇒ Object
Returns the value of attribute flag_id.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def flag_id @flag_id end |
#flag_slug ⇒ Object
Returns the value of attribute flag_slug.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def flag_slug @flag_slug end |
#id ⇒ Object
Returns the value of attribute id.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def id @id end |
#object ⇒ Object
Returns the value of attribute object.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def object @object end |
#rule_id ⇒ Object
Returns the value of attribute rule_id.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def rule_id @rule_id end |
#target_id ⇒ Object
Returns the value of attribute target_id.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def target_id @target_id end |
#target_type ⇒ Object
Returns the value of attribute target_type.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def target_type @target_type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def updated_at @updated_at end |
#value ⇒ Object
Returns the value of attribute value.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def value @value end |
#value_type ⇒ Object
Returns the value of attribute value_type.
22 23 24 |
# File 'lib/workos/feature_flags/flag_target.rb', line 22 def value_type @value_type end |