A Ruby library for generating Italian postal payment slips.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
lib
spec
tmp
.gitignore
.rspec
.rubocop.yml
.travis.yml
CHANGELOG.md
Gemfile
LICENSE.txt
README.md
Rakefile
bollettino.gemspec
example-slip.png

README.md

Bollettino

Build Status Dependency Status Maintainability Coverage Status

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:

Postal payment slip

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

  1. Fork it (https://github.com/interconn-isp/bollettino/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

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.

InterConn