Updated Invoicing APIs

- Updated Model objects.
- Updated Samples.
- Updated Tests.
This commit is contained in:
Jay Patel
2016-07-13 15:16:25 -05:00
parent 9534bcb176
commit c714f77980
48 changed files with 3320 additions and 2881 deletions

View File

@@ -14,6 +14,7 @@ use PayPal\Common\PayPalModel;
* @property string subject
* @property string note
* @property bool send_to_merchant
* @property string[] cc_emails
*/
class Notification extends PayPalModel
{
@@ -64,7 +65,7 @@ class Notification extends PayPalModel
}
/**
* A flag indicating whether a copy of the email has to be sent to the merchant.
* Indicates whether to send a copy of the email to the merchant.
*
* @param bool $send_to_merchant
*
@@ -77,7 +78,7 @@ class Notification extends PayPalModel
}
/**
* A flag indicating whether a copy of the email has to be sent to the merchant.
* Indicates whether to send a copy of the email to the merchant.
*
* @return bool
*/
@@ -86,4 +87,57 @@ class Notification extends PayPalModel
return $this->send_to_merchant;
}
/**
* Applicable for invoices created with Cc emails. If this field is not in the body, all the cc email addresses added as part of the invoice shall be notified else this field can be used to limit the list of email addresses. Note: additional email addresses are not supported.
*
* @param string[] $cc_emails
*
* @return $this
*/
public function setCcEmails($cc_emails)
{
$this->cc_emails = $cc_emails;
return $this;
}
/**
* Applicable for invoices created with Cc emails. If this field is not in the body, all the cc email addresses added as part of the invoice shall be notified else this field can be used to limit the list of email addresses. Note: additional email addresses are not supported.
*
* @return string[]
*/
public function getCcEmails()
{
return $this->cc_emails;
}
/**
* Append CcEmails to the list.
*
* @param string $string
* @return $this
*/
public function addCcEmail($string)
{
if (!$this->getCcEmails()) {
return $this->setCcEmails(array($string));
} else {
return $this->setCcEmails(
array_merge($this->getCcEmails(), array($string))
);
}
}
/**
* Remove CcEmails from the list.
*
* @param string $string
* @return $this
*/
public function removeCcEmail($string)
{
return $this->setCcEmails(
array_diff($this->getCcEmails(), array($string))
);
}
}