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.
42639 42640 42641 42642 42643 42644 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42639 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.
42637 42638 42639 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42637 def q @q end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
42637 42638 42639 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42637 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
42650 42651 42652 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42650 def copy(incoming={}) SubcatalogQueryForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
42654 42655 42656 42657 42658 42659 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42654 def to_hash { :q => q, :type => type.value } end |
#to_json ⇒ Object
42646 42647 42648 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42646 def to_json JSON.dump(to_hash) end |