Module: Monobank

Extended by:
SingleForwardable
Defined in:
lib/monobank.rb,
lib/monobank/error.rb,
lib/monobank/client.rb,
lib/monobank/version.rb,
lib/monobank/corporate.rb,
lib/monobank/connection.rb,
lib/monobank/methods/get.rb,
lib/monobank/auth/private.rb,
lib/monobank/methods/base.rb,
lib/monobank/methods/post.rb,
lib/monobank/bank/currency.rb,
lib/monobank/configuration.rb,
lib/monobank/auth/corporate.rb,
lib/monobank/resources/base.rb,
lib/monobank/resources/error.rb,
lib/monobank/corporate/client.rb,
lib/monobank/personal/webhook.rb,
lib/monobank/personal/settings.rb,
lib/monobank/personal/statement.rb,
lib/monobank/personal/auth_check.rb,
lib/monobank/personal/client_info.rb,
lib/monobank/personal/auth_request.rb,
lib/monobank/personal/registration.rb,
lib/monobank/resources/bank/currency.rb,
lib/monobank/personal/corporate_webhook.rb,
lib/monobank/resources/personal/webhook.rb,
lib/monobank/resources/personal/accounts.rb,
lib/monobank/resources/personal/settings.rb,
lib/monobank/personal/registration_status.rb,
lib/monobank/resources/personal/statement.rb,
lib/monobank/resources/personal/auth_check.rb,
lib/monobank/resources/personal/client_info.rb,
lib/monobank/resources/personal/auth_request.rb,
lib/monobank/resources/personal/registration.rb,
lib/monobank/resources/personal/registration_status.rb

Defined Under Namespace

Modules: Auth, Bank, Corporate, Methods, Personal, Resources Classes: Client, Configuration, Connection, Error

Constant Summary collapse

VERSION =
"1.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



19
20
21
# File 'lib/monobank.rb', line 19

def configuration
  @configuration ||= Configuration.new
end

Class Method Details

.clientObject



23
24
25
# File 'lib/monobank.rb', line 23

def client
  @client ||= Client.new(token: configuration.token)
end

.configure {|configuration| ... } ⇒ Object

Yields:



14
15
16
17
# File 'lib/monobank.rb', line 14

def configure
  self.configuration ||= Configuration.new
  yield(configuration) if block_given?
end

.resetObject



27
28
29
30
# File 'lib/monobank.rb', line 27

def reset
  @configuration = nil
  @client = nil
end