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.niebieskiorzel.pl/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.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 |
# File 'lib/infakt_api_client/configuration.rb', line 12 def initialize @api_endpoint = DEFAULT_ENDPOINT @api_key = nil end |
Instance Attribute Details
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
10 11 12 |
# File 'lib/infakt_api_client/configuration.rb', line 10 def api_endpoint @api_endpoint end |
#api_key ⇒ Object
Returns the value of attribute api_key.
9 10 11 |
# File 'lib/infakt_api_client/configuration.rb', line 9 def api_key @api_key end |
Instance Method Details
#valid? ⇒ Boolean
21 22 23 |
# File 'lib/infakt_api_client/configuration.rb', line 21 def valid? !api_key.nil? && !api_key.empty? && !api_endpoint.nil? && !api_endpoint.empty? end |