Class: Varanus::Reports
- Inherits:
-
Object
- Object
- Varanus::Reports
- Defined in:
- lib/varanus/reports.rb
Overview
An connection to the Reports API. This should not be initialized directly. Instead, use Varanus#reports
Constant Summary collapse
- SSL_CERT_STATUSES =
{ any: 0, requested: 1, downloaded: 2, revoked: 3, expired: 4, pending_download: 5, not_enrolled: 6 }.freeze
Instance Method Summary collapse
-
#domains ⇒ Object
DEPRECATED: Please use Varanus::Domain#list_with_info instead.
-
#initialize(varanus) ⇒ Reports
constructor
A new instance of Reports.
-
#ssl(opts = {}) ⇒ Object
DEPRECATED: Please use Varanus::SSL#report instead.
Constructor Details
#initialize(varanus) ⇒ Reports
Note:
Do not call this directly. Use Varanus#reports to initialize
Returns a new instance of Reports.
17 18 19 |
# File 'lib/varanus/reports.rb', line 17 def initialize varanus @varanus = varanus end |
Instance Method Details
#domains ⇒ Object
DEPRECATED: Please use Varanus::Domain#list_with_info instead.
22 23 24 25 26 27 |
# File 'lib/varanus/reports.rb', line 22 def domains warn 'DEPRECATION WARNING: Varanus::Reports#domains is deprecated. ' \ 'Use Varanus::Domain#report instead' r = soap_call :get_domain_report, {} format_results r[:report_row_domains] end |
#ssl(opts = {}) ⇒ Object
DEPRECATED: Please use Varanus::SSL#report instead.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/varanus/reports.rb', line 30 def ssl opts = {} warn 'DEPRECATION WARNING: Varanus::Reports#ssl is deprecated. ' \ 'Use Varanus::SSL#report instead' msg = { organizationNames: nil, certificateStatus: 0 } msg[:organizationNames] = Array(opts[:orgs]).join(',') if opts.include? :orgs if opts.include? :status msg[:certificateStatus] = SSL_CERT_STATUSES[opts[:status]] raise ArgumentError, 'Invalid status' if msg[:certificateStatus].nil? end r = soap_call :get_SSL_report, msg format_results r[:reports] end |