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