CardService.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service\TestHelpers\Issuing;
  4. /**
  5. * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  6. * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  7. */
  8. class CardService extends \Stripe\Service\AbstractService
  9. {
  10. /**
  11. * Updates the shipping status of the specified Issuing <code>Card</code> object to
  12. * <code>delivered</code>.
  13. *
  14. * @param string $id
  15. * @param null|array $params
  16. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  17. *
  18. * @throws \Stripe\Exception\ApiErrorException if the request fails
  19. *
  20. * @return \Stripe\Issuing\Card
  21. */
  22. public function deliverCard($id, $params = null, $opts = null)
  23. {
  24. return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/deliver', $id), $params, $opts);
  25. }
  26. /**
  27. * Updates the shipping status of the specified Issuing <code>Card</code> object to
  28. * <code>failure</code>.
  29. *
  30. * @param string $id
  31. * @param null|array $params
  32. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  33. *
  34. * @throws \Stripe\Exception\ApiErrorException if the request fails
  35. *
  36. * @return \Stripe\Issuing\Card
  37. */
  38. public function failCard($id, $params = null, $opts = null)
  39. {
  40. return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/fail', $id), $params, $opts);
  41. }
  42. /**
  43. * Updates the shipping status of the specified Issuing <code>Card</code> object to
  44. * <code>returned</code>.
  45. *
  46. * @param string $id
  47. * @param null|array $params
  48. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  49. *
  50. * @throws \Stripe\Exception\ApiErrorException if the request fails
  51. *
  52. * @return \Stripe\Issuing\Card
  53. */
  54. public function returnCard($id, $params = null, $opts = null)
  55. {
  56. return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/return', $id), $params, $opts);
  57. }
  58. /**
  59. * Updates the shipping status of the specified Issuing <code>Card</code> object to
  60. * <code>shipped</code>.
  61. *
  62. * @param string $id
  63. * @param null|array $params
  64. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  65. *
  66. * @throws \Stripe\Exception\ApiErrorException if the request fails
  67. *
  68. * @return \Stripe\Issuing\Card
  69. */
  70. public function shipCard($id, $params = null, $opts = null)
  71. {
  72. return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/cards/%s/shipping/ship', $id), $params, $opts);
  73. }
  74. }