NAME

Business::GoCardless::Webhook::Event

DESCRIPTION

A class for gocardless webhook events, extends Business::GoCardless::Resource. For more details see the gocardless API documentation specific to webhooks: https://developer.gocardless.com/api-reference/#appendix-webhooks

ATTRIBUTES

id
created_at
action
resource_type
links
details

resources

Returns an array of resource objects (Payment, Subscription, etc) that are present in the event allowing you to do things with them or update your own data:

if ( $Event->is_payment ) {

    foreach my $Payment ( $Event->resources ) {

        if ( $Event->action eq 'paid_out' ) {
            ...
        }
    }
}

is_payment

is_subscription

is_payout

is_mandate

is_refund

Shortcut methods to get the type of data in the event, and thus the type of objects that will be returned by the call to ->resources