change_health 5.5.0 → 5.6.0

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: 68c9d3df25d6f47b5a970058fc6aef97b372a605a2be2a7f81569b665b6d69ba
4
- data.tar.gz: 79b1857e502ab8e6fae635e230a5d22362c814b3aadb161d912d53d970cf00e4
3
+ metadata.gz: 8495cb12f20da060485853dced1cd55349f12f832d2248fac2df969cb010bdac
4
+ data.tar.gz: 146f312abc8a2e1aa29ba48aec980201c100b6675ddeb3552a8a9b0f7428c5ba
5
5
  SHA512:
6
- metadata.gz: f5a37f908a5da6a9b1c2cb09bc19f94355c54b1eebea564faba52746f22c9fefce045d0f95b51a7aac932bdb6be0e953a7d945baa46f6ea66aa341fcb8a43a69
7
- data.tar.gz: 60c0fbc7030dd5caee716952620e2b09c7b7d320a7249d26f3937ee22e75164b049ac3d9b99391b8a609ca6f325eba028ef96e6033c7dccb240e407f9547caed
6
+ metadata.gz: 59fea4e29a8a61b08fd30ddaba4e507b0e7aa0f4caaeb99aa50445121e5f8e408ea71dd91074800a5277dba545d3a1bb48040e2ef690f7d8c663f63b516893ba
7
+ data.tar.gz: 97eced181397c5c9629028a077c068e7e4aed773d919488eb6979d6e19ea5caf707ba290b785cfa2a56985f0eefa3e79f163b9ec1bbaaf2809ab8222008a862f
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ # [5.6.0] - 2024-03-06
9
+
10
+ ### Added
11
+
12
+ * Changed claim submission to use new endpoint override option
13
+
8
14
  # [5.5.0] - 2024-03-06
9
15
 
10
16
  ### Added
@@ -607,6 +613,7 @@ Added the ability to hit professional claim submission API. For more details, se
607
613
  * Authentication
608
614
  * Configuration
609
615
 
616
+ [5.6.0]: https://github.com/WeInfuse/change_health/compare/v5.5.0...v5.6.0
610
617
  [5.5.0]: https://github.com/WeInfuse/change_health/compare/v5.4.2...v5.5.0
611
618
  [5.4.2]: https://github.com/WeInfuse/change_health/compare/v5.4.1...v5.4.2
612
619
  [5.4.1]: https://github.com/WeInfuse/change_health/compare/v5.4.0...v5.4.1
@@ -21,10 +21,11 @@ module ChangeHealth
21
21
  self.class.send(verb.to_s, endpoint, query: query, body: body, headers: headers)
22
22
  end
23
23
 
24
- def self.endpoint_for(klass)
24
+ def self.endpoint_for(klass, default_endpoint: nil)
25
25
  endpoint_options = ChangeHealth.configuration.endpoints || {}
26
+ default_endpoint ||= klass::ENDPOINT
26
27
 
27
- endpoint_options[klass.to_s] || endpoint_options[klass.to_s.to_sym] || klass::ENDPOINT
28
+ endpoint_options[klass.to_s] || endpoint_options[klass.to_s.to_sym] || default_endpoint
28
29
  end
29
30
 
30
31
  private
@@ -36,11 +36,12 @@ module ChangeHealth
36
36
  end
37
37
 
38
38
  def submission(is_professional: true)
39
- endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
40
- endpoint += SUBMISSION_SUFFIX
41
39
  ChangeHealth::Response::Claim::SubmissionData.new(
42
40
  response: ChangeHealth::Connection.new.request(
43
- endpoint: endpoint,
41
+ endpoint: self.class.endpoint(
42
+ is_professional: is_professional,
43
+ suffix: SUBMISSION_SUFFIX
44
+ ),
44
45
  body: to_h,
45
46
  headers: is_professional ? professional_headers : institutional_headers
46
47
  )
@@ -48,11 +49,12 @@ module ChangeHealth
48
49
  end
49
50
 
50
51
  def validation(is_professional: true)
51
- endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
52
- endpoint += VALIDATION_SUFFIX
53
52
  ChangeHealth::Response::Claim::SubmissionData.new(
54
53
  response: ChangeHealth::Connection.new.request(
55
- endpoint: endpoint,
54
+ endpoint: self.class.endpoint(
55
+ is_professional: is_professional,
56
+ suffix: VALIDATION_SUFFIX
57
+ ),
56
58
  body: to_h,
57
59
  headers: is_professional ? professional_headers : institutional_headers
58
60
  )
@@ -60,15 +62,29 @@ module ChangeHealth
60
62
  end
61
63
 
62
64
  def self.health_check(is_professional: true)
63
- endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
64
- endpoint += HEALTH_CHECK_SUFFIX
65
- ChangeHealth::Connection.new.request(endpoint: endpoint, verb: :get)
65
+ ChangeHealth::Connection.new.request(
66
+ endpoint: endpoint(
67
+ is_professional: is_professional,
68
+ suffix: HEALTH_CHECK_SUFFIX
69
+ ),
70
+ verb: :get
71
+ )
66
72
  end
67
73
 
68
74
  def self.ping(is_professional: true)
69
75
  health_check(is_professional: is_professional)
70
76
  end
71
77
 
78
+ def self.endpoint(is_professional: true, suffix: '')
79
+ default_endpoint = is_professional ? PROFESSIONAL_ENDPOINT : INSTITUTIONAL_ENDPOINT
80
+ default_endpoint += suffix
81
+
82
+ ChangeHealth::Connection.endpoint_for(
83
+ ChangeHealth::Request::Claim::Submission,
84
+ default_endpoint: default_endpoint
85
+ )
86
+ end
87
+
72
88
  def professional_headers
73
89
  return unless self[:headers]
74
90
 
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '5.5.0'.freeze
2
+ VERSION = '5.6.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: change_health
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.0
4
+ version: 5.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-06 00:00:00.000000000 Z
11
+ date: 2024-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -128,7 +128,7 @@ dependencies:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0.9'
131
- description:
131
+ description:
132
132
  email:
133
133
  - mike.crockett@weinfuse.com
134
134
  executables: []
@@ -206,7 +206,7 @@ licenses:
206
206
  - MIT
207
207
  metadata:
208
208
  allowed_push_host: https://rubygems.org
209
- post_install_message:
209
+ post_install_message:
210
210
  rdoc_options: []
211
211
  require_paths:
212
212
  - lib
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  version: '0'
223
223
  requirements: []
224
224
  rubygems_version: 3.1.6
225
- signing_key:
225
+ signing_key:
226
226
  specification_version: 4
227
227
  summary: Ruby wrapper for the ChangeHealth API
228
228
  test_files: []