Class: Io::Flow::V0::Models::SubcatalogSettings

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 = {}) ⇒ SubcatalogSettings



22359
22360
22361
22362
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22359

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @update_policy = (x = (x = opts.delete(:update_policy); x.nil? ? "auto" : x); x.is_a?(::Io::Flow::V0::Models::UpdatePolicy) ? x : ::Io::Flow::V0::Models::UpdatePolicy.apply(x))
end

Instance Attribute Details

#update_policyObject (readonly)

Returns the value of attribute update_policy.



22357
22358
22359
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22357

def update_policy
  @update_policy
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



22368
22369
22370
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22368

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

#to_hashObject



22372
22373
22374
22375
22376
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22372

def to_hash
  {
    :update_policy => update_policy.value
  }
end

#to_jsonObject



22364
22365
22366
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22364

def to_json
  JSON.dump(to_hash)
end