Fix: Corriger le type PDO dans StripeService et retirer getConnection()
This commit is contained in:
31
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/BillingServiceFactory.php
vendored
Normal file
31
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/BillingServiceFactory.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\V2\Billing;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the Billing namespace.
|
||||
*
|
||||
* @property MeterEventAdjustmentService $meterEventAdjustments
|
||||
* @property MeterEventService $meterEvents
|
||||
* @property MeterEventSessionService $meterEventSession
|
||||
* @property MeterEventStreamService $meterEventStream
|
||||
*/
|
||||
class BillingServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'meterEventAdjustments' => MeterEventAdjustmentService::class,
|
||||
'meterEvents' => MeterEventService::class,
|
||||
'meterEventSession' => MeterEventSessionService::class,
|
||||
'meterEventStream' => MeterEventStreamService::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
28
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/MeterEventAdjustmentService.php
vendored
Normal file
28
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/MeterEventAdjustmentService.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\V2\Billing;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class MeterEventAdjustmentService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Creates a meter event adjustment to cancel a previously sent meter event.
|
||||
*
|
||||
* @param null|array{cancel: array{identifier: string}, event_name: string, type: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\Billing\MeterEventAdjustment
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v2/billing/meter_event_adjustments', $params, $opts);
|
||||
}
|
||||
}
|
||||
30
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/MeterEventService.php
vendored
Normal file
30
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/MeterEventService.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\V2\Billing;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class MeterEventService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Creates a meter event. Events are validated synchronously, but are processed
|
||||
* asynchronously. Supports up to 1,000 events per second in livemode. For higher
|
||||
* rate-limits, please use meter event streams instead.
|
||||
*
|
||||
* @param null|array{event_name: string, identifier?: string, payload: array<string, string>, timestamp?: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\Billing\MeterEvent
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v2/billing/meter_events', $params, $opts);
|
||||
}
|
||||
}
|
||||
30
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php
vendored
Normal file
30
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/MeterEventSessionService.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\V2\Billing;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class MeterEventSessionService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Creates a meter event session to send usage on the high-throughput meter event
|
||||
* stream. Authentication tokens are only valid for 15 minutes, so you will need to
|
||||
* create a new meter event session when your token expires.
|
||||
*
|
||||
* @param null|array $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\Billing\MeterEventSession
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v2/billing/meter_event_session', $params, $opts);
|
||||
}
|
||||
}
|
||||
34
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/MeterEventStreamService.php
vendored
Normal file
34
api/vendor/stripe/stripe-php/lib/Service/V2/Billing/MeterEventStreamService.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\V2\Billing;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class MeterEventStreamService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Creates meter events. Events are processed asynchronously, including validation.
|
||||
* Requires a meter event session for authentication. Supports up to 10,000
|
||||
* requests per second in livemode. For even higher rate-limits, contact sales.
|
||||
*
|
||||
* @param null|array{events: array{event_name: string, identifier?: string, payload: array<string, string>, timestamp?: string}[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Stripe\Exception\TemporarySessionExpiredException
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
$opts = \Stripe\Util\RequestOptions::parse($opts);
|
||||
if (!isset($opts->apiBase)) {
|
||||
$opts->apiBase = $this->getClient()->getMeterEventsBase();
|
||||
}
|
||||
$this->request('post', '/v2/billing/meter_event_stream', $params, $opts);
|
||||
}
|
||||
}
|
||||
29
api/vendor/stripe/stripe-php/lib/Service/V2/Core/CoreServiceFactory.php
vendored
Normal file
29
api/vendor/stripe/stripe-php/lib/Service/V2/Core/CoreServiceFactory.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Stripe\Service\V2\Core;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the root namespace.
|
||||
* // Doc: The beginning of the section generated from our OpenAPI spec.
|
||||
*
|
||||
* @property EventDestinationService $eventDestinations
|
||||
* @property EventService $events
|
||||
* // Doc: The end of the section generated from our OpenAPI spec
|
||||
*/
|
||||
class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
// Class Map: The beginning of the section generated from our OpenAPI spec
|
||||
'eventDestinations' => EventDestinationService::class,
|
||||
'events' => EventService::class,
|
||||
// Class Map: The end of the section generated from our OpenAPI spec
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
139
api/vendor/stripe/stripe-php/lib/Service/V2/Core/EventDestinationService.php
vendored
Normal file
139
api/vendor/stripe/stripe-php/lib/Service/V2/Core/EventDestinationService.php
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\V2\Core;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class EventDestinationService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* Lists all event destinations.
|
||||
*
|
||||
* @param null|array{include?: string[], limit?: int} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\Collection<\Stripe\V2\EventDestination>
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v2/core/event_destinations', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new event destination.
|
||||
*
|
||||
* @param null|array{description?: string, enabled_events: string[], event_payload: string, events_from?: string[], include?: string[], metadata?: array<string, string>, name: string, snapshot_api_version?: string, type: string, amazon_eventbridge?: array{aws_account_id: string, aws_region: string}, webhook_endpoint?: array{url: string}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\EventDestination
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function create($params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', '/v2/core/event_destinations', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an event destination.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\EventDestination
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function delete($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('delete', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable an event destination.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\EventDestination
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function disable($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/disable', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable an event destination.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\EventDestination
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function enable($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/enable', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a `ping` event to an event destination.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\Event
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function ping($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s/ping', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an event destination.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{include?: string[]} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\EventDestination
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the details of an event destination.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array{description?: string, enabled_events?: string[], include?: string[], metadata?: array<string, null|string>, name?: string, webhook_endpoint?: array{url: string}} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\EventDestination
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function update($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('post', $this->buildPath('/v2/core/event_destinations/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
44
api/vendor/stripe/stripe-php/lib/Service/V2/Core/EventService.php
vendored
Normal file
44
api/vendor/stripe/stripe-php/lib/Service/V2/Core/EventService.php
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\V2\Core;
|
||||
|
||||
/**
|
||||
* @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*
|
||||
* @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
|
||||
*/
|
||||
class EventService extends \Stripe\Service\AbstractService
|
||||
{
|
||||
/**
|
||||
* List events, going back up to 30 days.
|
||||
*
|
||||
* @param null|array{limit?: int, object_id: string} $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\Collection<\Stripe\V2\Event>
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function all($params = null, $opts = null)
|
||||
{
|
||||
return $this->requestCollection('get', '/v2/core/events', $params, $opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the details of an event.
|
||||
*
|
||||
* @param string $id
|
||||
* @param null|array $params
|
||||
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
|
||||
*
|
||||
* @return \Stripe\V2\Event
|
||||
*
|
||||
* @throws \Stripe\Exception\ApiErrorException if the request fails
|
||||
*/
|
||||
public function retrieve($id, $params = null, $opts = null)
|
||||
{
|
||||
return $this->request('get', $this->buildPath('/v2/core/events/%s', $id), $params, $opts);
|
||||
}
|
||||
}
|
||||
27
api/vendor/stripe/stripe-php/lib/Service/V2/V2ServiceFactory.php
vendored
Normal file
27
api/vendor/stripe/stripe-php/lib/Service/V2/V2ServiceFactory.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
// File generated from our OpenAPI spec
|
||||
|
||||
namespace Stripe\Service\V2;
|
||||
|
||||
/**
|
||||
* Service factory class for API resources in the V2 namespace.
|
||||
*
|
||||
* @property Billing\BillingServiceFactory $billing
|
||||
* @property Core\CoreServiceFactory $core
|
||||
*/
|
||||
class V2ServiceFactory extends \Stripe\Service\AbstractServiceFactory
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private static $classMap = [
|
||||
'billing' => Billing\BillingServiceFactory::class,
|
||||
'core' => Core\CoreServiceFactory::class,
|
||||
];
|
||||
|
||||
protected function getServiceClass($name)
|
||||
{
|
||||
return \array_key_exists($name, self::$classMap) ? self::$classMap[$name] : null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user