Exception: Worldline::Connect::SDK::V1::IdempotenceException

Inherits:
ApiException
  • Object
show all
Defined in:
lib/worldline/connect/sdk/v1/idempotence_exception.rb

Overview

Represents an error response from the Worldline Global Collect platform when an idempotent request failed because the first request has not finished yet. The idempotence_request_timestamp indicates the time when the first request with this idempotence_key arrived.

Instance Attribute Summary collapse

Attributes inherited from ApiException

#error_id, #errors, #response_body, #status_code

Instance Method Summary collapse

Methods inherited from ApiException

#to_s

Constructor Details

#initialize(status_code, response_body, error_id, errors, idempotence_key, idempotence_request_timestamp, message = 'the Worldline Global Collect platform returned a duplicate request error response') ⇒ IdempotenceException

Create a new IdempotenceException.



20
21
22
23
24
25
# File 'lib/worldline/connect/sdk/v1/idempotence_exception.rb', line 20

def initialize(status_code, response_body, error_id, errors, idempotence_key, idempotence_request_timestamp,
               message='the Worldline Global Collect platform returned a duplicate request error response')
  super(status_code, response_body, error_id, errors, message)
  @idempotence_key = idempotence_key
  @idempotence_request_timestamp = idempotence_request_timestamp
end

Instance Attribute Details

#idempotence_keyString (readonly)

The idempotence key used in the request.

Returns:

  • (String)

    the current value of idempotence_key



16
17
18
# File 'lib/worldline/connect/sdk/v1/idempotence_exception.rb', line 16

def idempotence_key
  @idempotence_key
end

#idempotence_request_timestampInteger (readonly)

A timestamp indicating the arrival time of the request that conflicts with the request just sent.

Returns:

  • (Integer)

    the current value of idempotence_request_timestamp



16
17
18
# File 'lib/worldline/connect/sdk/v1/idempotence_exception.rb', line 16

def idempotence_request_timestamp
  @idempotence_request_timestamp
end