PhysicalBundle.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Issuing;
  4. /**
  5. * A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card.
  6. *
  7. * @property string $id Unique identifier for the object.
  8. * @property string $object String representing the object's type. Objects of the same type share the same value.
  9. * @property \Stripe\StripeObject $features
  10. * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
  11. * @property string $name Friendly display name.
  12. * @property string $status Whether this physical bundle can be used to create cards.
  13. * @property string $type Whether this physical bundle is a standard Stripe offering or custom-made for you.
  14. */
  15. class PhysicalBundle extends \Stripe\ApiResource
  16. {
  17. const OBJECT_NAME = 'issuing.physical_bundle';
  18. const STATUS_ACTIVE = 'active';
  19. const STATUS_INACTIVE = 'inactive';
  20. const STATUS_REVIEW = 'review';
  21. const TYPE_CUSTOM = 'custom';
  22. const TYPE_STANDARD = 'standard';
  23. /**
  24. * Returns a list of physical bundle objects. The objects are sorted in descending
  25. * order by creation date, with the most recently created object appearing first.
  26. *
  27. * @param null|array $params
  28. * @param null|array|string $opts
  29. *
  30. * @throws \Stripe\Exception\ApiErrorException if the request fails
  31. *
  32. * @return \Stripe\Collection<\Stripe\Issuing\PhysicalBundle> of ApiResources
  33. */
  34. public static function all($params = null, $opts = null)
  35. {
  36. $url = static::classUrl();
  37. return static::_requestPage($url, \Stripe\Collection::class, $params, $opts);
  38. }
  39. /**
  40. * Retrieves a physical bundle object.
  41. *
  42. * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key
  43. * @param null|array|string $opts
  44. *
  45. * @throws \Stripe\Exception\ApiErrorException if the request fails
  46. *
  47. * @return \Stripe\Issuing\PhysicalBundle
  48. */
  49. public static function retrieve($id, $opts = null)
  50. {
  51. $opts = \Stripe\Util\RequestOptions::parse($opts);
  52. $instance = new static($id, $opts);
  53. $instance->refresh();
  54. return $instance;
  55. }
  56. }