Method: UltracartClient::StorefrontApi#send_webhook_test_with_http_info

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

#send_webhook_test_with_http_info(storefront_oid, email_commseq_webhook_test_request, opts = {}) ⇒ Array<(EmailCommseqWebhookSendTestResponse, Integer, Hash)>

Send webhook test

Parameters:

  • storefront_oid (Integer)
  • email_commseq_webhook_test_request (EmailCommseqWebhookSendTestRequest)

    Email commseq webhook test request

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

    the optional parameters

Returns:



10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
# File 'lib/ultracart_api/api/storefront_api.rb', line 10276

def send_webhook_test_with_http_info(storefront_oid, email_commseq_webhook_test_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorefrontApi.send_webhook_test ...'
  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.send_webhook_test"
  end
  # verify the required parameter 'email_commseq_webhook_test_request' is set
  if @api_client.config.client_side_validation && email_commseq_webhook_test_request.nil?
    fail ArgumentError, "Missing the required parameter 'email_commseq_webhook_test_request' when calling StorefrontApi.send_webhook_test"
  end
  # resource path
  local_var_path = '/storefront/{storefront_oid}/email/webhooks/test'.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_commseq_webhook_test_request)

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

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

  new_options = opts.merge(
    :operation => :"StorefrontApi.send_webhook_test",
    :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#send_webhook_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end