Class: Sysdig::UserNotifications
- Inherits:
-
Singular
- Object
- Singular
- Sysdig::UserNotifications
- Defined in:
- lib/sysdig/user_notifications.rb
Instance Method Summary collapse
Instance Method Details
#fetch_attributes(options = {}) ⇒ Object
14 15 16 |
# File 'lib/sysdig/user_notifications.rb', line 14 def fetch_attributes(={}) service.get_user_notifications.body.fetch("userNotification") end |
#save ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/sysdig/user_notifications.rb', line 18 def save data = service.update_user_notifications( "sns" => { "enabled" => self.sns_enabled, "topics" => self.sns_topics, }, "email" => { "enabled" => self.email_enabled, "recipients" => self.email_recipients, }, "pagerDuty" => { "enabled" => self.pager_duty_enabled, "integrated" => self.pager_duty_integrated, "resolveOnOk" => self.pager_duty_bind_resolution, "connectUrl" => self.pager_duty_connect_url, }, ).body.fetch("userNotification") merge_attributes(data) end |