The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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.

Please see WebService::Braintree::SubscriptionSearch for the fields available to be searched on.

all()

This returns all the subscriptions.