37372-vm/stripe-php/lib/Service/V2/Core/EventService.php
Flatlogic Bot e78bca6aa4 V.2
2026-01-12 01:02:42 +00:00

45 lines
1.4 KiB
PHP

<?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{created?: array{gt?: string, gte?: string, lt?: string, lte?: string}, limit?: int, object_id?: string, types?: string[]} $params
* @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts
*
* @return \Stripe\V2\Collection<\Stripe\V2\Core\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\Core\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);
}
}