NAME
Business::GoCardless::Webhook
DESCRIPTION
A class for a gocardless webhooks, extends Business::GoCardless::Resource. For more details see the gocardless API documentation specific to webhooks: https://developer.gocardless.com/#webhook-overview
ATTRIBUTES
resource_type
action
Operations on a webhook
json
Allows you to set the json data sent to you in the webhook:
$Webhook->json( $json_data )
Will throw a Business::GoCardless::Exception exception if the json fails to parse or if the signature does not match the payload data.
resources
Returns an array of resource objects (Bill, Subscription, etc) that are present in webhook allowing you to do things with them or update your own data:
if ( $Webhook->resource_type eq 'bill' ) {
foreach my $Bill ( $Webhook->resources ) {
...
}
} elsif ( $Webhook->resource_type eq 'subscription' ) {
...
AUTHOR
Lee Johnson - leejo@cpan.org
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. If you would like to contribute documentation, features, bug fixes, or anything else then please raise an issue / pull request:
https://github.com/leejo/business-gocardless