OrderReturnService.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service;
  4. class OrderReturnService extends \Stripe\Service\AbstractService
  5. {
  6. /**
  7. * Returns a list of your order returns. The returns are returned sorted by
  8. * creation date, with the most recently created return appearing first.
  9. *
  10. * @param null|array $params
  11. * @param null|array|\Stripe\Util\RequestOptions $opts
  12. *
  13. * @throws \Stripe\Exception\ApiErrorException if the request fails
  14. *
  15. * @return \Stripe\Collection
  16. */
  17. public function all($params = null, $opts = null)
  18. {
  19. return $this->requestCollection('get', '/v1/order_returns', $params, $opts);
  20. }
  21. /**
  22. * Retrieves the details of an existing order return. Supply the unique order ID
  23. * from either an order return creation request or the order return list, and
  24. * Stripe will return the corresponding order information.
  25. *
  26. * @param string $id
  27. * @param null|array $params
  28. * @param null|array|\Stripe\Util\RequestOptions $opts
  29. *
  30. * @throws \Stripe\Exception\ApiErrorException if the request fails
  31. *
  32. * @return \Stripe\OrderReturn
  33. */
  34. public function retrieve($id, $params = null, $opts = null)
  35. {
  36. return $this->request('get', $this->buildPath('/v1/order_returns/%s', $id), $params, $opts);
  37. }
  38. }