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?
104 105 106 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 104 def assign_vpp_device_based_licenses @assign_vpp_device_based_licenses end |
#remaining_vpp_licenses ⇒ Integer (readonly) Also known as: vpp_licenses_remaining
112 113 114 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 112 def remaining_vpp_licenses @remaining_vpp_licenses end |
#total_vpp_licenses ⇒ Integer (readonly) Also known as: vpp_licenses_total
108 109 110 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 108 def total_vpp_licenses @total_vpp_licenses end |
#used_vpp_licenses ⇒ Integer (readonly) Also known as: vpp_licenses_used
116 117 118 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 116 def used_vpp_licenses @used_vpp_licenses end |
#vpp_admin_account_id ⇒ Integer (readonly) Also known as: vpp_account_id
100 101 102 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 100 def vpp_admin_account_id @vpp_admin_account_id end |
#vpp_codes ⇒ Hash (readonly)
97 98 99 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 97 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
56 57 58 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 56 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.
232 233 234 235 236 |
# File 'lib/jamf/api/classic/api_objects/vppable.rb', line 232 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 |