NAME
WebService::Braintree::Transaction
PURPOSE
This class generates and manages transactions.
CLASS METHODS
sale()
This takes a hashref of parameters and returns the transaction created. This is a wrapper around "create()" with the type set to 'sale'.
credit()
This takes a hashref of parameters and returns the transaction created. This is a wrapper around "create()" with the type set to 'credit'.
create()
This takes a hashref of parameters and a type and returns the transaction created.
In general, you will not call this method. Instead, call one of the wrappers of this method, such as "sale()" and "credit()".
find()
This takes an id and returns the transaction (if it exists).
clone_transaction()
This takes an id and a hashref of parameters and clones the transaction (if it exists) with the parameters as overrides.
void()
This takes an id and voids the transaction (if it exists).
submit_for_settlement()
This takes an id and an optional amount and submits the transaction (if it exists) for settlement.
refund()
This takes an id and an optional amount and refunds the transaction (if it exists).
hold_in_escrow()
This takes an id and holds the transaction (if it exists) in escrow.
release_from_escrow()
This takes an id and releases the transaction (if it exists) from escrow.
cancel_release()
This takes an id and cancels the release of the transaction (if it exists).
update_details()
This takes an id and updates the transaction details with the provided parameters. This requires the transaction to be in submitted_for_settlement status.
submit_for_partial_settlement()
This takes an id, amount, and optional parameters and submits the transaction for partial settlement.
search()
This takes a subref which is used to set the search parameters and returns a transaction object.
Please see Searching for more information on the subref and how it works.
all()
This returns all the transactions.
OBJECT METHODS
In addition to the methods provided by the keys returned from Braintree, this class provides the following methods:
disbursement_details()
This returns the disbursement details of this transaction (if they exist). It will be a WebService::Braintree::DisbursementDetails object.
paypal_details()
This returns the PayPal details of this transaction (if they exist). It will be a WebService::Braintree::PayPalDetails object.
subscription()
This returns the related subscription of this transaction (if they exist). It will be a WebService::Braintree::Subscription object.
is_disbursed()
This returns whether or not the disbursement details of this transaction are valid.