lib/jss/api_object/directory_binding.rb
def rest_xml
            doc = REXML::Document.new APIConnection::XML_HEADER
            ns = doc.add_element RSRC_OBJECT_KEY.to_s
            ns.add_element('id').text = @id.to_s
            ns.add_element('name').text = @name
            ns.add_element('priority').text = @priority.to_s
            ns.add_element('domain').text = @domain.to_s
            ns.add_element('username').text = @username.to_s
            ns.add_element('computer_ou').text = @computer_ou.to_s
            ns.add_element('type').text = @type.to_s
            if !@password.nil?
                ns.add_element('password').text = @password.to_s
            end

            ns << @type_settings.type_setting_xml

            return doc.to_s
        end
# the xml formated data for adding or updating this in the JSS
#
# This method constructs a properly formatted XML document to be handled by the Jamf Pro API
#
# @author Tyler Morgan
#
# @return [String]
the xml formated data for adding or updating this in the JSS
This method constructs a properly formatted XML document to be handled by the Jamf Pro API
the xml formated data for adding or updating this in the JSS This method constructs a properly formatted XML document to be handled by the Jamf Pro API
def rest_xml
            doc = REXML::Document.new APIConnection::XML_HEADER
            ns = doc.add_element RSRC_OBJECT_KEY.to_s
            ns.add_element('id').text = @id.to_s
            ns.add_element('name').text = @name
            ns.add_element('priority').text = @priority.to_s
            ns.add_element('domain').text = @domain.to_s
            ns.add_element('username').text = @username.to_s
            ns.add_element('computer_ou').text = @computer_ou.to_s
            ns.add_element('type').text = @type.to_s
            if !@password.nil?
                ns.add_element('password').text = @password.to_s
            end
            ns << @type_settings.type_setting_xml
            return doc.to_s
        end
def rest_xml doc = REXML :: Document . new APIConnection :: XML_HEADER ns = doc . add_element RSRC_OBJECT_KEY . to_s ns . add_element ( 'id' ) . text = @id . to_s ns . add_element ( 'name' ) . text = @name ns . add_element ( 'priority' ) . text = @priority . to_s ns . add_element ( 'domain' ) . text = @domain . to_s ns . add_element ( 'username' ) . text = @username . to_s ns . add_element ( 'computer_ou' ) . text = @computer_ou . to_s ns . add_element ( 'type' ) . text = @type . to_s if ! @password . nil? ns . add_element ( 'password' ) . text = @password . to_s end ns << @type_settings . type_setting_xml return doc . to_s end
the xml formated data for adding or updating this in the JSS
This method constructs a properly formatted XML document to be handled by the Jamf Pro API
the xml formated data for adding or updating this in the JSS This method constructs a properly formatted XML document to be handled by the Jamf Pro API
None
String
author
None