PayPalApiPaymentHistory

Class PaymentHistory.

Defined (1)

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

/classes/lib/PayPal/Api/PaymentHistory.php  
  1. class PaymentHistory extends PayPalModel 
  2. /** 
  3. * A list of Payment resources 
  4. * @param \PayPal\Api\Payment[] $payments 
  5. *  
  6. * @return $this 
  7. */ 
  8. public function setPayments($payments) 
  9. $this->payments = $payments; 
  10. return $this; 
  11.  
  12. /** 
  13. * A list of Payment resources 
  14. * @return \PayPal\Api\Payment[] 
  15. */ 
  16. public function getPayments() 
  17. return $this->payments; 
  18.  
  19. /** 
  20. * Append Payments to the list. 
  21. * @param \PayPal\Api\Payment $payment 
  22. * @return $this 
  23. */ 
  24. public function addPayment($payment) 
  25. if (!$this->getPayments()) { 
  26. return $this->setPayments(array($payment)); 
  27. } else { 
  28. return $this->setPayments( 
  29. array_merge($this->getPayments(), array($payment)) 
  30. ); 
  31.  
  32. /** 
  33. * Remove Payments from the list. 
  34. * @param \PayPal\Api\Payment $payment 
  35. * @return $this 
  36. */ 
  37. public function removePayment($payment) 
  38. return $this->setPayments( 
  39. array_diff($this->getPayments(), array($payment)) 
  40. ); 
  41.  
  42. /** 
  43. * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. 
  44. * @param int $count 
  45. *  
  46. * @return $this 
  47. */ 
  48. public function setCount($count) 
  49. $this->count = $count; 
  50. return $this; 
  51.  
  52. /** 
  53. * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items. 
  54. * @return int 
  55. */ 
  56. public function getCount() 
  57. return $this->count; 
  58.  
  59. /** 
  60. * Identifier of the next element to get the next range of results. 
  61. * @param string $next_id 
  62. *  
  63. * @return $this 
  64. */ 
  65. public function setNextId($next_id) 
  66. $this->next_id = $next_id; 
  67. return $this; 
  68.  
  69. /** 
  70. * Identifier of the next element to get the next range of results. 
  71. * @return string 
  72. */ 
  73. public function getNextId() 
  74. return $this->next_id; 
  75.