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

Returns a new instance of SubcatalogSettings.



30721
30722
30723
30724
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30721

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.



30719
30720
30721
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30719

def update_policy
  @update_policy
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30730
30731
30732
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30730

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

#to_hashObject



30734
30735
30736
30737
30738
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30734

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

#to_jsonObject



30726
30727
30728
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30726

def to_json
  JSON.dump(to_hash)
end