Class: Copyleaks::CreditsCheckedWebhook

Inherits:
StatusWebhook show all
Defined in:
lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb

Instance Attribute Summary collapse

Attributes inherited from StatusWebhook

#status

Attributes inherited from Webhook

#developerPayload

Instance Method Summary collapse

Constructor Details

#initialize(credits: nil, scannedDocument: nil, **args) ⇒ CreditsCheckedWebhook

Returns a new instance of CreditsCheckedWebhook.



24
25
26
27
28
# File 'lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb', line 24

def initialize(credits: nil, scannedDocument: nil, **args)
  super(**args)
  @credits = credits
  @scannedDocument = scannedDocument
end

Instance Attribute Details

#credits ⇒ Object (readonly)

Returns the value of attribute credits.



22
23
24
# File 'lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb', line 22

def credits
  @credits
end

#scannedDocument ⇒ Object (readonly)

Returns the value of attribute scannedDocument.



22
23
24
# File 'lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb', line 22

def scannedDocument
  @scannedDocument
end

Instance Method Details

#as_json(*_args) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb', line 30

def as_json(*_args)
  super.merge(
    {
      credits: @credits,
      scannedDocument: @scannedDocument.respond_to?(:as_json) ? @scannedDocument.as_json : @scannedDocument
    }
  )
end

#to_json(*options) ⇒ Object



39
40
41
# File 'lib/copyleaks/models/submissions/webhooks/CreditsCheckedWebhook.rb', line 39

def to_json(*options)
  as_json.to_json(*options)
end