=begin #Smooch #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git =end require "uri" module SwaggerClient class MenuApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # # Remove the specified app’s menu. # @param [Hash] opts the optional parameters # @return [MenuResponse] def delete_menu(opts = {}) data, _status_code, _headers = delete_menu_with_http_info(opts) return data end # # Remove the specified app’s menu. # @param [Hash] opts the optional parameters # @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers def delete_menu_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MenuApi.delete_menu ..." end # resource path local_var_path = "/menu" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['appToken', 'jwt'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'MenuResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: MenuApi#delete_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Get the specified app’s menu. # @param [Hash] opts the optional parameters # @return [MenuResponse] def get_menu(opts = {}) data, _status_code, _headers = get_menu_with_http_info(opts) return data end # # Get the specified app’s menu. # @param [Hash] opts the optional parameters # @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers def get_menu_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MenuApi.get_menu ..." end # resource path local_var_path = "/menu" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'MenuResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: MenuApi#get_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Configure the specified app’s menu. # @param menu_update Supported properties for a updateMenu request. # @param [Hash] opts the optional parameters # @return [MenuResponse] def update_menu(menu_update, opts = {}) data, _status_code, _headers = update_menu_with_http_info(menu_update, opts) return data end # # Configure the specified app’s menu. # @param menu_update Supported properties for a updateMenu request. # @param [Hash] opts the optional parameters # @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers def update_menu_with_http_info(menu_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: MenuApi.update_menu ..." end # verify the required parameter 'menu_update' is set fail ArgumentError, "Missing the required parameter 'menu_update' when calling MenuApi.update_menu" if menu_update.nil? # resource path local_var_path = "/menu" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(menu_update) auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'MenuResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: MenuApi#update_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end