<?php
namespace Fifa\ConnectId\Sdk\Exception;

use Fifa\ConnectId\Sdk\Api\ApiException;

/**
 * Class PlayerRegistrationLevelRestrictionException
 * @package Fifa\ConnectId\Sdk\Exception
 */
class PlayerRegistrationLevelRestrictionException extends FifaConnectIdException
{
    /**
     * @var string
     */
    private $personFifaId;

    /**
     * PlayerRegistrationLevelRestrictionException constructor.
     * @param string $personFifaId
     */
    public function __construct($personFifaId)
    {
        $message = sprintf('Person `%s` doesn\'t have Player registration with level `Pro` (required during explicit request for person details).', $personFifaId);
        parent::__construct(new ApiException($message));
        $this->personFifaId = $personFifaId;
    }

    /**
     * @return string
     */
    public function getPersonFifaId(): string
    {
        return $this->personFifaId;
    }
}