Class: NgrokAPI::Models::CertificateAuthority
- Inherits:
-
Object
- Object
- NgrokAPI::Models::CertificateAuthority
- Defined in:
- lib/ngrokapi/models/certificate_authority.rb
Instance Attribute Summary collapse
-
#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.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#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:, result:) ⇒ CertificateAuthority
constructor
A new instance of CertificateAuthority.
- #to_s ⇒ Object
-
#update(description: nil, metadata: nil) ⇒ Object
Update attributes of a Certificate Authority by ID.
Constructor Details
#initialize(client:, result:) ⇒ CertificateAuthority
Returns a new instance of CertificateAuthority.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 20 def initialize(client:, result:) @client = client @result = result @id = @result['id'] @uri = @result['uri'] @created_at = @result['created_at'] @description = @result['description'] @metadata = @result['metadata'] @ca_pem = @result['ca_pem'] @subject_common_name = @result['subject_common_name'] @not_before = @result['not_before'] @not_after = @result['not_after'] @key_usages = @result['key_usages'] @extended_key_usages = @result['extended_key_usages'] end |
Instance Attribute Details
#ca_pem ⇒ Object (readonly)
Returns the value of attribute ca_pem.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def ca_pem @ca_pem end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def client @client end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def description @description end |
#extended_key_usages ⇒ Object (readonly)
Returns the value of attribute extended_key_usages.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def extended_key_usages @extended_key_usages end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def id @id end |
#key_usages ⇒ Object (readonly)
Returns the value of attribute key_usages.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def key_usages @key_usages end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def @metadata end |
#not_after ⇒ Object (readonly)
Returns the value of attribute not_after.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def not_after @not_after end |
#not_before ⇒ Object (readonly)
Returns the value of attribute not_before.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def not_before @not_before end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def result @result end |
#subject_common_name ⇒ Object (readonly)
Returns the value of attribute subject_common_name.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def subject_common_name @subject_common_name end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
6 7 8 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 6 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
36 37 38 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 36 def ==(other) @result == other.result end |
#delete ⇒ Object
Delete a Certificate Authority
https://ngrok.com/docs/api#api-certificate-authorities-delete
48 49 50 51 52 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 48 def delete @client.delete( id: @id ) end |
#to_s ⇒ Object
40 41 42 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 40 def to_s @result.to_s end |
#update(description: nil, metadata: nil) ⇒ Object
Update attributes of a Certificate Authority by ID
https://ngrok.com/docs/api#api-certificate-authorities-update
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/ngrokapi/models/certificate_authority.rb', line 58 def update( description: nil, metadata: nil ) @description = description if description @metadata = if @client.update( id: @id, description: description, metadata: ) end |