ruby-jss 0.10.1 → 0.10.2a4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ruby-jss might be problematic. Click here for more details.

@@ -51,9 +51,7 @@ module JSS
51
51
  #####################################
52
52
 
53
53
  include JSS::Creatable
54
-
55
- # Class Variables
56
- #####################################
54
+ include JSS::Sitable
57
55
 
58
56
  # Class Methods
59
57
  #####################################
@@ -88,6 +86,9 @@ module JSS
88
86
  # See {APIObject#add_object_history_entry}
89
87
  OBJECT_HISTORY_OBJECT_TYPE = 84
90
88
 
89
+ # Where is site data located in the API JSON?
90
+ SITE_SUBSET = :top
91
+
91
92
  # Attributes
92
93
  #####################################
93
94
 
@@ -200,6 +201,7 @@ module JSS
200
201
  obj.add_element('hide_account').text = hide_account
201
202
  obj.add_element('invitation_status').text = invitation_status
202
203
  obj.add_element('multiple_uses_allowed').text = multiple_uses_allowed
204
+ add_site_to_xml(doc)
203
205
  doc.to_s
204
206
  end
205
207
 
@@ -6,6 +6,8 @@ module JSS
6
6
  #
7
7
  class EBook < APIObject
8
8
 
9
+ include Sitable
10
+
9
11
  ### The base for REST resources of this class
10
12
  RSRC_BASE = 'ebooks'.freeze
11
13
 
@@ -21,6 +23,9 @@ module JSS
21
23
  # See {APIObject#add_object_history_entry}
22
24
  OBJECT_HISTORY_OBJECT_TYPE = 24
23
25
 
26
+ # Where is the Site data in the API JSON?
27
+ SITE_SUBSET = :general
28
+
24
29
  end
25
30
 
26
31
  end
@@ -56,6 +56,7 @@ module JSS
56
56
  #####################################
57
57
  ### Mix-Ins
58
58
  #####################################
59
+ include JSS::MDM
59
60
 
60
61
  #####################################
61
62
  ### Class Methods
@@ -86,6 +87,9 @@ module JSS
86
87
  # See {APIObject#add_object_history_entry}
87
88
  OBJECT_HISTORY_OBJECT_TYPE = 7
88
89
 
90
+ # what kind of devices are these WRT MDM
91
+ MDM_COMMAND_TARGET = :computergroups
92
+
89
93
  #####################################
90
94
  ### Class Variables
91
95
  #####################################
@@ -56,7 +56,7 @@ module JSS
56
56
  #####################################
57
57
  ### Mix-Ins
58
58
  #####################################
59
-
59
+ include JSS::MDM
60
60
 
61
61
  #####################################
62
62
  ### Class Constants
@@ -83,6 +83,9 @@ module JSS
83
83
  # See {APIObject#add_object_history_entry}
84
84
  OBJECT_HISTORY_OBJECT_TYPE = 25
85
85
 
86
+ # what kind of devices are these WRT MDM
87
+ MDM_COMMAND_TARGET = :mobiledevicegroups
88
+
86
89
  #####################################
87
90
  ### Class Variables
88
91
  #####################################
@@ -67,6 +67,7 @@ module JSS
67
67
  include JSS::Creatable
68
68
  include JSS::Updatable
69
69
  include JSS::Criteriable
70
+ include JSS::Sitable
70
71
 
71
72
 
72
73
  #####################################
@@ -76,6 +77,9 @@ module JSS
76
77
  ### the types of groups allowed for creation
77
78
  GROUP_TYPES = [:smart, :static]
78
79
 
80
+ # Where is the Site data in the API JSON?
81
+ SITE_SUBSET = :top
82
+
79
83
  #####################################
80
84
  ### Class Variables
81
85
  #####################################
@@ -357,7 +361,6 @@ module JSS
357
361
  doc = REXML::Document.new JSS::APIConnection::XML_HEADER
358
362
  group = doc.add_element self.class::RSRC_OBJECT_KEY.to_s
359
363
  group.add_element('name').text = @name
360
- group.add_element('site').add_element('name').text = @site if @site
361
364
  group.add_element('is_smart').text = @is_smart
362
365
  if @is_smart
363
366
  group << @criteria.rest_xml if @criteria
@@ -365,6 +368,8 @@ module JSS
365
368
  group << self.class::MEMBER_CLASS.xml_list(@members, :id)
366
369
  end
367
370
 
371
+ add_site_to_xml(doc)
372
+
368
373
  return doc.to_s
369
374
 
370
375
  end #rest_xml
@@ -6,6 +6,8 @@ module JSS
6
6
  #
7
7
  class MacApplication < APIObject
8
8
 
9
+ include Sitable
10
+
9
11
  ### The base for REST resources of this class
10
12
  RSRC_BASE = 'macapplications'.freeze
11
13
 
@@ -21,6 +23,9 @@ module JSS
21
23
  # See {APIObject#add_object_history_entry}
22
24
  OBJECT_HISTORY_OBJECT_TYPE = 350
23
25
 
26
+ # Where is the Site data in the API JSON?
27
+ SITE_SUBSET = :general
28
+
24
29
  end
25
30
 
26
31
  end