public static function build(array $args) {
        if (is_array($args) && array_key_exists("type", $args)) {
            switch ($args["type"]) {
                case Travel::TYPE_BUS:
                    return new BusTravel($args);
                case Travel::TYPE_FLIGHT:
                    return new Flight($args);
            }
        }
        throw new \InvalidArgumentException("Array must contain a valid 'type' field");
    }