Class: Eligible::V1_0::PatientStatement

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

Constant Summary collapse

ENDPOINT_NAME =
'patient_statements'.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

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

Capture a Patient Statement



24
25
26
# File 'lib/eligible/v1_0/patient_statement.rb', line 24

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

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

Finalize the patient statement



9
10
11
# File 'lib/eligible/v1_0/patient_statement.rb', line 9

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

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

Mark UnCollectible



44
45
46
# File 'lib/eligible/v1_0/patient_statement.rb', line 44

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

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

Post a payment



14
15
16
# File 'lib/eligible/v1_0/patient_statement.rb', line 14

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

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

List all payments



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

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

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

Process a Patient Statement



29
30
31
# File 'lib/eligible/v1_0/patient_statement.rb', line 29

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

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

Reestimate a Patient Statement



49
50
51
# File 'lib/eligible/v1_0/patient_statement.rb', line 49

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

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

Send a Patient Statement



34
35
36
# File 'lib/eligible/v1_0/patient_statement.rb', line 34

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

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

Submit a claim for a patient statement



54
55
56
# File 'lib/eligible/v1_0/patient_statement.rb', line 54

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

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

Void a Patient Statement



39
40
41
# File 'lib/eligible/v1_0/patient_statement.rb', line 39

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