module Bunq
Usage
Bunq.configure do |config| config.api_key = 'YOUR_APIKEY' config.installation_token = 'YOUR_INSTALLATION_TOKEN' config.private_key = 'YOUR PRIVATE KEY' config.server_public_key = 'SERVER PUBLIC KEY' end client = Bunq.client number_of_accounts = client.me_as_user.monetary_accounts.index.to_a.count puts "User has #{number_of_accounts} accounts"
Constants
- VERSION
Attributes
configuration[RW]
Public Class Methods
client()
click to toggle source
Returns a new instance of Client
with the current configuration
.
# File lib/bunq/client.rb, line 62 def client fail 'No configuration! Call Bunq.configure first.' unless configuration Client.new(configuration.dup) end
configure() { |configuration| ... }
click to toggle source
# File lib/bunq/client.rb, line 48 def configure self.configuration ||= Configuration.new yield(configuration) configuration.base_url = Configuration::SANDBOX_BASE_URL if configuration.sandbox end
reset_configuration()
click to toggle source
# File lib/bunq/client.rb, line 55 def reset_configuration self.configuration = nil end