Method: UltracartClient::StorefrontApi#get_experiments_with_http_info

Defined in:
lib/ultracart_api/api/storefront_api.rb

#get_experiments_with_http_info(storefront_oid, opts = {}) ⇒ Array<(ExperimentsResponse, Integer, Hash)>

Get experiments

Parameters:

  • storefront_oid (Integer)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ExperimentsResponse, Integer, Hash)>)

    ExperimentsResponse data, response status code and response headers



6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
# File 'lib/ultracart_api/api/storefront_api.rb', line 6233

def get_experiments_with_http_info(storefront_oid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorefrontApi.get_experiments ...'
  end
  # verify the required parameter 'storefront_oid' is set
  if @api_client.config.client_side_validation && storefront_oid.nil?
    fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.get_experiments"
  end
  # resource path
  local_var_path = '/storefront/{storefront_oid}/experiments'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ExperimentsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']

  new_options = opts.merge(
    :operation => :"StorefrontApi.get_experiments",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorefrontApi#get_experiments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end