Exception: OnlinePayments::SDK::IdempotenceException
- Inherits:
-
ApiException
- Object
- RuntimeError
- ApiException
- OnlinePayments::SDK::IdempotenceException
- Defined in:
- lib/onlinepayments/sdk/idempotence_exception.rb
Overview
Represents an error response from the payment 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
-
#idempotence_key ⇒ String
readonly
The idempotence key used in the request.
-
#idempotence_request_timestamp ⇒ Integer
readonly
A timestamp indicating the arrival time of the request that conflicts with the request just sent.
Attributes inherited from ApiException
#error_id, #errors, #response_body, #status_code
Instance Method Summary collapse
-
#initialize(status_code, response_body, error_id, errors, idempotence_key, idempotence_request_timestamp, message = 'the payment platform returned a duplicate request error response') ⇒ IdempotenceException
constructor
Create a new IdempotenceException.
Methods inherited from ApiException
Constructor Details
#initialize(status_code, response_body, error_id, errors, idempotence_key, idempotence_request_timestamp, message = 'the payment platform returned a duplicate request error response') ⇒ IdempotenceException
Create a new IdempotenceException.
17 18 19 20 21 22 |
# File 'lib/onlinepayments/sdk/idempotence_exception.rb', line 17 def initialize(status_code, response_body, error_id, errors, idempotence_key, , ='the payment platform returned a duplicate request error response') super(status_code, response_body, error_id, errors, ) @idempotence_key = idempotence_key @idempotence_request_timestamp = end |
Instance Attribute Details
#idempotence_key ⇒ String (readonly)
The idempotence key used in the request.
13 14 15 |
# File 'lib/onlinepayments/sdk/idempotence_exception.rb', line 13 def idempotence_key @idempotence_key end |
#idempotence_request_timestamp ⇒ Integer (readonly)
A timestamp indicating the arrival time of the request that conflicts with the request just sent.
13 14 15 |
# File 'lib/onlinepayments/sdk/idempotence_exception.rb', line 13 def @idempotence_request_timestamp end |