Class: Copyleaks::CopyleaksAiImageDetectionScannedDocumentModel
- Inherits:
-
Object
- Object
- Copyleaks::CopyleaksAiImageDetectionScannedDocumentModel
- Defined in:
- lib/copyleaks/models/imageDetection/responses/CopyleaksAiImageDetectionScannedDocumentModel.rb
Overview
Metadata about the AI image detection scan operation.
Instance Attribute Summary collapse
-
#actual_credits ⇒ Object
The actual number of credits consumed by this scan.
-
#creation_time ⇒ Object
ISO 8601 timestamp of when the scan was created.
-
#expected_credits ⇒ Object
The expected number of credits for this scan.
-
#scan_id ⇒ Object
The unique identifier for this scan.
Class Method Summary collapse
-
.from_json(json_hash) ⇒ Object
Create instance from JSON hash.
Instance Method Summary collapse
-
#initialize(scan_id: nil, actual_credits: nil, expected_credits: nil, creation_time: nil) ⇒ CopyleaksAiImageDetectionScannedDocumentModel
constructor
Initialize a new CopyleaksAiImageDetectionScannedDocumentModel.
-
#to_json(*args) ⇒ Object
Convert to JSON.
Constructor Details
#initialize(scan_id: nil, actual_credits: nil, expected_credits: nil, creation_time: nil) ⇒ CopyleaksAiImageDetectionScannedDocumentModel
Initialize a new CopyleaksAiImageDetectionScannedDocumentModel
48 49 50 51 52 53 |
# File 'lib/copyleaks/models/imageDetection/responses/CopyleaksAiImageDetectionScannedDocumentModel.rb', line 48 def initialize(scan_id: nil, actual_credits: nil, expected_credits: nil, creation_time: nil) @scan_id = scan_id @actual_credits = actual_credits @expected_credits = expected_credits @creation_time = creation_time end |
Instance Attribute Details
#actual_credits ⇒ Object
The actual number of credits consumed by this scan.
34 35 36 |
# File 'lib/copyleaks/models/imageDetection/responses/CopyleaksAiImageDetectionScannedDocumentModel.rb', line 34 def actual_credits @actual_credits end |
#creation_time ⇒ Object
ISO 8601 timestamp of when the scan was created.
40 41 42 |
# File 'lib/copyleaks/models/imageDetection/responses/CopyleaksAiImageDetectionScannedDocumentModel.rb', line 40 def creation_time @creation_time end |
#expected_credits ⇒ Object
The expected number of credits for this scan.
37 38 39 |
# File 'lib/copyleaks/models/imageDetection/responses/CopyleaksAiImageDetectionScannedDocumentModel.rb', line 37 def expected_credits @expected_credits end |
#scan_id ⇒ Object
The unique identifier for this scan.
31 32 33 |
# File 'lib/copyleaks/models/imageDetection/responses/CopyleaksAiImageDetectionScannedDocumentModel.rb', line 31 def scan_id @scan_id end |
Class Method Details
.from_json(json_hash) ⇒ Object
Create instance from JSON hash
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/copyleaks/models/imageDetection/responses/CopyleaksAiImageDetectionScannedDocumentModel.rb', line 56 def self.from_json(json_hash) return nil if json_hash.nil? new( scan_id: json_hash['scanId'], actual_credits: json_hash['actualCredits'], expected_credits: json_hash['expectedCredits'], creation_time: json_hash['creationTime'] ) end |
Instance Method Details
#to_json(*args) ⇒ Object
Convert to JSON
68 69 70 71 72 73 74 75 |
# File 'lib/copyleaks/models/imageDetection/responses/CopyleaksAiImageDetectionScannedDocumentModel.rb', line 68 def to_json(*args) { 'scanId' => @scan_id, 'actualCredits' => @actual_credits, 'expectedCredits' => @expected_credits, 'creationTime' => @creation_time }.to_json(*args) end |