Method: UltracartClient::StorefrontApi#insert_email_list_segment_folder_with_http_info

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

#insert_email_list_segment_folder_with_http_info(storefront_oid, email_list_segment_folder, opts = {}) ⇒ Array<(EmailListSegmentFolderResponse, Integer, Hash)>

Insert email campaign folder

Parameters:

  • storefront_oid (Integer)
  • email_list_segment_folder (EmailListSegmentFolder)

    Email campaign folder

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

    the optional parameters

Returns:



8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
# File 'lib/ultracart_api/api/storefront_api.rb', line 8641

def insert_email_list_segment_folder_with_http_info(storefront_oid, email_list_segment_folder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorefrontApi.insert_email_list_segment_folder ...'
  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.insert_email_list_segment_folder"
  end
  # verify the required parameter 'email_list_segment_folder' is set
  if @api_client.config.client_side_validation && email_list_segment_folder.nil?
    fail ArgumentError, "Missing the required parameter 'email_list_segment_folder' when calling StorefrontApi.insert_email_list_segment_folder"
  end
  # resource path
  local_var_path = '/storefront/{storefront_oid}/email/list_segment_folders'.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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(email_list_segment_folder)

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

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

  new_options = opts.merge(
    :operation => :"StorefrontApi.insert_email_list_segment_folder",
    :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(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorefrontApi#insert_email_list_segment_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end