change_health 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3410ab26b247fa107eb61e7e1f1b8c2f3d05eccedae19c12d49700bf63a3ba21
4
- data.tar.gz: 2158f64725e4e06eb8519e96e87ce3cb7c771e920ff3e44fe110768c5e171b89
3
+ metadata.gz: c5da8e7e82bca8bab6f8f3374fa2dc61d4957d45b2ef6094b9a966a15845438f
4
+ data.tar.gz: 6167ac5f1dfd966f4527b192bee617044ceab45fbc88872c039f3c2028c72dbe
5
5
  SHA512:
6
- metadata.gz: 37ab166894f274f64f6adefada085333fe29bb02594bebfaf0a72b0dc923a11d40f5b61a7c8e9f5eccb6bde888ca39c094c3f6493ca7ae48e1db687fea325786
7
- data.tar.gz: 8326e06c68013264dd1145eb601e552b41b8ef339c0642f2ef0ee95b9818100680791ee24f530c784ba7abb1d9f502a6a05ff0645b9d00793969d07d356ac3da
6
+ metadata.gz: dc3f605678bb170c6bdabb88b46762e4619ff22bfa3af8b43223f6e260c64838dc36e33c4166b81e7cc8b130bbf6f7af550abd7d51504376e45c42203afd9da8
7
+ data.tar.gz: 0bdccf4b39cb839decc0f9e74d39a89d98289ddde13f041e90e14983d0c9c40b91cefb48571331c2d4b23de441d8e9d16deb4badd6fc299ae72da15eed56ea4f
@@ -4,7 +4,13 @@ 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
- ## [0.12.0] - [XXXX-XX-XX]
7
+ ## [0.13.0] - [2020-05-05]
8
+ ### Changed
9
+ - Removed `alias_method` for `where` helpers so you can override a single method
10
+ - Added type Year to Date type 24
11
+ - Added type Day type 7
12
+
13
+ ## [0.12.0] - [2020-04-30]
8
14
  ### Added
9
15
  - EligibilityData#errors
10
16
  - EligibilityData#errors?
@@ -94,6 +100,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
94
100
  - Authentication
95
101
  - Configuration
96
102
 
103
+ [0.13.0]: https://github.com/WeInfuse/change_health/compare/v0.12.0...v0.13.0
104
+ [0.12.0]: https://github.com/WeInfuse/change_health/compare/v0.11.0...v0.12.0
97
105
  [0.11.0]: https://github.com/WeInfuse/change_health/compare/v0.10.0...v0.11.0
98
106
  [0.10.0]: https://github.com/WeInfuse/change_health/compare/v0.9.0...v0.10.0
99
107
  [0.9.0]: https://github.com/WeInfuse/change_health/compare/v0.8.0...v0.9.0
@@ -19,6 +19,8 @@ module ChangeHealth
19
19
 
20
20
  VISIT = '27'
21
21
  YEAR = '23'
22
+ YTD = '24'
23
+ DAY = '7'
22
24
  REMAINING = '29'
23
25
 
24
26
  CODES = {
@@ -34,33 +34,48 @@ module ChangeHealth
34
34
  end
35
35
 
36
36
  %w(family individual employee child employee_and_child).each do |method|
37
- alias_method method, "#{method}s"
37
+ define_method(method) do
38
+ self.send("#{method}s")
39
+ end
38
40
 
39
41
  %w(copayment coinsurance).each do |type_mod|
40
42
  method_name = "#{method}_#{type_mod}"
41
- alias_name = method_name.gsub('copayment', 'copay')
42
43
 
43
44
  define_method(method_name) do |**kwargs|
44
45
  self.send(method).send("#{type_mod}s").where(kwargs).first
45
46
  end
46
47
 
47
- alias_method alias_name, method_name if alias_name != method_name
48
+ if ('copayment' == type_mod)
49
+ define_method(method_name.gsub('copayment', 'copay')) do |**kwargs|
50
+ self.send(method_name, kwargs)
51
+ end
52
+ end
48
53
  end
49
54
 
50
55
  %w(deductible out_of_pocket).each do |type_mod|
51
56
  %w(year remaining).each do |time_mod|
52
57
  method_name = "#{method}_#{type_mod}_#{time_mod}"
53
- alias_name = method_name.gsub('out_of_pocket', 'oop')
54
58
 
55
59
  define_method(method_name) do |**kwargs|
56
60
  self.send(method).send("#{type_mod}s").send("#{time_mod}s").where(kwargs).first || self.send(method).send("#{type_mod}s").where(kwargs).first
57
61
  end
58
62
 
59
- alias_method alias_name, method_name if alias_name != method_name
63
+ if ('out_of_pocket' == type_mod)
64
+ define_method(method_name.gsub('out_of_pocket', 'oop')) do |**kwargs|
65
+ self.send(method_name, kwargs)
66
+ end
67
+
68
+ if ('year' == time_mod)
69
+ define_method(method_name.gsub('out_of_pocket', 'oop').gsub('year', 'total')) do |**kwargs|
70
+ self.send(method_name, kwargs)
71
+ end
72
+ end
73
+ end
60
74
 
61
- if method_name.include?('year')
62
- alias_method method_name.gsub('year', 'total'), method_name
63
- alias_method alias_name.gsub('year', 'total'), method_name
75
+ if ('year' == time_mod)
76
+ define_method(method_name.gsub('year', 'total')) do |**kwargs|
77
+ self.send(method_name, kwargs)
78
+ end
64
79
  end
65
80
  end
66
81
  end
@@ -1,3 +1,3 @@
1
1
  module ChangeHealth
2
- VERSION = '0.12.0'.freeze
2
+ VERSION = '0.13.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: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Crockett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-30 00:00:00.000000000 Z
11
+ date: 2020-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty