nacha

A Crystal shard for parsing and generating Nacha (ACH) files

Nacha

The ACH file format (or NACHA file) is a text file with ASCII text lines, where each line is 94 characters long and serves as a “record” to execute domestic ACH payments through the Automated Clearing House Network (NACHA).

Here's a few helpful links:

This Crystal shard allows you to generate or parse a NACHA file.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      nacha:
        github: jwoertink/nacha
    
  2. Run shards install

Usage

Still under development, things may change

require "nacha"

entries = [
  Nacha::EntryDetail.new,
  Nacha::EntryDetail.new,
] of Nacha::EntryDetail

batches = [
  Nacha::Batch.new(
    header: Nacha::BatchHeader.new,
    entries: entries,
  ),
] of Nacha::Batch

ach_file = Nacha::File.new(
  header: Nacha::FileHeader.new,
  batches: batches,
)

puts ach_file.generate

Development

  • write code
  • write spec
  • crystal tool format spec/ src/
  • ./bin/ameba
  • crystal spec
  • repeat

Contributing

  1. Fork it (https://github.com/jwoertink/nacha/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

nacha

Owner
Statistic
  • 4
  • 0
  • 2
  • 0
  • 2
  • over 1 year ago
  • December 8, 2022
License

MIT License

Links
Synced at

Wed, 20 Nov 2024 22:21:39 GMT

Languages