Project

nubank_sdk

0.01
The project is in a healthy, maintained state
Monitorize balances, recent transactions, credit limit etc...
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.3.26
~> 6.2.1
~> 2.2.2
~> 13.0
~> 3.0
~> 1.41.0
~> 2.16.0
~> 0.21.2
~> 0.9.12

Runtime

~> 2.7.1
~> 2.3
 Project Readme

NubankSdk

Version Downloads Quality Inspector

A gem to make it ease to monitorize your Nubank account.

Installation

Add this line to your application's Gemfile:

gem 'nubank_sdk'

And then execute:

bundle

Or install it yourself as:

gem install nubank_sdk

Usage

require 'nubank_sdk'

# instance a nubank account object
user = NubankSdk::User.new cpf: '12345678909'
password = 'dracarys'

First time? authenticate the account!

# request an email code
account_email = user.auth.request_email_code(password)

# get the email code from the user
puts "Enter the code sent to #{account_email}: "
email_code = gets.chomp
user.auth.exchange_certs(email_code, password)

Has a certificate? generate a access token :D

user.auth.authenticate_with_certificate(password)

get the account balance

account_balance = user.account.balance # => 77.0

Development

Prerequisites
  • Ruby 2.7.2
  • Bundler
  • git

Clone the repository:

git clone https://github.com/viserion77/nubank_sdk.git

Install the dependencies:

bundle install
  • Create a new branch for your feature or bugfix
  • Commit your changes, and push your branch to GitHub
  • Open a Pull Request to the develop branch
  • Write a description for your PR, and how to test it!
  • Wait for the CI to run the tests and check the code quality
  • If everything is ok, your PR will be merged

Deployment

Prerequisites
  • Ruby 2.7.2
  • Bundler
  • git

Clone the repository:

git clone https://github.com/viserion77/nubank_sdk.git

Install the dependencies:

bundle install
  • Create a new branch from develop for bumping the version
  • run bundle exec rake start_new_release to bump the version and a new tag
  • Open a Pull Request to the main branch
  • If everything is ok, your PR will be merged
  • After the merge, the CI will publish the new version to rubygems.org
  • If all goes well, you need release the new tag to GitHub. (tags)

Contributing

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

This project was based on the python implementation in this project: andreroggeri/pynubank