Class: Io::Flow::V0::Models::AvailableFilterUnstructured

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

Instance Attribute Summary collapse

Attributes inherited from AvailableFilter

#discriminator

Instance Method Summary collapse

Methods inherited from AvailableFilter

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ AvailableFilterUnstructured

Returns a new instance of AvailableFilterUnstructured.



29252
29253
29254
29255
29256
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29252

def initialize(incoming={})
  super(:discriminator => AvailableFilter::Types::AVAILABLE_FILTER_UNSTRUCTURED)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
end

Instance Attribute Details

#placeholderObject (readonly)

Returns the value of attribute placeholder.



29250
29251
29252
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29250

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



29262
29263
29264
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29262

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

#subtype_to_hashObject



29266
29267
29268
29269
29270
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29266

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



29258
29259
29260
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29258

def to_json
  JSON.dump(to_hash)
end