def rest_xml
      validate_before_save
      doc = REXML::Document.new APIConnection::XML_HEADER
      webhook = doc.add_element 'webhook'
      webhook.add_element('name').text = @name
      webhook.add_element('enabled').text = @enabled
      webhook.add_element('url').text = @url
      webhook.add_element('content_type').text = CONTENT_TYPES[@content_type]
      webhook.add_element('event').text = @event
      doc.to_s
    end
def rest_xml
      validate_before_save
      doc = REXML::Document.new APIConnection::XML_HEADER
      webhook = doc.add_element 'webhook'
      webhook.add_element('name').text = @name
      webhook.add_element('enabled').text = @enabled
      webhook.add_element('url').text = @url
      webhook.add_element('content_type').text = CONTENT_TYPES[@content_type]
      webhook.add_element('event').text = @event
      doc.to_s
    end
Return the REST XML for this webhook, with the current values,
 for saving or updating