change_health 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/change_health/models/eligibility_data.rb +12 -1
- data/lib/change_health/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69bacf8024e568af3c7dbbdfe638ede842f44392fc870128a7da9242ce7a7094
|
4
|
+
data.tar.gz: d1e9b4d07f32e0631b75820cfe31e0aa4a6f37f77ccebe8e63cdbf826a29ea90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa7f24775ab4760c110a0b3977a51170c4d465651753b184c65be967a1d48708d3564b63357db110ea8d538be2bece70bb07282623c85c35dc5d789fa68c0703
|
7
|
+
data.tar.gz: 8307d1353765e881915c50ee02b3c280c5abb73e42f94f9f814f3089c004b6e7d0c4c70130070f964f9922f5496f5b46a8b582956d945cac2d4ddbb6a561cc0d
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [1.0.3] - [2021-04-26]
|
8
|
+
### Added
|
9
|
+
- Model::Error#represents_down? - adds ability to distinguish error representing down state
|
10
|
+
- Model::Error#retryable? - retryable when down
|
11
|
+
- EligibilityData#recommend_retry? - recommend retry when down
|
12
|
+
|
7
13
|
## [1.0.2] - [2021-04-06]
|
8
14
|
### Added
|
9
15
|
- EligibilityData#recommend_retry? - fix a bug in the search statement
|
@@ -126,6 +132,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
126
132
|
- Authentication
|
127
133
|
- Configuration
|
128
134
|
|
135
|
+
[1.0.3]: https://github.com/WeInfuse/change_health/compare/v1.0.2...v1.0.3
|
129
136
|
[1.0.2]: https://github.com/WeInfuse/change_health/compare/v1.0.1...v1.0.2
|
130
137
|
[1.0.1]: https://github.com/WeInfuse/change_health/compare/v1.0.0...v1.0.1
|
131
138
|
[1.0.0]: https://github.com/WeInfuse/change_health/compare/v0.15.0...v1.0.0
|
@@ -13,6 +13,10 @@ module ChangeHealth
|
|
13
13
|
'do not resubmit'
|
14
14
|
].freeze
|
15
15
|
|
16
|
+
DOWN_FIELD = 'Http Header'.freeze
|
17
|
+
|
18
|
+
DOWN_MESSAGE = 'Please review http headers for this API, please contact support if you are unsure how to resolve.'.freeze
|
19
|
+
|
16
20
|
def initialize(data)
|
17
21
|
@data = data
|
18
22
|
end
|
@@ -29,8 +33,13 @@ module ChangeHealth
|
|
29
33
|
"#{code}: #{description}" if code?
|
30
34
|
end
|
31
35
|
|
36
|
+
def represents_down?
|
37
|
+
field == DOWN_FIELD && description == DOWN_MESSAGE
|
38
|
+
end
|
39
|
+
|
32
40
|
def retryable?
|
33
|
-
|
41
|
+
represents_down? ||
|
42
|
+
(code? && SIMPLE_RETRY_CODES.include?(code) && followupAction? && NO_RESUBMIT_MESSAGES.none? {|msg| followupAction.downcase.include?(msg) })
|
34
43
|
end
|
35
44
|
|
36
45
|
%w[field description code followupAction location].each do |method_name|
|
@@ -92,6 +101,8 @@ module ChangeHealth
|
|
92
101
|
def recommend_retry?
|
93
102
|
return false unless errors?
|
94
103
|
|
104
|
+
return true if errors.any?(&:represents_down?)
|
105
|
+
|
95
106
|
error_codes = errors.select(&:code?)
|
96
107
|
|
97
108
|
return false if error_codes.empty?
|
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: 1.0.
|
4
|
+
version: 1.0.3
|
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: 2021-04-
|
11
|
+
date: 2021-04-26 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: []
|
@@ -165,7 +165,7 @@ licenses:
|
|
165
165
|
- MIT
|
166
166
|
metadata:
|
167
167
|
allowed_push_host: https://rubygems.org
|
168
|
-
post_install_message:
|
168
|
+
post_install_message:
|
169
169
|
rdoc_options: []
|
170
170
|
require_paths:
|
171
171
|
- lib
|
@@ -180,8 +180,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
|
184
|
-
|
183
|
+
rubyforge_project:
|
184
|
+
rubygems_version: 2.7.6
|
185
|
+
signing_key:
|
185
186
|
specification_version: 4
|
186
187
|
summary: Ruby wrapper for the ChangeHealth API
|
187
188
|
test_files: []
|