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)



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

def 
  @account_name
end

#apple_idString



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

def apple_id
  @apple_id
end

#auto_register_managed_usersBoolean



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

def auto_register_managed_users
  @auto_register_managed_users
end

#contactString



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

def contact
  @contact
end

#countryString



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

def country
  @country
end

#expiration_dateTime (readonly)



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



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

#notify_disassociationBoolean



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

def notify_disassociation
  @notify_disassociation
end

#populate_catalog_from_vpp_contentBoolean



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)



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.

#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

#site_assigned?Boolean Originally defined in module Sitable

Does this object have a site assigned?

#site_idInteger Originally defined in module Sitable

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’

#site_objectJSS::Site Originally defined in module Sitable

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