ruby/lib/openapi_client/api/products_api.rb
def search_grocery_products_by_upc_with_http_info(upc, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: ProductsApi.search_grocery_products_by_upc ...'
      end
      # verify the required parameter 'upc' is set
      if @api_client.config.client_side_validation && upc.nil?
        fail ArgumentError, "Missing the required parameter 'upc' when calling ProductsApi.search_grocery_products_by_upc"
      end
      # resource path
      local_var_path = '/food/products/upc/{upc}'.sub('{' + 'upc' + '}', upc.to_s)

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

      # header parameters
      header_params = opts[:header_params] || {}
      # 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[:body] 

      # return_type
      return_type = opts[:return_type] || 'InlineResponse20028' 

      # auth_names
      auth_names = opts[:auth_names] || ['apiKeyScheme']

      new_options = opts.merge(
        :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: ProductsApi#search_grocery_products_by_upc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
# Search Grocery Products by UPC
# Get information about a packaged food using its UPC.
# @param upc [Float] The product&#39;s UPC.
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse20028, Integer, Hash)>] InlineResponse20028 data, response status code and response headers
Search Grocery Products by UPC
Get information about a packaged food using its UPC.
Search Grocery Products by UPC Get information about a packaged food using its UPC .
def search_grocery_products_by_upc_with_http_info(upc, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: ProductsApi.search_grocery_products_by_upc ...'
      end
      if @api_client.config.client_side_validation && upc.nil?
        fail ArgumentError, "Missing the required parameter 'upc' when calling ProductsApi.search_grocery_products_by_upc"
      end
      local_var_path = '/food/products/upc/{upc}'.sub('{' + 'upc' + '}', upc.to_s)
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:body] 
      return_type = opts[:return_type] || 'InlineResponse20028' 
      auth_names = opts[:auth_names] || ['apiKeyScheme']
      new_options = opts.merge(
        :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: ProductsApi#search_grocery_products_by_upc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def search_grocery_products_by_upc_with_http_info ( upc , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: ProductsApi.search_grocery_products_by_upc ...' end if @api_client . config . client_side_validation && upc . nil? fail ArgumentError , "Missing the required parameter 'upc' when calling ProductsApi.search_grocery_products_by_upc" end local_var_path = '/food/products/upc/{upc}' . sub ( '{' + 'upc' + '}' , upc . to_s ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :body ] return_type = opts [ :return_type ] || 'InlineResponse20028' auth_names = opts [ :auth_names ] || [ 'apiKeyScheme' ] new_options = opts . merge ( :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: ProductsApi#search_grocery_products_by_upc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Search Grocery Products by UPC
Get information about a packaged food using its UPC.
Search Grocery Products by UPC Get information about a packaged food using its UPC .
# verify the required parameter 'upc' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
InlineResponse20028 data, response status code and response headers
InlineResponse20028 data response status code and response headers
Array<(InlineResponse20028, Integer, Hash)>
upc
The product's UPC.
The product ' s UPC .
opts
opts the optional parameters
opts the optional parameters