Skip to content

Control code generator for invoices inside the Bolivian national tax service.

License

Notifications You must be signed in to change notification settings

pcriv/complicode-ruby

Repository files navigation

Complicode

Gem Depfu Inline docs Maintainability Test Coverage

Control code generator for invoices inside the Bolivian national tax service.

Links:

Requirements

  1. Ruby 2.5.0

Installation

To install, run:

gem install complicode

Or add the following to your Gemfile:

gem "complicode"

Usage

require "complicode"

authorization_code = "29040011007"
key = "9rCB7Sv4X29d)5k7N%3ab89p-3(5[A"
invoice = Complicode::Invoice.new(number: 1503, nit: 4189179011, issue_date: Date.new(2007, 7, 2), amount: 2500.0)
generator = Complicode::Generator.new
generator.call(authorization_code: authorization_code, key: key, invoice: invoice)
# => "6A-DC-53-05-14"

Tests

To test, run:

bundle exec rspec spec/

Versioning

Read Semantic Versioning for details. Briefly, it means:

  • Major (X.y.z) - Incremented for any backwards incompatible public API changes.
  • Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
  • Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.

License

Copyright 2020 Pablo Crivella. Read LICENSE for details.

About

Control code generator for invoices inside the Bolivian national tax service.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published