ach v1.4.0 Release Notes
Release Date: 2020-06-29 // almost 4 years ago-
๐ Version v1.4.0 of ACH adds several notable features such as custom validation, a command-line tool
achcli
to describe files, and improvements for verifying NACHA compatibility on slightly malformed files. This release also contains enhanced testing and documentation improvements.Custom Validation
๐ The ACH library (and HTTP server) now supports custom validation with the
ValidateOpts
struct by callingFile.SetValidation(..)
andReader.SetValidation(...)
. This offers various options:RequireABAOrigin bool
: Enable or disable routing number validation over theImmediateOrigin
file header fieldBypassOriginValidation
: Skip validation for theImmediateOrigin
file header field and allow customTraceNumber
valuesBypassDestinationValidation
: Skip validation for theImmediateDestination
file header field and allow customTraceNumber
values
๐ The HTTP server also supports reading this struct with camel-cased names when calling the validation route.
achcli
achcli
is a command-line utility for viewing ACH files in a more human readable format. This tool also allows maskingDFIAccountNumber
values with the-mask
flag.$ achcli -mask 20200601-1002-01.ach Describing ACH file '20200601-1002-01.ach' Origin OriginName Destination DestinationName FileCreationDate FileCreationTime 691000134 ASF APPLICATION SUPERVI 091400606 FIRST BANK & TRUST 181017 0306 BatchNumber SECCode ServiceClassCode CompanyName CompanyDiscretionaryData CompanyIdentification CompanyEntryDescription 1 WEB 200 CoinLion 123456789 TRANSFER TransactionCode RDFIIdentification AccountNumber Amount Name TraceNumber Category 26 09140060 *******89 12354 Paul Jones 091000017611242 Return Addenda99 ReturnCode OriginalTrace DateOfDeath OriginalDFI AddendaInformation TraceNumber R01 091400600000001 09100001 091000017611242 BatchCount BlockCount EntryAddendaCount TotalDebitAmount TotalCreditAmount 1 1 1 12354 0
Malformed Files
ACH files with lines that are not 94 characters are now adjusted in-memory (missing or extra spaces) in an attempt to comply with NACHA standards. The underlying file on disk is not modified during this reading.
โ ADDITIONS
- ๐ batches: Add
LiftEffectiveEntryDate()
to offer parsedtime.Time
values ofEffectiveEntryDate
- cmd/server: add version handler to admin HTTP server
- file: add BypassDestinationValidation to ValidateOpts
- 0๏ธโฃ file: add
ValidateWith
to override specific default validations - ๐ file: support setting ValidateOpts on struct for calling Create()
- reader: morph lines to 94 characters if they end in spaces
- server: read
ValidateOpts
in HTTP validate route - server: return fileID on create errors, enforce marshaled errors as strings
- ๐ file: support setting
ValidateOpts
on struct for callingCreate()
- ๐ file: struct unmarshaling works again, it was depreciated for a couple releases
- reader: morph lines to 94 characters with spaces if they are some other length
- reader: allow setting ValidateOpts
- ๐จ cmd/ach: initial setup of CLI tool to pretty print ACH files
๐ BUG FIXES
- all: replace
ร
withC
across the project - all: use filepath.Join instead of unix paths
- api: fixup flatten files OpenAPI spec
- api: note POST /files/create can return an error
- file: don't validate before flattening batches
- file: keep TraceNumbers when segmenting files
- server: fix segment OpenAPI spec and accept config body
- server: read empty SegmentFileConfiguration
- file: don't validate before flattening batches
๐ IMPROVEMENTS
- api: used shared Error model
- api: use shorter summaries
- api: include AddendaXX, ADV, and IAT records that were missing from OpenAPI spec
- โก๏ธ chore(deps): update module prometheus/client_golang to v1.4.1
- โก๏ธ chore(deps): update module gorilla/mux to v1.7.4
- โ reader: write a test for what partial file comes back from invalid EntryDetails
- reader: allow zero-entry files if their controls signify as such
- server: use FoundABug error with mismatched routing
- validators: ensure alpha routing number check digit is invalid
- all: use filepath.Join instead of unix paths
- reader: append a lingering batch even if there's no batch control
๐ BUILD
- โก๏ธ chore(deps): update golang docker tag to v1.14
- ๐ build: run sonatype-nexus-community/nancy in CI
- ๐ build: leverage moov-io/infra's Go linter script