Download src/Affiliate/Application/Commands/TrackAffiliateCommand.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 789 Bytes
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Affiliate/Application/Commands/TrackAffiliateCommand.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Affiliate/Application/Commands/TrackAffiliateCommand.php
-
curl -L -o TrackAffiliateCommand.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Affiliate/Application/Commands/TrackAffiliateCommand.php
789 Bytes
| declare(strict_types=1); | |
| namespace Affiliate\Application\Commands; | |
| use Affiliate\Application\CommandHandlers\TrackAffiliateCommandHandler; | |
| use Affiliate\Domain\ValueObjects\Amount; | |
| use Affiliate\Domain\ValueObjects\Code; | |
| use Shared\Infrastructure\CommandBus\Attributes\Handler; | |
| (TrackAffiliateCommandHandler::class) | |
| class TrackAffiliateCommand | |
| { | |
| public Code $code; | |
| public string $action; | |
| public ?Amount $amount = null; | |
| public function __construct(Code|string $code, string $action) | |
| { | |
| $this->code = $code instanceof Code ? $code : new Code($code); | |
| $this->action = $action; | |
| } | |
| public function setAmount(Amount|int $amount): void | |
| { | |
| $this->amount = $amount instanceof Amount ? $amount : new Amount($amount); | |
| } | |
| } | |