Sha256: c40ad809d07d38bba176fd2955c78b9d09c155ad93cecbce0aa51e43fa0268da

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

# Austrian bank tools

Ruby gem to validate Austrian bank account numbers.

## Usage

    account = BankTools::AT::Account.new("12345678901")
    account.valid?  # => true
    account.errors  # => []

    bad_account = BankTools::AT::Account.new("1")
    bad_account.valid?  # => false
    bad_account.errors  # => [:too_short]

    blz = BankTools::AT::BLZ.new("12345")
    blz.valid?  # => true
    blz.errors  # => []

    bad_blz = BankTools::AT::BLZ.new("1")
    bad_blz.valid?  # => false
    bad_blz.errors  # => [:too_short]

    # Error codes

    BankTools::AT::Errors::TOO_SHORT                # => :too_short
    BankTools::AT::Errors::TOO_LONG                 # => :too_long
    BankTools::AT::Errors::INVALID_CHARACTERS       # => :invalid_characters

## Tests

    bundle
    rspec # or: rake


## Installation

Add this line to your application's Gemfile:

    gem "banktools-at"

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install banktools-at

## TODO

* Use [check digit](http://www.cnb.cz/cs/platebni_styk/iban/download/TR201.pdf)

## Also see

* [Our other BankTools](https://github.com/barsoom?query=banktools)
* [iban-tools](https://github.com/iulianu/iban-tools)

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
banktools-at-0.1.0 README.md