A biblioteca Asaas Ruby tem provê um acesso a API Rest do asaas.com.br
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
- 0.2.21 - Add credit fields to Payment
- 0.2.20 -
- 0.2.19 - Small fixes
- 0.2.18 - Account documents upload
- 0.2.17 -
- 0.2.16 - Wallet account tranfers
- 0.2.15 - Bank account tranfers
- Ruby 2.3+.
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)