Class: Purest::Cert

Inherits:
APIMethods show all
Defined in:
lib/purest/cert.rb

Constant Summary collapse

GET_PARAMS =
%i[ca_certificate certificate common_name country email
intermediate_certificate locality organization
organizational_unit state].freeze

Instance Method Summary collapse

Methods inherited from APIMethods

#append_path

Methods inherited from Rest

access_method?, #authenticated?, #concat_url, #initialize, #logout, method_missing, #use_named_parameter

Constructor Details

This class inherits a constructor from Purest::Rest

Instance Method Details

#create(options = nil) ⇒ Object



19
20
21
# File 'lib/purest/cert.rb', line 19

def create(options = nil)
  super(options, 'cert')
end

#delete(options = nil) ⇒ Object



27
28
29
# File 'lib/purest/cert.rb', line 27

def delete(options = nil)
  super(options, 'cert')
end

#get(options = nil) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/purest/cert.rb', line 11

def get(options = nil)
  if !options.nil? && options[:csr]
    super(options, 'cert/certificate_signing_request', GET_PARAMS)
  else
    super(options, 'cert', GET_PARAMS)
  end
end

#update(options = nil) ⇒ Object



23
24
25
# File 'lib/purest/cert.rb', line 23

def update(options = nil)
  super(options, 'cert')
end