Class: Sysdig::PagerDutyNotification

Inherits:
UserNotification show all
Defined in:
lib/sysdig/pager_duty_notification.rb

Instance Method Summary collapse

Methods inherited from UserNotification

inherited, #initialize, type, types

Methods inherited from Model

epoch_time

Constructor Details

This class inherits a constructor from Sysdig::UserNotification

Instance Method Details

#saveObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/sysdig/pager_duty_notification.rb', line 10

def save
  notification = service.update_user_notifications("pagerDuty" => {
    "enabled"     => self.enabled,
    "integrated"  => self.integrated,
    "resolveOnOk" => self.bind_resolution,
    "connectUrl"  => self.connect_url,
  }).body.fetch("userNotification")

  merge_attributes(notification.fetch("pagerDuty"))
end