Class: Tikkie::Api::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/tikkie/api/configuration.rb

Overview

Tikkie API configuration.

Constant Summary collapse

SANDBOX_API_URL =
"https://api-sandbox.abnamro.com/v2/tikkie/"
PRODUCTION_API_URL =
"https://api.abnamro.com/v2/tikkie/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key:, app_token: nil, sandbox: false) ⇒ Configuration

Returns a new instance of Configuration.



12
13
14
15
16
# File 'lib/tikkie/api/configuration.rb', line 12

def initialize(api_key:, app_token: nil, sandbox: false)
  @api_key = api_key
  @app_token = app_token
  @sandbox = sandbox
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



10
11
12
# File 'lib/tikkie/api/configuration.rb', line 10

def api_key
  @api_key
end

#app_tokenObject (readonly)

Returns the value of attribute app_token.



10
11
12
# File 'lib/tikkie/api/configuration.rb', line 10

def app_token
  @app_token
end

#sandboxObject (readonly)

Returns the value of attribute sandbox.



10
11
12
# File 'lib/tikkie/api/configuration.rb', line 10

def sandbox
  @sandbox
end

Instance Method Details

#api_urlObject



18
19
20
# File 'lib/tikkie/api/configuration.rb', line 18

def api_url
  @sandbox ? SANDBOX_API_URL : PRODUCTION_API_URL
end