0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Ruby API for invoicing service fakturownia.pl
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
~> 10.0
~> 3.1.0

Runtime

 Project Readme

Fakturownia

Ruby wrapper around API of invoice service fakturownia.pl

Installation

Add this line to your application's Gemfile:

gem 'fakturownia_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fakturownia_api

Usage

Create a client with api_token and subdomain:

client = Fakturownia::Client.new(api_token: 'YOUR_TOKEN', subdomain: 'YOUR_DOMAIN')

Invoices

Create invoice with (full list of available options):

invoice = {
  buyer_name: 'Name',
  buyer_tax_no: ''
  positions: [
    {name: 'Product 1', total_price_gross: 10.0, quantity: 2},
    {name: 'Product 2', total_price_gross: 20.0, quantity: 4}
  ]
}

client.invoice.create(ruby_hash)

Download invoice as PDF

client.invoice.show(id, format: :pdf)

Change invoice state

client.invoice.change_status(id, 'paid')

TODO

Currently only invoice resource is supported.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/fakturownia/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes and tests (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request