PhysicalBundleService.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service\Issuing;
  4. /**
  5. * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  6. * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  7. */
  8. class PhysicalBundleService extends \Stripe\Service\AbstractService
  9. {
  10. /**
  11. * Returns a list of physical bundle objects. The objects are sorted in descending
  12. * order by creation date, with the most recently created object appearing first.
  13. *
  14. * @param null|array $params
  15. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  16. *
  17. * @throws \Stripe\Exception\ApiErrorException if the request fails
  18. *
  19. * @return \Stripe\Collection<\Stripe\Issuing\PhysicalBundle>
  20. */
  21. public function all($params = null, $opts = null)
  22. {
  23. return $this->requestCollection('get', '/v1/issuing/physical_bundles', $params, $opts);
  24. }
  25. /**
  26. * Retrieves a physical bundle object.
  27. *
  28. * @param string $id
  29. * @param null|array $params
  30. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  31. *
  32. * @throws \Stripe\Exception\ApiErrorException if the request fails
  33. *
  34. * @return \Stripe\Issuing\PhysicalBundle
  35. */
  36. public function retrieve($id, $params = null, $opts = null)
  37. {
  38. return $this->request('get', $this->buildPath('/v1/issuing/physical_bundles/%s', $id), $params, $opts);
  39. }
  40. }