Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiskolabs/virtuaaliviivakoodi
Library for generating virtuaaliviivakoodi's
https://github.com/kiskolabs/virtuaaliviivakoodi
Last synced: about 2 months ago
JSON representation
Library for generating virtuaaliviivakoodi's
- Host: GitHub
- URL: https://github.com/kiskolabs/virtuaaliviivakoodi
- Owner: kiskolabs
- Created: 2017-05-17T14:59:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T14:25:43.000Z (9 months ago)
- Last Synced: 2024-10-04T08:50:09.676Z (3 months ago)
- Language: Ruby
- Size: 14.6 KB
- Stars: 4
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Virtuaaliviivakoodi
Virtuaaliviivakoodi is a library for generating Pankkiviivakoodi of The Federation of Finnish Financial Services ("Finnish bank transfer barcode"). Implementation has been done following [the specification](http://www.finanssiala.fi/maksujenvalitys/dokumentit/Pankkiviivakoodi-opas.pdf).
The library supports both current versions of Pankkiviivakoodi, version 4 (reference number in national form) and version 5 (reference number in international form, aka Creditor Reference based on ISO 11649).
## Installation
Add this line to your application's Gemfile:
```ruby
gem "virtuaaliviivakoodi"
```And then execute:
$ bundle
Or install it yourself as:
$ gem install virtuaaliviivakoodi
## Usage
```ruby
Virtuaaliviivakoodi.generate({
iban: "FI37 1590 3000 0007 76",
reference: 11112,
amount: 12.25,
due_date: "161221"
}) #=> "437159030000007760000122500000000000000000011112161221"
```## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/kiskolabs/virtuaaliviivakoodi.
## Thanks
Akseli Nurmio for his JavaScript library [virtuaaliviivakoodi](https://github.com/akselinurmio/virtuaaliviivakoodi) from which this library has borrowed bunch of test cases.