PayPal\Api\Invoice::addAttachment PHP Method

addAttachment() public method

Append Attachments to the list.
public addAttachment ( FileAttachment $fileAttachment )
$fileAttachment FileAttachment
    public function addAttachment($fileAttachment)
    {
        if (!$this->getAttachments()) {
            return $this->setAttachments(array($fileAttachment));
        } else {
            return $this->setAttachments(array_merge($this->getAttachments(), array($fileAttachment)));
        }
    }