module Jamf::VPPable::ClassMethods

Methods in here will become class methods of the classes that include VPPable

Public Instance Methods

all_vpp_device_assignable() click to toggle source

The names and assignment data for all class members that have VPP licenses that can be assigned by device. The assignment data is a hash of three keys pointing to integers:

{
  total: int,
  used: int,
  remaining: int
}

WARNING: This must instantiate all objects, so is slow

@return [Hash{String=>Hash}] The names and assignment data

   # File lib/jamf/api/classic/api_objects/vppable.rb
76 def all_vpp_device_assignable
77   data = {}
78   all_ids.each do |id|
79     obj = fetch id: id
80     next unless obj.vpp_device_based?
81 
82     data[obj.name] = {
83       total: obj.vpp_licenses_total,
84       used: obj.vpp_licenses_used,
85       remaining: obj.vpp_licenses_remaining
86     }
87   end
88   data
89 end