Class: InfaktApiClient::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_endpointObject

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_keyObject

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

Returns:

  • (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