0.01
No commit activity in last 3 years
No release in over 3 years
This gem gives integration with polish on-line invoicing service: http://fakturownia.pl
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0

Runtime

>= 3.0
 Project Readme

Fakturownia

This gem provides integration with polish invoicing system www.fakturownia.pl

Installation

Add this line to your application's Gemfile:

gem 'fakturownia'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fakturownia

Execute:

$ bundle install
$ rails generate fakturownia:install

After installation you have to set two options in config/initializers/fakturownia.rb

  • api_token - after register in fakturownia.pl you will have this token
  • account_name - after login to fakturownia.pl is a first part of URL

Usage

Get invoice based in invoice ID provided after creation from fakturownia.pl:

Fakturownia::API.invoice(123456)

Get invoices from given time period:

Fakturownia::API.invoices(period, date_from, date_to)

where:

  • period is one of the [:all, :this_month, :last_month, :this_year, :last_year, :more]. If period = :more than date_from and date_to has to be set
  • date_from and date_to - dates

Get invoice as a PDF:

Fakturownia::API.pdf(123456)

Add new invoice:

Fakturownia::API.create(invoice_json)

where invoice_json is a hash with invoice data.

Update previously added invoice with invoice_id from fakturownia.pl:

Fakturownia::API.update(invoice_id, invoice_json)

Delete previously added invoice with invoice_id from fakturownia.pl:

Fakturownia::API.delete(invoice_id)

More details in API requests and invoice JSON structure: https://app.fakturownia.pl/api

TODO

  • tests
  • products
  • clients
  • payments

Contributing

  1. Fork it
  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 new Pull Request

License

This gem is licensed under the MIT License.