TransactionService.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service\Issuing;
  4. class TransactionService extends \Stripe\Service\AbstractService
  5. {
  6. /**
  7. * Returns a list of Issuing <code>Transaction</code> objects. The objects are
  8. * sorted in descending order by creation date, with the most recently created
  9. * object appearing first.
  10. *
  11. * @param null|array $params
  12. * @param null|array|\Stripe\Util\RequestOptions $opts
  13. *
  14. * @throws \Stripe\Exception\ApiErrorException if the request fails
  15. *
  16. * @return \Stripe\Collection
  17. */
  18. public function all($params = null, $opts = null)
  19. {
  20. return $this->requestCollection('get', '/v1/issuing/transactions', $params, $opts);
  21. }
  22. /**
  23. * Retrieves an Issuing <code>Transaction</code> object.
  24. *
  25. * @param string $id
  26. * @param null|array $params
  27. * @param null|array|\Stripe\Util\RequestOptions $opts
  28. *
  29. * @throws \Stripe\Exception\ApiErrorException if the request fails
  30. *
  31. * @return \Stripe\Issuing\Transaction
  32. */
  33. public function retrieve($id, $params = null, $opts = null)
  34. {
  35. return $this->request('get', $this->buildPath('/v1/issuing/transactions/%s', $id), $params, $opts);
  36. }
  37. /**
  38. * Updates the specified Issuing <code>Transaction</code> object by setting the
  39. * values of the parameters passed. Any parameters not provided will be left
  40. * unchanged.
  41. *
  42. * @param string $id
  43. * @param null|array $params
  44. * @param null|array|\Stripe\Util\RequestOptions $opts
  45. *
  46. * @throws \Stripe\Exception\ApiErrorException if the request fails
  47. *
  48. * @return \Stripe\Issuing\Transaction
  49. */
  50. public function update($id, $params = null, $opts = null)
  51. {
  52. return $this->request('post', $this->buildPath('/v1/issuing/transactions/%s', $id), $params, $opts);
  53. }
  54. }