Class: NgrokAPI::Models::TlsCertificate
- Inherits:
-
Object
- Object
- NgrokAPI::Models::TlsCertificate
- Defined in:
- lib/ngrokapi/models/tls_certificate.rb
Overview
A resource representing data from the tls_certificate API
Instance Attribute Summary collapse
-
#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.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ nil
Delete this TLS certificate.
-
#initialize(client:, result:) ⇒ TlsCertificate
constructor
A new instance of TlsCertificate.
- #to_s ⇒ Object
-
#update(description: nil, metadata: nil) ⇒ NgrokAPI::Models::TlsCertificate
Update the attributes of this TLS Certificate.
Constructor Details
#initialize(client:, result:) ⇒ TlsCertificate
Returns a new instance of TlsCertificate.
16 17 18 19 20 21 22 23 24 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 16 def initialize(client:, result:) @client = client @result = result @created_at = @result['created_at'] @id = @result['id'] @description = @result['description'] @metadata = @result['metadata'] @uri = @result['uri'] end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
8 9 10 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 8 def client @client end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 8 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
8 9 10 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 8 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 8 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
8 9 10 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 8 def @metadata end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
8 9 10 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 8 def result @result end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
8 9 10 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 8 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
26 27 28 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 26 def ==(other) @result == other.result end |
#delete ⇒ nil
Delete this TLS certificate.
40 41 42 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 40 def delete @client.delete(id: @id) end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 30 def to_s @result.to_s end |
#update(description: nil, metadata: nil) ⇒ NgrokAPI::Models::TlsCertificate
Update the attributes of this TLS Certificate.
54 55 56 57 58 |
# File 'lib/ngrokapi/models/tls_certificate.rb', line 54 def update(description: nil, metadata: nil) @description = description if description @metadata = if @client.update(id: @id, description: description, metadata: ) end |