class Jamf::VPPAccount
A VPP account defined in the JSS
Constants
- RSRC_BASE
The base for REST resources of this class
- RSRC_LIST_KEY
the hash key used for the JSON list output of all objects in the
JSS
- RSRC_OBJECT_KEY
The hash key used for the JSON object output. It’s also used in various error messages
- SITE_SUBSET
Attributes
@return [String] The name of the company associated with the Acct/Token
@return [String] The AppleID associated with the acct
@return [Boolean] Automatically register users that have Managed Apple IDs
so they do not receive an invitation and are not prompted to register with volume purchasing
@return [String] The full name of the local contact person for the acct
@return [String] The Country Code associated with the acct
@return [Time] The expiration date of the Acct/Token
@return [String] The location associated with the Acct/Token
@return [String] The location associated with the Acct/Token
@return [Boolean] Display a notification to users on their mobile devices
when a volume purchased app in a user-based volume assignment is no longer assigned to them
@return [Boolean] Automatically populate purchased content from Apple
School Manager or Apple Business Manager in Jamf Pro
@return [String] The service token for connecting to the account at Apple.
Currently not visible, appears as '***************'
Public Class Methods
See Jamf::APIObject#initialize
Jamf::APIObject::new
# File lib/jamf/api/classic/api_objects/vpp_account.rb 98 def initialize(**args) 99 super 100 @contact = @init_data[:contact] 101 @service_token = @init_data[:service_token] 102 @account_name = @init_data[:account_name] 103 @expiration_date = @init_data[:expiration_date].to_s.empty? ? nil : Jamf.parse_time(@init_data[:expiration_date]) 104 @location_name = @init_data[:location_name] 105 @country = @init_data[:country] 106 @apple_id = @init_data[:apple_id] 107 @populate_catalog_from_vpp_content = @init_data[:populate_catalog_from_vpp_content] 108 @notify_disassociation = @init_data[:notify_disassociation] 109 @auto_register_managed_users = @init_data[:auto_register_managed_users] 110 end
Public Instance Methods
@param new_val the value
@return [void]
# File lib/jamf/api/classic/api_objects/vpp_account.rb 141 def apple_id=(new_val = @apple_id) 142 return if new_val == @apple_id 143 144 @apple_id = Jamf::Validate.email_address new_val 145 @need_to_update = true 146 end
@param new_val the value
@return [void]
# File lib/jamf/api/classic/api_objects/vpp_account.rb 174 def auto_register_managed_users=(new_val = @auto_register_managed_users) 175 return if new_val == @auto_register_managed_users 176 177 @auto_register_managed_users = Jamf::Validate.boolean new_val 178 @need_to_update = true 179 end
@param new_val the value
@return [void]
# File lib/jamf/api/classic/api_objects/vpp_account.rb 119 def contact=(new_val = @contact) 120 return if new_val == @contact 121 122 @contact = Jamf::Validate.non_empty_string new_val, 'Contact must be a non-empty String' 123 @need_to_update = true 124 end
@param new_val the value
@return [void]
# File lib/jamf/api/classic/api_objects/vpp_account.rb 130 def country=(new_val = @country) 131 return if new_val == @country 132 133 @country = Jamf::Validate.app_store_country_code new_val 134 @need_to_update = true 135 end
@param new_val the value
@return [void]
# File lib/jamf/api/classic/api_objects/vpp_account.rb 163 def notify_disassociation=(new_val = @notify_disassociation) 164 return if new_val == @notify_disassociation 165 166 @notify_disassociation = Jamf::Validate.boolean new_val 167 @need_to_update = true 168 end
@param new_val the value
@return [void]
# File lib/jamf/api/classic/api_objects/vpp_account.rb 152 def populate_catalog_from_vpp_content=(new_val = @populate_catalog_from_vpp_content) 153 return if new_val == @populate_catalog_from_vpp_content 154 155 @populate_catalog_from_vpp_content = Jamf::Validate.boolean new_val 156 @need_to_update = true 157 end
Private Instance Methods
Return a String
with the XML Resource for submitting creation or changes to the JSS
via the API via the Creatable
or Updatable
modules
Most classes will redefine this method.
# File lib/jamf/api/classic/api_objects/vpp_account.rb 191 def rest_xml 192 doc = REXML::Document.new Jamf::Connection::XML_HEADER 193 tmpl = doc.add_element self.class::RSRC_OBJECT_KEY.to_s 194 tmpl.add_element('name').text = @name 195 tmpl.add_element('contact').text = @contact 196 tmpl.add_element('country').text = @country 197 tmpl.add_element('apple_id').text = @apple_id 198 tmpl.add_element('populate_catalog_from_vpp_content').text = @populate_catalog_from_vpp_content.to_s 199 tmpl.add_element('notify_disassociation').text = @notify_disassociation.to_s 200 tmpl.add_element('auto_register_managed_users').text = @auto_register_managed_users.to_s 201 202 add_site_to_xml doc 203 204 doc.to_s 205 end