Method: Jamf::Locatable#location_xml

Defined in:
lib/jamf/api/classic/api_objects/locatable.rb

#location_xmlREXML::Element

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return a REXML <location> element to be included in the rest_xml of objects that have a Location subset

Returns:

  • (REXML::Element)


282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/jamf/api/classic/api_objects/locatable.rb', line 282

def location_xml
  location = REXML::Element.new('location')
  location.add_element('building').text = @building
  location.add_element('department').text = @department
  location.add_element('email_address').text = @email_address
  location.add_element('position').text = @position
  location.add_element('phone').text = @phone
  location.add_element('real_name').text = @real_name
  location.add_element('room').text = @room
  location.add_element('username').text = @username
  location
end