Updated Invoice API

This commit is contained in:
Jay Patel
2016-09-19 14:32:33 -05:00
parent a1039ae38a
commit 4f20bc4b97
10 changed files with 209 additions and 11 deletions

View File

@@ -18,6 +18,7 @@ use PayPal\Common\PayPalModel;
* @property \PayPal\Api\TemplateSettings[] settings
* @property string unit_of_measure
* @property bool custom
* @property \PayPal\Api\Links[] links
*/
class Template extends PayPalModel
{
@@ -212,4 +213,57 @@ class Template extends PayPalModel
return $this->custom;
}
/**
* Sets Links
*
* @param \PayPal\Api\Links[] $links
*
* @return $this
*/
public function setLinks($links)
{
$this->links = $links;
return $this;
}
/**
* Gets Links
*
* @return \PayPal\Api\Links[]
*/
public function getLinks()
{
return $this->links;
}
/**
* Append Links to the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function addLink($links)
{
if (!$this->getLinks()) {
return $this->setLinks(array($links));
} else {
return $this->setLinks(
array_merge($this->getLinks(), array($links))
);
}
}
/**
* Remove Links from the list.
*
* @param \PayPal\Api\Links $links
* @return $this
*/
public function removeLink($links)
{
return $this->setLinks(
array_diff($this->getLinks(), array($links))
);
}
}