Biro

DISCLAIMER: This library is currently in alpha and under active development.

Biro is an extraction from the Noverde credit analysis system. Noverde's requirements for a simple and unified API to access different credit bureaus (pronounced "Birô" in brazilian portuguese) and others third parties systems was the main motivation to build this library.

Installation

Add this line to your application's Gemfile:

gem 'biro'

And then execute:

$ bundle

Or install it yourself as:

$ gem install biro

Usage

require 'biro'

# Configure the gateway provider
Biro.configure do |config|
  config.gateway :spc, username: 'myusername', password: 'mypassword'
end

# Use the gateway provider to fetch user data (the attributes are explained below)
response = Biro.gateways[:spc].find('99353932750', 'F', 495)

# Use the return data
response[:resultado][:consumidor] # => should return the person data

Gateways

SPC

Biro.configure do |config|
  config.gateway :spc, username: 'myusername', password: 'mypassword'
end

display_products

This method wraps the "listarProdutos" from the SOAP API. You need this method to get the product code.

 Biro.gateways[:spc].display_products

find(document, kind, product_code, options = {})

This method wraps the "consultar" from the SOAP API. You should input the CPF if the kind is F or the CNPJ if the person is J. You can put the include_score: true to get the credit score data.

 Biro.gateways[:spc].find('80541028286', 'F', 455, include_score: true)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/noverde/biro.

License

The gem is available as open source under the terms of the MIT License.