Class: Io::Flow::V0::Models::SubcatalogForm

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ SubcatalogForm

Returns a new instance of SubcatalogForm.



53495
53496
53497
53498
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53495

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @settings = (x = opts.delete(:settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SubcatalogSettingsForm) ? x : ::Io::Flow::V0::Models::SubcatalogSettingsForm.new(x)))
end

Instance Attribute Details

#settingsObject (readonly)

Returns the value of attribute settings.



53493
53494
53495
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53493

def settings
  @settings
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53504
53505
53506
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53504

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

#to_hashObject



53508
53509
53510
53511
53512
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53508

def to_hash
  {
    :settings => settings.nil? ? nil : settings.to_hash
  }
end

#to_jsonObject



53500
53501
53502
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53500

def to_json
  JSON.dump(to_hash)
end