AccountSessionService.php 865 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service;
  4. /**
  5. * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  6. * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  7. */
  8. class AccountSessionService extends \Stripe\Service\AbstractService
  9. {
  10. /**
  11. * Creates a AccountSession object that includes a single-use token that the
  12. * platform can use on their front-end to grant client-side API access.
  13. *
  14. * @param null|array $params
  15. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  16. *
  17. * @throws \Stripe\Exception\ApiErrorException if the request fails
  18. *
  19. * @return \Stripe\AccountSession
  20. */
  21. public function create($params = null, $opts = null)
  22. {
  23. return $this->request('post', '/v1/account_sessions', $params, $opts);
  24. }
  25. }