nacha 0.1.7 → 0.1.8
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/CHANGELOG.md +8 -0
- data/lib/nacha/field.rb +3 -1
- data/lib/nacha/record/ack_entry_detail.rb +23 -0
- data/lib/nacha/record/base.rb +2 -6
- data/lib/nacha/record/file_control_record_type.rb +3 -1
- data/lib/nacha/record/file_header_record_type.rb +0 -1
- data/lib/nacha/record/filler.rb +2 -2
- data/lib/nacha/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e70f9ad804c23687e8b3c9b6aa0fed4327554a98bdad5419a84dfe9f5d7f459
|
4
|
+
data.tar.gz: 475cc33a0528eda1b5c55f670f87537ea8f7a6610b7943304738e09f4740bae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b5d4c12e34b8eda4e97fd6a1ee4fa082217f967ac75893195566091673196346b544bc262d1ad789f136f55c28d1b4002495ae859474776200841d06fc10a21
|
7
|
+
data.tar.gz: 98f8cb7134340a7088946dfe1904b1e11c485676f9ad7369bf299e20aa23af45323bb12dd7d0ba2d2064ff7fcffa8a9a9639ca4e885e09fa89c5f9b191d73dea
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.1.8] - 2025-06-24
|
11
|
+
|
12
|
+
- Now parses filler records correctly (fixed definition)
|
13
|
+
|
14
|
+
- Add support for `ack_entry_detail` record type
|
15
|
+
|
16
|
+
- Tweaked the child record types for file_control and file_header
|
17
|
+
|
10
18
|
## [0.1.7] - 2025-06-23
|
11
19
|
|
12
20
|
- Better parsing. Nacha::Record::FileControl had issues parsing if the reserved
|
data/lib/nacha/field.rb
CHANGED
@@ -108,7 +108,9 @@ class Nacha::Field
|
|
108
108
|
add_error("'position' must be present for a field definition.") unless @position
|
109
109
|
add_error("'contents' must be present for a field definition.") unless @contents
|
110
110
|
|
111
|
-
if @data_assigned &&
|
111
|
+
if @data_assigned &&
|
112
|
+
(mandatory? || required?) &&
|
113
|
+
((@input_data.nil? || @input_data.to_s.empty?) && @contents !~ /\AC( *)\z/)
|
112
114
|
add_error("'#{human_name}' is a required field and cannot be blank.")
|
113
115
|
end
|
114
116
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'nacha/record/base.rb'
|
5
|
+
require 'nacha/record/detail_record_type.rb'
|
6
|
+
|
7
|
+
module Nacha
|
8
|
+
module Record
|
9
|
+
class AckEntryDetail < Nacha::Record::Base
|
10
|
+
include DetailRecordType
|
11
|
+
nacha_field :record_type_code, inclusion: 'M', contents: 'C6', position: 1..1
|
12
|
+
nacha_field :transaction_code, inclusion: 'M', contents: 'Numeric', position: 2..3
|
13
|
+
nacha_field :receiving_dfi_identification, inclusion: 'M', contents: 'TTTTAAAAC', position: 4..12
|
14
|
+
nacha_field :dfi_account_number, inclusion: 'R', contents: 'Alphameric', position: 13..29
|
15
|
+
nacha_field :amount, inclusion: 'M', contents: '$$$$$$$$¢¢', position: 30..39
|
16
|
+
nacha_field :originl_entry_trace_number, inclusion: 'M', contents: 'Numeric', position: 40..54
|
17
|
+
nacha_field :receiving_company_name, inclusion: 'R', contents: 'Alphameric', position: 55..76
|
18
|
+
nacha_field :discretionary_data, inclusion: 'O', contents: 'Alphameric', position: 77..78
|
19
|
+
nacha_field :addenda_record_indicator, inclusion: 'M', contents: 'Numeric', position: 79..79
|
20
|
+
nacha_field :trace_number, inclusion: 'M', contents: 'Numeric', position: 80..94
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/nacha/record/base.rb
CHANGED
@@ -90,12 +90,8 @@ module Nacha
|
|
90
90
|
last_match
|
91
91
|
end
|
92
92
|
elsif d[:contents] =~ /\ANumeric\z/
|
93
|
-
|
94
|
-
|
95
|
-
else
|
96
|
-
skipped_output = true
|
97
|
-
''
|
98
|
-
end
|
93
|
+
output_started = true
|
94
|
+
'[0-9 ]' + "{#{(d[:position] || d['position']).size}}"
|
99
95
|
elsif d[:contents] =~ /\AYYMMDD\z/
|
100
96
|
if output_started
|
101
97
|
'[0-9 ]' + "{#{(d[:position] || d['position']).size}}"
|
data/lib/nacha/record/filler.rb
CHANGED
@@ -9,8 +9,8 @@ module Nacha
|
|
9
9
|
class Filler < Nacha::Record::Base
|
10
10
|
include FillerRecordType
|
11
11
|
|
12
|
-
nacha_field :record_type_code, inclusion: 'M', contents:
|
13
|
-
nacha_field :filler, inclusion: 'M', contents: '
|
12
|
+
nacha_field :record_type_code, inclusion: 'M', contents: 'C9', position: 1..1
|
13
|
+
nacha_field :filler, inclusion: 'M', contents: ('C' + ('9' * 93)), position: 2..94
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/lib/nacha/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nacha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David H. Wilkins
|
@@ -238,6 +238,7 @@ files:
|
|
238
238
|
- lib/nacha/numeric.rb
|
239
239
|
- lib/nacha/parser.rb
|
240
240
|
- lib/nacha/parser_context.rb
|
241
|
+
- lib/nacha/record/ack_entry_detail.rb
|
241
242
|
- lib/nacha/record/addenda_record_type.rb
|
242
243
|
- lib/nacha/record/adv_batch_control.rb
|
243
244
|
- lib/nacha/record/adv_entry_detail.rb
|