Class: NgrokAPI::Models::EventDestination
- Inherits:
-
Object
- Object
- NgrokAPI::Models::EventDestination
- Defined in:
- lib/ngrokapi/models/event_destination.rb
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.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#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.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ Object
Delete an Event Destination.
-
#initialize(client:, result:) ⇒ EventDestination
constructor
A new instance of EventDestination.
- #to_s ⇒ Object
Constructor Details
#initialize(client:, result:) ⇒ EventDestination
Returns a new instance of EventDestination.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ngrokapi/models/event_destination.rb', line 16 def initialize(client:, result:) @client = client @result = result @id = @result['id'] = @result['metadata'] @created_at = @result['created_at'] @description = @result['description'] @format = @result['format'] @target = @result['target'] @uri = @result['uri'] end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/ngrokapi/models/event_destination.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/event_destination.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/event_destination.rb', line 6 def description @description end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
6 7 8 |
# File 'lib/ngrokapi/models/event_destination.rb', line 6 def format @format end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/ngrokapi/models/event_destination.rb', line 6 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/ngrokapi/models/event_destination.rb', line 6 def end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
6 7 8 |
# File 'lib/ngrokapi/models/event_destination.rb', line 6 def result @result end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
6 7 8 |
# File 'lib/ngrokapi/models/event_destination.rb', line 6 def target @target end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
6 7 8 |
# File 'lib/ngrokapi/models/event_destination.rb', line 6 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
28 29 30 |
# File 'lib/ngrokapi/models/event_destination.rb', line 28 def ==(other) @result == other.result end |
#delete ⇒ Object
Delete an Event Destination. If the Event Destination is still referenced by an Event Stream, this will throw an error until that Event Stream has removed that reference.
42 43 44 45 46 |
# File 'lib/ngrokapi/models/event_destination.rb', line 42 def delete @client.delete( id: @id ) end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/ngrokapi/models/event_destination.rb', line 32 def to_s @result.to_s end |