Giter Club home page Giter Club logo

gerencianet / gn-api-sdk-ruby Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 9.0 148 KB

SDK em Ruby integrada a API Gerencianet. Esta SDK está preparada para integração à API Pix e API Boletos da Gerencianet, que lhe permite realizar o gerenciamento de cobranças Pix com QR Code e Pix Copia e Cola, boleto/Bolix, carnê, cartão de crédito e muito mais.

Home Page: https://dev.gerencianet.com.br/docs/instalacao-sdk-ruby

License: MIT License

Ruby 99.38% Shell 0.62%
ruby ruby-gem marketplace subscription sdk qrcode card split boleto billet

gn-api-sdk-ruby's Introduction

gn-api-sdk-ruby

A ruby gem for integration of your backend with the payment services provided by Gerencianet.

Build Status Coverage Status Code Climate Gem Version

Installation

Add this line to your application's Gemfile:

gem 'gerencianet'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gerencianet

Tested with

ruby 2.6.6

Basic usage

require "gerencianet"

options = {
  client_id: CREDENTIALS::CLIENT_ID,
  client_secret: CREDENTIALS::CLIENT_SECRET,
  sandbox: CREDENTIALS::SANDBOX
}

gerencianet = Gerencianet.new(options)

charge = {
  items: [{
    name: "Product A",
    value: 1000,
    amount: 2
  }]
}

response = gerencianet.create_charge(body: charge)

Examples

You can run the examples inside examples with $ ruby examples/example.rb:

$ ruby examples/create_charge.rb

Just remember to set the correct credentials inside examples/credentials.rb before running.

Tests

To run the tests, just run rspec:

$ rspec

Or use guard to watch files and automatically run rspec

$ guard -n false -c

Additional documentation

The full documentation with all available endpoints is in https://dev.gerencianet.com.br/.

Changelog

CHANGELOG

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/gerencianet/gn-api-sdk-ruby. This project is intended to be a safe, welcoming space for collaboration.

License

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

gn-api-sdk-ruby's People

Contributors

dannielhugo avatar filipemata avatar franciscotfmc avatar giovani-felipe avatar jessica-gavagn avatar sadycoimbraefi avatar talitacampos avatar thiagogresende avatar whintergoncalves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.