Class: Tikkie::Api::Configuration
- Inherits:
-
Object
- Object
- Tikkie::Api::Configuration
- 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
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#app_token ⇒ Object
readonly
Returns the value of attribute app_token.
-
#sandbox ⇒ Object
readonly
Returns the value of attribute sandbox.
Instance Method Summary collapse
- #api_url ⇒ Object
-
#initialize(api_key:, app_token: nil, sandbox: false) ⇒ Configuration
constructor
A new instance of Configuration.
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_key ⇒ Object (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_token ⇒ Object (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 |
#sandbox ⇒ Object (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_url ⇒ Object
18 19 20 |
# File 'lib/tikkie/api/configuration.rb', line 18 def api_url @sandbox ? SANDBOX_API_URL : PRODUCTION_API_URL end |