/** * Initializes resources (i.e. registers them with Resource::_registry). Note * that if you add a Resource then you must initialize it here. * * @internal */ private static function initializeResources() { if (self::$initialized) { return; } Resource::init(); Resources\Application::init(); Resources\Identity::init(); Resources\Processor::init(); Resources\Merchant::init(); Resources\PaymentInstrument::init(); Resources\Authorization::init(); Resources\Transfer::init(); Resources\Reversal::init(); Resources\Dispute::init(); Resources\Webhook::init(); Resources\Settlement::init(); Resources\Verification::init(); Resources\Evidence::init(); self::$initialized = true; }
/** * @param int $amount the amount to reverse * @return \Finix\Resources\Reversal * @throws \Finix\Hal\Exception\LinkNotUniqueException * @throws \Finix\Hal\Exception\RelNotFoundException */ public function reverse($amount) { // TODO shouldn't this field be named: "reverse_amount" or "amount_to_reverse" $reversal = new Reversal(["refund_amount" => $amount]); return $reversal->create($this->resource->getLink("reversals")->getHref()); }