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.
15800 15801 15802 15803 15804 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15800 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.
15798 15799 15800 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15798 def enabled @enabled end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
15810 15811 15812 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15810 def copy(incoming={}) ExperimentStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
15814 15815 15816 15817 15818 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15814 def to_hash { :enabled => enabled } end |
#to_json ⇒ Object
15806 15807 15808 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15806 def to_json JSON.dump(to_hash) end |