Class: Io::Flow::V0::Clients::ExperienceCheckoutSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ExperienceCheckoutSettings

Returns a new instance of ExperienceCheckoutSettings.



1355
1356
1357
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 1355

def initialize(client)
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
end

Instance Method Details

#get(organization, experience_key) ⇒ Object



1359
1360
1361
1362
1363
1364
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 1359

def get(organization, experience_key)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").get
  ::Io::Flow::V0::Models::ExperienceCheckoutSettings.new(r)
end

#put(organization, experience_key, experience_checkout_settings_form) ⇒ Object



1366
1367
1368
1369
1370
1371
1372
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 1366

def put(organization, experience_key, experience_checkout_settings_form)
  HttpClient::Preconditions.assert_class('organization', organization, String)
  HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
  (x = experience_checkout_settings_form; x.is_a?(::Io::Flow::V0::Models::ExperienceCheckoutSettingsForm) ? x : ::Io::Flow::V0::Models::ExperienceCheckoutSettingsForm.new(x))
  r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").with_json(experience_checkout_settings_form.to_json).put
  ::Io::Flow::V0::Models::ExperienceCheckoutSettings.new(r)
end