<?php
/**
 * @license GPL-2.0-or-later
 *
 * Modified using Strauss.
 * @see https://github.com/BrianHenryIE/strauss
 */ declare(strict_types=1);

namespace RCP\LiquidWeb\LicensingApiClient\Responses\License;

use RCP\LiquidWeb\LicensingApiClient\Responses\Contracts\Response;

/**
 * Represents a license activation deletion response.
 *
 * @implements Response<array{deleted: bool}>
 */
final class DeleteActivation implements Response
{
	public bool $deleted;

	private function __construct(bool $deleted) {
		$this->deleted = $deleted;
	}

	/**
	 * @param array{deleted: bool} $attributes
	 */
	public static function from(array $attributes): self {
		return new self($attributes['deleted']);
	}

	/**
	 * @return array{deleted: bool}
	 */
	public function toArray(): array {
		return [
			'deleted' => $this->deleted,
		];
	}
}
