class Fog::Rackspace::Monitoring::Notification

Public Instance Methods

destroy() click to toggle source
# File lib/fog/rackspace/models/monitoring/notification.rb, line 33
def destroy
  requires :id
  service.delete_notification(id)
end
params() click to toggle source
# File lib/fog/rackspace/models/monitoring/notification.rb, line 14
def params
  options = {
    'label'     => label,
    'details'   => details,
    'type'      => type,
  }
  options.reject {|key, value| value.nil?}
end
save() click to toggle source
# File lib/fog/rackspace/models/monitoring/notification.rb, line 23
def save
  if identity
    data = service.update_notification(identity, params)
  else
    data = service.create_notification(params)
    self.id = data.headers['X-Object-ID']
  end
  true
end