NAME
WebService::Braintree::Customer
PURPOSE
This class creates, updates, deletes, and finds customers.
create()
This takes a hashref of parameters and returns the customer created.
find()
This takes a customer_id returns the customer (if it exists).
update()
This takes a customer_id and a hashref of parameters. It will update the corresponding customer (if found) and returns the updated customer.
delete()
This takes a customer_id and deletes the corresponding customer (if found).
search()
This takes a subref which is used to set the search parameters and returns a collection of Customer objects.
Please see Searching for more information on the subref and how it works.
all()
This returns all the customers.
transactions()
This takes a customer_id. It returns all the transactions for that customer.
credit()
This takes a customer_id and a hashref of parameters. It will create a credit transaction for the corresponding customer and return it;
sale()
This takes a customer_id and a hashref of parameters. It will create a sale transaction for the corresponding customer and return it;
OBJECT METHODS
In addition to the methods provided by the keys returned from Braintree, this class provides the following methods:
payment_types()
This returns a list of all the payment types supported by this class.
payment_methods()
This returns an arrayref of all available payment methods across all types.