SessionService.php 778 B

123456789101112131415161718192021222324252627
  1. <?php
  2. // File generated from our OpenAPI spec
  3. namespace Stripe\Service\BillingPortal;
  4. /**
  5. * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  6. * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
  7. */
  8. class SessionService extends \Stripe\Service\AbstractService
  9. {
  10. /**
  11. * Creates a session of the customer portal.
  12. *
  13. * @param null|array $params
  14. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  15. *
  16. * @throws \Stripe\Exception\ApiErrorException if the request fails
  17. *
  18. * @return \Stripe\BillingPortal\Session
  19. */
  20. public function create($params = null, $opts = null)
  21. {
  22. return $this->request('post', '/v1/billing_portal/sessions', $params, $opts);
  23. }
  24. }