EarlyFraudWarningService.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service\Radar;
  4. class EarlyFraudWarningService extends \Stripe\Service\AbstractService
  5. {
  6. /**
  7. * Returns a list of early fraud warnings.
  8. *
  9. * @param null|array $params
  10. * @param null|array|\Stripe\Util\RequestOptions $opts
  11. *
  12. * @throws \Stripe\Exception\ApiErrorException if the request fails
  13. *
  14. * @return \Stripe\Collection
  15. */
  16. public function all($params = null, $opts = null)
  17. {
  18. return $this->requestCollection('get', '/v1/radar/early_fraud_warnings', $params, $opts);
  19. }
  20. /**
  21. * Retrieves the details of an early fraud warning that has previously been
  22. * created.
  23. *
  24. * Please refer to the <a href="#early_fraud_warning_object">early fraud
  25. * warning</a> object reference for more details.
  26. *
  27. * @param string $id
  28. * @param null|array $params
  29. * @param null|array|\Stripe\Util\RequestOptions $opts
  30. *
  31. * @throws \Stripe\Exception\ApiErrorException if the request fails
  32. *
  33. * @return \Stripe\Radar\EarlyFraudWarning
  34. */
  35. public function retrieve($id, $params = null, $opts = null)
  36. {
  37. return $this->request('get', $this->buildPath('/v1/radar/early_fraud_warnings/%s', $id), $params, $opts);
  38. }
  39. }