Class: JSS::VPPAccount

Inherits:
APIObject show all
Includes:
Sitable, Updatable
Defined in:
lib/jss/api_object/vpp_account.rb

Overview

A VPP account defined in the JSS

Constant Summary collapse

RSRC_BASE =

The base for REST resources of this class

'vppaccounts'.freeze
RSRC_LIST_KEY =

the hash key used for the JSON list output of all objects in the JSS

:vpp_accounts
RSRC_OBJECT_KEY =

The hash key used for the JSON object output. It’s also used in various error messages

:vpp_account
SITE_SUBSET =
:top

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ VPPAccount

See JSS::APIObject#initialize



98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/jss/api_object/vpp_account.rb', line 98

def initialize(args = {})
  super
  @contact = @init_data[:contact]
  @service_token = @init_data[:service_token]
  @account_name = @init_data[:account_name]
  @expiration_date = @init_data[:expiration_date].to_s.empty? ? nil : Time.parse(@init_data[:expiration_date])
  @location_name = @init_data[:location_name]
  @country = @init_data[:country]
  @apple_id = @init_data[:apple_id]
  @populate_catalog_from_vpp_content = @init_data[:populate_catalog_from_vpp_content]
  @notify_disassociation = @init_data[:notify_disassociation]
  @auto_register_managed_users = @init_data[:auto_register_managed_users]
end

Instance Attribute Details

#account_nameString (readonly)

Returns The name of the company associated with the Acct/Token.

Returns:

  • (String)

    The name of the company associated with the Acct/Token



64
65
66
# File 'lib/jss/api_object/vpp_account.rb', line 64

def 
  @account_name
end

#apple_idString

Returns The AppleID associated with the acct.

Returns:

  • (String)

    The AppleID associated with the acct



77
78
79
# File 'lib/jss/api_object/vpp_account.rb', line 77

def apple_id
  @apple_id
end

#auto_register_managed_usersBoolean

Returns Automatically register users that have Managed Apple IDs so they do not receive an invitation and are not prompted to register with volume purchasing.

Returns:

  • (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



91
92
93
# File 'lib/jss/api_object/vpp_account.rb', line 91

def auto_register_managed_users
  @auto_register_managed_users
end

#contactString

Returns The full name of the local contact person for the acct.

Returns:

  • (String)

    The full name of the local contact person for the acct



57
58
59
# File 'lib/jss/api_object/vpp_account.rb', line 57

def contact
  @contact
end

#countryString

Returns The Country Code associated with the acct.

Returns:

  • (String)

    The Country Code associated with the acct



74
75
76
# File 'lib/jss/api_object/vpp_account.rb', line 74

def country
  @country
end

#expiration_dateTime (readonly)

Returns The expiration date of the Acct/Token.

Returns:

  • (Time)

    The expiration date of the Acct/Token



67
68
69
# File 'lib/jss/api_object/vpp_account.rb', line 67

def expiration_date
  @expiration_date
end

#location_nameString (readonly) Also known as: location

Returns The location associated with the Acct/Token.

Returns:

  • (String)

    The location associated with the Acct/Token



70
71
72
# File 'lib/jss/api_object/vpp_account.rb', line 70

def location_name
  @location_name
end

#need_to_updateBoolean (readonly) Originally defined in module Updatable

Returns do we have unsaved changes?.

Returns:

  • (Boolean)

    do we have unsaved changes?

#notify_disassociationBoolean

Returns 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.

Returns:

  • (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



86
87
88
# File 'lib/jss/api_object/vpp_account.rb', line 86

def notify_disassociation
  @notify_disassociation
end

#populate_catalog_from_vpp_contentBoolean

Returns Automatically populate purchased content from Apple School Manager or Apple Business Manager in Jamf Pro.

Returns:

  • (Boolean)

    Automatically populate purchased content from Apple School Manager or Apple Business Manager in Jamf Pro



81
82
83
# File 'lib/jss/api_object/vpp_account.rb', line 81

def populate_catalog_from_vpp_content
  @populate_catalog_from_vpp_content
end

#service_tokenString (readonly)

Returns The service token for connecting to the account at Apple. Currently not visible, appears as ‘***************’.

Returns:

  • (String)

    The service token for connecting to the account at Apple. Currently not visible, appears as ‘***************’



61
62
63
# File 'lib/jss/api_object/vpp_account.rb', line 61

def service_token
  @service_token
end

Instance Method Details

#name=(newname) ⇒ void Originally defined in module Updatable

This method returns an undefined value.

Change the name of this item Remember to #update to push changes to the server.

Parameters:

  • newname (String)

    the new name

Raises:

#site=(new_site) ⇒ void Originally defined in module Sitable

This method returns an undefined value.

Change the site of this object. Any of the NON_SITES values will unset the site

Parameters:

  • new_site (Integer, String)

    The new site

Raises:

#site_assigned?Boolean Originally defined in module Sitable

Does this object have a site assigned?

Returns:

  • (Boolean)

    Does this object have a site assigned?

#site_idInteger Originally defined in module Sitable

The id of the site for this object.

Returns:

  • (Integer)

    The id of the site for this object.

#site_nameString Also known as: site Originally defined in module Sitable

The name of the site for this object. For backward compatibility, this is aliased to just ‘site’

Returns:

  • (String)

    The name of the site for this object.

#site_objectJSS::Site Originally defined in module Sitable

The JSS::Site instance for this object’s site

Returns:

  • (JSS::Site)

    The JSS::Site instance for this object’s site

#unset_sitevoid Originally defined in module Sitable

This method returns an undefined value.

Set the site to nothing

#updateBoolean Originally defined in module Updatable

Save changes to the JSS

Returns:

  • (Boolean)

    success

Raises: