give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Responses
/
Credit
/
DeleteQuota.php
give
/
vendor
/
vendor-prefixed
/
stellarwp
/
licensing-api-client
/
src
/
Responses
/
Credit
Last commit date
ValueObjects
3 months ago
BalanceCollection.php
3 months ago
DeletePool.php
3 months ago
DeleteQuota.php
3 months ago
LedgerPage.php
3 months ago
PoolCollection.php
3 months ago
QuotaCollection.php
3 months ago
RecordUsage.php
3 months ago
Refund.php
3 months ago
DeleteQuota.php
36 lines
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Credit; |
| 4 | |
| 5 | use Give\Vendors\LiquidWeb\LicensingApiClient\Responses\Contracts\Response; |
| 6 | |
| 7 | /** |
| 8 | * Represents a successful quota deletion. |
| 9 | * |
| 10 | * @implements Response<array{deleted: bool}> |
| 11 | */ |
| 12 | final class DeleteQuota 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 |