eligible 3.0.0.beta8 → 3.0.0.beta13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/lib/eligible.rb +37 -3
  4. data/lib/eligible/v1_0/action.rb +9 -0
  5. data/lib/eligible/v1_0/attribute.rb +9 -0
  6. data/lib/eligible/v1_0/charge.rb +13 -0
  7. data/lib/eligible/v1_0/claim.rb +25 -0
  8. data/lib/eligible/v1_0/claim_service_line.rb +9 -0
  9. data/lib/eligible/v1_0/contract.rb +9 -0
  10. data/lib/eligible/v1_0/device.rb +9 -0
  11. data/lib/eligible/v1_0/discount.rb +9 -0
  12. data/lib/eligible/v1_0/enrollment.rb +17 -0
  13. data/lib/eligible/v1_0/estimate.rb +29 -0
  14. data/lib/eligible/v1_0/estimate_service_line.rb +17 -0
  15. data/lib/eligible/v1_0/file.rb +17 -0
  16. data/lib/eligible/v1_0/file_link.rb +13 -0
  17. data/lib/eligible/v1_0/insurance_company.rb +13 -7
  18. data/lib/eligible/v1_0/insurance_company_alias.rb +9 -0
  19. data/lib/eligible/v1_0/insurance_policy.rb +4 -2
  20. data/lib/eligible/v1_0/patient.rb +4 -2
  21. data/lib/eligible/v1_0/patient_statement.rb +48 -50
  22. data/lib/eligible/v1_0/patient_statement_service_line.rb +7 -4
  23. data/lib/eligible/v1_0/payment_report.rb +21 -0
  24. data/lib/eligible/v1_0/product.rb +9 -0
  25. data/lib/eligible/v1_0/provider.rb +9 -0
  26. data/lib/eligible/v1_0/remark.rb +21 -0
  27. data/lib/eligible/v1_0/rest_api_base.rb +25 -13
  28. data/lib/eligible/v1_0/rule.rb +13 -0
  29. data/lib/eligible/v1_0/session.rb +21 -0
  30. data/lib/eligible/v1_0/transaction.rb +21 -0
  31. data/lib/eligible/v1_0/treatment.rb +9 -0
  32. data/lib/eligible/v1_0/value_list.rb +9 -0
  33. data/lib/eligible/v1_0/value_list_item.rb +9 -0
  34. data/lib/eligible/v1_0/verification.rb +17 -0
  35. data/lib/eligible/version.rb +1 -1
  36. metadata +27 -3
  37. 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: 53592214bfd4b6268ac1b0aa61440c61772aa1fc27508db1ebec7e5a7204ccf5
4
- data.tar.gz: f5290a7b78595181c9c294eb6ed1e5d766c9fe737d335f330dc6b72074d07c05
3
+ metadata.gz: aefce6db544898580f8d65ad3c0b553f30bd1afb63c677ddadca553bcd732132
4
+ data.tar.gz: 76185674a4d1f96cb3358a9e12ffd367be8d616a01cd0c16de13e272712430b4
5
5
  SHA512:
6
- metadata.gz: b2126a3662966130bd79b7467b329eb17d2dccc75cbd2d5d43e390fcd032ebded283f930dd43f799ec23a773e9559a0507ae88ecee932e9609089a045bf518ec
7
- data.tar.gz: 51c19b4405d0d2f92e3f859ad581f2c06fb99ef41d34d3212e589de314100f585ceca214cd7b0f86982586dc1b736c8845797558e70f995bb28592bab30f8fca
6
+ metadata.gz: 7069d579a3ab778da4cf7b6c31b235572ad5f80fd13df487d869895432272434aa1c3a985993b497df07788d6ba0e992ff38917765979f6eac3aa6bd650129b3
7
+ data.tar.gz: 771c36b33ba389066e8318315239789e80f1eebcb8484b53a84cf4df8b7c28ff8fe704657275246882bf3eb99ef89f5cce61314fa6adfce9ea84c99a745969a6
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0.beta13 - 2020-06-05
4
+ - Added create, update, delete and validate endpoints support for rules
5
+
6
+ ## 3.0.0.beta12 - 2020-05-12
7
+ - Updated pinned GDS SSL certificate
8
+
9
+ ## 3.0.0.beta11 - 2020-05-12
10
+ - Added summary and escalate actions for Enrollments endpoint
11
+ - Added Action endpoint
12
+ - Added Attribute endpoint
13
+ - Added Claim endpoint
14
+ - Added ClaimServiceLine endpoint
15
+ - Added Device endpoint
16
+ - Added Discount endpoint
17
+ - Renamed FileObject to File in order to kept consistency
18
+ - Added FileLink endpoint
19
+ - Added InsuranceCompanyAlias endpoint
20
+ - Added PaymentReport endpoint
21
+ - Added Remark endpoint
22
+ - Added Rule endpoint
23
+ - Added Session endpoint
24
+ - Added Transaction endpoint
25
+ - Added ValueList endpoint
26
+ - Added ValueListItem endpoint
27
+ - Added Verification endpoint
28
+ - Updated Charge endpoint to raise exception on delete action
29
+ - Updated Estimate endpoint, raise exception on update and delete actions, and added missing actions process, reestimate, convert
30
+ - Update EstimateServiceLine endpoint to raise exception on update and delete actions
31
+ - Updated InsuranceCompany endpoint to raise exception on delete action
32
+
33
+ ## 3.0.0.beta10 - 2020-05-06
34
+ - Added support for new REST API endpoints "Contract, Enrollment, Provider"
35
+ - Added support delete operations on new API.
36
+
37
+ ## 3.0.0.beta9 - 2020-05-04
38
+ - Added support for new REST API endpoints "Charge, Estimate, EstimateServiceLine, Product, Treatment"
39
+
3
40
  ## 3.0.0.beta8 - 2020-04-30
4
41
  - Fixed payment and payment_reports API urls for new PatientStatement endpoint
5
42
 
@@ -43,12 +43,36 @@ 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/file_object'
46
+ require 'eligible/v1_0/action'
47
+ require 'eligible/v1_0/attribute'
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'
55
+ require 'eligible/v1_0/estimate'
56
+ require 'eligible/v1_0/estimate_service_line'
57
+ require 'eligible/v1_0/file'
58
+ require 'eligible/v1_0/file_link'
47
59
  require 'eligible/v1_0/insurance_company'
60
+ require 'eligible/v1_0/insurance_company_alias'
48
61
  require 'eligible/v1_0/insurance_policy'
49
62
  require 'eligible/v1_0/patient'
50
63
  require 'eligible/v1_0/patient_statement'
51
64
  require 'eligible/v1_0/patient_statement_service_line'
65
+ require 'eligible/v1_0/payment_report'
66
+ require 'eligible/v1_0/product'
67
+ require 'eligible/v1_0/provider'
68
+ require 'eligible/v1_0/remark'
69
+ require 'eligible/v1_0/rule'
70
+ require 'eligible/v1_0/session'
71
+ require 'eligible/v1_0/transaction'
72
+ require 'eligible/v1_0/treatment'
73
+ require 'eligible/v1_0/value_list'
74
+ require 'eligible/v1_0/value_list_item'
75
+ require 'eligible/v1_0/verification'
52
76
 
53
77
  # Errors
54
78
  require 'eligible/errors/eligible_error'
@@ -62,11 +86,12 @@ module Eligible
62
86
  @@test = false
63
87
  @@api_version = '1.5'
64
88
  @@api_base = "https://gds.eligibleapi.com/v#{@@api_version}"
65
- @@fingerprints = %w(9df5f186fb20ad25ffd864942a6394840b02a480
66
- a1cd762a9f4be0f3b6bdd6300e52c6ce8d7d67f5
89
+ @@fingerprints = %w(a1cd762a9f4be0f3b6bdd6300e52c6ce8d7d67f5
90
+ 36d6b6f98a2b9bcdf4321d1978553e23cf044b53
67
91
  d93b7697100fe978ae0f78fbf2a2443cc1958ca3
68
92
  896ce24f7a83eb656c040985fdb50ce39f90b813)
69
93
  @@eligible_account = nil
94
+ @@eligible_account_id = nil
70
95
 
71
96
  def self.api_url(url = '', rest_api_version = nil)
72
97
  api_base = rest_api_version ? @@api_base.gsub(/v(\d).(\d)/, "v#{rest_api_version}") : @@api_base
@@ -77,10 +102,18 @@ module Eligible
77
102
  @@eligible_account
78
103
  end
79
104
 
105
+ def self.eligible_account_id
106
+ @@eligible_account_id
107
+ end
108
+
80
109
  def self.eligible_account=(eligible_account)
81
110
  @@eligible_account = eligible_account
82
111
  end
83
112
 
113
+ def self.eligible_account_id=(eligible_account_id)
114
+ @@eligible_account_id = eligible_account_id
115
+ end
116
+
84
117
  def self.api_key
85
118
  @@api_key
86
119
  end
@@ -277,6 +310,7 @@ module Eligible
277
310
  headers[:authorization] = authorization_header(basic_auth, auth_options)
278
311
  headers[:eligible_version] = api_version if api_version
279
312
  headers[:eligible_account] = eligible_account if eligible_account
313
+ headers[:eligible_account_id] = eligible_account_id if eligible_account_id
280
314
  headers
281
315
  end
282
316
 
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class Action < RestAPIBase
6
+ ENDPOINT_NAME = 'rules/actions'.freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class Attribute < RestAPIBase
6
+ ENDPOINT_NAME = 'rules/attributes'.freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
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
12
+ end
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,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class ClaimServiceLine < RestAPIBase
6
+ ENDPOINT_NAME = 'claim_service_lines'.freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class Contract < RestAPIBase
6
+ ENDPOINT_NAME = 'contracts'.freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class Device < RestAPIBase
6
+ ENDPOINT_NAME = 'devices'.freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class Discount < RestAPIBase
6
+ ENDPOINT_NAME = 'discounts'.freeze
7
+ end
8
+ end
9
+ 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
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
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
28
+ end
29
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
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
16
+ end
17
+ 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
- class InsuranceCompany < RestAPIBase
5
- ENDPOINT_NAME = 'insurance_companies'.freeze
4
+ module V1_0
5
+ class InsuranceCompany < RestAPIBase
6
+ ENDPOINT_NAME = 'insurance_companies'.freeze
6
7
 
7
- def self.create(_params, _opts = {})
8
- fail NotImplementedError, "Not an allowed operation for this endpoint"
9
- end
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
- def self.update(_params, _opts = {})
12
- fail NotImplementedError, "Not an allowed operation for this endpoint"
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
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class InsuranceCompanyAlias < RestAPIBase
6
+ ENDPOINT_NAME = 'insurance_company_aliases'.freeze
7
+ end
8
+ end
9
+ end
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eligible
4
- class InsurancePolicy < RestAPIBase
5
- ENDPOINT_NAME = 'insurance_policies'.freeze
4
+ module V1_0
5
+ class InsurancePolicy < RestAPIBase
6
+ ENDPOINT_NAME = 'insurance_policies'.freeze
7
+ end
6
8
  end
7
9
  end
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eligible
4
- class Patient < RestAPIBase
5
- ENDPOINT_NAME = 'patients'.freeze
4
+ module V1_0
5
+ class Patient < RestAPIBase
6
+ ENDPOINT_NAME = 'patients'.freeze
7
+ end
6
8
  end
7
9
  end
@@ -1,56 +1,54 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eligible
4
- class PatientStatement < RestAPIBase
5
- ENDPOINT_NAME = 'patient_statements'.freeze
6
-
7
- # Finalize the patient statement
8
- def self.finalize(id, opts = {})
9
- send_request :post, "/patient_statements/#{statement_id(id)}/finalize", rest_api_params(id), opts.merge(required_params: [:id])
10
- end
11
-
12
- # Post a payment
13
- def self.pay(params, opts = {})
14
- send_request :post, "/patient_statements/#{statement_id(params)}/payment_reports", rest_api_params(params), opts.merge(required_params: [:id])
15
- end
16
-
17
- # List all payments
18
- def self.payments(params, opts = {})
19
- send_request :get, "/patient_statements/#{statement_id(params)}/payment_reports", rest_api_params(params), opts.merge(required_params: [:id])
20
- end
21
-
22
- # Capture a Patient Statement
23
- def self.capture(params, opts = {})
24
- send_request :post, "/patient_statements/#{statement_id(params)}/capture", rest_api_params(params), opts.merge(required_params: [:id])
25
- end
26
-
27
- # Process a Patient Statement
28
- def self.process(params, opts = {})
29
- send_request :post, "/patient_statements/#{statement_id(params)}/process", rest_api_params(params), opts.merge(required_params: [:id])
30
- end
31
-
32
- # Send a Patient Statement
33
- def self.send(id, opts = {})
34
- send_request :post, "/patient_statements/#{statement_id(id)}/send", rest_api_params(id), opts.merge(required_params: [:id])
35
- end
36
-
37
- # Void a Patient Statement
38
- def self.void(id, opts = {})
39
- send_request :post, "/patient_statements/#{statement_id(id)}/void", rest_api_params(id), opts.merge(required_params: [:id])
40
- end
41
-
42
- # Mark UnCollectible
43
- def self.mark_uncollectible(id, opts = {})
44
- send_request :post, "/patient_statements/#{statement_id(id)}/mark_uncollectible", rest_api_params(id), opts.merge(required_params: [:id])
45
- end
46
-
47
- # Reestimate a Patient Statement
48
- def self.reestimate(params, opts = {})
49
- send_request :post, "/patient_statements/#{statement_id(params)}/reestimate", rest_api_params(params), opts.merge(required_params: [:id])
50
- end
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
- class PatientStatementServiceLine < RestAPIBase
5
- ENDPOINT_NAME = 'patient_statement_service_lines'.freeze
4
+ module V1_0
5
+ class PatientStatementServiceLine < RestAPIBase
6
+ ENDPOINT_NAME = 'patient_statement_service_lines'.freeze
6
7
 
7
- # not an allowed operation so override the implementation to not support explicitly even though route is not defined
8
- def self.update; end
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,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class Product < RestAPIBase
6
+ ENDPOINT_NAME = 'products'.freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class Provider < RestAPIBase
6
+ ENDPOINT_NAME = 'providers'.freeze
7
+ end
8
+ end
9
+ 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,35 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eligible
4
- class RestAPIBase < APIResource
5
- REST_API_VERSION = '1.0'.freeze
4
+ module V1_0
5
+ class RestAPIBase < APIResource
6
+ REST_API_VERSION = '1.0'.freeze
6
7
 
7
- def self.retrieve(id, opts = {})
8
- send_request :get, api_url(endpoint_name, rest_api_params(id), :id), rest_api_params(id), opts.merge(required_params: [:id])
9
- end
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
- def self.create(params, opts = {})
12
- send_request :post, api_url(endpoint_name), rest_api_params(params), opts
13
- end
12
+ def self.create(params, opts = {})
13
+ send_request :post, api_url(endpoint_name), rest_api_params(params), opts
14
+ end
14
15
 
15
- def self.update(params, opts = {})
16
- send_request :put, api_url(endpoint_name, rest_api_params(params), :id), rest_api_params(params), opts.merge(required_params: [:id])
17
- end
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
18
29
 
19
- def self.list(params, opts = {})
20
- send_request :get, api_url(endpoint_name), rest_api_params(params), opts
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
21
33
  end
22
34
  end
23
35
  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,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class Treatment < RestAPIBase
6
+ ENDPOINT_NAME = 'treatments'.freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class ValueList < RestAPIBase
6
+ ENDPOINT_NAME = 'rules/value_lists'.freeze
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class ValueListItem < RestAPIBase
6
+ ENDPOINT_NAME = 'rules/value_list_items'.freeze
7
+ end
8
+ end
9
+ 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
@@ -1,3 +1,3 @@
1
1
  module Eligible
2
- VERSION = '3.0.0.beta8'.freeze
2
+ VERSION = '3.0.0.beta13'.freeze
3
3
  end
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.beta8
4
+ version: 3.0.0.beta13
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-04-30 00:00:00.000000000 Z
13
+ date: 2020-06-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -155,13 +155,37 @@ 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/file_object.rb
158
+ - lib/eligible/v1_0/action.rb
159
+ - lib/eligible/v1_0/attribute.rb
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
167
+ - lib/eligible/v1_0/estimate.rb
168
+ - lib/eligible/v1_0/estimate_service_line.rb
169
+ - lib/eligible/v1_0/file.rb
170
+ - lib/eligible/v1_0/file_link.rb
159
171
  - lib/eligible/v1_0/insurance_company.rb
172
+ - lib/eligible/v1_0/insurance_company_alias.rb
160
173
  - lib/eligible/v1_0/insurance_policy.rb
161
174
  - lib/eligible/v1_0/patient.rb
162
175
  - lib/eligible/v1_0/patient_statement.rb
163
176
  - lib/eligible/v1_0/patient_statement_service_line.rb
177
+ - lib/eligible/v1_0/payment_report.rb
178
+ - lib/eligible/v1_0/product.rb
179
+ - lib/eligible/v1_0/provider.rb
180
+ - lib/eligible/v1_0/remark.rb
164
181
  - lib/eligible/v1_0/rest_api_base.rb
182
+ - lib/eligible/v1_0/rule.rb
183
+ - lib/eligible/v1_0/session.rb
184
+ - lib/eligible/v1_0/transaction.rb
185
+ - lib/eligible/v1_0/treatment.rb
186
+ - lib/eligible/v1_0/value_list.rb
187
+ - lib/eligible/v1_0/value_list_item.rb
188
+ - lib/eligible/v1_0/verification.rb
165
189
  - lib/eligible/version.rb
166
190
  - lib/eligible/visit_type.rb
167
191
  - 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