Class: Hookdeck::Configuration

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

Constant Summary collapse

DEFAULTS =
{
  api_base: 'https://api.hookdeck.com',
  api_version: '2024-09-01'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



10
11
12
13
14
# File 'lib/hookdeck/configuration.rb', line 10

def initialize
  DEFAULTS.each do |key, value|
    instance_variable_set("@#{key}", value)
  end
end

Instance Attribute Details

#api_baseObject

Returns the value of attribute api_base.



8
9
10
# File 'lib/hookdeck/configuration.rb', line 8

def api_base
  @api_base
end

#api_keyObject

Returns the value of attribute api_key.



8
9
10
# File 'lib/hookdeck/configuration.rb', line 8

def api_key
  @api_key
end

#api_versionObject

Returns the value of attribute api_version.



8
9
10
# File 'lib/hookdeck/configuration.rb', line 8

def api_version
  @api_version
end

Instance Method Details

#validate!Object

Validates the configuration.

Raises:



19
20
21
# File 'lib/hookdeck/configuration.rb', line 19

def validate!
  validate_api_version!
end