Project

guevara

0.01
Low commit activity in last 3 years
No release in over a year
Hide the uglyness of nacha file format.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.2, >= 2.2.10
~> 1.2
~> 13.0
 Project Readme

Gem Version Build Status Code Climate Inline docs

Guevara

Nacha file format is a pain, but with this gem the life will be easier and the sun will shine for you :). Nacha Guevara

Installation

$ gem install guevara

Usage

You need to build a big hash structure with all the required info, create a Guevara::Nacha and call to_s to build the file.

nacha = Guevara::Nacha.new(
  priority_code:    01,
  destination_id:   '12345678',
  origin_id:        '12345678',
  created_at:       '2014-11-28T13:30',
  id:               'A',
  destination_name: 'Rubylit',
  origin_name:      'Zest',
  batches:          [
    {
      service_class:  '200',
      company_name:   'rubylit',
      company_id:     'Ruby123',
      company_date:   '2014-09-18',
      origin_id:      '12345678',
      effective_date: '2014-09-21',
      transactions:   [{
        id:               'FD00AFA8A0F7',
        type:             'debit',
        amount:           1600,
        name:             'marge baker',
        additional_info:  'wellsville|KS|66092|101 2nd st|',
        telephone:        '5858232966',
        account_type:     'checking',
        routing_number:   103100195,
        account_number:   '3ACCOUNT234'
      }]
    }
  ]
)

nacha.to_s #=>
# 101001234567800123456781411281330A094101                Rubylit                   Zest       0
# 5200rubylit                                Ruby123PPD          140918140921   1123456780000001
# 6271031001953ACCOUNT234      0000001600FD00AFA8A0F7   marge baker             1123456780000001
# 705wellsville|KS|66092|101 2nd st|                                                 00010000001
# 82000000020010310019000000001600000000000000   Ruby123                         123456780000001
# 9000001000006000000020010310019000000001600000000000000                                       

Contributing

  1. Fork it ( https://github.com/rubylit/guevara/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

License

Copyright (C) 2014 Eloy Espinaco, Gaston Ramos

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.