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.
49597 49598 49599 49600 49601 49602 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49597 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.
49595 49596 49597 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49595 def q @q end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
49595 49596 49597 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49595 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49608 49609 49610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49608 def copy(incoming={}) SubcatalogQueryForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49612 49613 49614 49615 49616 49617 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49612 def to_hash { :q => q, :type => type.value } end |
#to_json ⇒ Object
49604 49605 49606 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49604 def to_json JSON.dump(to_hash) end |