Align commerce module with the monorepo module structure by updating all namespaces to use the Core\Mod\Commerce convention. This change supports the recent monorepo separation and ensures consistency with other modules. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
27 lines
647 B
PHP
27 lines
647 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Core\Mod\Commerce\Exceptions;
|
|
|
|
use Exception;
|
|
use Core\Mod\Commerce\Models\Subscription;
|
|
|
|
/**
|
|
* Exception thrown when a subscription has exceeded its pause cycle limit.
|
|
*/
|
|
class PauseLimitExceededException extends Exception
|
|
{
|
|
public function __construct(
|
|
public readonly Subscription $subscription,
|
|
public readonly int $maxPauseCycles,
|
|
string $message = '',
|
|
) {
|
|
$message = $message ?: sprintf(
|
|
'Subscription has reached the maximum number of pause cycles (%d).',
|
|
$maxPauseCycles
|
|
);
|
|
|
|
parent::__construct($message);
|
|
}
|
|
}
|