Bump stripe-php from 16.4.0 to 17.2.1

This commit is contained in:
johnnyq
2025-05-22 12:37:35 -04:00
parent 5361391b3b
commit 6a368840fa
332 changed files with 4978 additions and 4624 deletions

View File

@@ -16,6 +16,7 @@ namespace Stripe;
* the `expand` parameter contains `total_count`.
*
* @template TStripeObject of StripeObject
*
* @template-implements \IteratorAggregate<TStripeObject>
*
* @property string $object
@@ -71,10 +72,10 @@ class SearchResult extends StripeObject implements \Countable, \IteratorAggregat
if (\is_string($k)) {
return parent::offsetGet($k);
}
$msg = "You tried to access the {$k} index, but SearchResult " .
'types only support string keys. (HINT: Search calls ' .
'return an object with a `data` (which is the data ' .
"array). You likely want to call ->data[{$k}])";
$msg = "You tried to access the {$k} index, but SearchResult "
. 'types only support string keys. (HINT: Search calls '
. 'return an object with a `data` (which is the data '
. "array). You likely want to call ->data[{$k}])";
throw new Exception\InvalidArgumentException($msg);
}
@@ -83,9 +84,9 @@ class SearchResult extends StripeObject implements \Countable, \IteratorAggregat
* @param null|array $params
* @param null|array|string $opts
*
* @throws Exception\ApiErrorException
*
* @return SearchResult<TStripeObject>
*
* @throws Exception\ApiErrorException
*/
public function all($params = null, $opts = null)
{
@@ -94,9 +95,9 @@ class SearchResult extends StripeObject implements \Countable, \IteratorAggregat
list($response, $opts) = $this->_request('get', $url, $params, $opts);
$obj = Util\Util::convertToStripeObject($response, $opts);
if (!($obj instanceof \Stripe\SearchResult)) {
throw new \Stripe\Exception\UnexpectedValueException(
'Expected type ' . \Stripe\SearchResult::class . ', got "' . \get_class($obj) . '" instead.'
if (!$obj instanceof SearchResult) {
throw new Exception\UnexpectedValueException(
'Expected type ' . SearchResult::class . ', got "' . \get_class($obj) . '" instead.'
);
}
$obj->setFilters($params);
@@ -124,12 +125,12 @@ class SearchResult extends StripeObject implements \Countable, \IteratorAggregat
}
/**
* @throws Exception\ApiErrorException
*
* @return \Generator|TStripeObject[] A generator that can be used to
* iterate across all objects across all pages. As page boundaries are
* encountered, the next page will be fetched automatically for
* continued iteration.
*
* @throws Exception\ApiErrorException
*/
public function autoPagingIterator()
{
@@ -181,9 +182,9 @@ class SearchResult extends StripeObject implements \Countable, \IteratorAggregat
* @param null|array $params
* @param null|array|string $opts
*
* @throws Exception\ApiErrorException
*
* @return SearchResult<TStripeObject>
*
* @throws Exception\ApiErrorException
*/
public function nextPage($params = null, $opts = null)
{