change_health 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/change_health/models/eligibility_data.rb +8 -4
- data/lib/change_health/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c0475b9e925fd6ff896bb48a1d512f41085b35576b91b426b5ef83d567a428b
|
4
|
+
data.tar.gz: 42b48761b66ae58e8c72ec42b99082a20ccdda1f8554068a0981cebd35bd35d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7e2365fa92c0847c9363e518ff52631da5a17501b16d9f93b233edaea374491450d6cd3d9d5b8d91fb78b8dc3c326ab9dd05a1531ea765ad6c54769f2c58fdd
|
7
|
+
data.tar.gz: fec74c0bc9f129ec49632de92d147776d455643b190de8e750a4b5b5a6732b74ef164bdbd788d93345df0688e631f926d30506abc9c46ab0c50323a55ea42146
|
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
|
+
|
8
|
+
## [1.0.1] - [2021-03-24]
|
9
|
+
### Added
|
10
|
+
- EligibilityData#plan_status - adds ability to select instead of find
|
11
|
+
- EligibilityData#inactive? active? - use new plan_status select
|
12
|
+
|
7
13
|
## [1.0.0] - [2021-03-17]
|
8
14
|
### Added
|
9
15
|
- Model::Error - help with error codes
|
@@ -117,6 +123,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
117
123
|
- Authentication
|
118
124
|
- Configuration
|
119
125
|
|
126
|
+
[1.0.1]: https://github.com/WeInfuse/change_health/compare/v1.0.0...v1.0.1
|
127
|
+
[1.0.0]: https://github.com/WeInfuse/change_health/compare/v0.15.0...v1.0.0
|
120
128
|
[0.15.0]: https://github.com/WeInfuse/change_health/compare/v0.14.0...v0.15.0
|
121
129
|
[0.14.0]: https://github.com/WeInfuse/change_health/compare/v0.13.0...v0.14.0
|
122
130
|
[0.13.0]: https://github.com/WeInfuse/change_health/compare/v0.12.0...v0.13.0
|
@@ -72,11 +72,11 @@ module ChangeHealth
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def active?(service_code: '30')
|
75
|
-
|
75
|
+
plan_status(service_code: service_code, single: false).any? {|status| ACTIVE == status['statusCode'] }
|
76
76
|
end
|
77
77
|
|
78
78
|
def inactive?(service_code: '30')
|
79
|
-
|
79
|
+
plan_status(service_code: service_code, single: false).any? {|status| INACTIVE == status['statusCode'] }
|
80
80
|
end
|
81
81
|
|
82
82
|
def errors?
|
@@ -131,8 +131,12 @@ module ChangeHealth
|
|
131
131
|
ChangeHealth::Models::EligibilityData::PARSE_DATE.call(self.plan_date_range[1])
|
132
132
|
end
|
133
133
|
|
134
|
-
def plan_status(service_code: )
|
135
|
-
|
134
|
+
def plan_status(service_code: , single: true)
|
135
|
+
if true == single
|
136
|
+
self.planStatus&.find {|plan| plan.dig('serviceTypeCodes')&.include?(service_code) } || {}
|
137
|
+
else
|
138
|
+
self.planStatus&.select {|plan| plan.dig('serviceTypeCodes')&.include?(service_code) } || []
|
139
|
+
end
|
136
140
|
end
|
137
141
|
|
138
142
|
def benefits
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Crockett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|