def all(class_name, refresh = false, only: nil)
      the_class = JSS.api_object_class(class_name)
      list_method = only ? :"all_#{only}" : :all

      raise ArgumentError, "Unknown identifier: #{only} for #{the_class}" unless
        the_class.respond_to? list_method

      the_class.send list_method, refresh, api: self
    end
def all(class_name, refresh = false, only: nil)
      the_class = JSS.api_object_class(class_name)
      list_method = only ? :"all_#{only}" : :all

      raise ArgumentError, "Unknown identifier: #{only} for #{the_class}" unless
        the_class.respond_to? list_method

      the_class.send list_method, refresh, api: self
    end
Call one of the 'all*' methods on a JSS::APIObject subclass
 using this APIConnection.

 @param class_name[String,Symbol] The name of a JSS::APIObject subclass
   see {JSS.api_object_class}

 @param refresh[Boolean] Should the data be re-read from the API?

 @param only[String,Symbol] Limit the output to subset or data. All
   APIObject subclasses can take :ids or :names, which calls the .all_ids
   and .all_names methods. Some subclasses can take other options, e.g.
   MobileDevice can take :udids

 @return [Array] The list of items for the class