Class: Tenable::Models::WebAppScan

Inherits:
Data
  • Object
show all
Defined in:
lib/tenable/models/web_app_scan.rb

Overview

Represents a web application scan instance.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#completed_atObject (readonly)

Returns the value of attribute completed_at

Returns:

  • (Object)

    the current value of completed_at



6
7
8
# File 'lib/tenable/models/web_app_scan.rb', line 6

def completed_at
  @completed_at
end

#config_idObject (readonly)

Returns the value of attribute config_id

Returns:

  • (Object)

    the current value of config_id



6
7
8
# File 'lib/tenable/models/web_app_scan.rb', line 6

def config_id
  @config_id
end

#findings_countObject (readonly)

Returns the value of attribute findings_count

Returns:

  • (Object)

    the current value of findings_count



6
7
8
# File 'lib/tenable/models/web_app_scan.rb', line 6

def findings_count
  @findings_count
end

#scan_idObject (readonly)

Returns the value of attribute scan_id

Returns:

  • (Object)

    the current value of scan_id



6
7
8
# File 'lib/tenable/models/web_app_scan.rb', line 6

def scan_id
  @scan_id
end

#started_atObject (readonly)

Returns the value of attribute started_at

Returns:

  • (Object)

    the current value of started_at



6
7
8
# File 'lib/tenable/models/web_app_scan.rb', line 6

def started_at
  @started_at
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



6
7
8
# File 'lib/tenable/models/web_app_scan.rb', line 6

def status
  @status
end

Class Method Details

.from_api(data) ⇒ WebAppScan

Builds a WebAppScan from a raw API response hash.

Parameters:

  • data (Hash)

    raw API response hash with string keys

Returns:



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/tenable/models/web_app_scan.rb', line 11

def self.from_api(data)
  data = data.transform_keys(&:to_sym)
  new(
    scan_id: data[:scan_id],
    config_id: data[:config_id],
    status: data[:status],
    started_at: data[:started_at],
    completed_at: data[:completed_at],
    findings_count: data[:findings_count] || 0
  )
end