0.0
The project is in a healthy, maintained state
This gem maps to the BB Statements API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 7.1, >= 7.1.3.2
~> 11.1.3
~> 3.6, >= 3.6.0
~> 3.22.0

Runtime

~> 1.0.3
~> 2.9.0
~> 2.6, >= 2.1.0
~> 7.1.2
 Project Readme

bb_statements

BancoBrasilStatements - The Ruby gem for the the Banco do Brasil Statements API

Installation

Build a gem

To build the Ruby code into a gem:

gem build bb_statements.gemspec

Then either install the gem locally:

gem install ./bb_statements-1.0.0.gem

(for development, run gem install --dev ./bb_statements-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'bb_statements', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'bb_statements', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'bb_statements'
# Setup authorization
BancoBrasilStatements.configure do |config|
  # Configure OAuth2 access token for authorization: OAuth2-CC
  config.access_token = 'YOUR ACCESS TOKEN'
end

api_instance = BancoBrasilStatements::StatementsApi.new
id = 'id_example' # String | Código identificador do pagamento.
gw_dev_app_key = 'gw_dev_app_key_example' # String | Chave de acesso do aplicativo do desenvolvedor. Esta chave é única e obtida no Portal “BB for Developers” e usada para identificar as requisições da aplicação do desenvolvedor.  Example: 0021239456d80136bebf005056891bed
authorization = 'authorization_example' # String | É um “token” de acesso fornecido pelo OAuth 2.0.  Example: Bearer [ACCESS_TOKEN]
opts = {
  start_date: Date.yesterday,
  end_date: Date.current,
  page_size: 50,
  page_index: 1
}

begin
  # branch_office, account, opts
  result = api_instance.consult_statements(1505, 1348, opts)
  p result
rescue BancoBrasilStatements::ApiError => e
  puts "Exception when calling StatementsApi->consult_statements: #{e}"
end
# Setup authorization
BancoBrasilStatements.configure do |config|
  # Configure OAuth2 access token for authorization: OAuth2-CC
  config.access_token = 'YOUR ACCESS TOKEN'
end