Customer.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace Pingpp;
  3. class Customer extends ApiResource
  4. {
  5. /**
  6. * @param string $id The ID of the customer to retrieve.
  7. * @param array|string|null $options
  8. *
  9. * @return Customer
  10. */
  11. public static function retrieve($id, $options = null)
  12. {
  13. return self::_retrieve($id, $options);
  14. }
  15. /**
  16. * @param array|null $params
  17. * @param array|string|null $options
  18. *
  19. * @return array An array of Customers.
  20. */
  21. public static function all($params = null, $options = null)
  22. {
  23. return self::_all($params, $options);
  24. }
  25. /**
  26. * @param array|null $params
  27. * @param array|string|null $options
  28. *
  29. * @return Customer The created customer.
  30. */
  31. public static function create($params = null, $options = null)
  32. {
  33. return self::_create($params, $options);
  34. }
  35. /**
  36. * @param array|string|null $options
  37. *
  38. * @return Customer The saved customer.
  39. */
  40. public function save($options = null)
  41. {
  42. return $this->_save($options);
  43. }
  44. /**
  45. * @param array|null $params
  46. * @param array|string|null $opts
  47. *
  48. * @return Customer The deleted customer.
  49. */
  50. public function delete($params = null, $opts = null)
  51. {
  52. return $this->_delete($params, $opts);
  53. }
  54. }