eligible 3.0.0.beta9 → 3.0.0.beta10

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0980900a3206860647c35d61795ceaa176b18621dd6def8089864870ac93a725'
4
- data.tar.gz: bdefbc5efb86e2f482be2fbc5d8a757214dc9d0165cf9684ac1a9e4247ca2c82
3
+ metadata.gz: 022aad585cbfad9359538dc5fb0b94a8a0e81eeb380d6005afcc8e53927b8438
4
+ data.tar.gz: 6b6d6c13ca25ea86645d02b9793305a90ad3c2b59a103136eeb00143eaa10b61
5
5
  SHA512:
6
- metadata.gz: a2e929c67ce8e77af613aa16d838981eed8fe2afe1e470a19e9aa536093359082b6ab498f0c2051a035663b99514f1d88af45ad89f74e43c4ef28830495fcaa9
7
- data.tar.gz: 1cabd417dbc9b7d4df37b9835b597ffd0339030f01d09d1a04e3059db526d26b3cdf0beb8d5fced5803214eb10a9a5f4c71b8951e5da69eda0dc7a8f3689ec32
6
+ metadata.gz: 477bb4a77d00801a652170050f1e1d6227107fd1aa76278824e75c9ff5a5b0376d6eecc516232c4675cb2cc07f789139cb7642f66c9100fd581cd9d20f591717
7
+ data.tar.gz: ef065dca99ea990a7274825b90bc1597612f89fce9469baef28d8a0766b1126c49dd68b867b67c1202a166e53f0f16cdd582cdf13b2f14083d5c586d29fb0045
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0.beta10 - 2020-05-06
4
+ - Added support for new REST API endpoints "Contract, Enrollment, Provider"
5
+ - Added support delete operations on new API.
6
+
3
7
  ## 3.0.0.beta9 - 2020-05-04
4
8
  - Added support for new REST API endpoints "Charge, Estimate, EstimateServiceLine, Product, Treatment"
5
9
 
@@ -44,6 +44,8 @@ require 'eligible/icd'
44
44
  # New REST API Endpoints
45
45
  require 'eligible/v1_0/rest_api_base'
46
46
  require 'eligible/v1_0/charge'
47
+ require 'eligible/v1_0/contract'
48
+ require 'eligible/v1_0/enrollment'
47
49
  require 'eligible/v1_0/estimate'
48
50
  require 'eligible/v1_0/estimate_service_line'
49
51
  require 'eligible/v1_0/file_object'
@@ -53,6 +55,7 @@ require 'eligible/v1_0/patient'
53
55
  require 'eligible/v1_0/patient_statement'
54
56
  require 'eligible/v1_0/patient_statement_service_line'
55
57
  require 'eligible/v1_0/product'
58
+ require 'eligible/v1_0/provider'
56
59
  require 'eligible/v1_0/treatment'
57
60
 
58
61
  # Errors
@@ -72,6 +75,7 @@ module Eligible
72
75
  d93b7697100fe978ae0f78fbf2a2443cc1958ca3
73
76
  896ce24f7a83eb656c040985fdb50ce39f90b813)
74
77
  @@eligible_account = nil
78
+ @@eligible_account_id = nil
75
79
 
76
80
  def self.api_url(url = '', rest_api_version = nil)
77
81
  api_base = rest_api_version ? @@api_base.gsub(/v(\d).(\d)/, "v#{rest_api_version}") : @@api_base
@@ -82,10 +86,18 @@ module Eligible
82
86
  @@eligible_account
83
87
  end
84
88
 
89
+ def self.eligible_account_id
90
+ @@eligible_account_id
91
+ end
92
+
85
93
  def self.eligible_account=(eligible_account)
86
94
  @@eligible_account = eligible_account
87
95
  end
88
96
 
97
+ def self.eligible_account_id=(eligible_account_id)
98
+ @@eligible_account_id = eligible_account_id
99
+ end
100
+
89
101
  def self.api_key
90
102
  @@api_key
91
103
  end
@@ -282,6 +294,7 @@ module Eligible
282
294
  headers[:authorization] = authorization_header(basic_auth, auth_options)
283
295
  headers[:eligible_version] = api_version if api_version
284
296
  headers[:eligible_account] = eligible_account if eligible_account
297
+ headers[:eligible_account_id] = eligible_account_id if eligible_account_id
285
298
  headers
286
299
  end
287
300
 
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eligible
4
- class Charge < RestAPIBase
5
- ENDPOINT_NAME = 'charges'.freeze
4
+ module V1_0
5
+ class Charge < RestAPIBase
6
+ ENDPOINT_NAME = 'charges'.freeze
7
+ end
6
8
  end
7
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 Enrollment < RestAPIBase
6
+ ENDPOINT_NAME = 'enrollments'.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 Estimate < RestAPIBase
5
- ENDPOINT_NAME = 'estimates'.freeze
4
+ module V1_0
5
+ class Estimate < RestAPIBase
6
+ ENDPOINT_NAME = 'estimates'.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 EstimateServiceLine < RestAPIBase
5
- ENDPOINT_NAME = 'estimate_service_lines'.freeze
4
+ module V1_0
5
+ class EstimateServiceLine < RestAPIBase
6
+ ENDPOINT_NAME = 'estimate_service_lines'.freeze
7
+ end
6
8
  end
7
9
  end
@@ -1,10 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eligible
4
- class FileObject < RestAPIBase
5
- ENDPOINT_NAME = 'files'.freeze
4
+ module V1_0
5
+ class FileObject < RestAPIBase
6
+ ENDPOINT_NAME = 'files'.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
+ # 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
9
11
  end
10
12
  end
@@ -1,15 +1,17 @@
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
10
11
 
11
- def self.update(_params, _opts = {})
12
- fail NotImplementedError, "Not an allowed operation for this endpoint"
12
+ def self.update(_params, _opts = {})
13
+ fail NotImplementedError, "Not an allowed operation for this endpoint"
14
+ end
13
15
  end
14
16
  end
15
17
  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,58 @@
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, "/patient_statements/#{statement_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, "/patient_statements/#{statement_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, "/patient_statements/#{statement_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, "/patient_statements/#{statement_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, "/patient_statements/#{statement_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, "/patient_statements/#{statement_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, "/patient_statements/#{statement_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, "/patient_statements/#{statement_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, "/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
55
+ end
54
56
  end
55
57
  end
56
58
  end
@@ -1,10 +1,12 @@
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
+ # 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
9
11
  end
10
12
  end
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eligible
4
- class Product < RestAPIBase
5
- ENDPOINT_NAME = 'products'.freeze
4
+ module V1_0
5
+ class Product < RestAPIBase
6
+ ENDPOINT_NAME = 'products'.freeze
7
+ end
6
8
  end
7
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
@@ -1,23 +1,29 @@
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
18
23
 
19
- def self.list(params, opts = {})
20
- send_request :get, api_url(endpoint_name), rest_api_params(params), opts
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
21
27
  end
22
28
  end
23
29
  end
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eligible
4
- class Treatment < RestAPIBase
5
- ENDPOINT_NAME = 'treatments'.freeze
4
+ module V1_0
5
+ class Treatment < RestAPIBase
6
+ ENDPOINT_NAME = 'treatments'.freeze
7
+ end
6
8
  end
7
9
  end
@@ -1,3 +1,3 @@
1
1
  module Eligible
2
- VERSION = '3.0.0.beta9'.freeze
2
+ VERSION = '3.0.0.beta10'.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.beta9
4
+ version: 3.0.0.beta10
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-04 00:00:00.000000000 Z
13
+ date: 2020-05-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -156,6 +156,8 @@ files:
156
156
  - lib/eligible/ticket.rb
157
157
  - lib/eligible/util.rb
158
158
  - lib/eligible/v1_0/charge.rb
159
+ - lib/eligible/v1_0/contract.rb
160
+ - lib/eligible/v1_0/enrollment.rb
159
161
  - lib/eligible/v1_0/estimate.rb
160
162
  - lib/eligible/v1_0/estimate_service_line.rb
161
163
  - lib/eligible/v1_0/file_object.rb
@@ -165,6 +167,7 @@ files:
165
167
  - lib/eligible/v1_0/patient_statement.rb
166
168
  - lib/eligible/v1_0/patient_statement_service_line.rb
167
169
  - lib/eligible/v1_0/product.rb
170
+ - lib/eligible/v1_0/provider.rb
168
171
  - lib/eligible/v1_0/rest_api_base.rb
169
172
  - lib/eligible/v1_0/treatment.rb
170
173
  - lib/eligible/version.rb