class Copyleaks::Alerts
Attributes
Public Class Methods
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/NotificationsModels/Alerts.rb, line 31 def initialize(category:, code:, title:, message:, helpLink:, severity:, additionalData:) raise 'Copyleaks::Alerts - category must be a String' unless category.is_a?(String) raise 'Copyleaks::Alerts - code must be a String' unless code.is_a?(String) raise 'Copyleaks::Alerts - title must be a String' unless title.is_a?(String) raise 'Copyleaks::Alerts - message must be a String' unless message.is_a?(String) raise 'Copyleaks::Alerts - helpLink must be a String' unless helpLink.is_a?(String) raise 'Copyleaks::Alerts - severity must be a String' unless severity.is_a?(String) raise 'Copyleaks::Alerts - additionalData must be a String' unless additionalData.is_a?(String) @category = category @code = code @title = title @message = message @helpLink = helpLink @severity = severity @additionalData = additionalData end
@param [int] $category - Scan alert category. @param [string] $title - Scan alert human-readable title. @param [string] $message - Provides human-readable information about the scan alert. @param [string|null] $helpLink - URL to a resource describing the specific scan alert. @param [int] $severity - Specifies the importance of the scan alert. @param [string] $additionalData - Additional data about the scan alert. Supplied as a JSON string. @param [string] $code - Scan alert code. The code is unique for each scan alert.
Public Instance Methods
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/NotificationsModels/Alerts.rb, line 49 def as_json(*_args) { category: @category, code: @code, title: @title, message: @message, helpLink: @helpLink, severity: @severity, additionalData: @additionalData } end
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/NotificationsModels/Alerts.rb, line 61 def to_json(*options) as_json(*options).to_json(*options) end