Git Product home page Git Product logo

asaas-ruby's Introduction

Asaas Ruby

Build Status

A biblioteca Asaas Ruby tem provê um acesso a API Rest do asaas.com.br

Installation

You don't need this source code unless you want to modify the gem. If you just want to use the package, just run:

gem install asaas-ruby

Para fazer o build da gem

gem build asaas-ruby.gemspec

Changelog

  • 0.2.24 - Add support to PIX billing type and fills missing CHANGELOG entries
  • 0.2.23 - Add support to Ruby 2.7 and Rails 6.1
  • 0.2.22 - Remove unecessary ActiveSupport version limit
  • 0.2.21 - Add credit fields to Payment
  • 0.2.20 - Adds debug flag to check responses
  • 0.2.19 - Small fixes
  • 0.2.18 - Account documents upload
  • 0.2.17 - Add support to DEPOSIT billing type
  • 0.2.16 - Wallet account tranfers
  • 0.2.15 - Bank account tranfers

Requirements

  • Ruby 2.3+.

Usage

require 'asaas-ruby'

Asaas.setup do |config|
  config.token = 'token'
end

asaas_client = Asaas::Client.new()

customer = Asaas::Customer.new({name: 'Thiago Diniz', cpfCnpj: '05201932419', email: '[email protected]'})
asaas_client.customers.create(customer)

charge = Asaas::Payment.new({
  customer: customer.id,
  dueDate: '2019-10-10',
  billingType: 'BOLETO',
  description: "Teste de boleto",
  value: BigDecimal("103.54").to_f,
  postalService: false
})

asaas_client.payments.create(charge)

asaas-ruby's People

Contributors

brunnogomes avatar douglaspozzolo avatar manuwell avatar marcosgugs avatar neemiasvf avatar roque86 avatar theanrogerio avatar thiagodiniz avatar vitor-novaes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

asaas-ruby's Issues

dry-types-0.15.0/lib/dry/types/nominal.rb:32:in `initialize': wrong number of arguments (given 2, expected 1) (ArgumentError)

Após adicionar a gem no projeto e tentar adicionar uma migration, apareceu esse erro. Alguma ideia do que pode ser? Obrigado!

stacktrace:

/home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry/types/nominal.rb:32:in `initialize': wrong number of arguments (given 2, expected 1) (ArgumentError)
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry/types/any.rb:9:in `initialize'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry/types/any.rb:34:in `new'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry/types/any.rb:34:in `<module:Types>'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry/types/any.rb:2:in `<module:Dry>'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry/types/any.rb:1:in `<main>'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry/types/core.rb:1:in `<main>'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry/types.rb:173:in `<main>'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/dry-types-0.15.0/lib/dry-types.rb:1:in `<main>'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/asaas-ruby-0.2.27/lib/asaas-ruby.rb:6:in `<main>'
	from <internal:/home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from <internal:/home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/zeitwerk-2.6.15/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:55:in `each'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:55:in `block in require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:44:in `each'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler/runtime.rb:44:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundler.rb:187:in `require'
	from /home/diegopolido/Projects/my_app/config/application.rb:7:in `<main>'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/command/actions.rb:15:in `require_application!'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/command/actions.rb:19:in `boot_application!'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/commands/generate/generate_command.rb:21:in `perform'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-1.3.1/lib/thor/command.rb:28:in `run'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/command/base.rb:178:in `invoke_command'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/command/base.rb:73:in `perform'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/command.rb:71:in `block in invoke'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/command.rb:149:in `with_argv'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/command.rb:69:in `invoke'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.1.3.3/lib/rails/commands.rb:18:in `<main>'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/diegopolido/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from bin/rails:4:in `<main>'

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.