class GoCardlessPro::Resources::CustomerNotification

Customer Notifications represent the notification which is due to be sent to a customer after an event has happened. The event, the resource and the customer to be notified are all identified in the `links` property.

Note that these are ephemeral records - once the notification has been actioned in some way, it is no longer visible using this API.

<p class=“restricted-notice”><strong>Restricted</strong>: This API is currently only available for approved integrators - please <a href=“get”>help@gocardless.com“>get in touch</a> if you would like to use this API.</p>

Attributes

action_taken[R]
action_taken_at[R]
action_taken_by[R]
id[R]
type[R]

Public Class Methods

new(object, response = nil) click to toggle source

Initialize a customer_notification resource instance @param object [Hash] an object returned from the API

# File lib/gocardless_pro/resources/customer_notification.rb, line 38
def initialize(object, response = nil)
  @object = object

  @action_taken = object['action_taken']
  @action_taken_at = object['action_taken_at']
  @action_taken_by = object['action_taken_by']
  @id = object['id']
  @links = object['links']
  @type = object['type']
  @response = response
end

Public Instance Methods

api_response() click to toggle source
# File lib/gocardless_pro/resources/customer_notification.rb, line 50
def api_response
  ApiResponse.new(@response)
end
to_h() click to toggle source

Provides the customer_notification resource as a hash of all its readable attributes

# File lib/gocardless_pro/resources/customer_notification.rb, line 60
def to_h
  @object
end