Module: MangoApi::Responses

Extended by:
UriProvider
Defined in:
lib/mangopay/api/service/responses.rb

Overview

Provides API method delegates for replicating responses based on idempotency keys.

Class Method Summary collapse

Methods included from UriProvider

provide_uri

Class Method Details

.replicate(id_key) ⇒ ResponseReplica

Retrieves the response of a previous request by the idempotency key which was provided at the time.

Parameters:

  • +id_key+

    Idempotency key provided with the original request

Returns:

  • (ResponseReplica)

    Replica of the original response



17
18
19
20
21
# File 'lib/mangopay/api/service/responses.rb', line 17

def replicate(id_key)
  uri = provide_uri(:replicate_response, id_key)
  response = HttpClient.get uri
  parse response
end