tufy 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: b2c9f37bc9f6c854d47dd0c28e8bd66cb327aab8
4
- data.tar.gz: e7fa88c37dc8100955f5cf09133a27c7751bfd6e
3
+ metadata.gz: a2c513c2ac18635923ef0f3a3358fc3c71a5d031
4
+ data.tar.gz: 125732ff13a791d9321e66b9357aa74d422b8115
5
5
  SHA512:
6
- metadata.gz: 7d7827f34efbcf6c67808691f7cc8054d2e4be2d076cb1123ed515b0825646a1376d36b72eda7dde619ec9829a371a219e745b3e3b1914ebb4287dd8a492067c
7
- data.tar.gz: 62357b9a30cbd7bfc8f27af418ae4d949d60ba97207ef04c2cccf7b7ac5f496ab06d3058afac7a9b2fa743ba409dd0cc574d63a56a961b9d0769a52ba311e794
6
+ metadata.gz: 6b02f1aca4301feb26942f1cbab2cefa0771be9c0cbe893964928fb45d4c2f34216997d64ffcdcf1af478f5096c2bffb0ec9ddf9e6c361c33508476193b546bb
7
+ data.tar.gz: 55d87577c9a2a1fb7d50a0ec1cc98559dba93d5ffda9f1794e6582790a27aac60ed6a04d2dbf09e8d0b5de878da772bbe9d3d3d22f1872b5c011b0794c0ab132
@@ -1,3 +1,7 @@
1
+ # v0.05
2
+
3
+ - Create method to return TU past due codes instead of using constants
4
+
1
5
  # v0.0.4
2
6
 
3
7
  - Fix: Added transformed_data key in ctx in Tufy::Transform
@@ -36,6 +36,17 @@ module Tufy
36
36
  ctx.transformed_data = ctx.transformed_data + transform(ctx).upcase
37
37
  end
38
38
 
39
+ def self.tu_past_due_code(days_past_due)
40
+ case days_past_due
41
+ when 0
42
+ 0
43
+ when (1..30)
44
+ 1
45
+ else
46
+ ((days_past_due - 1) / 30) * 30
47
+ end
48
+ end
49
+
39
50
  private
40
51
 
41
52
  def self.transform(ctx)
@@ -155,15 +166,6 @@ module Tufy
155
166
  YES = "Y"
156
167
  NO = "N"
157
168
  NOT_APPLICABLE = "A"
158
-
159
- # TU Code for Number of Days Past Due
160
- PAST_DUE_CODE_000 = '000'
161
- PAST_DUE_CODE_001 = '001'
162
- PAST_DUE_CODE_030 = '030'
163
- PAST_DUE_CODE_060 = '060'
164
- PAST_DUE_CODE_090 = '090'
165
- PAST_DUE_CODE_120 = '120'
166
- PAST_DUE_CODE_150 = '150'
167
169
  end
168
170
  end
169
171
  end
@@ -1,3 +1,3 @@
1
1
  module Tufy
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tufy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil Marion dela Cruz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-05 00:00:00.000000000 Z
11
+ date: 2017-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: light-service