class Copyleaks::CopyleaksStartRequestModel
Attributes
Public Class Methods
Source
# File lib/copyleaks/models/start_request_model.rb, line 30 def initialize(trigger, errorHandling = CopyleaksStartErrorHandlings::IGNORE) trigger.each do |item| unless item.instance_of?(String) raise 'Copyleaks::CopyleaksStartRequestModel - trigger - entity must be of type String' end end unless [0, 1].include? errorHandling raise 'Copyleaks::CopyleaksStartRequestModel - errorHandling - errorHandling must be of type Copyleaks::CopyleaksStartErrorHandlings Consts' end @trigger = trigger @errorHandling = errorHandling end
@param string[] trigger A list of scans that you submitted for a check-credits scan and that you would like to submit for a full scan. @param CopyleaksStartErrorHandlings
errorHandling When set to ignore (ignore = 1) the trigger scans will start running even if some of them are in error mode, when set to cancel (cancel = 0) the request will be cancelled if any error was found.
Public Instance Methods
Source
# File lib/copyleaks/models/start_request_model.rb, line 45 def as_json(*_args) { trigger: @trigger, errorHandling: @errorHandling }.select { |_k, v| !v.nil? } end
Source
# File lib/copyleaks/models/start_request_model.rb, line 52 def to_json(*options) as_json(*options).to_json(*options) end