NAME
WebService::Braintree::Subscription
PURPOSE
This class creates, finds, updates, cancels, retries charges on, searches for, and lists all subscriptions.
CLASS METHODS
create()
This takes a hashref of parameters and returns the subscription created.
find()
This takes a subscription_id and returns the subscription (if it exists).
update()
This takes a subcsription_id and a hashref of parameters. It will update the corresponding subscription (if found) and returns the updated subscription.
cancel()
This takes a subscription_id and cancels (aka, deletes) the corresponding subscription (if found).
retry_charge()
This takes a subscription_id and an amount and attempts to retry a charge for that amount to that subscription (if found).
search()
This takes a subref which is used to set the search parameters and returns a subscription object.
Please see Searching for more information on the subref and how it works.
all()
This returns all the subscriptions.
OBJECT METHODS
In addition to the methods provided by the keys returned from Braintree, this class provides the following methods:
transactions()
This returns a list of all transactions that have been made against this subscription. This is a list of WebService::Braintree::Transaction objects.