change_health 5.15.0 → 5.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/lib/change_health/request/submission.rb +6 -5
- data/lib/change_health/response/response_data.rb +7 -1
- data/lib/change_health/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 355fbfa31f70d2fe1b7d96c42f6caad0f56e550f2c26d33f42de7ecdc6cb0496
|
4
|
+
data.tar.gz: 715784379b3546edbeb66494388e958d4accc76e7a2e78f4824c122d878d32b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99b51f0c666af0450c60fd53095b8280db9f94aa0389db9df0a5f34bcf6f601bb32c36bd1e66fe1146a1f6cfe6737f6d59bc4c2ea74b105efde48e77ad3041ef
|
7
|
+
data.tar.gz: 4d7562fe434fe483ef115e420b422764d5c2047d1aa2d6f6b10739283f1c422f94b93b49fc978fb64569386d60e69f078c1d1243996ca62fb23d99af4053227f
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,25 @@ 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.17.0] - 2024-07-23
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
* Additional error handling for different format of error response
|
13
|
+
|
14
|
+
```
|
15
|
+
{
|
16
|
+
"error": "invalid_request",
|
17
|
+
"error_description": "Invalid request"
|
18
|
+
}
|
19
|
+
```
|
20
|
+
|
21
|
+
# [5.16.0] - 2024-06-24
|
22
|
+
|
23
|
+
### Added
|
24
|
+
|
25
|
+
* Ability to accept alternate `endpoint` in submission.
|
26
|
+
|
8
27
|
# [5.15.0] - 2024-06-19
|
9
28
|
|
10
29
|
### Added
|
@@ -712,6 +731,8 @@ Added the ability to hit professional claim submission API. For more details, se
|
|
712
731
|
* Authentication
|
713
732
|
* Configuration
|
714
733
|
|
734
|
+
[5.17.0]: https://github.com/WeInfuse/change_health/compare/v5.16.0...v5.17.0
|
735
|
+
[5.16.0]: https://github.com/WeInfuse/change_health/compare/v5.15.0...v5.16.0
|
715
736
|
[5.15.0]: https://github.com/WeInfuse/change_health/compare/v5.14.0...v5.15.0
|
716
737
|
[5.14.0]: https://github.com/WeInfuse/change_health/compare/v5.13.3...v5.14.0
|
717
738
|
[5.13.3]: https://github.com/WeInfuse/change_health/compare/v5.13.2...v5.13.3
|
@@ -40,14 +40,15 @@ module ChangeHealth
|
|
40
40
|
self[:providers] << provider
|
41
41
|
end
|
42
42
|
|
43
|
-
def submission(is_professional: true, headers: nil, base_uri: nil, auth_headers: nil)
|
43
|
+
def submission(is_professional: true, headers: nil, base_uri: nil, auth_headers: nil, endpoint: nil)
|
44
44
|
headers ||= is_professional ? professional_headers : institutional_headers
|
45
|
+
endpoint ||= self.class.endpoint(
|
46
|
+
is_professional: is_professional,
|
47
|
+
suffix: SUBMISSION_SUFFIX
|
48
|
+
)
|
45
49
|
ChangeHealth::Response::Claim::SubmissionData.new(
|
46
50
|
response: ChangeHealth::Connection.new.request(
|
47
|
-
endpoint:
|
48
|
-
is_professional: is_professional,
|
49
|
-
suffix: SUBMISSION_SUFFIX
|
50
|
-
),
|
51
|
+
endpoint: endpoint,
|
51
52
|
base_uri: base_uri,
|
52
53
|
body: to_h,
|
53
54
|
headers: headers,
|
@@ -16,7 +16,9 @@ module ChangeHealth
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def errors?
|
19
|
-
errors.is_a?(Array) && false == errors.empty?
|
19
|
+
field_error = errors.is_a?(Array) && false == errors.empty?
|
20
|
+
|
21
|
+
field_error || server_error.is_a?(ChangeHealthException)
|
20
22
|
end
|
21
23
|
|
22
24
|
def errors
|
@@ -25,6 +27,10 @@ module ChangeHealth
|
|
25
27
|
errors.flatten.map { |error| ChangeHealth::Response::Error.new(error) }
|
26
28
|
end
|
27
29
|
|
30
|
+
def server_error
|
31
|
+
ChangeHealthException.from_response(@response, msg: 'Request') if @raw.dig('error')
|
32
|
+
end
|
33
|
+
|
28
34
|
def recommend_retry?
|
29
35
|
return false unless errors?
|
30
36
|
|
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.
|
4
|
+
version: 5.17.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-
|
11
|
+
date: 2024-07-23 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
|
@@ -221,8 +221,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
requirements: []
|
224
|
-
rubygems_version: 3.
|
225
|
-
signing_key:
|
224
|
+
rubygems_version: 3.1.6
|
225
|
+
signing_key:
|
226
226
|
specification_version: 4
|
227
227
|
summary: Ruby wrapper for the ChangeHealth API
|
228
228
|
test_files: []
|