ruby/lib/openapi_client/api/meal_planning_api.rb
# Add Meal Plan Template
# Add a meal plan template for a user.
# @param username [String] The username.
# @param hash [String] The private hash for the username.
# @param inline_object6 [InlineObject6] 
# @param [Hash] opts the optional parameters
# @return [Array<(InlineResponse20040, Integer, Hash)>] InlineResponse20040 data, response status code and response headers
Add Meal Plan Template
Add a meal plan template for a user.
Add Meal Plan Template Add a meal plan template for a user .
def add_meal_plan_template_with_http_info(username, hash, inline_object6, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: MealPlanningApi.add_meal_plan_template ...'
      end
      if @api_client.config.client_side_validation && username.nil?
        fail ArgumentError, "Missing the required parameter 'username' when calling MealPlanningApi.add_meal_plan_template"
      end
      if @api_client.config.client_side_validation && hash.nil?
        fail ArgumentError, "Missing the required parameter 'hash' when calling MealPlanningApi.add_meal_plan_template"
      end
      if @api_client.config.client_side_validation && inline_object6.nil?
        fail ArgumentError, "Missing the required parameter 'inline_object6' when calling MealPlanningApi.add_meal_plan_template"
      end
      local_var_path = '/mealplanner/{username}/templates'.sub('{' + 'username' + '}', username.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_object6) 
      return_type = opts[:return_type] || 'InlineResponse20040' 
      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(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: MealPlanningApi#add_meal_plan_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def add_meal_plan_template_with_http_info ( username , hash , inline_object6 , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: MealPlanningApi.add_meal_plan_template ...' end if @api_client . config . client_side_validation && username . nil? fail ArgumentError , "Missing the required parameter 'username' when calling MealPlanningApi.add_meal_plan_template" end if @api_client . config . client_side_validation && hash . nil? fail ArgumentError , "Missing the required parameter 'hash' when calling MealPlanningApi.add_meal_plan_template" end if @api_client . config . client_side_validation && inline_object6 . nil? fail ArgumentError , "Missing the required parameter 'inline_object6' when calling MealPlanningApi.add_meal_plan_template" end local_var_path = '/mealplanner/{username}/templates' . sub ( '{' + 'username' + '}' , username . 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_object6 ) return_type = opts [ :return_type ] || 'InlineResponse20040' 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 ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: MealPlanningApi#add_meal_plan_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Add Meal Plan Template
Add a meal plan template for a user.
Add Meal Plan Template Add a meal plan template for a user .
# verify the required parameter 'username' is set # verify the required parameter 'hash' is set # verify the required parameter 'inline_object6' 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
InlineResponse20040 data, response status code and response headers
InlineResponse20040 data response status code and response headers
Array<(InlineResponse20040, Integer, Hash)>
username
None
hash
The private hash for the username.
The private hash for the username .
inline_object6
opts
None
opts the optional parameters
opts the optional parameters