tufy 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ebf4890dfa5545659b7b844ca375317c5b4f904
4
- data.tar.gz: aea3aad28224881692d6873c2640b707490dfaea
3
+ metadata.gz: 641644ae83a015b24cfd42c3b2cb5286a6277310
4
+ data.tar.gz: 227ca577b2639e2e1eec332b2442c0ae73a8622f
5
5
  SHA512:
6
- metadata.gz: 7f39976fc5d185576be115a4546b809d81a2cb185cdf1d1e10c8b21f7cd60eee289cb023e1a03f72fa13f4cd60e7640f86de09fdd57ed0f7241522e35d97f93d
7
- data.tar.gz: f5a2c532844cc771dd10fe0d2cb819809bf00ea8bdbde9bbeb47a54aec7616f23de38309906d1d040f6c5460506ecb75858a886787d2158fd0ed502b7fa2698a
6
+ metadata.gz: b98e122ad2097b3e4d6d5fb7b9b61e195d86dd860dd7cdf876bbd33d95e8c5e8e578f80cb7a98e406a544633802292993d60673dddca9d3fa7eef6124494ca9f
7
+ data.tar.gz: 4e2f99caaa71413d8da83c0f2d40bea69c0a16967060ba08e737b074f5ceffe79dd9edd736c592a56dde234aa2a386ee1c85a27042145d77923aad33f398dc73
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # v0.0.10
2
+
3
+ - Added account status constants
4
+ - Zero if interest_and_fees is negative
5
+
1
6
  # v0.0.9
2
7
 
3
8
  - Fix Address segment tag
@@ -7,7 +7,8 @@ module Tufy
7
7
  :account_number,
8
8
  :restructured_account_number,
9
9
  :user_id,
10
- :account_status, :account_type,
10
+ :account_status,
11
+ :account_type,
11
12
  :currency_code,
12
13
  :opened_date,
13
14
  :payment_amount,
@@ -111,6 +112,10 @@ module Tufy
111
112
 
112
113
  # account status constants
113
114
  ACTIVE_OR_OPEN = "A"
115
+ RESTRUCTURED = "C"
116
+ BLOCKED_DUE_TO_CREDIT = "BC"
117
+ VOLUNTARY_CLOSED = "CV"
118
+ WRITE_OFF = "W"
114
119
 
115
120
  # account type constants
116
121
  SECURED_PERSONAL_LOAN = "3100"
@@ -16,9 +16,12 @@ module Tufy
16
16
  def self.transform(ctx)
17
17
  raw_data = ctx.raw_data
18
18
 
19
+ interest_and_fees = raw_data[:interest_and_fees].to_i
20
+ interest_and_fees = interest_and_fees < 0 ? 0 : interest_and_fees
21
+
19
22
  BuildAccountSegment::Constants::INTEREST_AND_FEES_TAG +
20
- FormatStrings::F2TS % raw_data[:interest_and_fees].to_i.to_s.size +
21
- raw_data[:interest_and_fees].to_i.to_s
23
+ FormatStrings::F2TS % interest_and_fees.to_s.size +
24
+ raw_data[:interest_and_fees].to_s
22
25
  end
23
26
  end
24
27
  end
data/lib/tufy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tufy
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
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.9
4
+ version: 0.0.10
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-18 00:00:00.000000000 Z
11
+ date: 2017-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: light-service