Download src/Billing/Application/Commands/CreateSubscriptionCommand.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Billing/Application/Commands/CreateSubscriptionCommand.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Billing/Application/Commands/CreateSubscriptionCommand.php
-
curl -L -o CreateSubscriptionCommand.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Billing/Application/Commands/CreateSubscriptionCommand.php
1.02 kB
| declare(strict_types=1); | |
| namespace Billing\Application\Commands; | |
| use Billing\Application\CommandHandlers\CreateSubscriptionCommandHandler; | |
| use Billing\Domain\Entities\PlanEntity; | |
| use Billing\Domain\ValueObjects\TrialPeriodDays; | |
| use Shared\Domain\ValueObjects\Id; | |
| use Shared\Infrastructure\CommandBus\Attributes\Handler; | |
| use Workspace\Domain\Entities\WorkspaceEntity; | |
| (CreateSubscriptionCommandHandler::class) | |
| class CreateSubscriptionCommand | |
| { | |
| public Id|WorkspaceEntity $workspace; | |
| public Id|PlanEntity $plan; | |
| public ?TrialPeriodDays $trialPeriodDays = null; | |
| public function __construct( | |
| Id|WorkspaceEntity|string $workspace, | |
| Id|PlanEntity|string $plan | |
| ) { | |
| $this->workspace = is_string($workspace) | |
| ? new Id($workspace) : $workspace; | |
| $this->plan = is_string($plan) | |
| ? new Id($plan) : $plan; | |
| } | |
| public function setTrialPeriodDays(int $days): void | |
| { | |
| $this->trialPeriodDays = new TrialPeriodDays($days); | |
| } | |
| } | |