lib/jss/api_object/computer_invitation.rb in ruby-jss-0.10.2 vs lib/jss/api_object/computer_invitation.rb in ruby-jss-0.11.0a5
- old
+ new
@@ -49,14 +49,12 @@
# MixIns
#####################################
include JSS::Creatable
+ include JSS::Sitable
- # Class Variables
- #####################################
-
# Class Methods
#####################################
def self.all_invitations(refresh = false, api: JSS.api)
all(refresh, api: api).map { |ci| ci[:invitation] }
@@ -86,10 +84,13 @@
# the object type for this object in
# the object history table.
# See {APIObject#add_object_history_entry}
OBJECT_HISTORY_OBJECT_TYPE = 84
+ # Where is site data located in the API JSON?
+ SITE_SUBSET = :top
+
# Attributes
#####################################
# The values returned in the General, Location, and Purchasing subsets are stored as direct attributes
# Location and Purchasing are defined in the Locatable and Purchasable mixin modules.
@@ -198,9 +199,10 @@
end
obj.add_element('ssh_username').text = ssh_username
obj.add_element('hide_account').text = hide_account
obj.add_element('invitation_status').text = invitation_status
obj.add_element('multiple_uses_allowed').text = multiple_uses_allowed
+ add_site_to_xml(doc)
doc.to_s
end
end