OpenXE/classes/Modules/TaxdooApi/Exception/TooManyReuestsException.php
2021-05-21 08:49:41 +02:00

31 lines
561 B
PHP

<?php
namespace Xentral\Modules\TaxdooApi\Exception;
class TooManyReuestsException extends TaxdooFatalExcepion
{
/** @var int $remaining */
private $remaining;
/**
* @param int $timeout
*
* @return TooManyReuestsException
*/
public static function fromTimeout($timeout)
{
$e = new self("Too many requests ($timeout secs timeout)");
$e->remaining = $timeout;
return $e;
}
/**
* @return int
*/
public function getRemaining()
{
return $this->remaining;
}
}