Recurly_Invoice::refundAmount PHP Method

refundAmount() public method

Refunds an open amount from the invoice and returns a new refund invoice
public refundAmount ( $amount_in_cents, $refund_apply_order = 'credit' ) : Recurly_Invoice
return Recurly_Invoice a new refund invoice
    public function refundAmount($amount_in_cents, $refund_apply_order = 'credit')
    {
        $doc = $this->createDocument();
        $root = $doc->appendChild($doc->createElement($this->getNodeName()));
        $root->appendChild($doc->createElement('refund_apply_order', $refund_apply_order));
        $root->appendChild($doc->createElement('amount_in_cents', $amount_in_cents));
        return $this->createRefundInvoice($this->renderXML($doc));
    }