Class: Io::Flow::V0::Models::SubcatalogQueryForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SubcatalogQueryForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Defines a query specifying items to be included or excluded in a subcatalog
Instance Attribute Summary collapse
-
#q ⇒ Object
readonly
Returns the value of attribute q.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SubcatalogQueryForm
constructor
A new instance of SubcatalogQueryForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ SubcatalogQueryForm
Returns a new instance of SubcatalogQueryForm.
50008 50009 50010 50011 50012 50013 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50008 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:q, :type], 'SubcatalogQueryForm') @q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String) @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::QueryType) ? x : ::Io::Flow::V0::Models::QueryType.apply(x)) end |
Instance Attribute Details
#q ⇒ Object (readonly)
Returns the value of attribute q.
50006 50007 50008 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50006 def q @q end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
50006 50007 50008 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50006 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50019 50020 50021 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50019 def copy(incoming={}) SubcatalogQueryForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50023 50024 50025 50026 50027 50028 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50023 def to_hash { :q => q, :type => type.value } end |
#to_json ⇒ Object
50015 50016 50017 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50015 def to_json JSON.dump(to_hash) end |