Class: Statsig::APIConfig
- Inherits:
-
Object
- Object
- Statsig::APIConfig
- Defined in:
- lib/api_config.rb
Instance Attribute Summary collapse
-
#default_value ⇒ Object
Returns the value of attribute default_value.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#entity ⇒ Object
Returns the value of attribute entity.
-
#explicit_parameters ⇒ Object
Returns the value of attribute explicit_parameters.
-
#has_shared_params ⇒ Object
Returns the value of attribute has_shared_params.
-
#id_type ⇒ Object
Returns the value of attribute id_type.
-
#is_active ⇒ Object
Returns the value of attribute is_active.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rules ⇒ Object
Returns the value of attribute rules.
-
#salt ⇒ Object
Returns the value of attribute salt.
-
#target_app_ids ⇒ Object
Returns the value of attribute target_app_ids.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Attribute Details
#default_value ⇒ Object
Returns the value of attribute default_value.
8 9 10 |
# File 'lib/api_config.rb', line 8 def default_value @default_value end |
#enabled ⇒ Object
Returns the value of attribute enabled.
8 9 10 |
# File 'lib/api_config.rb', line 8 def enabled @enabled end |
#entity ⇒ Object
Returns the value of attribute entity.
8 9 10 |
# File 'lib/api_config.rb', line 8 def entity @entity end |
#explicit_parameters ⇒ Object
Returns the value of attribute explicit_parameters.
8 9 10 |
# File 'lib/api_config.rb', line 8 def explicit_parameters @explicit_parameters end |
#has_shared_params ⇒ Object
Returns the value of attribute has_shared_params.
8 9 10 |
# File 'lib/api_config.rb', line 8 def has_shared_params @has_shared_params end |
#id_type ⇒ Object
Returns the value of attribute id_type.
8 9 10 |
# File 'lib/api_config.rb', line 8 def id_type @id_type end |
#is_active ⇒ Object
Returns the value of attribute is_active.
8 9 10 |
# File 'lib/api_config.rb', line 8 def is_active @is_active end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/api_config.rb', line 8 def name @name end |
#rules ⇒ Object
Returns the value of attribute rules.
8 9 10 |
# File 'lib/api_config.rb', line 8 def rules @rules end |
#salt ⇒ Object
Returns the value of attribute salt.
8 9 10 |
# File 'lib/api_config.rb', line 8 def salt @salt end |
#target_app_ids ⇒ Object
Returns the value of attribute target_app_ids.
8 9 10 |
# File 'lib/api_config.rb', line 8 def target_app_ids @target_app_ids end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/api_config.rb', line 8 def type @type end |
Class Method Details
.from_json(json) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/api_config.rb', line 11 def self.from_json(json) new( name: json[:name], type: json[:type], is_active: json[:isActive], salt: json[:salt], default_value: json[:defaultValue] || {}, enabled: json[:enabled], rules: json[:rules]&.map do |rule| APIRule.from_json(rule) end, id_type: json[:idType], entity: json[:entity], explicit_parameters: json[:explicitParameters], has_shared_params: json[:hasSharedParams], target_app_ids: json[:targetAppIDs] ) end |