public static function fromAssociativeArray(array $data): BusinessHours
    {
        if (!isset($data['days'], $data['timezone']) || !\is_array($data['days'])) {
            throw new \InvalidArgumentException('Array is not valid.');
        }

        $days = [];
        foreach ($data['days'] as $day) {
            $days[] = DayBuilder::fromAssociativeArray($day);
        }

        return new BusinessHours($days, new \DateTimeZone($data['timezone']));
    }