Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Invoicing
Ruby

This branch is 37 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.rvmrc
.travis.yml
Gemfile
README.md
Rakefile
config.ru
invoicing.gemspec

README.md

Build Status

Basic Usage

seller = Seller.find(3)
book = Book.find(1) # implements CostItem
decorations = {whatever_you_want: 'here'}

invoice = Invoicing::generate do
  from seller
  line_item book
  due Time.now + 7.days
  payment_reference "REF2345"
  decorate_with decorations
end

Invoice Numbering:

A default invoice number will be set with the format INV[invoice id].

A custom invoice number can be specified as follows:

invoice = Invoicing::generate do
  numbered "CUSTOMREF123"
end

You can specify a custom invoice number containing the invoice id as follows:

invoice = Invoicing::generate do
  numbered "CUSTOMREF{id}"
end
Something went wrong with that request. Please try again.