PayPalApiInvoiceSearchResponse

Class InvoiceSearchResponse.

Defined (1)

The class is defined in the following location(s).

/classes/lib/PayPal/Api/InvoiceSearchResponse.php  
  1. class InvoiceSearchResponse extends PayPalModel 
  2. /** 
  3. * Total number of invoices. 
  4. * @param int $total_count 
  5. *  
  6. * @return $this 
  7. */ 
  8. public function setTotalCount($total_count) 
  9. $this->total_count = $total_count; 
  10. return $this; 
  11.  
  12. /** 
  13. * Total number of invoices. 
  14. * @return int 
  15. */ 
  16. public function getTotalCount() 
  17. return $this->total_count; 
  18.  
  19. /** 
  20. * List of invoices belonging to a merchant. 
  21. * @param \PayPal\Api\Invoice[] $invoices 
  22. *  
  23. * @return $this 
  24. */ 
  25. public function setInvoices($invoices) 
  26. $this->invoices = $invoices; 
  27. return $this; 
  28.  
  29. /** 
  30. * List of invoices belonging to a merchant. 
  31. * @return \PayPal\Api\Invoice[] 
  32. */ 
  33. public function getInvoices() 
  34. return $this->invoices; 
  35.  
  36. /** 
  37. * Append Invoices to the list. 
  38. * @param \PayPal\Api\Invoice $invoice 
  39. * @return $this 
  40. */ 
  41. public function addInvoice($invoice) 
  42. if (!$this->getInvoices()) { 
  43. return $this->setInvoices(array($invoice)); 
  44. } else { 
  45. return $this->setInvoices( 
  46. array_merge($this->getInvoices(), array($invoice)) 
  47. ); 
  48.  
  49. /** 
  50. * Remove Invoices from the list. 
  51. * @param \PayPal\Api\Invoice $invoice 
  52. * @return $this 
  53. */ 
  54. public function removeInvoice($invoice) 
  55. return $this->setInvoices( 
  56. array_diff($this->getInvoices(), array($invoice)) 
  57. ); 
  58.