def parse_self_service_notifications(ss_data)
      return unless @self_service_data_config[:notifications_supported]

      # oldstyle/broken, we need the XML to know if notifications are turned on
      if @self_service_data_config[:notifications_supported] == :ssvc_only && @in_jss
        ssrsrc = "#{rest_rsrc}/subset/selfservice"
        raw_xml = api.get_rsrc(ssrsrc, :xml)
        @self_service_notifications_enabled = raw_xml.include? '<notification>true</notification>'
        @self_service_notification_type = NOTIFICATION_TYPES.invert[ss_data[:notification]]
        @self_service_notification_subject = ss_data[:notification_subject]
        @self_service_notification_message = ss_data[:notification_message]
        return
      end

      # newstyle, 'notifications' subset
      notif_data = ss_data[:notifications]
      notif_data ||= {}

      @self_service_notifications_enabled = notif_data[:notification_enabled]
      @self_service_notification_type = NOTIFICATION_TYPES.invert[notif_data[:notification_type]]
      @self_service_notification_type ||= DFT_NOTIFICATION_TYPE
      @self_service_notification_subject = notif_data[:notification_subject]
      @self_service_notification_message = notif_data[:notification_message]

      reminders = notif_data[:reminders]
      reminders ||= {}
      @self_service_reminders_enabled = reminders[:notification_reminders_enabled]
      @self_service_reminder_frequency = reminders[:notification_reminder_frequency]
    end
def parse_self_service_notifications(ss_data)
      return unless @self_service_data_config[:notifications_supported]

      # oldstyle/broken, we need the XML to know if notifications are turned on
      if @self_service_data_config[:notifications_supported] == :ssvc_only && @in_jss
        ssrsrc = "#{rest_rsrc}/subset/selfservice"
        raw_xml = api.get_rsrc(ssrsrc, :xml)
        @self_service_notifications_enabled = raw_xml.include? '<notification>true</notification>'
        @self_service_notification_type = NOTIFICATION_TYPES.invert[ss_data[:notification]]
        @self_service_notification_subject = ss_data[:notification_subject]
        @self_service_notification_message = ss_data[:notification_message]
        return
      end

      # newstyle, 'notifications' subset
      notif_data = ss_data[:notifications]
      notif_data ||= {}

      @self_service_notifications_enabled = notif_data[:notification_enabled]
      @self_service_notification_type = NOTIFICATION_TYPES.invert[notif_data[:notification_type]]
      @self_service_notification_type ||= DFT_NOTIFICATION_TYPE
      @self_service_notification_subject = notif_data[:notification_subject]
      @self_service_notification_message = notif_data[:notification_message]

      reminders = notif_data[:reminders]
      reminders ||= {}
      @self_service_reminders_enabled = reminders[:notification_reminders_enabled]
      @self_service_reminder_frequency = reminders[:notification_reminder_frequency]
    end
parse incoming ssvc notification settings