class Copyleaks::ScannedDocument
Attributes
Public Class Methods
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/ScannedDocument.rb, line 30 def initialize(scanId:, totalWords:, totalExcluded:, credits:, creationTime:, metadata:) raise 'scanId must be a String' unless scanId.is_a?(String) raise 'totalWords must be an Integer' unless totalWords.is_a?(Integer) raise 'totalExcluded must be an Integer' unless totalExcluded.is_a?(Integer) raise 'credits must be an Integer' unless credits.is_a?(Integer) raise 'creationTime must be a String' unless creationTime.is_a?(String) raise 'metadata must be a Metadata object' unless metadata.is_a?(Metadata) @scanId = scanId @totalWords = totalWords @totalExcluded = totalExcluded @credits = credits @creationTime = creationTime @metadata = metadata end
@param [String] scanId - The unique scan id provided by you. @param [Integer] totalWords - Total number of words found in the scanned text. @param [Integer] totalExcluded - Number of excluded words in the submitted content. @param [Integer] credits - Overall credits used for the scan. @param [String] creationTime - The creation time of the scan. @param [Metadata] metadata - Metadata
object
Public Instance Methods
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/ScannedDocument.rb, line 46 def as_json(*_args) { scanId: @scanId, totalWords: @totalWords, totalExcluded: @totalExcluded, credits: @credits, creationTime: @creationTime, metadata: @metadata }.select { |_k, v| !v.nil? } end
Source
# File lib/copyleaks/models/submissions/webhooks/HelperModels/CompletedModels/ScannedDocument.rb, line 57 def to_json(*options) as_json(*options).to_json(*options) end