Class: Digicert::Certificate

Inherits:
Base
  • Object
show all
Extended by:
Findable
Defined in:
lib/digicert/certificate.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Findable

find, find_by_object

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Digicert::Base

Class Method Details

.revoke(certificate_id, attributes = {}) ⇒ Object



19
20
21
# File 'lib/digicert/certificate.rb', line 19

def self.revoke(certificate_id, attributes = {})
  new(attributes.merge(resource_id: certificate_id)).revoke
end

Instance Method Details

#download(attributes = {}) ⇒ Object



7
8
9
# File 'lib/digicert/certificate.rb', line 7

def download(attributes = {})
  certificate_downloader.fetch(resource_id, attributes)
end

#download_contentObject



11
12
13
# File 'lib/digicert/certificate.rb', line 11

def download_content
  certificate_downloader.fetch_content(resource_id)
end

#download_to_path(path:, ext: "zip", **attributes) ⇒ Object



23
24
25
26
27
# File 'lib/digicert/certificate.rb', line 23

def download_to_path(path:, ext: "zip", **attributes)
  certificate_downloader.fetch_to_path(
    resource_id, attributes.merge(path: path, ext: ext)
  )
end

#revokeObject



15
16
17
# File 'lib/digicert/certificate.rb', line 15

def revoke
  request_klass.new(:put, revocation_path, attributes).parse
end