Bollettino
Bollettino is a tool for generating Italian postal payment slips.
Don't know what a postal payment slip is? Then you probably don't need this library. But here's an example anyway:
See all those blank spaces? Bollettino takes care of filling them. All you need is the data.
Bollettino is the successor to Postino, which used the now abandoned prawn-templates.
Installation
Bollettino depends on ImageMagick. Sorry, guys.
Add this line to your application's Gemfile
:
gem 'bollettino'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bollettino
Usage
payee = Bollettino::Model::Payee.new(
account_number: '0123456789',
name: 'Acme Inc.'
)
payer = Bollettino::Model::Payer.new(
name: 'John Doe',
address: Bollettino::Model::Address.new(
street: '3681 Foggy Moor',
zip: '19147-0834',
location: 'Grayson'
)
)
payment_order = Bollettino::Model::PaymentOrder.new(
numeric_amount: 54.31,
text_amount: 'Cinquantaquattro/31',
reason: 'Invoice INV-1391'
)
slip = Bollettino::Model::Slip.new(
payee: payee,
payer: payer,
payment_order: payment_order
)
generator = Bollettino::Generator.new
generator.generate!(slip, 'slip.png')
Contributing
- Fork it (https://github.com/interconn-isp/bollettino/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Related projects
- For a command line interface, see bollettino-cli.
- For converting numbers into words, see Abaco.
Maintainers
Bollettino is developed and maintained by Alessandro Desantis.
License
Bollettino is released under the MIT license.