mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 19:04:52 +00:00
Bump stripe-php from 16.4.0 to 17.2.1
This commit is contained in:
@@ -13,9 +13,9 @@ trait All
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection of ApiResources
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function all($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -13,9 +13,9 @@ trait Create
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return static the created resource
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function create($params = null, $options = null)
|
||||
{
|
||||
|
||||
@@ -13,9 +13,9 @@ trait Delete
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return static the deleted resource
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function delete($params = null, $opts = null)
|
||||
{
|
||||
|
||||
@@ -51,9 +51,9 @@ trait NestedResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\StripeObject
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected static function _createNestedResource($id, $nestedPath, $params = null, $options = null)
|
||||
{
|
||||
@@ -69,9 +69,9 @@ trait NestedResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\StripeObject
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected static function _retrieveNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null)
|
||||
{
|
||||
@@ -87,9 +87,9 @@ trait NestedResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\StripeObject
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected static function _updateNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null)
|
||||
{
|
||||
@@ -105,9 +105,9 @@ trait NestedResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\StripeObject
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected static function _deleteNestedResource($id, $nestedPath, $nestedId, $params = null, $options = null)
|
||||
{
|
||||
@@ -122,9 +122,9 @@ trait NestedResource
|
||||
* @param null|array $params
|
||||
* @param null|array|string $options
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\StripeObject
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected static function _allNestedResources($id, $nestedPath, $params = null, $options = null)
|
||||
{
|
||||
|
||||
@@ -34,9 +34,9 @@ trait Request
|
||||
* @param string[] $usage names of tracked behaviors associated with this request
|
||||
* @param 'v1'|'v2' $apiMode
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return array tuple containing (the JSON response, $options)
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected function _request($method, $url, $params = [], $options = null, $usage = [], $apiMode = 'v1')
|
||||
{
|
||||
@@ -49,14 +49,14 @@ trait Request
|
||||
|
||||
/**
|
||||
* @param string $url URL for the request
|
||||
* @param class-string< \Stripe\SearchResult|\Stripe\Collection > $resultClass indicating what type of paginated result is returned
|
||||
* @param class-string< \Stripe\Collection|\Stripe\SearchResult > $resultClass indicating what type of paginated result is returned
|
||||
* @param null|array $params list of parameters for the request
|
||||
* @param null|array|string $options
|
||||
* @param string[] $usage names of tracked behaviors associated with this request
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\Collection|\Stripe\SearchResult
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected static function _requestPage($url, $resultClass, $params = null, $options = null, $usage = [])
|
||||
{
|
||||
@@ -64,7 +64,7 @@ trait Request
|
||||
|
||||
list($response, $opts) = static::_staticRequest('get', $url, $params, $options, $usage);
|
||||
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
|
||||
if (!($obj instanceof $resultClass)) {
|
||||
if (!$obj instanceof $resultClass) {
|
||||
throw new \Stripe\Exception\UnexpectedValueException(
|
||||
'Expected type ' . $resultClass . ', got "' . \get_class($obj) . '" instead.'
|
||||
);
|
||||
@@ -99,9 +99,9 @@ trait Request
|
||||
* @param string[] $usage names of tracked behaviors associated with this request
|
||||
* @param 'v1'|'v2' $apiMode
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return array tuple containing (the JSON response, $options)
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
protected static function _staticRequest($method, $url, $params, $options, $usage = [], $apiMode = 'v1')
|
||||
{
|
||||
|
||||
@@ -15,9 +15,9 @@ trait Retrieve
|
||||
* or an options array containing an `id` key
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return static
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function retrieve($id, $opts = null)
|
||||
{
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Stripe\ApiOperations;
|
||||
|
||||
/**
|
||||
* Trait for searchable resources.
|
||||
*
|
||||
* This trait should only be applied to classes that derive from StripeObject.
|
||||
*/
|
||||
trait Search
|
||||
{
|
||||
/**
|
||||
* @param string $searchUrl
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return \Stripe\SearchResult of ApiResources
|
||||
*/
|
||||
protected static function _searchResource($searchUrl, $params = null, $opts = null)
|
||||
{
|
||||
return static::_requestPage($searchUrl, \Stripe\SearchResult::class, $params, $opts);
|
||||
}
|
||||
}
|
||||
@@ -14,9 +14,9 @@ trait SingletonRetrieve
|
||||
* @param null|array|string $opts the ID of the API resource to retrieve,
|
||||
* or an options array containing an `id` key
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return static
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function retrieve($opts = null)
|
||||
{
|
||||
|
||||
@@ -15,9 +15,9 @@ trait Update
|
||||
* @param null|array $params
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return static the updated resource
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public static function update($id, $params = null, $opts = null)
|
||||
{
|
||||
@@ -34,10 +34,10 @@ trait Update
|
||||
/**
|
||||
* @param null|array|string $opts
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @return static the saved resource
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*
|
||||
* @deprecated The `save` method is deprecated and will be removed in a
|
||||
* future major version of the library. Use the static method `update`
|
||||
* on the resource instead.
|
||||
|
||||
Reference in New Issue
Block a user