Sha256: 51ee097e5ecbcf5081f3011551f920fef9dfe5038643e6c5bec6d146eccb6123
Contents?: true
Size: 894 Bytes
Versions: 39
Compression:
Stored size: 894 Bytes
Contents
require 'fog/core/model' require 'fog/rackspace/models/monitoring/base' module Fog module Rackspace class Monitoring class Notification < Fog::Rackspace::Monitoring::Base identity :id attribute :label attribute :details attribute :type def params options = { 'label' => label, 'details' => details, 'type' => type, } options.reject {|key, value| value.nil?} end 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 def destroy requires :id service.delete_notification(id) end end end end end
Version data entries
39 entries across 37 versions & 6 rubygems