Class: NgrokAPI::Models::CertificateAuthority
- Inherits:
-
Object
- Object
- NgrokAPI::Models::CertificateAuthority
- Defined in:
- lib/ngrokapi/models/certificate_authority.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#ca_pem ⇒ Object
readonly
Returns the value of attribute ca_pem.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#extended_key_usages ⇒ Object
readonly
Returns the value of attribute extended_key_usages.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key_usages ⇒ Object
readonly
Returns the value of attribute key_usages.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#not_after ⇒ Object
readonly
Returns the value of attribute not_after.
-
#not_before ⇒ Object
readonly
Returns the value of attribute not_before.
-
#subject_common_name ⇒ Object
readonly
Returns the value of attribute subject_common_name.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ Object
Delete a Certificate Authority.
-
#initialize(client: nil, attrs: {}) ⇒ CertificateAuthority
constructor
A new instance of CertificateAuthority.
- #to_h ⇒ Object
- #to_s ⇒ Object
-
#update(description: nil, metadata: nil) ⇒ Object
Update attributes of a Certificate Authority by ID.
Constructor Details
#initialize(client: nil, attrs: {}) ⇒ CertificateAuthority
Returns a new instance of CertificateAuthority.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 24 def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @id = @attrs['id'] unless @attrs['uri'].nil? @uri = URI(@attrs['uri']) end @created_at = @attrs['created_at'] @description = @attrs['description'] @metadata = @attrs['metadata'] @ca_pem = @attrs['ca_pem'] @subject_common_name = @attrs['subject_common_name'] @not_before = @attrs['not_before'] @not_after = @attrs['not_after'] @key_usages = @attrs['key_usages'] @extended_key_usages = @attrs['extended_key_usages'] end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def attrs @attrs end |
#ca_pem ⇒ Object (readonly)
Returns the value of attribute ca_pem.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def ca_pem @ca_pem end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def client @client end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def description @description end |
#extended_key_usages ⇒ Object (readonly)
Returns the value of attribute extended_key_usages.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def extended_key_usages @extended_key_usages end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def id @id end |
#key_usages ⇒ Object (readonly)
Returns the value of attribute key_usages.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def key_usages @key_usages end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def @metadata end |
#not_after ⇒ Object (readonly)
Returns the value of attribute not_after.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def not_after @not_after end |
#not_before ⇒ Object (readonly)
Returns the value of attribute not_before.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def not_before @not_before end |
#subject_common_name ⇒ Object (readonly)
Returns the value of attribute subject_common_name.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def subject_common_name @subject_common_name end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
10 11 12 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 10 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 42 def ==(other) @attrs == other.attrs end |
#delete ⇒ Object
Delete a Certificate Authority
58 59 60 61 62 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 58 def delete @client.delete( id: @id ) end |
#to_h ⇒ Object
50 51 52 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 50 def to_h @attrs.to_h end |
#to_s ⇒ Object
46 47 48 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 46 def to_s @attrs.to_s end |
#update(description: nil, metadata: nil) ⇒ Object
Update attributes of a Certificate Authority by ID
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 68 def update( description: nil, metadata: nil ) @description = description if description @metadata = if @client.update( id: @id, description: description, metadata: ) end |