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.
46822 46823 46824 46825 46826 46827 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46822 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.
46820 46821 46822 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46820 def q @q end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
46820 46821 46822 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46820 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
46833 46834 46835 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46833 def copy(incoming={}) SubcatalogQueryForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
46837 46838 46839 46840 46841 46842 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46837 def to_hash { :q => q, :type => type.value } end |
#to_json ⇒ Object
46829 46830 46831 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46829 def to_json JSON.dump(to_hash) end |