Class: InfaktApiClient::Configuration
- Inherits:
-
Object
- Object
- InfaktApiClient::Configuration
- Defined in:
- lib/infakt_api_client/configuration.rb
Overview
Configuration class for InfaktApiClient Manages API credentials and endpoint settings for the inFakt API integration
Constant Summary collapse
- DEFAULT_ENDPOINT =
"https://api.infakt.pl/api/v3/"- SANDBOX_ENDPOINT =
"https://api.sandbox-infakt.pl/api/v3/"
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#sandbox_mode ⇒ Object
Returns the value of attribute sandbox_mode.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 |
# File 'lib/infakt_api_client/configuration.rb', line 13 def initialize @api_endpoint = DEFAULT_ENDPOINT @api_key = nil @sandbox_mode = false end |
Instance Attribute Details
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
11 12 13 |
# File 'lib/infakt_api_client/configuration.rb', line 11 def api_endpoint @api_endpoint end |
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/infakt_api_client/configuration.rb', line 10 def api_key @api_key end |
#sandbox_mode ⇒ Object
Returns the value of attribute sandbox_mode.
11 12 13 |
# File 'lib/infakt_api_client/configuration.rb', line 11 def sandbox_mode @sandbox_mode end |
Instance Method Details
#valid? ⇒ Boolean
30 31 32 |
# File 'lib/infakt_api_client/configuration.rb', line 30 def valid? !api_key.nil? && !api_key.empty? && !api_endpoint.nil? && !api_endpoint.empty? end |