Class: Varanus
- Inherits:
-
Object
- Object
- Varanus
- Defined in:
- lib/varanus.rb,
lib/varanus/version.rb
Overview
Interface for Sectigo’s (formerly Comodo CA) API.
Defined Under Namespace
Classes: DCV, Domain, Error, Organization, Reports, RestResource, SSL
Constant Summary collapse
- VERSION =
'0.8.1'
Instance Attribute Summary collapse
-
#customer_uri ⇒ Object
readonly
Returns the value of attribute customer_uri.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#connection ⇒ Object
:nodoc:.
-
#dcv ⇒ Varanus::DCV
Retrive DCV instance.
-
#domain ⇒ Varanus::Domain
Retrieve Domain instance.
-
#initialize(customer_uri, username, password) ⇒ Varanus
constructor
A new instance of Varanus.
-
#organization ⇒ Varanus::Organization
Retrieve Organization instance.
-
#reports ⇒ Object
DEPRECATED.
-
#ssl ⇒ Varanus::SSL
Retrive SSL instance.
Constructor Details
#initialize(customer_uri, username, password) ⇒ Varanus
Returns a new instance of Varanus.
11 12 13 14 15 |
# File 'lib/varanus.rb', line 11 def initialize customer_uri, username, password @customer_uri = customer_uri @username = username @password = password end |
Instance Attribute Details
#customer_uri ⇒ Object (readonly)
Returns the value of attribute customer_uri.
5 6 7 |
# File 'lib/varanus.rb', line 5 def customer_uri @customer_uri end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
5 6 7 |
# File 'lib/varanus.rb', line 5 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
5 6 7 |
# File 'lib/varanus.rb', line 5 def username @username end |
Instance Method Details
#connection ⇒ Object
:nodoc:
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/varanus.rb', line 18 def connection @connection ||= Faraday.new(url: 'https://cert-manager.com/api', request: { timeout: 300 }) do |conn| conn.request :json conn.response :json, content_type: /\bjson$/ conn.headers['login'] = @username conn.headers['password'] = @password conn.headers['customerUri'] = @customer_uri conn.adapter Faraday.default_adapter end end |
#dcv ⇒ Varanus::DCV
Retrive DCV instance
34 35 36 |
# File 'lib/varanus.rb', line 34 def dcv @dcv ||= DCV.new(self) end |
#domain ⇒ Varanus::Domain
Retrieve Domain instance
40 41 42 |
# File 'lib/varanus.rb', line 40 def domain @domain ||= Domain.new(self) end |
#organization ⇒ Varanus::Organization
Retrieve Organization instance
46 47 48 |
# File 'lib/varanus.rb', line 46 def organization @organization ||= Organization.new(self) end |
#reports ⇒ Object
DEPRECATED
51 52 53 |
# File 'lib/varanus.rb', line 51 def reports @reports ||= Reports.new(self) end |
#ssl ⇒ Varanus::SSL
Retrive SSL instance
57 58 59 |
# File 'lib/varanus.rb', line 57 def ssl @ssl ||= SSL.new(self) end |