PayPal\Api\FileAttachment::setUrl PHP Method

setUrl() public method

URL of the attached file that can be downloaded.
public setUrl ( string $url )
$url string
    public function setUrl($url)
    {
        UrlValidator::validate($url, "Url");
        $this->url = $url;
        return $this;
    }

Usage Example

 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage Url is not a fully qualified URL
  */
 public function testUrlValidationForUrl()
 {
     $obj = new FileAttachment();
     $obj->setUrl(null);
 }