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.



22744
22745
22746
22747
22748
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22744

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.



22742
22743
22744
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22742

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



22754
22755
22756
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22754

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

#subtype_to_hashObject



22758
22759
22760
22761
22762
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22758

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



22750
22751
22752
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22750

def to_json
  JSON.dump(to_hash)
end