Class: Asaas::Client
- Inherits:
-
Object
- Object
- Asaas::Client
- Defined in:
- lib/asaas/client.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #accounts ⇒ Object
- #cities ⇒ Object
- #customers ⇒ Object
- #documents ⇒ Object
-
#initialize(token = nil, api_version = nil) ⇒ Client
constructor
A new instance of Client.
- #notifications ⇒ Object
- #payments ⇒ Object
- #subscriptions ⇒ Object
- #transfers ⇒ Object
- #webhooks ⇒ Object
Constructor Details
#initialize(token = nil, api_version = nil) ⇒ Client
Returns a new instance of Client.
6 7 8 9 |
# File 'lib/asaas/client.rb', line 6 def initialize(token = nil, api_version = nil) @token = token || Asaas::Configuration.token @api_version = api_version || Asaas::Configuration.api_version end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
4 5 6 |
# File 'lib/asaas/client.rb', line 4 def token @token end |
Instance Method Details
#accounts ⇒ Object
11 12 13 |
# File 'lib/asaas/client.rb', line 11 def accounts @accounts ||= Asaas::Api::Account.new(@token, @api_version) end |
#cities ⇒ Object
15 16 17 |
# File 'lib/asaas/client.rb', line 15 def cities @cities ||= Asaas::Api::City.new(@token, @api_version) end |
#customers ⇒ Object
19 20 21 |
# File 'lib/asaas/client.rb', line 19 def customers @customers ||= Asaas::Api::Customer.new(@token, @api_version) end |
#documents ⇒ Object
43 44 45 |
# File 'lib/asaas/client.rb', line 43 def documents @documents ||= Asaas::Api::Document.new(@token) end |
#notifications ⇒ Object
23 24 25 |
# File 'lib/asaas/client.rb', line 23 def notifications @notifications ||= Asaas::Api::Notification.new(@token, @api_version) end |
#payments ⇒ Object
27 28 29 |
# File 'lib/asaas/client.rb', line 27 def payments @payments ||= Asaas::Api::Payment.new(@token, @api_version) end |
#subscriptions ⇒ Object
31 32 33 |
# File 'lib/asaas/client.rb', line 31 def subscriptions @subscriptions ||= Asaas::Api::Subscription.new(@token, @api_version) end |