Class: Dnsimple::Struct::Certificate
- Defined in:
- lib/dnsimple/struct/certificate.rb
Instance Attribute Summary collapse
-
#alternate_names ⇒ Array<String>
The certificate alternate names.
-
#authority_identifier ⇒ String
The Certificate Authority (CA) that issued the certificate.
-
#auto_renew ⇒ Boolean
True if the certificate is set to auto-renew on expiration.
-
#common_name ⇒ String
The certificate common name.
-
#contact_id ⇒ Integer
The associated contact ID.
-
#created_at ⇒ String
When the certificate was created in DNSimple.
-
#csr ⇒ String
The certificate CSR.
-
#domain_id ⇒ Integer
The associated domain ID.
-
#expires_at ⇒ String
The timestamp when the certificate will expire.
-
#id ⇒ Integer
The certificate ID in DNSimple.
-
#state ⇒ String
The certificate state.
-
#updated_at ⇒ String
When the certificate was last updated in DNSimple.
-
#years ⇒ Integer
The years the certificate will last.
Instance Method Summary collapse
-
#expires_on ⇒ String
deprecated
Deprecated.
Please use #expires_at instead.
- #expires_on=(expiration_date) ⇒ Object
-
#initialize(attributes = {}) ⇒ Certificate
constructor
A new instance of Certificate.
Constructor Details
#initialize(attributes = {}) ⇒ Certificate
Returns a new instance of Certificate.
8 9 10 11 12 |
# File 'lib/dnsimple/struct/certificate.rb', line 8 def initialize(attributes = {}) attributes.delete("expires_on") super @expires_on = Date.parse(expires_at).to_s if expires_at end |
Instance Attribute Details
#alternate_names ⇒ Array<String>
Returns The certificate alternate names.
27 28 29 |
# File 'lib/dnsimple/struct/certificate.rb', line 27 def alternate_names @alternate_names end |
#authority_identifier ⇒ String
Returns The Certificate Authority (CA) that issued the certificate.
39 40 41 |
# File 'lib/dnsimple/struct/certificate.rb', line 39 def @authority_identifier end |
#auto_renew ⇒ Boolean
Returns True if the certificate is set to auto-renew on expiration.
42 43 44 |
# File 'lib/dnsimple/struct/certificate.rb', line 42 def auto_renew @auto_renew end |
#common_name ⇒ String
Returns The certificate common name.
24 25 26 |
# File 'lib/dnsimple/struct/certificate.rb', line 24 def common_name @common_name end |
#contact_id ⇒ Integer
Returns The associated contact ID.
21 22 23 |
# File 'lib/dnsimple/struct/certificate.rb', line 21 def contact_id @contact_id end |
#created_at ⇒ String
Returns When the certificate was created in DNSimple.
45 46 47 |
# File 'lib/dnsimple/struct/certificate.rb', line 45 def created_at @created_at end |
#csr ⇒ String
Returns The certificate CSR.
33 34 35 |
# File 'lib/dnsimple/struct/certificate.rb', line 33 def csr @csr end |
#domain_id ⇒ Integer
Returns The associated domain ID.
18 19 20 |
# File 'lib/dnsimple/struct/certificate.rb', line 18 def domain_id @domain_id end |
#expires_at ⇒ String
Returns The timestamp when the certificate will expire.
51 52 53 |
# File 'lib/dnsimple/struct/certificate.rb', line 51 def expires_at @expires_at end |
#id ⇒ Integer
Returns The certificate ID in DNSimple.
15 16 17 |
# File 'lib/dnsimple/struct/certificate.rb', line 15 def id @id end |
#state ⇒ String
Returns The certificate state.
36 37 38 |
# File 'lib/dnsimple/struct/certificate.rb', line 36 def state @state end |
#updated_at ⇒ String
Returns When the certificate was last updated in DNSimple.
48 49 50 |
# File 'lib/dnsimple/struct/certificate.rb', line 48 def updated_at @updated_at end |
#years ⇒ Integer
Returns The years the certificate will last.
30 31 32 |
# File 'lib/dnsimple/struct/certificate.rb', line 30 def years @years end |
Instance Method Details
#expires_on ⇒ String
Please use #expires_at instead.
Returns The date when the certificate will expire.
55 56 57 58 |
# File 'lib/dnsimple/struct/certificate.rb', line 55 def expires_on warn "[DEPRECATION] Certificate#expires_on is deprecated. Please use `expires_at` instead." @expires_on end |
#expires_on=(expiration_date) ⇒ Object
60 61 62 63 |
# File 'lib/dnsimple/struct/certificate.rb', line 60 def expires_on=(expiration_date) warn "[DEPRECATION] Certificate#expires_on= is deprecated. Please use `expires_at=` instead." @expires_on = expiration_date end |