Class: NgrokAPI::Models::Secret
- Inherits:
-
Object
- Object
- NgrokAPI::Models::Secret
- Defined in:
- lib/ngrokapi/models/secret.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#created_by ⇒ Object
readonly
Returns the value of attribute created_by.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_updated_by ⇒ Object
readonly
Returns the value of attribute last_updated_by.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#vault ⇒ Object
readonly
Returns the value of attribute vault.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ Object
Delete a Secret.
-
#initialize(client: nil, attrs: {}) ⇒ Secret
constructor
A new instance of Secret.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(client: nil, attrs: {}) ⇒ Secret
Returns a new instance of Secret.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/ngrokapi/models/secret.rb', line 23 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'] @updated_at = @attrs['updated_at'] @name = @attrs['name'] @description = @attrs['description'] @metadata = @attrs['metadata'] @created_by = @attrs['created_by'] @last_updated_by = @attrs['last_updated_by'] @vault = @attrs['vault'] end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def attrs @attrs end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ngrokapi/models/secret.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/secret.rb', line 10 def created_at @created_at end |
#created_by ⇒ Object (readonly)
Returns the value of attribute created_by.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def created_by @created_by end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def id @id end |
#last_updated_by ⇒ Object (readonly)
Returns the value of attribute last_updated_by.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def last_updated_by @last_updated_by end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def @metadata end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def name @name end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def updated_at @updated_at end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def uri @uri end |
#vault ⇒ Object (readonly)
Returns the value of attribute vault.
10 11 12 |
# File 'lib/ngrokapi/models/secret.rb', line 10 def vault @vault end |
Instance Method Details
#==(other) ⇒ Object
40 41 42 |
# File 'lib/ngrokapi/models/secret.rb', line 40 def ==(other) @attrs == other.attrs end |
#delete ⇒ Object
Delete a Secret
56 57 58 59 60 |
# File 'lib/ngrokapi/models/secret.rb', line 56 def delete @client.delete( id: @id ) end |
#to_h ⇒ Object
48 49 50 |
# File 'lib/ngrokapi/models/secret.rb', line 48 def to_h @attrs.to_h end |
#to_s ⇒ Object
44 45 46 |
# File 'lib/ngrokapi/models/secret.rb', line 44 def to_s @attrs.to_s end |