Class: Io::Flow::V0::Models::ItemQuerySuggestion
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ItemQuerySuggestion
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#q ⇒ Object
readonly
Returns the value of attribute q.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ItemQuerySuggestion
constructor
A new instance of ItemQuerySuggestion.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ItemQuerySuggestion
Returns a new instance of ItemQuerySuggestion.
34769 34770 34771 34772 34773 34774 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34769 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:q], 'ItemQuerySuggestion') @q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String) @count = (x = opts.delete(:count); x.nil? ? nil : HttpClient::Preconditions.assert_class('count', x, Integer)) end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
34767 34768 34769 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34767 def count @count end |
#q ⇒ Object (readonly)
Returns the value of attribute q.
34767 34768 34769 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34767 def q @q end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
34780 34781 34782 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34780 def copy(incoming={}) ItemQuerySuggestion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
34784 34785 34786 34787 34788 34789 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34784 def to_hash { :q => q, :count => count } end |
#to_json ⇒ Object
34776 34777 34778 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34776 def to_json JSON.dump(to_hash) end |