give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Responses
/
License
/
DeleteActivation.php
give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Responses
/
License
Last commit date
Alias
3 months ago
Listing
3 months ago
ValueObjects
3 months ago
Activate.php
3 months ago
Deactivate.php
3 months ago
DeleteActivation.php
3 months ago
RegenerateKey.php
3 months ago
StatusChange.php
3 months ago
Validate.php
3 months ago
ValidatedProductCollection.php
3 months ago
DeleteActivation.php
36 lines
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Give\Vendors\LiquidWeb\LicensingApiClient\Responses\License; |
| 4 | |
| 5 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Contracts\Response; |
| 6 | |
| 7 | /** |
| 8 | * Represents a license activation deletion response. |
| 9 | * |
| 10 | * @implements Response<array{deleted: bool}> |
| 11 | */ |
| 12 | final class DeleteActivation implements Response |
| 13 | { |
| 14 | public bool $deleted; |
| 15 | |
| 16 | private function __construct(bool $deleted) { |
| 17 | $this->deleted = $deleted; |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * @param array{deleted: bool} $attributes |
| 22 | */ |
| 23 | public static function from(array $attributes): self { |
| 24 | return new self($attributes['deleted']); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * @return array{deleted: bool} |
| 29 | */ |
| 30 | public function toArray(): array { |
| 31 | return [ |
| 32 | 'deleted' => $this->deleted, |
| 33 | ]; |
| 34 | } |
| 35 | } |
| 36 |