class SwaggerClient::MenuApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/swagger_client/api/menu_api.rb, line 18
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

delete_menu(opts = {}) click to toggle source

Remove the specified app’s menu. @param [Hash] opts the optional parameters @return [MenuResponse]

# File lib/swagger_client/api/menu_api.rb, line 26
def delete_menu(opts = {})
  data, _status_code, _headers = delete_menu_with_http_info(opts)
  return data
end
delete_menu_with_http_info(opts = {}) click to toggle source

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

# File lib/swagger_client/api/menu_api.rb, line 35
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_menu(opts = {}) click to toggle source

Get the specified app’s menu. @param [Hash] opts the optional parameters @return [MenuResponse]

# File lib/swagger_client/api/menu_api.rb, line 75
def get_menu(opts = {})
  data, _status_code, _headers = get_menu_with_http_info(opts)
  return data
end
get_menu_with_http_info(opts = {}) click to toggle source

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

# File lib/swagger_client/api/menu_api.rb, line 84
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
update_menu(menu_update, opts = {}) click to toggle source

Configure the specified app’s menu. @param menu_update Supported properties for a updateMenu request. @param [Hash] opts the optional parameters @return [MenuResponse]

# File lib/swagger_client/api/menu_api.rb, line 125
def update_menu(menu_update, opts = {})
  data, _status_code, _headers = update_menu_with_http_info(menu_update, opts)
  return data
end
update_menu_with_http_info(menu_update, opts = {}) click to toggle source

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

# File lib/swagger_client/api/menu_api.rb, line 135
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