<?php
namespace Fifa\ConnectId\Sdk\Registration\Model;
use Fifa\ConnectId\Sdk\Util\Data\Status;

/**
 * Class BriefRegistration
 * @package Fifa\ConnectId\Sdk\Registration\Model
 */
class BriefRegistration
{
    /**
     * @var string
     */
    private $organisationId;

    /**
     * @var string
     */
    private $status;

    /**
     * @var string
     */
    private $systemId;

    /**
     * BriefRegistration constructor.
     * @param string $organisationId
     * @param string $status
     * @param string $systemId
     */
    public function __construct(string $organisationId, string $status, string $systemId)
    {
        $this->organisationId = $organisationId;
        $this->status = $status;
        $this->systemId = $systemId;
    }

    /**
     * @return string
     */
    public function __toString()
    {
        return sprintf('OrganisationId: %s, Status: %s, SystemId: %s', $this->organisationId, $this->status, $this->systemId);
    }

    /**
     * @return bool
     */
    public function isActive(): bool
    {
        return strtolower($this->getStatus()) === Status::ACTIVE;
    }

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

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

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