Class: Io::Flow::V0::Models::ExperimentStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperimentStatus
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents a single instance of an experiment (e.g. page request) resulting in a decision as to the status of a given experiment
Instance Attribute Summary collapse
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperimentStatus
constructor
A new instance of ExperimentStatus.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperimentStatus
Returns a new instance of ExperimentStatus.
14365 14366 14367 14368 14369 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14365 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:enabled], 'ExperimentStatus') @enabled = HttpClient::Preconditions.assert_boolean('enabled', opts.delete(:enabled)) end |
Instance Attribute Details
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
14363 14364 14365 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14363 def enabled @enabled end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
14375 14376 14377 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14375 def copy(incoming={}) ExperimentStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
14379 14380 14381 14382 14383 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14379 def to_hash { :enabled => enabled } end |
#to_json ⇒ Object
14371 14372 14373 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14371 def to_json JSON.dump(to_hash) end |