Файл: sngine-v2.8/Script/includes/libs/PayPal/paypal/rest-api-sdk-php/lib/PayPal/Api/InvoiceSearchResponse.php
Строк: 87
<?php
namespace PayPalApi;
use PayPalCommonPayPalModel;
/**
* Class InvoiceSearchResponse
*
*
*
* @package PayPalApi
*
* @property int total_count
* @property PayPalApiInvoice[] invoices
*/
class InvoiceSearchResponse extends PayPalModel
{
/**
* Total number of invoices.
*
* @param int $total_count
*
* @return $this
*/
public function setTotalCount($total_count)
{
$this->total_count = $total_count;
return $this;
}
/**
* Total number of invoices.
*
* @return int
*/
public function getTotalCount()
{
return $this->total_count;
}
/**
* List of invoices belonging to a merchant.
*
* @param PayPalApiInvoice[] $invoices
*
* @return $this
*/
public function setInvoices($invoices)
{
$this->invoices = $invoices;
return $this;
}
/**
* List of invoices belonging to a merchant.
*
* @return PayPalApiInvoice[]
*/
public function getInvoices()
{
return $this->invoices;
}
/**
* Append Invoices to the list.
*
* @param PayPalApiInvoice $invoice
* @return $this
*/
public function addInvoice($invoice)
{
if (!$this->getInvoices()) {
return $this->setInvoices(array($invoice));
} else {
return $this->setInvoices(
array_merge($this->getInvoices(), array($invoice))
);
}
}
/**
* Remove Invoices from the list.
*
* @param PayPalApiInvoice $invoice
* @return $this
*/
public function removeInvoice($invoice)
{
return $this->setInvoices(
array_diff($this->getInvoices(), array($invoice))
);
}
}