eligible 3.0.0.beta10 → 3.0.0.beta15

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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +36 -0
  4. data/lib/eligible.rb +23 -3
  5. data/lib/eligible/v1_0/action.rb +9 -0
  6. data/lib/eligible/v1_0/attribute.rb +9 -0
  7. data/lib/eligible/v1_0/charge.rb +4 -0
  8. data/lib/eligible/v1_0/claim.rb +25 -0
  9. data/lib/eligible/v1_0/claim_service_line.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 +8 -0
  13. data/lib/eligible/v1_0/estimate.rb +20 -0
  14. data/lib/eligible/v1_0/estimate_service_line.rb +8 -0
  15. data/lib/eligible/v1_0/fee.rb +21 -0
  16. data/lib/eligible/v1_0/fee_refund.rb +29 -0
  17. data/lib/eligible/v1_0/file.rb +17 -0
  18. data/lib/eligible/v1_0/file_link.rb +13 -0
  19. data/lib/eligible/v1_0/insurance_company.rb +4 -0
  20. data/lib/eligible/v1_0/insurance_company_alias.rb +9 -0
  21. data/lib/eligible/v1_0/patient_question.rb +9 -0
  22. data/lib/eligible/v1_0/patient_questionnaire.rb +9 -0
  23. data/lib/eligible/v1_0/patient_statement.rb +9 -13
  24. data/lib/eligible/v1_0/patient_statement_service_line.rb +3 -2
  25. data/lib/eligible/v1_0/payment_report.rb +21 -0
  26. data/lib/eligible/v1_0/remark.rb +21 -0
  27. data/lib/eligible/v1_0/rest_api_base.rb +15 -0
  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/value_list.rb +9 -0
  32. data/lib/eligible/v1_0/value_list_item.rb +9 -0
  33. data/lib/eligible/v1_0/verification.rb +17 -0
  34. data/lib/eligible/version.rb +1 -1
  35. metadata +23 -3
  36. data/lib/eligible/v1_0/file_object.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 022aad585cbfad9359538dc5fb0b94a8a0e81eeb380d6005afcc8e53927b8438
4
- data.tar.gz: 6b6d6c13ca25ea86645d02b9793305a90ad3c2b59a103136eeb00143eaa10b61
3
+ metadata.gz: 6aac2add3d1121cf7c670898956c0287c25308946d9f29bd55f81b8fef5526c5
4
+ data.tar.gz: 5275ddcbcdbe02d833ff794e5a74e80c0b81b5d7af758491ff1d99a1819438af
5
5
  SHA512:
6
- metadata.gz: 477bb4a77d00801a652170050f1e1d6227107fd1aa76278824e75c9ff5a5b0376d6eecc516232c4675cb2cc07f789139cb7642f66c9100fd581cd9d20f591717
7
- data.tar.gz: ef065dca99ea990a7274825b90bc1597612f89fce9469baef28d8a0766b1126c49dd68b867b67c1202a166e53f0f16cdd582cdf13b2f14083d5c586d29fb0045
6
+ metadata.gz: ae710114851b35f5a43d38749abbef7036a3f1870e41bd8a44f2b269af2ba2f40cf2963997a23ab06639a2a03404c1d6efdf2df78bcd4018fc5d6bcc13c933c2
7
+ data.tar.gz: 305d4836b384b893646b0a89bfecf7127f480ac8bf788c2fc1cbead6b1db019e7074ae7dd8285eb2d5c632f1471b6bac2ce8b94fc95da84be66bbe27b51d4bfb
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
19
  .idea
20
+ .DS_Store
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0.beta14 - 2020-06-12
4
+ - Added support for patient questionnaire, patient questions API endpoints
5
+
6
+ ## 3.0.0.beta14 - 2020-06-08
7
+ - Added Fee and FeeRefund new REST API endpoints
8
+
9
+ ## 3.0.0.beta13 - 2020-06-05
10
+ - Added create, update, delete and validate endpoints support for rules
11
+
12
+ ## 3.0.0.beta12 - 2020-05-12
13
+ - Updated pinned GDS SSL certificate
14
+
15
+ ## 3.0.0.beta11 - 2020-05-12
16
+ - Added summary and escalate actions for Enrollments endpoint
17
+ - Added Action endpoint
18
+ - Added Attribute endpoint
19
+ - Added Claim endpoint
20
+ - Added ClaimServiceLine endpoint
21
+ - Added Device endpoint
22
+ - Added Discount endpoint
23
+ - Renamed FileObject to File in order to kept consistency
24
+ - Added FileLink endpoint
25
+ - Added InsuranceCompanyAlias endpoint
26
+ - Added PaymentReport endpoint
27
+ - Added Remark endpoint
28
+ - Added Rule endpoint
29
+ - Added Session endpoint
30
+ - Added Transaction endpoint
31
+ - Added ValueList endpoint
32
+ - Added ValueListItem endpoint
33
+ - Added Verification endpoint
34
+ - Updated Charge endpoint to raise exception on delete action
35
+ - Updated Estimate endpoint, raise exception on update and delete actions, and added missing actions process, reestimate, convert
36
+ - Update EstimateServiceLine endpoint to raise exception on update and delete actions
37
+ - Updated InsuranceCompany endpoint to raise exception on delete action
38
+
3
39
  ## 3.0.0.beta10 - 2020-05-06
4
40
  - Added support for new REST API endpoints "Contract, Enrollment, Provider"
5
41
  - Added support delete operations on new API.
@@ -43,20 +43,40 @@ 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'
47
51
  require 'eligible/v1_0/contract'
52
+ require 'eligible/v1_0/device'
53
+ require 'eligible/v1_0/discount'
48
54
  require 'eligible/v1_0/enrollment'
49
55
  require 'eligible/v1_0/estimate'
50
56
  require 'eligible/v1_0/estimate_service_line'
51
- require 'eligible/v1_0/file_object'
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'
52
61
  require 'eligible/v1_0/insurance_company'
62
+ require 'eligible/v1_0/insurance_company_alias'
53
63
  require 'eligible/v1_0/insurance_policy'
54
64
  require 'eligible/v1_0/patient'
55
65
  require 'eligible/v1_0/patient_statement'
56
66
  require 'eligible/v1_0/patient_statement_service_line'
67
+ require 'eligible/v1_0/payment_report'
68
+ require 'eligible/v1_0/patient_question'
69
+ require 'eligible/v1_0/patient_questionnaire'
57
70
  require 'eligible/v1_0/product'
58
71
  require 'eligible/v1_0/provider'
72
+ require 'eligible/v1_0/remark'
73
+ require 'eligible/v1_0/rule'
74
+ require 'eligible/v1_0/session'
75
+ require 'eligible/v1_0/transaction'
59
76
  require 'eligible/v1_0/treatment'
77
+ require 'eligible/v1_0/value_list'
78
+ require 'eligible/v1_0/value_list_item'
79
+ require 'eligible/v1_0/verification'
60
80
 
61
81
  # Errors
62
82
  require 'eligible/errors/eligible_error'
@@ -70,8 +90,8 @@ module Eligible
70
90
  @@test = false
71
91
  @@api_version = '1.5'
72
92
  @@api_base = "https://gds.eligibleapi.com/v#{@@api_version}"
73
- @@fingerprints = %w(9df5f186fb20ad25ffd864942a6394840b02a480
74
- a1cd762a9f4be0f3b6bdd6300e52c6ce8d7d67f5
93
+ @@fingerprints = %w(a1cd762a9f4be0f3b6bdd6300e52c6ce8d7d67f5
94
+ 36d6b6f98a2b9bcdf4321d1978553e23cf044b53
75
95
  d93b7697100fe978ae0f78fbf2a2443cc1958ca3
76
96
  896ce24f7a83eb656c040985fdb50ce39f90b813)
77
97
  @@eligible_account = nil
@@ -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
@@ -4,6 +4,10 @@ module Eligible
4
4
  module V1_0
5
5
  class Charge < RestAPIBase
6
6
  ENDPOINT_NAME = 'charges'.freeze
7
+
8
+ def self.delete(_params, _opts = {})
9
+ fail NotImplementedError, "Not an allowed operation for this endpoint"
10
+ end
7
11
  end
8
12
  end
9
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 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
@@ -4,6 +4,14 @@ module Eligible
4
4
  module V1_0
5
5
  class Enrollment < RestAPIBase
6
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
7
15
  end
8
16
  end
9
17
  end
@@ -4,6 +4,26 @@ module Eligible
4
4
  module V1_0
5
5
  class Estimate < RestAPIBase
6
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
7
27
  end
8
28
  end
9
29
  end
@@ -5,5 +5,13 @@ module Eligible
5
5
  class EstimateServiceLine < RestAPIBase
6
6
  ENDPOINT_NAME = 'estimate_service_lines'.freeze
7
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
8
16
  end
9
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
@@ -12,6 +12,10 @@ module Eligible
12
12
  def self.update(_params, _opts = {})
13
13
  fail NotImplementedError, "Not an allowed operation for this endpoint"
14
14
  end
15
+
16
+ def self.delete(_params, _opts = {})
17
+ fail NotImplementedError, "Not an allowed operation for this endpoint"
18
+ end
15
19
  end
16
20
  end
17
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
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Eligible
4
+ module V1_0
5
+ class PatientQuestion < RestAPIBase
6
+ ENDPOINT_NAME = 'rules/patient_questions'.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 PatientQuestionnaire < RestAPIBase
6
+ ENDPOINT_NAME = 'rules/patient_questionnaires'.freeze
7
+ end
8
+ end
9
+ end
@@ -7,51 +7,47 @@ module Eligible
7
7
 
8
8
  # Finalize the patient statement
9
9
  def self.finalize(id, opts = {})
10
- send_request :post, "/patient_statements/#{statement_id(id)}/finalize", rest_api_params(id), opts.merge(required_params: [:id])
10
+ send_request :post, "/#{endpoint_name}/#{object_id(id)}/finalize", rest_api_params(id), opts.merge(required_params: [:id])
11
11
  end
12
12
 
13
13
  # Post a payment
14
14
  def self.pay(params, opts = {})
15
- send_request :post, "/patient_statements/#{statement_id(params)}/payment_reports", rest_api_params(params), opts.merge(required_params: [:id])
15
+ send_request :post, "/#{endpoint_name}/#{object_id(params)}/payment_reports", rest_api_params(params), opts.merge(required_params: [:id])
16
16
  end
17
17
 
18
18
  # List all payments
19
19
  def self.payments(params, opts = {})
20
- send_request :get, "/patient_statements/#{statement_id(params)}/payment_reports", rest_api_params(params), opts.merge(required_params: [:id])
20
+ send_request :get, "/#{endpoint_name}/#{object_id(params)}/payment_reports", rest_api_params(params), opts.merge(required_params: [:id])
21
21
  end
22
22
 
23
23
  # Capture a Patient Statement
24
24
  def self.capture(params, opts = {})
25
- send_request :post, "/patient_statements/#{statement_id(params)}/capture", rest_api_params(params), opts.merge(required_params: [:id])
25
+ send_request :post, "/#{endpoint_name}/#{object_id(params)}/capture", rest_api_params(params), opts.merge(required_params: [:id])
26
26
  end
27
27
 
28
28
  # Process a Patient Statement
29
29
  def self.process(params, opts = {})
30
- send_request :post, "/patient_statements/#{statement_id(params)}/process", rest_api_params(params), opts.merge(required_params: [:id])
30
+ send_request :post, "/#{endpoint_name}/#{object_id(params)}/process", rest_api_params(params), opts.merge(required_params: [:id])
31
31
  end
32
32
 
33
33
  # Send a Patient Statement
34
34
  def self.send(id, opts = {})
35
- send_request :post, "/patient_statements/#{statement_id(id)}/send", rest_api_params(id), opts.merge(required_params: [:id])
35
+ send_request :post, "/#{endpoint_name}/#{object_id(id)}/send", rest_api_params(id), opts.merge(required_params: [:id])
36
36
  end
37
37
 
38
38
  # Void a Patient Statement
39
39
  def self.void(id, opts = {})
40
- send_request :post, "/patient_statements/#{statement_id(id)}/void", rest_api_params(id), opts.merge(required_params: [:id])
40
+ send_request :post, "/#{endpoint_name}/#{object_id(id)}/void", rest_api_params(id), opts.merge(required_params: [:id])
41
41
  end
42
42
 
43
43
  # Mark UnCollectible
44
44
  def self.mark_uncollectible(id, opts = {})
45
- send_request :post, "/patient_statements/#{statement_id(id)}/mark_uncollectible", rest_api_params(id), opts.merge(required_params: [:id])
45
+ send_request :post, "/#{endpoint_name}/#{object_id(id)}/mark_uncollectible", rest_api_params(id), opts.merge(required_params: [:id])
46
46
  end
47
47
 
48
48
  # Reestimate a Patient Statement
49
49
  def self.reestimate(params, opts = {})
50
- send_request :post, "/patient_statements/#{statement_id(params)}/reestimate", rest_api_params(params), opts.merge(required_params: [:id])
51
- end
52
-
53
- def self.statement_id(id_or_params)
54
- id_or_params.is_a?(Hash) ? Util.value(id_or_params, :id) : id_or_params
50
+ send_request :post, "/#{endpoint_name}/#{object_id(params)}/reestimate", rest_api_params(params), opts.merge(required_params: [:id])
55
51
  end
56
52
  end
57
53
  end
@@ -5,8 +5,9 @@ module Eligible
5
5
  class PatientStatementServiceLine < RestAPIBase
6
6
  ENDPOINT_NAME = 'patient_statement_service_lines'.freeze
7
7
 
8
- # not an allowed operation so override the implementation to not support explicitly even though route is not defined
9
- def self.update; end
8
+ def self.update(_params, _opts = {})
9
+ fail NotImplementedError, "Not an allowed operation for this endpoint"
10
+ end
10
11
  end
11
12
  end
12
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
@@ -24,6 +24,21 @@ module Eligible
24
24
  def self.delete(id, opts = {})
25
25
  send_request :delete, api_url(endpoint_name, rest_api_params(id), :id), rest_api_params(id), opts.merge(required_params: [:id])
26
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
37
+
38
+ def self.fee_url(params)
39
+ fee_id = Util.value(rest_api_params(params), :fee)
40
+ "/fees/#{fee_id}"
41
+ end
27
42
  end
28
43
  end
29
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,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.beta10'.freeze
2
+ VERSION = '3.0.0.beta15'.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.beta10
4
+ version: 3.0.0.beta15
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-05-07 00:00:00.000000000 Z
13
+ date: 2020-06-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -155,21 +155,41 @@ 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
159
163
  - lib/eligible/v1_0/contract.rb
164
+ - lib/eligible/v1_0/device.rb
165
+ - lib/eligible/v1_0/discount.rb
160
166
  - lib/eligible/v1_0/enrollment.rb
161
167
  - lib/eligible/v1_0/estimate.rb
162
168
  - lib/eligible/v1_0/estimate_service_line.rb
163
- - lib/eligible/v1_0/file_object.rb
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
164
173
  - lib/eligible/v1_0/insurance_company.rb
174
+ - lib/eligible/v1_0/insurance_company_alias.rb
165
175
  - lib/eligible/v1_0/insurance_policy.rb
166
176
  - lib/eligible/v1_0/patient.rb
177
+ - lib/eligible/v1_0/patient_question.rb
178
+ - lib/eligible/v1_0/patient_questionnaire.rb
167
179
  - lib/eligible/v1_0/patient_statement.rb
168
180
  - lib/eligible/v1_0/patient_statement_service_line.rb
181
+ - lib/eligible/v1_0/payment_report.rb
169
182
  - lib/eligible/v1_0/product.rb
170
183
  - lib/eligible/v1_0/provider.rb
184
+ - lib/eligible/v1_0/remark.rb
171
185
  - lib/eligible/v1_0/rest_api_base.rb
186
+ - lib/eligible/v1_0/rule.rb
187
+ - lib/eligible/v1_0/session.rb
188
+ - lib/eligible/v1_0/transaction.rb
172
189
  - lib/eligible/v1_0/treatment.rb
190
+ - lib/eligible/v1_0/value_list.rb
191
+ - lib/eligible/v1_0/value_list_item.rb
192
+ - lib/eligible/v1_0/verification.rb
173
193
  - lib/eligible/version.rb
174
194
  - lib/eligible/visit_type.rb
175
195
  - lib/eligible/x12.rb
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Eligible
4
- module V1_0
5
- class FileObject < RestAPIBase
6
- ENDPOINT_NAME = 'files'.freeze
7
-
8
- # not an allowed operation so override the implementation to not support explicitly even though route is not defined
9
- def self.update; end
10
- end
11
- end
12
- end