Sha256: d5f03cf6732817384e9621e59d53fe91f0d63cee3c3ad274b2cf696dc1ad9696
Contents?: true
Size: 1.84 KB
Versions: 17
Compression:
Stored size: 1.84 KB
Contents
# Biro DISCLAIMER: This library is currently in alpha and under active development. Biro is an extraction from the [Noverde](https://www.noverde.com.br) 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: ```ruby gem 'biro' ``` And then execute: $ bundle Or install it yourself as: $ gem install biro ## Usage ```ruby 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](https://www.spcbrasil.org.br) ```ruby 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**. ```ruby 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. ```ruby 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](http://opensource.org/licenses/MIT).
Version data entries
17 entries across 17 versions & 1 rubygems