BalanceService.php 955 B

123456789101112131415161718192021222324252627282930
  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 BalanceService extends \Stripe\Service\AbstractService
  9. {
  10. /**
  11. * Retrieves the current account balance, based on the authentication that was used
  12. * to make the request. For a sample request, see <a
  13. * href="/docs/connect/account-balances#accounting-for-negative-balances">Accounting
  14. * for negative balances</a>.
  15. *
  16. * @param null|array $params
  17. * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
  18. *
  19. * @throws \Stripe\Exception\ApiErrorException if the request fails
  20. *
  21. * @return \Stripe\Balance
  22. */
  23. public function retrieve($params = null, $opts = null)
  24. {
  25. return $this->request('get', '/v1/balance', $params, $opts);
  26. }
  27. }