PayPal\Api\Invoice::addRefund PHP Method

addRefund() public method

Append Refunds to the list.
public addRefund ( RefundDetail $refundDetail )
$refundDetail RefundDetail
    public function addRefund($refundDetail)
    {
        if (!$this->getRefunds()) {
            return $this->setRefunds(array($refundDetail));
        } else {
            return $this->setRefunds(array_merge($this->getRefunds(), array($refundDetail)));
        }
    }