See also the Transaction response object.

This functionality is specific to Braintree Marketplace merchants.

result = gateway.transaction.cancel_release("transaction_id")

If you previously released an escrowed Braintree Marketplace transaction, you can cancel the release while the escrow_status is release_pending.

transaction_id required, String

The id of the transaction you want to cancel release of escrow for.