Sha256: 12b0206efae1872a7b7061eba6012d31f1bea200cce044a82a06445b480ce0fb
Contents?: true
Size: 744 Bytes
Versions: 6
Compression:
Stored size: 744 Bytes
Contents
# frozen_string_literal: true module Eligible class RestAPIBase < APIResource REST_API_VERSION = '1.0'.freeze def self.retrieve(id, opts = {}) send_request :get, api_url(endpoint_name, rest_api_params(id), :id), rest_api_params(id), opts.merge(required_params: [:id]) end def self.create(params, opts = {}) send_request :post, api_url(endpoint_name), rest_api_params(params), opts end def self.update(params, opts = {}) send_request :put, api_url(endpoint_name, rest_api_params(params), :id), rest_api_params(params), opts.merge(required_params: [:id]) end def self.list(params, opts = {}) send_request :get, api_url(endpoint_name), rest_api_params(params), opts end end end
Version data entries
6 entries across 6 versions & 1 rubygems