class Meli::ItemsHealthApi
Attributes
Public Class Methods
# File lib/meli/api/items_health_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Return item health actions by id. @param id [String] @param access_token [String] @param [Hash] opts the optional parameters @return [Object]
# File lib/meli/api/items_health_api.rb, line 27 def items_id_health_actions_get(id, access_token, opts = {}) data, _status_code, _headers = items_id_health_actions_get_with_http_info(id, access_token, opts) data end
Return item health actions by id. @param id [String] @param access_token [String] @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/meli/api/items_health_api.rb, line 37 def items_id_health_actions_get_with_http_info(id, access_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemsHealthApi.items_id_health_actions_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ItemsHealthApi.items_id_health_actions_get" end # verify the required parameter 'access_token' is set if @api_client.config.client_side_validation && access_token.nil? fail ArgumentError, "Missing the required parameter 'access_token' when calling ItemsHealthApi.items_id_health_actions_get" end # resource path local_var_path = '/items/{id}/health/actions'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'access_token'] = access_token # 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] || 'Object' # auth_names auth_names = opts[:auth_names] || [] 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: ItemsHealthApi#items_id_health_actions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Return health by id. @param id [String] @param access_token [String] @param [Hash] opts the optional parameters @return [Object]
# File lib/meli/api/items_health_api.rb, line 94 def items_id_health_get(id, access_token, opts = {}) data, _status_code, _headers = items_id_health_get_with_http_info(id, access_token, opts) data end
Return health by id. @param id [String] @param access_token [String] @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/meli/api/items_health_api.rb, line 104 def items_id_health_get_with_http_info(id, access_token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemsHealthApi.items_id_health_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ItemsHealthApi.items_id_health_get" end # verify the required parameter 'access_token' is set if @api_client.config.client_side_validation && access_token.nil? fail ArgumentError, "Missing the required parameter 'access_token' when calling ItemsHealthApi.items_id_health_get" end # resource path local_var_path = '/items/{id}/health'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'access_token'] = access_token # 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] || 'Object' # auth_names auth_names = opts[:auth_names] || [] 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: ItemsHealthApi#items_id_health_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Return health levels. @param site_id [String] @param [Hash] opts the optional parameters @return [Object]
# File lib/meli/api/items_health_api.rb, line 160 def sites_site_id_health_levels_get(site_id, opts = {}) data, _status_code, _headers = sites_site_id_health_levels_get_with_http_info(site_id, opts) data end
Return health levels. @param site_id [String] @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/meli/api/items_health_api.rb, line 169 def sites_site_id_health_levels_get_with_http_info(site_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ItemsHealthApi.sites_site_id_health_levels_get ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling ItemsHealthApi.sites_site_id_health_levels_get" end # resource path local_var_path = '/sites/{site_id}/health_levels'.sub('{' + 'site_id' + '}', CGI.escape(site_id.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] || 'Object' # auth_names auth_names = opts[:auth_names] || [] 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: ItemsHealthApi#sites_site_id_health_levels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end