Class: Io::Flow::V0::Models::QueryFilterUnstructuredForm

Inherits:
QueryFilterForm show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from QueryFilterForm

#discriminator

Instance Method Summary collapse

Methods inherited from QueryFilterForm

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ QueryFilterUnstructuredForm

Returns a new instance of QueryFilterUnstructuredForm.



56644
56645
56646
56647
56648
56649
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56644

def initialize(incoming={})
  super(:discriminator => QueryFilterForm::Types::QUERY_FILTER_UNSTRUCTURED_FORM)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:q], 'QueryFilterUnstructuredForm')
  @q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String)
end

Instance Attribute Details

#qObject (readonly)

Returns the value of attribute q.



56642
56643
56644
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56642

def q
  @q
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



56655
56656
56657
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56655

def copy(incoming={})
  QueryFilterUnstructuredForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



56659
56660
56661
56662
56663
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56659

def subtype_to_hash
  {
    :q => q
  }
end

#to_jsonObject



56651
56652
56653
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56651

def to_json
  JSON.dump(to_hash)
end