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.



25291
25292
25293
25294
25295
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25291

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.



25289
25290
25291
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25289

def configuration
  @configuration
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25301
25302
25303
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25301

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

#to_hashObject



25305
25306
25307
25308
25309
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25305

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

#to_jsonObject



25297
25298
25299
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25297

def to_json
  JSON.dump(to_hash)
end