ach 0.5.6 → 0.5.7
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 +4 -4
- data/lib/ach.rb +1 -0
- data/lib/ach/records/batch_header.rb +2 -1
- data/lib/ach/string_formatting_helper.rb +9 -0
- data/lib/ach/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4acdd7cd46577d18bd21b38f7acb358185f05de
|
4
|
+
data.tar.gz: c6c79c9ea05ebf3b4a0f1f0aec01dcdac054ea71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f2b15b83d7bfb77cb0e8d7ca6ed0891d0c00caa17fcd18e8cba20538aee6da9f8a2cfce1e4a7eca636528a256e18546b7ff1c5dd4ee4524b672b79b6477a568
|
7
|
+
data.tar.gz: 8a6a2e3436e4989c54652b917cf647fdf551c025ba51fbefcf07405032bade41635481a24ad311f5480e8317bc70d877b59b759af542245e487a30fadffb7ce0
|
data/lib/ach.rb
CHANGED
@@ -22,8 +22,9 @@ module ACH::Records
|
|
22
22
|
lambda { |f| f.upcase }, 'PPD', /\A\w{3}\z/
|
23
23
|
field :company_entry_description, String,
|
24
24
|
lambda { |f| left_justify(f, 10)}
|
25
|
+
# This field allows for marking the batch as same-day for the bank by passing in ex: SD1300
|
25
26
|
field :company_descriptive_date, Time,
|
26
|
-
|
27
|
+
ACH::StringFormattingHelper.method(:stringify_with_same_day).to_proc,
|
27
28
|
lambda { Time.now }
|
28
29
|
field :effective_entry_date, Time,
|
29
30
|
lambda { |f| f.strftime('%y%m%d')}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module ACH
|
2
|
+
module StringFormattingHelper
|
3
|
+
# Passing in SD to the date signifies same-day to banks. This is used for the company_descriptive_date
|
4
|
+
def self.stringify_with_same_day(f)
|
5
|
+
return f.upcase if f.to_s.upcase.match(/^SD\d+$/)
|
6
|
+
f.strftime('%y%m%d')
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
data/lib/ach/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ach
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jared Morgan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: appraisal
|
@@ -110,6 +110,7 @@ files:
|
|
110
110
|
- lib/ach/records/file_header.rb
|
111
111
|
- lib/ach/records/nines.rb
|
112
112
|
- lib/ach/records/record.rb
|
113
|
+
- lib/ach/string_formatting_helper.rb
|
113
114
|
- lib/ach/version.rb
|
114
115
|
homepage: https://github.com/jm81/ach
|
115
116
|
licenses: []
|