eligible 3.0.0.beta9 → 3.0.0.beta14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/lib/eligible.rb +34 -3
- data/lib/eligible/v1_0/action.rb +9 -0
- data/lib/eligible/v1_0/attribute.rb +9 -0
- data/lib/eligible/v1_0/charge.rb +8 -2
- data/lib/eligible/v1_0/claim.rb +25 -0
- data/lib/eligible/v1_0/claim_service_line.rb +9 -0
- data/lib/eligible/v1_0/contract.rb +9 -0
- data/lib/eligible/v1_0/device.rb +9 -0
- data/lib/eligible/v1_0/discount.rb +9 -0
- data/lib/eligible/v1_0/enrollment.rb +17 -0
- data/lib/eligible/v1_0/estimate.rb +24 -2
- data/lib/eligible/v1_0/estimate_service_line.rb +12 -2
- data/lib/eligible/v1_0/fee.rb +21 -0
- data/lib/eligible/v1_0/fee_refund.rb +29 -0
- data/lib/eligible/v1_0/file.rb +17 -0
- data/lib/eligible/v1_0/file_link.rb +13 -0
- data/lib/eligible/v1_0/insurance_company.rb +13 -7
- data/lib/eligible/v1_0/insurance_company_alias.rb +9 -0
- data/lib/eligible/v1_0/insurance_policy.rb +4 -2
- data/lib/eligible/v1_0/patient.rb +4 -2
- data/lib/eligible/v1_0/patient_statement.rb +48 -50
- data/lib/eligible/v1_0/patient_statement_service_line.rb +7 -4
- data/lib/eligible/v1_0/payment_report.rb +21 -0
- data/lib/eligible/v1_0/product.rb +4 -2
- data/lib/eligible/v1_0/provider.rb +9 -0
- data/lib/eligible/v1_0/remark.rb +21 -0
- data/lib/eligible/v1_0/rest_api_base.rb +34 -13
- data/lib/eligible/v1_0/rule.rb +13 -0
- data/lib/eligible/v1_0/session.rb +21 -0
- data/lib/eligible/v1_0/transaction.rb +21 -0
- data/lib/eligible/v1_0/treatment.rb +4 -2
- data/lib/eligible/v1_0/value_list.rb +9 -0
- data/lib/eligible/v1_0/value_list_item.rb +9 -0
- data/lib/eligible/v1_0/verification.rb +17 -0
- data/lib/eligible/version.rb +1 -1
- metadata +24 -3
- data/lib/eligible/v1_0/file_object.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59d30207290e55309457e01bec0308e3ab0d684729d9ed5c4a7421dde7ae07ee
|
4
|
+
data.tar.gz: 2f099ebebeddf8dbd5f521b039698d42954687a7ebeb210830d97b831778856d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 689e2a898e818c1d772ffe0a1ca056b66b48716ad4d1d08ad64ef3eb360efa4ee8e02e7a0d27d26f52030b2a8c6784784f9d526e8eb5bb503b67dc0a21c566dc
|
7
|
+
data.tar.gz: 324c94a195aa6a1d661b827b1e35698d1ed8c0aa975938f805ffd1575b6d463f817e4e5948c14bfdcaa35be4e3a2f75641baae3e217422f017a407176bf96fa9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,42 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 3.0.0.beta14 - 2020-06-08
|
4
|
+
- Added Fee and FeeRefund new REST API endpoints
|
5
|
+
|
6
|
+
## 3.0.0.beta13 - 2020-06-05
|
7
|
+
- Added create, update, delete and validate endpoints support for rules
|
8
|
+
|
9
|
+
## 3.0.0.beta12 - 2020-05-12
|
10
|
+
- Updated pinned GDS SSL certificate
|
11
|
+
|
12
|
+
## 3.0.0.beta11 - 2020-05-12
|
13
|
+
- Added summary and escalate actions for Enrollments endpoint
|
14
|
+
- Added Action endpoint
|
15
|
+
- Added Attribute endpoint
|
16
|
+
- Added Claim endpoint
|
17
|
+
- Added ClaimServiceLine endpoint
|
18
|
+
- Added Device endpoint
|
19
|
+
- Added Discount endpoint
|
20
|
+
- Renamed FileObject to File in order to kept consistency
|
21
|
+
- Added FileLink endpoint
|
22
|
+
- Added InsuranceCompanyAlias endpoint
|
23
|
+
- Added PaymentReport endpoint
|
24
|
+
- Added Remark endpoint
|
25
|
+
- Added Rule endpoint
|
26
|
+
- Added Session endpoint
|
27
|
+
- Added Transaction endpoint
|
28
|
+
- Added ValueList endpoint
|
29
|
+
- Added ValueListItem endpoint
|
30
|
+
- Added Verification endpoint
|
31
|
+
- Updated Charge endpoint to raise exception on delete action
|
32
|
+
- Updated Estimate endpoint, raise exception on update and delete actions, and added missing actions process, reestimate, convert
|
33
|
+
- Update EstimateServiceLine endpoint to raise exception on update and delete actions
|
34
|
+
- Updated InsuranceCompany endpoint to raise exception on delete action
|
35
|
+
|
36
|
+
## 3.0.0.beta10 - 2020-05-06
|
37
|
+
- Added support for new REST API endpoints "Contract, Enrollment, Provider"
|
38
|
+
- Added support delete operations on new API.
|
39
|
+
|
3
40
|
## 3.0.0.beta9 - 2020-05-04
|
4
41
|
- Added support for new REST API endpoints "Charge, Estimate, EstimateServiceLine, Product, Treatment"
|
5
42
|
|
data/lib/eligible.rb
CHANGED
@@ -43,17 +43,38 @@ require 'eligible/icd'
|
|
43
43
|
|
44
44
|
# New REST API Endpoints
|
45
45
|
require 'eligible/v1_0/rest_api_base'
|
46
|
+
require 'eligible/v1_0/action'
|
47
|
+
require 'eligible/v1_0/attribute'
|
46
48
|
require 'eligible/v1_0/charge'
|
49
|
+
require 'eligible/v1_0/claim'
|
50
|
+
require 'eligible/v1_0/claim_service_line'
|
51
|
+
require 'eligible/v1_0/contract'
|
52
|
+
require 'eligible/v1_0/device'
|
53
|
+
require 'eligible/v1_0/discount'
|
54
|
+
require 'eligible/v1_0/enrollment'
|
47
55
|
require 'eligible/v1_0/estimate'
|
48
56
|
require 'eligible/v1_0/estimate_service_line'
|
49
|
-
require 'eligible/v1_0/
|
57
|
+
require 'eligible/v1_0/fee'
|
58
|
+
require 'eligible/v1_0/fee_refund'
|
59
|
+
require 'eligible/v1_0/file'
|
60
|
+
require 'eligible/v1_0/file_link'
|
50
61
|
require 'eligible/v1_0/insurance_company'
|
62
|
+
require 'eligible/v1_0/insurance_company_alias'
|
51
63
|
require 'eligible/v1_0/insurance_policy'
|
52
64
|
require 'eligible/v1_0/patient'
|
53
65
|
require 'eligible/v1_0/patient_statement'
|
54
66
|
require 'eligible/v1_0/patient_statement_service_line'
|
67
|
+
require 'eligible/v1_0/payment_report'
|
55
68
|
require 'eligible/v1_0/product'
|
69
|
+
require 'eligible/v1_0/provider'
|
70
|
+
require 'eligible/v1_0/remark'
|
71
|
+
require 'eligible/v1_0/rule'
|
72
|
+
require 'eligible/v1_0/session'
|
73
|
+
require 'eligible/v1_0/transaction'
|
56
74
|
require 'eligible/v1_0/treatment'
|
75
|
+
require 'eligible/v1_0/value_list'
|
76
|
+
require 'eligible/v1_0/value_list_item'
|
77
|
+
require 'eligible/v1_0/verification'
|
57
78
|
|
58
79
|
# Errors
|
59
80
|
require 'eligible/errors/eligible_error'
|
@@ -67,11 +88,12 @@ module Eligible
|
|
67
88
|
@@test = false
|
68
89
|
@@api_version = '1.5'
|
69
90
|
@@api_base = "https://gds.eligibleapi.com/v#{@@api_version}"
|
70
|
-
@@fingerprints = %w(
|
71
|
-
|
91
|
+
@@fingerprints = %w(a1cd762a9f4be0f3b6bdd6300e52c6ce8d7d67f5
|
92
|
+
36d6b6f98a2b9bcdf4321d1978553e23cf044b53
|
72
93
|
d93b7697100fe978ae0f78fbf2a2443cc1958ca3
|
73
94
|
896ce24f7a83eb656c040985fdb50ce39f90b813)
|
74
95
|
@@eligible_account = nil
|
96
|
+
@@eligible_account_id = nil
|
75
97
|
|
76
98
|
def self.api_url(url = '', rest_api_version = nil)
|
77
99
|
api_base = rest_api_version ? @@api_base.gsub(/v(\d).(\d)/, "v#{rest_api_version}") : @@api_base
|
@@ -82,10 +104,18 @@ module Eligible
|
|
82
104
|
@@eligible_account
|
83
105
|
end
|
84
106
|
|
107
|
+
def self.eligible_account_id
|
108
|
+
@@eligible_account_id
|
109
|
+
end
|
110
|
+
|
85
111
|
def self.eligible_account=(eligible_account)
|
86
112
|
@@eligible_account = eligible_account
|
87
113
|
end
|
88
114
|
|
115
|
+
def self.eligible_account_id=(eligible_account_id)
|
116
|
+
@@eligible_account_id = eligible_account_id
|
117
|
+
end
|
118
|
+
|
89
119
|
def self.api_key
|
90
120
|
@@api_key
|
91
121
|
end
|
@@ -282,6 +312,7 @@ module Eligible
|
|
282
312
|
headers[:authorization] = authorization_header(basic_auth, auth_options)
|
283
313
|
headers[:eligible_version] = api_version if api_version
|
284
314
|
headers[:eligible_account] = eligible_account if eligible_account
|
315
|
+
headers[:eligible_account_id] = eligible_account_id if eligible_account_id
|
285
316
|
headers
|
286
317
|
end
|
287
318
|
|
data/lib/eligible/v1_0/charge.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Eligible
|
4
|
-
|
5
|
-
|
4
|
+
module V1_0
|
5
|
+
class Charge < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'charges'.freeze
|
7
|
+
|
8
|
+
def self.delete(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
end
|
6
12
|
end
|
7
13
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class Claim < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'claims'.freeze
|
7
|
+
|
8
|
+
def self.delete(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.submit(id, opts = {})
|
13
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/submit", rest_api_params(id), opts.merge(required_params: [:id])
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.correct(id, opts = {})
|
17
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/correct", rest_api_params(id), opts.merge(required_params: [:id])
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.cancel(id, opts = {})
|
21
|
+
send_request :delete, "/#{endpoint_name}/#{object_id(id)}/cancel", rest_api_params(id), opts.merge(required_params: [:id])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class Enrollment < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'enrollments'.freeze
|
7
|
+
|
8
|
+
def self.summary(params, opts = {})
|
9
|
+
send_request :get, "/#{endpoint_name}/summary", rest_api_params(params), opts
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.escalate(id, opts = {})
|
13
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/escalate", rest_api_params(id), opts.merge(required_params: [:id])
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,7 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Eligible
|
4
|
-
|
5
|
-
|
4
|
+
module V1_0
|
5
|
+
class Estimate < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'estimates'.freeze
|
7
|
+
|
8
|
+
def self.process(id, opts = {})
|
9
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/process", rest_api_params(id), opts.merge(required_params: [:id])
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.reestimate(id, opts = {})
|
13
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/reestimate", rest_api_params(id), opts.merge(required_params: [:id])
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.convert(id, opts = {})
|
17
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/convert", rest_api_params(id), opts.merge(required_params: [:id])
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.update(_params, _opts = {})
|
21
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.delete(_params, _opts = {})
|
25
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
26
|
+
end
|
27
|
+
end
|
6
28
|
end
|
7
29
|
end
|
@@ -1,7 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Eligible
|
4
|
-
|
5
|
-
|
4
|
+
module V1_0
|
5
|
+
class EstimateServiceLine < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'estimate_service_lines'.freeze
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.update(_params, _opts = {})
|
10
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.delete(_params, _opts = {})
|
14
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
15
|
+
end
|
6
16
|
end
|
7
17
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class Fee < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'fees'.freeze
|
7
|
+
|
8
|
+
def self.create(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.update(_params, _opts = {})
|
13
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.delete(_params, _opts = {})
|
17
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class FeeRefund < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'fee_refunds'.freeze
|
7
|
+
|
8
|
+
def self.retrieve(params, opts = {})
|
9
|
+
send_request :get, "#{fee_url(params)}/fee_refunds/#{fee_refund_id(params)}", rest_api_params(params), opts.merge(required_params: [:id, :fee])
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.create(params, opts = {})
|
13
|
+
send_request :post, "#{fee_url(params)}/fee_refunds", rest_api_params(params), opts.merge(required_params: [:fee])
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.update(params, opts = {})
|
17
|
+
send_request :put, "#{fee_url(params)}/fee_refunds/#{fee_refund_id(params)}", rest_api_params(params), opts.merge(required_params: [:id, :fee])
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.list(params, opts = {})
|
21
|
+
send_request :get, "#{fee_url(params)}/fee_refunds", rest_api_params(params), opts.merge(required_params: [:fee])
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.delete(_params, _opts = {})
|
25
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class File < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'files'.freeze
|
7
|
+
|
8
|
+
def self.update(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.delete(_params, _opts = {})
|
13
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class FileLink < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'file_links'.freeze
|
7
|
+
|
8
|
+
def self.delete(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -1,15 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Eligible
|
4
|
-
|
5
|
-
|
4
|
+
module V1_0
|
5
|
+
class InsuranceCompany < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'insurance_companies'.freeze
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
def self.create(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.update(_params, _opts = {})
|
13
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
14
|
+
end
|
10
15
|
|
11
|
-
|
12
|
-
|
16
|
+
def self.delete(_params, _opts = {})
|
17
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
18
|
+
end
|
13
19
|
end
|
14
20
|
end
|
15
21
|
end
|
@@ -1,56 +1,54 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Eligible
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
def self.statement_id(id_or_params)
|
53
|
-
id_or_params.is_a?(Hash) ? Util.value(id_or_params, :id) : id_or_params
|
4
|
+
module V1_0
|
5
|
+
class PatientStatement < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'patient_statements'.freeze
|
7
|
+
|
8
|
+
# Finalize the patient statement
|
9
|
+
def self.finalize(id, opts = {})
|
10
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/finalize", rest_api_params(id), opts.merge(required_params: [:id])
|
11
|
+
end
|
12
|
+
|
13
|
+
# Post a payment
|
14
|
+
def self.pay(params, opts = {})
|
15
|
+
send_request :post, "/#{endpoint_name}/#{object_id(params)}/payment_reports", rest_api_params(params), opts.merge(required_params: [:id])
|
16
|
+
end
|
17
|
+
|
18
|
+
# List all payments
|
19
|
+
def self.payments(params, opts = {})
|
20
|
+
send_request :get, "/#{endpoint_name}/#{object_id(params)}/payment_reports", rest_api_params(params), opts.merge(required_params: [:id])
|
21
|
+
end
|
22
|
+
|
23
|
+
# Capture a Patient Statement
|
24
|
+
def self.capture(params, opts = {})
|
25
|
+
send_request :post, "/#{endpoint_name}/#{object_id(params)}/capture", rest_api_params(params), opts.merge(required_params: [:id])
|
26
|
+
end
|
27
|
+
|
28
|
+
# Process a Patient Statement
|
29
|
+
def self.process(params, opts = {})
|
30
|
+
send_request :post, "/#{endpoint_name}/#{object_id(params)}/process", rest_api_params(params), opts.merge(required_params: [:id])
|
31
|
+
end
|
32
|
+
|
33
|
+
# Send a Patient Statement
|
34
|
+
def self.send(id, opts = {})
|
35
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/send", rest_api_params(id), opts.merge(required_params: [:id])
|
36
|
+
end
|
37
|
+
|
38
|
+
# Void a Patient Statement
|
39
|
+
def self.void(id, opts = {})
|
40
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/void", rest_api_params(id), opts.merge(required_params: [:id])
|
41
|
+
end
|
42
|
+
|
43
|
+
# Mark UnCollectible
|
44
|
+
def self.mark_uncollectible(id, opts = {})
|
45
|
+
send_request :post, "/#{endpoint_name}/#{object_id(id)}/mark_uncollectible", rest_api_params(id), opts.merge(required_params: [:id])
|
46
|
+
end
|
47
|
+
|
48
|
+
# Reestimate a Patient Statement
|
49
|
+
def self.reestimate(params, opts = {})
|
50
|
+
send_request :post, "/#{endpoint_name}/#{object_id(params)}/reestimate", rest_api_params(params), opts.merge(required_params: [:id])
|
51
|
+
end
|
54
52
|
end
|
55
53
|
end
|
56
54
|
end
|
@@ -1,10 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Eligible
|
4
|
-
|
5
|
-
|
4
|
+
module V1_0
|
5
|
+
class PatientStatementServiceLine < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'patient_statement_service_lines'.freeze
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
def self.update(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
end
|
9
12
|
end
|
10
13
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class PaymentReport < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'payment_reports'.freeze
|
7
|
+
|
8
|
+
def self.create(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.update(_params, _opts = {})
|
13
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.delete(_params, _opts = {})
|
17
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class Remark < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'remarks'.freeze
|
7
|
+
|
8
|
+
def self.create(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.update(_params, _opts = {})
|
13
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.delete(_params, _opts = {})
|
17
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -1,23 +1,44 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Eligible
|
4
|
-
|
5
|
-
|
4
|
+
module V1_0
|
5
|
+
class RestAPIBase < APIResource
|
6
|
+
REST_API_VERSION = '1.0'.freeze
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
def self.retrieve(id, opts = {})
|
9
|
+
send_request :get, api_url(endpoint_name, rest_api_params(id), :id), rest_api_params(id), opts.merge(required_params: [:id])
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
def self.create(params, opts = {})
|
13
|
+
send_request :post, api_url(endpoint_name), rest_api_params(params), opts
|
14
|
+
end
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
def self.update(params, opts = {})
|
17
|
+
send_request :put, api_url(endpoint_name, rest_api_params(params), :id), rest_api_params(params), opts.merge(required_params: [:id])
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.list(params, opts = {})
|
21
|
+
send_request :get, api_url(endpoint_name), rest_api_params(params), opts
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.delete(id, opts = {})
|
25
|
+
send_request :delete, api_url(endpoint_name, rest_api_params(id), :id), rest_api_params(id), opts.merge(required_params: [:id])
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def self.object_id(id_or_params)
|
31
|
+
id_or_params.is_a?(Hash) ? Util.value(id_or_params, :id) : id_or_params
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.fee_refund_id(params)
|
35
|
+
Util.value(rest_api_params(params), :id)
|
36
|
+
end
|
18
37
|
|
19
|
-
|
20
|
-
|
38
|
+
def self.fee_url(params)
|
39
|
+
fee_id = Util.value(rest_api_params(params), :fee)
|
40
|
+
"/fees/#{fee_id}"
|
41
|
+
end
|
21
42
|
end
|
22
43
|
end
|
23
44
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class Rule < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'rules'.freeze
|
7
|
+
|
8
|
+
def self.validate(params, opts = {})
|
9
|
+
send_request :post, "/#{endpoint_name}/validate", rest_api_params(params), opts
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class Session < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'sessions'.freeze
|
7
|
+
|
8
|
+
def self.update(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.delete(_params, _opts = {})
|
13
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.list(_params, _opts = {})
|
17
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class Transaction < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'transactions'.freeze
|
7
|
+
|
8
|
+
def self.create(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.update(_params, _opts = {})
|
13
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.delete(_params, _opts = {})
|
17
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Eligible
|
4
|
+
module V1_0
|
5
|
+
class Verification < RestAPIBase
|
6
|
+
ENDPOINT_NAME = 'verifications'.freeze
|
7
|
+
|
8
|
+
def self.update(_params, _opts = {})
|
9
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.delete(_params, _opts = {})
|
13
|
+
fail NotImplementedError, "Not an allowed operation for this endpoint"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/eligible/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eligible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.beta14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katelyn Gleaon
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-06-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
@@ -155,18 +155,39 @@ files:
|
|
155
155
|
- lib/eligible/session_token.rb
|
156
156
|
- lib/eligible/ticket.rb
|
157
157
|
- lib/eligible/util.rb
|
158
|
+
- lib/eligible/v1_0/action.rb
|
159
|
+
- lib/eligible/v1_0/attribute.rb
|
158
160
|
- lib/eligible/v1_0/charge.rb
|
161
|
+
- lib/eligible/v1_0/claim.rb
|
162
|
+
- lib/eligible/v1_0/claim_service_line.rb
|
163
|
+
- lib/eligible/v1_0/contract.rb
|
164
|
+
- lib/eligible/v1_0/device.rb
|
165
|
+
- lib/eligible/v1_0/discount.rb
|
166
|
+
- lib/eligible/v1_0/enrollment.rb
|
159
167
|
- lib/eligible/v1_0/estimate.rb
|
160
168
|
- lib/eligible/v1_0/estimate_service_line.rb
|
161
|
-
- lib/eligible/v1_0/
|
169
|
+
- lib/eligible/v1_0/fee.rb
|
170
|
+
- lib/eligible/v1_0/fee_refund.rb
|
171
|
+
- lib/eligible/v1_0/file.rb
|
172
|
+
- lib/eligible/v1_0/file_link.rb
|
162
173
|
- lib/eligible/v1_0/insurance_company.rb
|
174
|
+
- lib/eligible/v1_0/insurance_company_alias.rb
|
163
175
|
- lib/eligible/v1_0/insurance_policy.rb
|
164
176
|
- lib/eligible/v1_0/patient.rb
|
165
177
|
- lib/eligible/v1_0/patient_statement.rb
|
166
178
|
- lib/eligible/v1_0/patient_statement_service_line.rb
|
179
|
+
- lib/eligible/v1_0/payment_report.rb
|
167
180
|
- lib/eligible/v1_0/product.rb
|
181
|
+
- lib/eligible/v1_0/provider.rb
|
182
|
+
- lib/eligible/v1_0/remark.rb
|
168
183
|
- lib/eligible/v1_0/rest_api_base.rb
|
184
|
+
- lib/eligible/v1_0/rule.rb
|
185
|
+
- lib/eligible/v1_0/session.rb
|
186
|
+
- lib/eligible/v1_0/transaction.rb
|
169
187
|
- lib/eligible/v1_0/treatment.rb
|
188
|
+
- lib/eligible/v1_0/value_list.rb
|
189
|
+
- lib/eligible/v1_0/value_list_item.rb
|
190
|
+
- lib/eligible/v1_0/verification.rb
|
170
191
|
- lib/eligible/version.rb
|
171
192
|
- lib/eligible/visit_type.rb
|
172
193
|
- lib/eligible/x12.rb
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Eligible
|
4
|
-
class FileObject < RestAPIBase
|
5
|
-
ENDPOINT_NAME = 'files'.freeze
|
6
|
-
|
7
|
-
# not an allowed operation so override the implementation to not support explicitly even though route is not defined
|
8
|
-
def self.update; end
|
9
|
-
end
|
10
|
-
end
|