Method: Jamf::Prestage::ClassMethods#serials_for_prestage
- Defined in:
- lib/jamf/api/jamf_pro/mixins/prestage.rb
#serials_for_prestage(prestage_ident, refresh = false, cnx: Jamf.cnx) ⇒ Array<String>
Get the assigned serialnumbers for a given prestage, without having to instantiate it
118 119 120 121 122 123 |
# File 'lib/jamf/api/jamf_pro/mixins/prestage.rb', line 118 def serials_for_prestage(prestage_ident, refresh = false, cnx: Jamf.cnx) # rubocop:disable Lint/UnusedMethodArgument id = valid_id prestage_ident, cnx: cnx raise Jamf::NoSuchItemError, "No #{self} matching '#{prestage_ident}'" unless id serials_by_prestage_id(cnx: cnx).select { |_sn, psid| id == psid }.keys end |