Exception: Ingenico::Direct::SDK::Webhooks::ApiVersionMismatchException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/ingenico/direct/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.



10
11
12
13
14
# File 'lib/ingenico/direct/sdk/webhooks/api_version_mismatch_exception.rb', line 10

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



8
9
10
# File 'lib/ingenico/direct/sdk/webhooks/api_version_mismatch_exception.rb', line 8

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



8
9
10
# File 'lib/ingenico/direct/sdk/webhooks/api_version_mismatch_exception.rb', line 8

def sdk_api_version
  @sdk_api_version
end