private function add(Writer $writer, array $properties)
    {
        foreach ($properties as $property) {
            if (! is_null($this->$property)) {
                $writer->write([$property => $this->$property]);
            }
        }
    }