The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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.