Class: Io::Flow::V0::Models::TargetingQuery
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TargetingQuery
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#outcome_id ⇒ Object
readonly
Returns the value of attribute outcome_id.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#q ⇒ Object
readonly
Returns the value of attribute q.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ TargetingQuery
constructor
A new instance of TargetingQuery.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ TargetingQuery
Returns a new instance of TargetingQuery.
31735 31736 31737 31738 31739 31740 31741 31742 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31735 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :q, :outcome_id, :position], 'TargetingQuery') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String) @outcome_id = HttpClient::Preconditions.assert_class('outcome_id', opts.delete(:outcome_id), String) @position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
31733 31734 31735 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31733 def id @id end |
#outcome_id ⇒ Object (readonly)
Returns the value of attribute outcome_id.
31733 31734 31735 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31733 def outcome_id @outcome_id end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
31733 31734 31735 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31733 def position @position end |
#q ⇒ Object (readonly)
Returns the value of attribute q.
31733 31734 31735 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31733 def q @q end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
31748 31749 31750 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31748 def copy(incoming={}) TargetingQuery.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
31752 31753 31754 31755 31756 31757 31758 31759 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31752 def to_hash { :id => id, :q => q, :outcome_id => outcome_id, :position => position } end |
#to_json ⇒ Object
31744 31745 31746 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31744 def to_json JSON.dump(to_hash) end |