<?php

// File generated from our OpenAPI spec

namespace ChamaWP\Vendor\Stripe\Service\V2\Core;

/**
 * @phpstan-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
 *
 * @psalm-import-type RequestOptionsArray from \Stripe\Util\RequestOptions
 *
 * @license MIT
 * Modified by __root__ on 22-June-2025 using {@see https://github.com/BrianHenryIE/strauss}.
 */
class EventService extends \ChamaWP\Vendor\Stripe\Service\AbstractService
{
    /**
     * List events, going back up to 30 days.
     *
     * @param null|array{limit?: int, object_id: string} $params
     * @param null|RequestOptionsArray|\ChamaWP\Vendor\Stripe\Util\RequestOptions $opts
     *
     * @return \ChamaWP\Vendor\Stripe\V2\Collection<\Stripe\V2\Event>
     *
     * @throws \ChamaWP\Vendor\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|\ChamaWP\Vendor\Stripe\Util\RequestOptions $opts
     *
     * @return \ChamaWP\Vendor\Stripe\V2\Event
     *
     * @throws \ChamaWP\Vendor\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);
    }
}
