Method: UltracartClient::StorefrontApi#validate_ruler_with_http_info

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

#validate_ruler_with_http_info(ruler_validate_request, opts = {}) ⇒ Array<(RulerValidationResponse, Integer, Hash)>

Validate AWS Event Ruler

Parameters:

  • ruler_validate_request (RulerValidationRequest)

    Ruler Validate Request

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

    the optional parameters

Returns:

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

    RulerValidationResponse data, response status code and response headers



12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
# File 'lib/ultracart_api/api/storefront_api.rb', line 12559

def validate_ruler_with_http_info(ruler_validate_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorefrontApi.validate_ruler ...'
  end
  # verify the required parameter 'ruler_validate_request' is set
  if @api_client.config.client_side_validation && ruler_validate_request.nil?
    fail ArgumentError, "Missing the required parameter 'ruler_validate_request' when calling StorefrontApi.validate_ruler"
  end
  # resource path
  local_var_path = '/storefront/ruler/validate'

  # 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(ruler_validate_request)

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

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

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