*/ final class ShowResponse implements ApiResponse { private $ip; private $dedicated; private $rdns; private function __construct() { } public static function create(array $data) { $model = new self(); $model->ip = $data['ip']; $model->dedicated = (bool) $data['dedicated']; $model->rdns = $data['rdns']; return $model; } public function getIp(): string { return $this->ip; } public function getDedicated(): bool { return $this->dedicated; } public function getRdns(): string { return $this->rdns; } }