Class: Eligible::Enrollment

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

Instance Attribute Summary

Attributes inherited from EligibleObject

#api_key, #eligible_id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIResource

api_url, class_name, require_param, 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

.get(params, api_key = nil) ⇒ Object



3
4
5
# File 'lib/eligible/enrollment.rb', line 3

def self.get(params, api_key = nil)
  send_request(:get, api_url('enrollment_npis', params, :enrollment_npi_id), api_key, params, :enrollment_npi_id)
end

.list(params, api_key = nil) ⇒ Object



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

def self.list(params, api_key = nil)
  send_request(:get, api_url('enrollment_npis'), api_key, **params)
end

.post(params, api_key = nil) ⇒ Object



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

def self.post(params, api_key = nil)
  send_request(:post, api_url('enrollment_npis'), api_key, **params)
end

.update(params, api_key = nil) ⇒ Object



15
16
17
# File 'lib/eligible/enrollment.rb', line 15

def self.update(params, api_key = nil)
  send_request(:put, api_url('enrollment_npis', params, :enrollment_npi_id), api_key, params, :enrollment_npi_id)
end

Instance Method Details

#enrollment_npisObject



19
20
21
# File 'lib/eligible/enrollment.rb', line 19

def enrollment_npis
  values.first[:enrollment_npis]
end