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.



23790
23791
23792
23793
23794
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23790

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.



23788
23789
23790
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23788

def configuration
  @configuration
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



23800
23801
23802
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23800

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

#to_hashObject



23804
23805
23806
23807
23808
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23804

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

#to_jsonObject



23796
23797
23798
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23796

def to_json
  JSON.dump(to_hash)
end