Exception: Worldline::Connect::SDK::Webhooks::ApiVersionMismatchException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/worldline/connect/sdk/webhooks/api_version_mismatch_exception.rb

Overview

Raised when a webhooks event has an API version that is not supported by current version of SDK.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_api_version, sdk_api_version) ⇒ ApiVersionMismatchException

Returns a new instance of ApiVersionMismatchException.



12
13
14
15
16
# File 'lib/worldline/connect/sdk/webhooks/api_version_mismatch_exception.rb', line 12

def initialize(event_api_version, sdk_api_version)
  super("event API version #{event_api_version} is not compatible with SDK API version #{sdk_api_version}")
  @event_api_version = event_api_version
  @sdk_api_version = sdk_api_version
end

Instance Attribute Details

#event_api_versionString (readonly)

The API version from the webhooks event.

Returns:

  • (String)

    the current value of event_api_version



10
11
12
# File 'lib/worldline/connect/sdk/webhooks/api_version_mismatch_exception.rb', line 10

def event_api_version
  @event_api_version
end

#sdk_api_versionString (readonly)

The API version that this version of the SDK supports.

Returns:

  • (String)

    the current value of sdk_api_version



10
11
12
# File 'lib/worldline/connect/sdk/webhooks/api_version_mismatch_exception.rb', line 10

def sdk_api_version
  @sdk_api_version
end