<?php

namespace Fifa\ConnectId\Sdk\ApiModelValidation;

use Fifa\ConnectId\Sdk\Util\Data\Organisation\OrganisationNature;
use Fifa\ConnectId\Sdk\Registration\ValidationException;

class OrganisationNatureValidator
{
    /**
     * Method that validates object provided and throws exception when object's properties are invalid
     *
     * @param string|null $validationSubject
     * @param string $validationSubjectName
     * @return void
     * @throws ValidationException
     */
    public static function validate(?string $validationSubject, string $validationSubjectName)
    {
        $validationSubjectName = ApiModelValidator::resolveValidationSubjectName($validationSubject, $validationSubjectName);

        ApiModelValidator::mustMatchEnumValue($validationSubject, OrganisationNature::getOrganisationNatures(), $validationSubjectName);
    }
}