<?php

// File generated from our OpenAPI spec

namespace ChamaWP\Vendor\Stripe\Service;

/**
 * @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 CountrySpecService extends AbstractService
{
    /**
     * Lists all Country Spec objects available in the API.
     *
     * @param null|array{ending_before?: string, expand?: string[], limit?: int, starting_after?: string} $params
     * @param null|RequestOptionsArray|\ChamaWP\Vendor\Stripe\Util\RequestOptions $opts
     *
     * @return \ChamaWP\Vendor\Stripe\Collection<\Stripe\CountrySpec>
     *
     * @throws \ChamaWP\Vendor\Stripe\Exception\ApiErrorException if the request fails
     */
    public function all($params = null, $opts = null)
    {
        return $this->requestCollection('get', '/v1/country_specs', $params, $opts);
    }

    /**
     * Returns a Country Spec for a given Country code.
     *
     * @param string $id
     * @param null|array{expand?: string[]} $params
     * @param null|RequestOptionsArray|\ChamaWP\Vendor\Stripe\Util\RequestOptions $opts
     *
     * @return \ChamaWP\Vendor\Stripe\CountrySpec
     *
     * @throws \ChamaWP\Vendor\Stripe\Exception\ApiErrorException if the request fails
     */
    public function retrieve($id, $params = null, $opts = null)
    {
        return $this->request('get', $this->buildPath('/v1/country_specs/%s', $id), $params, $opts);
    }
}
