ApplePayDomainService.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service;
  4. class ApplePayDomainService extends \Stripe\Service\AbstractService
  5. {
  6. /**
  7. * List apple pay domains.
  8. *
  9. * @param null|array $params
  10. * @param null|array|\Stripe\Util\RequestOptions $opts
  11. *
  12. * @throws \Stripe\Exception\ApiErrorException if the request fails
  13. *
  14. * @return \Stripe\Collection
  15. */
  16. public function all($params = null, $opts = null)
  17. {
  18. return $this->requestCollection('get', '/v1/apple_pay/domains', $params, $opts);
  19. }
  20. /**
  21. * Create an apple pay domain.
  22. *
  23. * @param null|array $params
  24. * @param null|array|\Stripe\Util\RequestOptions $opts
  25. *
  26. * @throws \Stripe\Exception\ApiErrorException if the request fails
  27. *
  28. * @return \Stripe\ApplePayDomain
  29. */
  30. public function create($params = null, $opts = null)
  31. {
  32. return $this->request('post', '/v1/apple_pay/domains', $params, $opts);
  33. }
  34. /**
  35. * Delete an apple pay domain.
  36. *
  37. * @param string $id
  38. * @param null|array $params
  39. * @param null|array|\Stripe\Util\RequestOptions $opts
  40. *
  41. * @throws \Stripe\Exception\ApiErrorException if the request fails
  42. *
  43. * @return \Stripe\ApplePayDomain
  44. */
  45. public function delete($id, $params = null, $opts = null)
  46. {
  47. return $this->request('delete', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts);
  48. }
  49. /**
  50. * Retrieve an apple pay domain.
  51. *
  52. * @param string $id
  53. * @param null|array $params
  54. * @param null|array|\Stripe\Util\RequestOptions $opts
  55. *
  56. * @throws \Stripe\Exception\ApiErrorException if the request fails
  57. *
  58. * @return \Stripe\ApplePayDomain
  59. */
  60. public function retrieve($id, $params = null, $opts = null)
  61. {
  62. return $this->request('get', $this->buildPath('/v1/apple_pay/domains/%s', $id), $params, $opts);
  63. }
  64. }