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.



61335
61336
61337
61338
61339
61340
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61335

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.



61333
61334
61335
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61333

def q
  @q
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



61346
61347
61348
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61346

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

#subtype_to_hashObject



61350
61351
61352
61353
61354
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61350

def subtype_to_hash
  {
    :q => q
  }
end

#to_jsonObject



61342
61343
61344
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 61342

def to_json
  JSON.dump(to_hash)
end