asaas-ruby 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/Gemfile +4 -0
- data/README.md +36 -0
- data/Rakefile +2 -0
- data/asaas-ruby.gemspec +30 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/asaas-ruby.rb +25 -0
- data/lib/asaas/api.rb +7 -0
- data/lib/asaas/api/account.rb +11 -0
- data/lib/asaas/api/base.rb +91 -0
- data/lib/asaas/api/city.rb +11 -0
- data/lib/asaas/api/customer.rb +11 -0
- data/lib/asaas/api/notification.rb +11 -0
- data/lib/asaas/api/payment.rb +11 -0
- data/lib/asaas/api/subscription.rb +11 -0
- data/lib/asaas/client.rb +35 -0
- data/lib/asaas/configuration.rb +44 -0
- data/lib/asaas/entity.rb +14 -0
- data/lib/asaas/entity/account.rb +29 -0
- data/lib/asaas/entity/bank_account.rb +16 -0
- data/lib/asaas/entity/base.rb +11 -0
- data/lib/asaas/entity/city.rb +15 -0
- data/lib/asaas/entity/customer.rb +29 -0
- data/lib/asaas/entity/installment.rb +10 -0
- data/lib/asaas/entity/meta.rb +33 -0
- data/lib/asaas/entity/notification.rb +18 -0
- data/lib/asaas/entity/payment.rb +47 -0
- data/lib/asaas/entity/subscription.rb +40 -0
- data/lib/asaas/version.rb +3 -0
- metadata +209 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e81927ea4bf3bc84dd2e371408e34cad7ae632e5
|
4
|
+
data.tar.gz: 7fbf55459c18cd3eb00a64123572e195036b977e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 63de29d27ba28d9995dcc968f6bc3a579d31d76947083a8404a50c0442d042e3445b57d516b7ae919011fadaa987f07524cd16015c1b2c3e7fc318e4915120ca
|
7
|
+
data.tar.gz: 2b8a2eba6f9ee7cd8ef9ac1b5aaf98cb8de150a5be2ee116a7c8c6ef309773b666b268a9390a3aa2d431274b49b5ecd27c096a4921368a205ae891f030cdbe4f
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Ruby::Asaas
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ruby/asaas`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'ruby-asaas'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install ruby-asaas
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ruby-asaas.
|
36
|
+
|
data/Rakefile
ADDED
data/asaas-ruby.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'asaas/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "asaas-ruby"
|
8
|
+
spec.version = Asaas::VERSION
|
9
|
+
spec.authors = ["Marcos Junior"]
|
10
|
+
spec.email = ["marcos@maini.com.br"]
|
11
|
+
|
12
|
+
spec.summary = %q{Asass.com Ruby API Wrapper}
|
13
|
+
spec.description = %q{Asass.com Ruby API Wrapper}
|
14
|
+
spec.homepage = "http://github.com/marcosgugs/ruby-asaas"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec", "~> 3.2"
|
24
|
+
|
25
|
+
spec.add_dependency "activesupport", "~> 4.2"
|
26
|
+
spec.add_dependency "virtus", '~> 1.0', "~> 1.0.5"
|
27
|
+
spec.add_dependency "typhoeus", '~> 1.0', "~> 1.0.2"
|
28
|
+
spec.add_dependency "rest-client", '~> 1.8', "~> 1.8.0"
|
29
|
+
spec.add_dependency "awesome_print", '~> 1.6', "~> 1.6.1"
|
30
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "asaas"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/asaas-ruby.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'awesome_print'
|
2
|
+
require 'active_support'
|
3
|
+
require 'active_support/inflector'
|
4
|
+
require 'rest-client'
|
5
|
+
require 'typhoeus'
|
6
|
+
require 'asaas/version'
|
7
|
+
require 'virtus'
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Asaas
|
11
|
+
autoload :Entity, 'asaas/entity'
|
12
|
+
autoload :Configuration, 'asaas/configuration'
|
13
|
+
autoload :Api, 'asaas/api'
|
14
|
+
autoload :Client, 'asaas/client'
|
15
|
+
|
16
|
+
class << self
|
17
|
+
|
18
|
+
def setup(&block)
|
19
|
+
Asaas::Configuration.setup(&block)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
end
|
data/lib/asaas/api.rb
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Api
|
3
|
+
class Base
|
4
|
+
|
5
|
+
attr_reader :endpoint
|
6
|
+
attr_reader :meta
|
7
|
+
attr_reader :errors
|
8
|
+
attr_reader :success
|
9
|
+
attr_reader :token
|
10
|
+
attr_accessor :route
|
11
|
+
|
12
|
+
def initialize(client_token, route = nil)
|
13
|
+
@token = client_token
|
14
|
+
@route = route
|
15
|
+
@endpoint = Asaas::Configuration.get_endpoint
|
16
|
+
end
|
17
|
+
|
18
|
+
def extract_meta(meta)
|
19
|
+
@meta = Asaas::Entity::Meta.new(meta)
|
20
|
+
end
|
21
|
+
|
22
|
+
def get(id)
|
23
|
+
request(:get, {id: id})
|
24
|
+
parse_response
|
25
|
+
end
|
26
|
+
|
27
|
+
def list
|
28
|
+
request(:get)
|
29
|
+
parse_response
|
30
|
+
end
|
31
|
+
|
32
|
+
def create(attrs)
|
33
|
+
ap request(:post, {}, attrs)
|
34
|
+
parse_response
|
35
|
+
end
|
36
|
+
|
37
|
+
def update(attrs)
|
38
|
+
request(:put, {id: attrs.id}, attrs)
|
39
|
+
parse_response
|
40
|
+
end
|
41
|
+
|
42
|
+
def delete(id)
|
43
|
+
request(:put, {id: id})
|
44
|
+
parse_response
|
45
|
+
end
|
46
|
+
|
47
|
+
protected
|
48
|
+
def parse_url(id = nil)
|
49
|
+
u = URI(@endpoint + @route)
|
50
|
+
if id
|
51
|
+
u.path += "/#{id}"
|
52
|
+
end
|
53
|
+
u.to_s
|
54
|
+
end
|
55
|
+
|
56
|
+
def parse_response
|
57
|
+
ap hash
|
58
|
+
hash = JSON.parse(@response.body)
|
59
|
+
@errors = false
|
60
|
+
@success = true
|
61
|
+
if hash.fetch("errors", false)
|
62
|
+
@errors = hash.fetch("errors")
|
63
|
+
@success = false
|
64
|
+
elsif hash.fetch("object", false) === "list"
|
65
|
+
Asaas::Entity::Meta.new(hash)
|
66
|
+
else
|
67
|
+
entity = convert_data_to_entity(hash.fetch("object", false))
|
68
|
+
entity.new(hash) if entity
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def convert_data_to_entity(type)
|
73
|
+
"Asaas::Entity::#{type.capitalize}".constantize
|
74
|
+
end
|
75
|
+
|
76
|
+
def request(method, params = {}, body = nil)
|
77
|
+
@response = Typhoeus::Request.new(
|
78
|
+
parse_url(params.fetch(:id, false)),
|
79
|
+
method: method,
|
80
|
+
body: body.attributes,
|
81
|
+
params: params,
|
82
|
+
headers: { 'access_token': @token || Asaas::Configuration.token }
|
83
|
+
).run
|
84
|
+
end
|
85
|
+
|
86
|
+
def get_headers
|
87
|
+
{ 'access_token': @token || Asaas::Configuration.token }
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
data/lib/asaas/client.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
module Asaas
|
2
|
+
class Client
|
3
|
+
|
4
|
+
attr_reader :token
|
5
|
+
|
6
|
+
def initialize(token)
|
7
|
+
@token = token
|
8
|
+
end
|
9
|
+
|
10
|
+
def accounts
|
11
|
+
@accounts ||= Asaas::Api::Account.new(@token)
|
12
|
+
end
|
13
|
+
|
14
|
+
def cities
|
15
|
+
@cities ||= Asaas::Api::City.new(@token)
|
16
|
+
end
|
17
|
+
|
18
|
+
def customers
|
19
|
+
@customers ||= Asaas::Api::Customer.new(@token)
|
20
|
+
end
|
21
|
+
|
22
|
+
def notifications
|
23
|
+
@notifications ||= Asaas::Api::Notification.new(@token)
|
24
|
+
end
|
25
|
+
|
26
|
+
def payments
|
27
|
+
@payments ||= Asaas::Api::Payment.new(@token)
|
28
|
+
end
|
29
|
+
|
30
|
+
def subscriptions
|
31
|
+
@subscriptions ||= Asaas::Api::Subscription.new(@token)
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Configuration
|
3
|
+
|
4
|
+
mattr_accessor :staging_endpoint do
|
5
|
+
'http://homolog.asaas.com/api/v2'
|
6
|
+
end
|
7
|
+
|
8
|
+
mattr_accessor :production_endpoint do
|
9
|
+
'https://www.asaas.com/api/v2'
|
10
|
+
end
|
11
|
+
|
12
|
+
mattr_accessor :production do
|
13
|
+
false
|
14
|
+
end
|
15
|
+
|
16
|
+
mattr_accessor :token
|
17
|
+
|
18
|
+
class << self
|
19
|
+
|
20
|
+
def setup(&block)
|
21
|
+
yield self if block_given?
|
22
|
+
self
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_endpoint
|
26
|
+
if production
|
27
|
+
production_endpoint
|
28
|
+
else
|
29
|
+
staging_endpoint
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def get_environment
|
34
|
+
if production
|
35
|
+
:production
|
36
|
+
else
|
37
|
+
:staging
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
data/lib/asaas/entity.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
autoload :Base, 'asaas/entity/base'
|
4
|
+
autoload :Account, 'asaas/entity/account'
|
5
|
+
autoload :BankAccount, 'asaas/entity/bank_account'
|
6
|
+
autoload :City, 'asaas/entity/city'
|
7
|
+
autoload :Customer, 'asaas/entity/customer'
|
8
|
+
autoload :Installment, 'asaas/entity/installment'
|
9
|
+
autoload :Meta, 'asaas/entity/meta'
|
10
|
+
autoload :Notification, 'asaas/entity/notification'
|
11
|
+
autoload :Payment, 'asaas/entity/payment'
|
12
|
+
autoload :Subscription, 'asaas/entity/subscription'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
class Account
|
4
|
+
include Virtus.model
|
5
|
+
|
6
|
+
attribute :id, Integer
|
7
|
+
attribute :name, String
|
8
|
+
attribute :email, String
|
9
|
+
attribute :phone, String
|
10
|
+
attribute :mobilePhone, String
|
11
|
+
attribute :address, String
|
12
|
+
attribute :addressNumber, String
|
13
|
+
attribute :complement, String
|
14
|
+
attribute :province, String
|
15
|
+
attribute :city, String
|
16
|
+
attribute :state, String
|
17
|
+
attribute :country, String
|
18
|
+
attribute :postalCode, String
|
19
|
+
attribute :cpfCnpj, String
|
20
|
+
attribute :personType, String
|
21
|
+
attribute :companyType, String
|
22
|
+
attribute :apiKey, String
|
23
|
+
attribute :pushNotificationUrl, String
|
24
|
+
attribute :pushNotificationEmail, String
|
25
|
+
attribute :bankAccount, Asaas::Entity::BankAccount
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
class BankAccount
|
4
|
+
include Virtus.model
|
5
|
+
|
6
|
+
attribute :ownerName, String
|
7
|
+
attribute :cpfCnpj, String
|
8
|
+
attribute :bank, String
|
9
|
+
attribute :agency, String
|
10
|
+
attribute :agencyDigit, String
|
11
|
+
attribute :account, String
|
12
|
+
attribute :accountDigit, String
|
13
|
+
attribute :bankAccounttype, String
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
class City
|
4
|
+
include Virtus.model
|
5
|
+
|
6
|
+
attribute :id, Integer
|
7
|
+
attribute :ibgeCode, Integer
|
8
|
+
attribute :name, String
|
9
|
+
attribute :districtCode, Integer
|
10
|
+
attribute :district, String
|
11
|
+
attribute :state, String
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
class Customer < Asaas::Entity::Base
|
4
|
+
|
5
|
+
attribute :id, Integer
|
6
|
+
attribute :name, String
|
7
|
+
attribute :email, String
|
8
|
+
attribute :company, String
|
9
|
+
attribute :phone, String
|
10
|
+
attribute :mobilePhone, String
|
11
|
+
attribute :address, String
|
12
|
+
attribute :addressNumber, String
|
13
|
+
attribute :complement, String
|
14
|
+
attribute :province, String
|
15
|
+
attribute :city, String
|
16
|
+
attribute :state, String
|
17
|
+
attribute :country, String
|
18
|
+
attribute :postalCode, String
|
19
|
+
attribute :foreignCustomer, Axiom::Types::Boolean
|
20
|
+
attribute :notificationDisabled, Axiom::Types::Boolean
|
21
|
+
attribute :cpfCnpj, String
|
22
|
+
attribute :personType, String
|
23
|
+
attribute :subscriptions, Asaas::Entity::Meta
|
24
|
+
attribute :payments, Asaas::Entity::Meta
|
25
|
+
attribute :notifications, Asaas::Entity::Meta
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
class Data < Virtus::Attribute
|
4
|
+
def coerce(value)
|
5
|
+
value.map do |hash|
|
6
|
+
ap hash
|
7
|
+
if hash.has_key? "object"
|
8
|
+
entity = convert_data_to_entity(hash["object"])
|
9
|
+
entity.new(hash)
|
10
|
+
else
|
11
|
+
entity = convert_data_to_entity(hash.keys.first)
|
12
|
+
entity.new(hash.values.first)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
protected
|
18
|
+
def convert_data_to_entity(type)
|
19
|
+
"Asaas::Entity::#{type.capitalize}".constantize
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class Meta
|
24
|
+
include Virtus.model
|
25
|
+
|
26
|
+
attribute :limit, Integer
|
27
|
+
attribute :offset, Integer
|
28
|
+
attribute :hasMore, Axiom::Types::Boolean
|
29
|
+
attribute :data, Data
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
class Notification
|
4
|
+
include Virtus.model
|
5
|
+
|
6
|
+
attribute :id, Integer
|
7
|
+
attribute :customer, String
|
8
|
+
attribute :event, String
|
9
|
+
attribute :scheduleOffset, Integer
|
10
|
+
attribute :emailEnabledForProvider, Axiom::Types::Boolean
|
11
|
+
attribute :smsEnabledForProvider, Axiom::Types::Boolean
|
12
|
+
attribute :emailEnabledForCustomer, Axiom::Types::Boolean
|
13
|
+
attribute :smsEnabledForCustomer, Axiom::Types::Boolean
|
14
|
+
attribute :enabled, Axiom::Types::Boolean
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
class Payment
|
4
|
+
include Virtus.model
|
5
|
+
|
6
|
+
attribute :id, Integer
|
7
|
+
attribute :customer, String
|
8
|
+
attribute :subscription, String
|
9
|
+
attribute :billingType, String
|
10
|
+
attribute :value, Float
|
11
|
+
attribute :netValue, Float
|
12
|
+
attribute :originalValue, Float
|
13
|
+
attribute :interestValue, Float
|
14
|
+
attribute :grossValue, Float
|
15
|
+
attribute :dueDate, String
|
16
|
+
attribute :status, String
|
17
|
+
attribute :nossoNumero, String
|
18
|
+
attribute :description, String
|
19
|
+
attribute :invoiceNumber, String
|
20
|
+
attribute :invoiceUrl, String
|
21
|
+
attribute :boletoUrl, String
|
22
|
+
attribute :installment, Integer
|
23
|
+
attribute :installmentCount, Integer
|
24
|
+
attribute :installmentValue, Float
|
25
|
+
attribute :creditCardHolderName, String
|
26
|
+
attribute :creditCardNumber, String
|
27
|
+
attribute :creditCardExpiryMonth, String
|
28
|
+
attribute :creditCardExpiryYear, String
|
29
|
+
attribute :creditCardCcv, String
|
30
|
+
attribute :creditCardHolderFullName, String
|
31
|
+
attribute :creditCardHolderEmail, String
|
32
|
+
attribute :creditCardHolderCpfCnpj, String
|
33
|
+
attribute :creditCardHolderAddress, String
|
34
|
+
attribute :creditCardHolderAddressNumber, String
|
35
|
+
attribute :creditCardHolderAddressComplement, String
|
36
|
+
attribute :creditCardHolderProvince, String
|
37
|
+
attribute :creditCardHolderCity, String
|
38
|
+
attribute :creditCardHolderUf, String
|
39
|
+
attribute :creditCardHolderPostalCode, String
|
40
|
+
attribute :creditCardHolderPhone, String
|
41
|
+
attribute :creditCardHolderPhoneDDD, String
|
42
|
+
attribute :creditCardHolderMobilePhone, String
|
43
|
+
attribute :creditCardHolderMobilePhoneDDD, String
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Asaas
|
2
|
+
module Entity
|
3
|
+
class Subscription
|
4
|
+
include Virtus.model
|
5
|
+
|
6
|
+
attribute :id, Integer
|
7
|
+
attribute :customer
|
8
|
+
attribute :value, Float
|
9
|
+
attribute :grossValue, Float
|
10
|
+
attribute :nextDueDate, String
|
11
|
+
attribute :cycle, String
|
12
|
+
attribute :billingType, String
|
13
|
+
attribute :description, String
|
14
|
+
attribute :updatePendingPayments, Axiom::Types::Boolean
|
15
|
+
attribute :payments, Array[Payment]
|
16
|
+
attribute :creditCardHolderName, String
|
17
|
+
attribute :creditCardNumber, String
|
18
|
+
attribute :creditCardExpiryMonth, String
|
19
|
+
attribute :creditCardExpiryYear, String
|
20
|
+
attribute :creditCardCcv, String
|
21
|
+
attribute :creditCardHolderFullName, String
|
22
|
+
attribute :creditCardHolderEmail, String
|
23
|
+
attribute :creditCardHolderCpfCnpj, String
|
24
|
+
attribute :creditCardHolderAddress, String
|
25
|
+
attribute :creditCardHolderAddressNumber, String
|
26
|
+
attribute :creditCardHolderAddressComplement, String
|
27
|
+
attribute :creditCardHolderProvince, String
|
28
|
+
attribute :creditCardHolderCity, String
|
29
|
+
attribute :creditCardHolderUf, String
|
30
|
+
attribute :creditCardHolderPostalCode, String
|
31
|
+
attribute :creditCardHolderPhone, String
|
32
|
+
attribute :creditCardHolderPhoneDDD, String
|
33
|
+
attribute :creditCardHolderMobilePhone, String
|
34
|
+
attribute :creditCardHolderMobilePhoneDDD, String
|
35
|
+
attribute :maxPayments, Integer
|
36
|
+
attribute :endDate, String
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: asaas-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marcos Junior
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.2'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4.2'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: virtus
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.0'
|
76
|
+
- - "~>"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.0.5
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '1.0'
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 1.0.5
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: typhoeus
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.0'
|
96
|
+
- - "~>"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 1.0.2
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '1.0'
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 1.0.2
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: rest-client
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '1.8'
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 1.8.0
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '1.8'
|
126
|
+
- - "~>"
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: 1.8.0
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: awesome_print
|
131
|
+
requirement: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - "~>"
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '1.6'
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 1.6.1
|
139
|
+
type: :runtime
|
140
|
+
prerelease: false
|
141
|
+
version_requirements: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.6'
|
146
|
+
- - "~>"
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: 1.6.1
|
149
|
+
description: Asass.com Ruby API Wrapper
|
150
|
+
email:
|
151
|
+
- marcos@maini.com.br
|
152
|
+
executables: []
|
153
|
+
extensions: []
|
154
|
+
extra_rdoc_files: []
|
155
|
+
files:
|
156
|
+
- ".gitignore"
|
157
|
+
- Gemfile
|
158
|
+
- README.md
|
159
|
+
- Rakefile
|
160
|
+
- asaas-ruby.gemspec
|
161
|
+
- bin/console
|
162
|
+
- bin/setup
|
163
|
+
- lib/asaas-ruby.rb
|
164
|
+
- lib/asaas/api.rb
|
165
|
+
- lib/asaas/api/account.rb
|
166
|
+
- lib/asaas/api/base.rb
|
167
|
+
- lib/asaas/api/city.rb
|
168
|
+
- lib/asaas/api/customer.rb
|
169
|
+
- lib/asaas/api/notification.rb
|
170
|
+
- lib/asaas/api/payment.rb
|
171
|
+
- lib/asaas/api/subscription.rb
|
172
|
+
- lib/asaas/client.rb
|
173
|
+
- lib/asaas/configuration.rb
|
174
|
+
- lib/asaas/entity.rb
|
175
|
+
- lib/asaas/entity/account.rb
|
176
|
+
- lib/asaas/entity/bank_account.rb
|
177
|
+
- lib/asaas/entity/base.rb
|
178
|
+
- lib/asaas/entity/city.rb
|
179
|
+
- lib/asaas/entity/customer.rb
|
180
|
+
- lib/asaas/entity/installment.rb
|
181
|
+
- lib/asaas/entity/meta.rb
|
182
|
+
- lib/asaas/entity/notification.rb
|
183
|
+
- lib/asaas/entity/payment.rb
|
184
|
+
- lib/asaas/entity/subscription.rb
|
185
|
+
- lib/asaas/version.rb
|
186
|
+
homepage: http://github.com/marcosgugs/ruby-asaas
|
187
|
+
licenses: []
|
188
|
+
metadata: {}
|
189
|
+
post_install_message:
|
190
|
+
rdoc_options: []
|
191
|
+
require_paths:
|
192
|
+
- lib
|
193
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
194
|
+
requirements:
|
195
|
+
- - ">="
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: '0'
|
198
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
203
|
+
requirements: []
|
204
|
+
rubyforge_project:
|
205
|
+
rubygems_version: 2.5.1
|
206
|
+
signing_key:
|
207
|
+
specification_version: 4
|
208
|
+
summary: Asass.com Ruby API Wrapper
|
209
|
+
test_files: []
|