Module: Jamf::VPPable
- Included in:
- MacApplication, MobileDeviceApplication
- Defined in:
- lib/jamf/api/classic/api_objects/vppable.rb
Overview
A mix-in module to handleVPP-related data in API objects that can be assigned via VPP.
NOTE: For now we are only working with device-based VPP assignments, which are done via the scope of the VPPable object (macapp, mobdevapp, ebook)
User-based APP assignments will require the creation of a VPPAssignment class, and a VPPAssignmentScope class, since those scopes are very limited compared to ordinary scope.
To use this module, merely ‘include VPPable` when defining your subclass of Jamf::APIObject
classes doing so MUST call #add_vpp_xml(xmldoc) in their #rest_xml method
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- VPPABLE =
Mixed-in Constants
true
Instance Attribute Summary collapse
- #assign_vpp_device_based_licenses ⇒ Boolean (also: #vpp_device_based?)
- #remaining_vpp_licenses ⇒ Integer (also: #vpp_licenses_remaining) readonly
- #total_vpp_licenses ⇒ Integer (also: #vpp_licenses_total) readonly
- #used_vpp_licenses ⇒ Integer (also: #vpp_licenses_used) readonly
- #vpp_admin_account_id ⇒ Integer (also: #vpp_account_id) readonly
- #vpp_codes ⇒ Hash readonly
Class Method Summary collapse
-
.included(klass) ⇒ Object
Mixed-in Class Methods.
Instance Method Summary collapse
-
#vpp_admin_account_name ⇒ String
(also: #vpp_account_name)
The name of the vpp admin acct for this object.
Instance Attribute Details
#assign_vpp_device_based_licenses ⇒ Boolean Also known as: vpp_device_based?
86 87 88 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 86 def assign_vpp_device_based_licenses @assign_vpp_device_based_licenses end |
#remaining_vpp_licenses ⇒ Integer (readonly) Also known as: vpp_licenses_remaining
94 95 96 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 94 def remaining_vpp_licenses @remaining_vpp_licenses end |
#total_vpp_licenses ⇒ Integer (readonly) Also known as: vpp_licenses_total
90 91 92 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 90 def total_vpp_licenses @total_vpp_licenses end |
#used_vpp_licenses ⇒ Integer (readonly) Also known as: vpp_licenses_used
98 99 100 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 98 def used_vpp_licenses @used_vpp_licenses end |
#vpp_admin_account_id ⇒ Integer (readonly) Also known as: vpp_account_id
82 83 84 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 82 def vpp_admin_account_id @vpp_admin_account_id end |
#vpp_codes ⇒ Hash (readonly)
79 80 81 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 79 def vpp_codes @vpp_codes end |
Class Method Details
.included(klass) ⇒ Object
Mixed-in Class Methods
This is a common technique to get class methods mixed in when you ‘include’ a module full of instance methods
38 39 40 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 38 def self.included(klass) klass.extend(ClassMethods) end |
Instance Method Details
#vpp_admin_account_name ⇒ String Also known as: vpp_account_name
Returns The name of the vpp admin acct for this object.
214 215 216 217 218 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 214 def vpp_admin_account_name return unless @vpp_admin_account_id.is_a? Integer Jamf::VPPAccount.map_all_ids_to(:name)[@vpp_admin_account_id] end |