0.0
No commit activity in last 3 years
No release in over 3 years
Gem to interact with NFEdoBrasil SOAP API. Enables creation, consultation and import of invoices.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
~> 3.2.0
~> 0.10

Runtime

~> 2.11.1
 Project Readme

Gem Version Build Status

NfedoBrasil

Gem to interact with NFEdoBrasil SOAP API.

Installation

Add this line to your application's Gemfile:

gem 'nfedobrasil'

And then execute:

$ bundle

Or install it yourself as:

$ gem install nfedobrasil

Usage

This gem is just a wrapper around Savon which monkey patches (yes... I know =[) both Savon and HTTPI so that they can work with P12 authentication required by NFEdoBrasil.

require 'nfedobrasil'
# For dev mode access:
client = NfedoBrasil.client({ssl_plcs_file: './hml_natue.p12', ssl_plcs_password: 'y7bYntT3F'}, true)

# For production access:
client = NfedoBrasil.client({ssl_plcs_file: './hml_natue.p12', ssl_plcs_password: 'y7bYntT3F'})

# Now just consume the API using Savon
client.operations
# => [:enviar, :analisa_n_fe, :consultar, :consulta_token, :cancelar, :carta_correcao, :inutilizar, :consultar_cadastro_sefaz, :consultar_nota_sefaz, :status_servico, :retorna_danfe, :retorna_chaves, :retorna_xmls, :insere_emissor, :insere_armazenamento, :existe_emissor, :existe_armazenamento]

Contributing

  1. Fork it ( https://github.com/natuelabs/nfedobrasil/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