Search.php 633 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Stripe\ApiOperations;
  3. /**
  4. * Trait for searchable resources.
  5. *
  6. * This trait should only be applied to classes that derive from StripeObject.
  7. */
  8. trait Search
  9. {
  10. /**
  11. * @param string $searchUrl
  12. * @param null|array $params
  13. * @param null|array|string $opts
  14. *
  15. * @throws \Stripe\Exception\ApiErrorException if the request fails
  16. *
  17. * @return \Stripe\SearchResult of ApiResources
  18. */
  19. protected static function _searchResource($searchUrl, $params = null, $opts = null)
  20. {
  21. return static::_requestPage($searchUrl, \Stripe\SearchResult::class, $params, $opts);
  22. }
  23. }