Exception: OnlinePayments::SDK::IdempotenceException
- Inherits:
-
ApiException
- Object
- RuntimeError
- ApiException
- OnlinePayments::SDK::IdempotenceException
- Defined in:
- lib/onlinepayments/sdk/idempotence_exception.rb
Overview
This exception is thrown when a response from the Online Payments platform indicates a request with the same idempotence_key was received earlier. 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 Online Payments 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 Online Payments platform returned a duplicate request error response') ⇒ IdempotenceException
Create a new IdempotenceException
13 14 15 16 17 18 19 |
# File 'lib/onlinepayments/sdk/idempotence_exception.rb', line 13 def initialize(status_code, response_body, error_id, errors, idempotence_key, , = 'the Online Payments 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.
9 10 11 |
# File 'lib/onlinepayments/sdk/idempotence_exception.rb', line 9 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.
9 10 11 |
# File 'lib/onlinepayments/sdk/idempotence_exception.rb', line 9 def @idempotence_request_timestamp end |