Class: Io::Flow::V0::Clients::ExperienceDefaults
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::ExperienceDefaults
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#get(organization, incoming = {}) ⇒ Object
Returns recommended default settings when creating a new experience.
-
#initialize(client) ⇒ ExperienceDefaults
constructor
A new instance of ExperienceDefaults.
Constructor Details
#initialize(client) ⇒ ExperienceDefaults
Returns a new instance of ExperienceDefaults.
1081 1082 1083 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 1081 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#get(organization, incoming = {}) ⇒ Object
Returns recommended default settings when creating a new experience
1086 1087 1088 1089 1090 1091 1092 1093 1094 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 1086 def get(organization, incoming={}) HttpClient::Preconditions.assert_class('organization', organization, String) opts = HttpClient::Helper.symbolize_keys(incoming) query = { :region_id => (x = opts.delete(:region_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('region_id', x, String)) }.delete_if { |k, v| v.nil? } r = @client.request("/#{CGI.escape(organization)}/experience/defaults").with_query(query).get ::Io::Flow::V0::Models::ExperienceDefaults.new(r) end |