Class: GoCardlessPro::Services::CustomerNotificationsService
- Inherits:
-
BaseService
- Object
- BaseService
- GoCardlessPro::Services::CustomerNotificationsService
- Defined in:
- lib/gocardless_pro/services/customer_notifications_service.rb
Overview
Service for making requests to the CustomerNotification endpoints
Instance Method Summary collapse
-
#handle(identity, options = {}) ⇒ Object
“Handling” a notification means that you have sent the notification yourself (and don’t want GoCardless to send it).
Methods inherited from BaseService
#initialize, #make_request, #sub_url
Constructor Details
This class inherits a constructor from GoCardlessPro::Services::BaseService
Instance Method Details
#handle(identity, options = {}) ⇒ Object
“Handling” a notification means that you have sent the notification yourself (and don’t want GoCardless to send it). If the notification has already been actioned, or the deadline to notify has passed, this endpoint will return an ‘already_actioned` error and you should not take further action. This endpoint takes no additional parameters.
Example URL: /customer_notifications/:identity/actions/handle
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/gocardless_pro/services/customer_notifications_service.rb', line 25 def handle(identity, = {}) path = sub_url('/customer_notifications/:identity/actions/handle', { 'identity' => identity }) params = .delete(:params) || {} [:params] = {} [:params]['data'] = params [:retry_failures] = false response = make_request(:post, path, ) return if response.body.nil? Resources::CustomerNotification.new(unenvelope_body(response.body), response) end |