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

use Fifa\ConnectId\Sdk\Api\ApiException;

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

    /**
     * @var int
     */
    private $timeoutSeconds;

    /**
     * MemberAssociationDoesNotRespondException constructor.
     * @param string $organisationId
     * @param int $timeoutSeconds
     */
    public function __construct($organisationId, $timeoutSeconds)
    {
        parent::__construct(new ApiException(sprintf('Member Association with FIFA ID `%s` didn\'t respond within `%s` seconds.', $organisationId, $timeoutSeconds)));
        $this->organisationId = $organisationId;
        $this->timeoutSeconds = $timeoutSeconds;
    }

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

    /**
     * @return int
     */
    public function getTimeoutSeconds(): int
    {
        return $this->timeoutSeconds;
    }
}