/** @test */ function it_has_shortcut_methods() { $refund = new Refund(); $payment = Payment::fromArray(['id' => 'PM123']); $refund->of($payment)->returning(100)->totalling(150); $this->assertSame(100, $refund->getAmount()); $this->assertSame(150, $refund->getTotalAmountConfirmation()); $this->assertAttributeSame($payment, 'payment', $refund); }
/** * @see https://developer.gocardless.com/pro/#refunds-get-a-single-refund * * @param $id * * @return Refund */ public function getRefund($id) { $response = $this->get(self::REFUNDS, [], $id); return Refund::fromArray($response); }