Class: Io::Flow::V0::Models::CheckoutSettings

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

Returns a new instance of CheckoutSettings.



25004
25005
25006
25007
25008
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25004

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:configuration], 'CheckoutSettings')
  @configuration = (x = opts.delete(:configuration); x.is_a?(::Io::Flow::V0::Models::ExperienceConfigurationReference) ? x : ::Io::Flow::V0::Models::ExperienceConfigurationReference.new(x))
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



25002
25003
25004
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25002

def configuration
  @configuration
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25014
25015
25016
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25014

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

#to_hashObject



25018
25019
25020
25021
25022
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25018

def to_hash
  {
    :configuration => configuration.to_hash
  }
end

#to_jsonObject



25010
25011
25012
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25010

def to_json
  JSON.dump(to_hash)
end