OpenXE/classes/Modules/TaxdooApi/Exception/TooManyReuestsException.php

31 lines
561 B
PHP
Raw Normal View History

2021-05-21 08:49:41 +02:00
<?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;
}
}