Class: Io::Flow::V0::Clients::OrganizationDefaultConfigurations
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::OrganizationDefaultConfigurations
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
- #get(organization_id) ⇒ Object
-
#initialize(client) ⇒ OrganizationDefaultConfigurations
constructor
A new instance of OrganizationDefaultConfigurations.
-
#put_checkout(organization_id, organization_default_configurations_form) ⇒ Object
Update the default checkout configuration id for this organization.
Constructor Details
#initialize(client) ⇒ OrganizationDefaultConfigurations
Returns a new instance of OrganizationDefaultConfigurations.
6655 6656 6657 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6655 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#get(organization_id) ⇒ Object
6659 6660 6661 6662 6663 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6659 def get(organization_id) HttpClient::Preconditions.assert_class('organization_id', organization_id, String) r = @client.request("/#{CGI.escape(organization_id)}/default/configurations").get ::Io::Flow::V0::Models::OrganizationDefaultConfigurations.new(r) end |
#put_checkout(organization_id, organization_default_configurations_form) ⇒ Object
Update the default checkout configuration id for this organization
6666 6667 6668 6669 6670 6671 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6666 def put_checkout(organization_id, organization_default_configurations_form) HttpClient::Preconditions.assert_class('organization_id', organization_id, String) (x = organization_default_configurations_form; x.is_a?(::Io::Flow::V0::Models::OrganizationDefaultConfigurationsForm) ? x : ::Io::Flow::V0::Models::OrganizationDefaultConfigurationsForm.new(x)) r = @client.request("/#{CGI.escape(organization_id)}/default/configurations/checkout").with_json(organization_default_configurations_form.to_json).put ::Io::Flow::V0::Models::OrganizationDefaultConfigurations.new(r) end |