CountrySpecService.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service;
  4. class CountrySpecService extends \Stripe\Service\AbstractService
  5. {
  6. /**
  7. * Lists all Country Spec objects available in the API.
  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/country_specs', $params, $opts);
  19. }
  20. /**
  21. * Returns a Country Spec for a given Country code.
  22. *
  23. * @param string $id
  24. * @param null|array $params
  25. * @param null|array|\Stripe\Util\RequestOptions $opts
  26. *
  27. * @throws \Stripe\Exception\ApiErrorException if the request fails
  28. *
  29. * @return \Stripe\CountrySpec
  30. */
  31. public function retrieve($id, $params = null, $opts = null)
  32. {
  33. return $this->request('get', $this->buildPath('/v1/country_specs/%s', $id), $params, $opts);
  34. }
  35. }