NAME
WebService::Braintree::WebhookNotification
PURPOSE
This class parses and verifies webhook notifications.
NOTES
Unlike all other classes, this class does NOT interact with a REST API. Instead, this takes data you provide it and either parses it into a usable object or provides a verification of it.
CLASS METHODS
parse()
This takes a signature and a payload and returns a parsing of the notification within that payload. The payload is validated against the signature before parsing.
The return is an object of this class.
verify()
This takes a challenge and returns a proper response.
OBJECT METHODS
In addition to the methods provided by the keys returned from Braintree, this class provides the following methods:
subscription()
This returns the subscription associated with this notification (if any). This will be an object of type "" in WebService::Braintree::Subscription.
merchant_account()
This returns the merchant account associated with this notification (if any). This will be an object of type "" in WebService::Braintree::MerchantAccount.
disbursement()
This returns the disbursement associated with this notification (if any). This will be an object of type "" in WebService::Braintree::Disbursement.
transaction()
This returns the stransaction associated with this notification (if any). This will be an object of type "" in WebService::Braintree::Transaction.
partner_merchant()
This returns the partner merchant associated with this notification (if any). This will be an object of type "" in WebService::Braintree::PartnerMerchant.
dispute()
This returns the dispute associated with this notification (if any). This will be an object of type "" in WebService::Braintree::Dispute.
errors()
This returns the errors associated with this notification (if any). This will be an object of type "" in WebService::Braintree::ValidationErrorCollection.
message()
This returns the message associated with this notification (if any). This will be a string.