Class: Eligible::V1_0::Enrollment

Inherits:
RestAPIBase show all
Defined in:
lib/eligible/v1_0/enrollment.rb

Constant Summary collapse

ENDPOINT_NAME =
'enrollments'.freeze

Constants inherited from RestAPIBase

RestAPIBase::REST_API_VERSION

Instance Attribute Summary

Attributes inherited from EligibleObject

#api_key, #eligible_id

Class Method Summary collapse

Methods inherited from RestAPIBase

create, delete, list, retrieve, update

Methods inherited from APIResource

api_url, class_name, endpoint_name, require_param, required_param_validation, rest_api_params, send_request, url

Methods inherited from EligibleObject

#[], #[]=, construct_from, #each, #error, #initialize, #keys, #refresh_from, #to_hash, #to_json, #values

Constructor Details

This class inherits a constructor from Eligible::EligibleObject

Class Method Details

.escalate(id, opts = {}) ⇒ Object



12
13
14
# File 'lib/eligible/v1_0/enrollment.rb', line 12

def self.escalate(id, opts = {})
  send_request :post, "/#{endpoint_name}/#{object_id(id)}/escalate", rest_api_params(id), **opts.merge(required_params: [:id])
end

.summary(params, opts = {}) ⇒ Object



8
9
10
# File 'lib/eligible/v1_0/enrollment.rb', line 8

def self.summary(params, opts = {})
  send_request :get, "/#{endpoint_name}/summary", rest_api_params(params), **opts
end