Class: NewStoreApi::AdyenAdapterController

Inherits:
BaseController show all
Defined in:
lib/new_store_api/controllers/adyen_adapter_controller.rb

Overview

AdyenAdapterController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from NewStoreApi::BaseController

Instance Method Details

#list_notifications(psp_reference: nil, merchant_reference: nil) ⇒ GetNotificationsResponse

🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.
Retrieves the notifications the platform received from Adyen for a given psp_reference or merchant_reference. Although each of these filters is optional to get a meaningful response one of them needs to be present in the request here description here

Parameters:

  • psp_reference (String) (defaults to: nil)

    Optional parameter: TODO: type description

  • merchant_reference (String) (defaults to: nil)

    Optional parameter: TODO: type

Returns:



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/new_store_api/controllers/adyen_adapter_controller.rb', line 27

def list_notifications(psp_reference: nil,
                       merchant_reference: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/payment/tools/notifications',
                                 Server::API)
               .query_param(new_parameter(psp_reference, key: 'psp_reference'))
               .query_param(new_parameter(merchant_reference, key: 'merchant_reference'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('oauth')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(GetNotificationsResponse.method(:from_hash)))
    .execute
end