ruby/lib/openapi_client/api/meal_planning_api.rb
# Delete from Meal Plan
# Delete an item from the user&#39;s meal plan.
# @param username [String] The username.
# @param id [Float] The shopping list item id.
# @param hash [String] The private hash for the username.
# @param inline_object5 [InlineObject5] 
# @param [Hash] opts the optional parameters
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
Delete from Meal Plan
Delete an item from the user's meal plan.
Delete from Meal Plan Delete an item from the user ' s meal plan .
def delete_from_meal_plan_with_http_info(username, id, hash, inline_object5, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MealPlanningApi.delete_from_meal_plan ...'
      end
      if @api_client.config.client_side_validation && username.nil?
        fail ArgumentError, "Missing the required parameter 'username' when calling MealPlanningApi.delete_from_meal_plan"
      end
      if @api_client.config.client_side_validation && id.nil?
        fail ArgumentError, "Missing the required parameter 'id' when calling MealPlanningApi.delete_from_meal_plan"
      end
      if @api_client.config.client_side_validation && hash.nil?
        fail ArgumentError, "Missing the required parameter 'hash' when calling MealPlanningApi.delete_from_meal_plan"
      end
      if @api_client.config.client_side_validation && inline_object5.nil?
        fail ArgumentError, "Missing the required parameter 'inline_object5' when calling MealPlanningApi.delete_from_meal_plan"
      end
      local_var_path = '/mealplanner/{username}/items/{id}'.sub('{' + 'username' + '}', username.to_s).sub('{' + 'id' + '}', id.to_s)
      query_params = opts[:query_params] || {}
      query_params[:'hash'] = hash
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type([''])
      form_params = opts[:form_params] || {}
      post_body = opts[:body] || @api_client.object_to_http_body(inline_object5) 
      return_type = opts[:return_type] || 'Object' 
      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(:DELETE, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MealPlanningApi#delete_from_meal_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def delete_from_meal_plan_with_http_info ( username , id , hash , inline_object5 , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MealPlanningApi.delete_from_meal_plan ...' end if @api_client . config . client_side_validation && username . nil? fail ArgumentError , "Missing the required parameter 'username' when calling MealPlanningApi.delete_from_meal_plan" end if @api_client . config . client_side_validation && id . nil? fail ArgumentError , "Missing the required parameter 'id' when calling MealPlanningApi.delete_from_meal_plan" end if @api_client . config . client_side_validation && hash . nil? fail ArgumentError , "Missing the required parameter 'hash' when calling MealPlanningApi.delete_from_meal_plan" end if @api_client . config . client_side_validation && inline_object5 . nil? fail ArgumentError , "Missing the required parameter 'inline_object5' when calling MealPlanningApi.delete_from_meal_plan" end local_var_path = '/mealplanner/{username}/items/{id}' . sub ( '{' + 'username' + '}' , username . to_s ) . sub ( '{' + 'id' + '}' , id . to_s ) query_params = opts [ :query_params ] || { } query_params [ :' hash ' ] = hash header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ '' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :body ] || @api_client . object_to_http_body ( inline_object5 ) return_type = opts [ :return_type ] || 'Object' 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 ( :DELETE , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: MealPlanningApi#delete_from_meal_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Delete from Meal Plan
Delete an item from the user&#39;s meal plan.
Delete from Meal Plan Delete an item from the user&#39 ; s meal plan .
# verify the required parameter 'username' is set # verify the required parameter 'id' is set # verify the required parameter 'hash' is set # verify the required parameter 'inline_object5' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
Object data, response status code and response headers
Object data response status code and response headers
Array<(Object, Integer, Hash)>
username
None
id
The shopping list item id.
The shopping list item id .
hash
The private hash for the username.
The private hash for the username .
inline_object5
opts
None
opts the optional parameters
opts the optional parameters