Class: NgrokAPI::Models::ApplicationSession
- Inherits:
-
Object
- Object
- NgrokAPI::Models::ApplicationSession
- Defined in:
- lib/ngrokapi/models/application_session.rb
Instance Attribute Summary collapse
-
#application_user ⇒ Object
readonly
Returns the value of attribute application_user.
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#browser_session ⇒ Object
readonly
Returns the value of attribute browser_session.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#edge ⇒ Object
readonly
Returns the value of attribute edge.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_active ⇒ Object
readonly
Returns the value of attribute last_active.
-
#public_url ⇒ Object
readonly
Returns the value of attribute public_url.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ Object
Delete an application session by ID.
-
#initialize(client: nil, attrs: {}) ⇒ ApplicationSession
constructor
A new instance of ApplicationSession.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(client: nil, attrs: {}) ⇒ ApplicationSession
Returns a new instance of ApplicationSession.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/ngrokapi/models/application_session.rb', line 24 def initialize(client: nil, attrs: {}) @client = client @attrs = attrs @id = @attrs['id'] unless @attrs['uri'].nil? @uri = URI(@attrs['uri']) end unless @attrs['public_url'].nil? @public_url = URI(@attrs['public_url']) end @browser_session = @attrs['browser_session'] @application_user = @attrs['application_user'] @created_at = @attrs['created_at'] @last_active = @attrs['last_active'] @expires_at = @attrs['expires_at'] @endpoint = @attrs['endpoint'] @edge = @attrs['edge'] @route = @attrs['route'] end |
Instance Attribute Details
#application_user ⇒ Object (readonly)
Returns the value of attribute application_user.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def application_user @application_user end |
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def attrs @attrs end |
#browser_session ⇒ Object (readonly)
Returns the value of attribute browser_session.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def browser_session @browser_session end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.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/application_session.rb', line 10 def created_at @created_at end |
#edge ⇒ Object (readonly)
Returns the value of attribute edge.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def edge @edge end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def endpoint @endpoint end |
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def id @id end |
#last_active ⇒ Object (readonly)
Returns the value of attribute last_active.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def last_active @last_active end |
#public_url ⇒ Object (readonly)
Returns the value of attribute public_url.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def public_url @public_url end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def route @route end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
10 11 12 |
# File 'lib/ngrokapi/models/application_session.rb', line 10 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
44 45 46 |
# File 'lib/ngrokapi/models/application_session.rb', line 44 def ==(other) @attrs == other.attrs end |
#delete ⇒ Object
Delete an application session by ID.
60 61 62 63 64 |
# File 'lib/ngrokapi/models/application_session.rb', line 60 def delete @client.delete( id: @id ) end |
#to_h ⇒ Object
52 53 54 |
# File 'lib/ngrokapi/models/application_session.rb', line 52 def to_h @attrs.to_h end |
#to_s ⇒ Object
48 49 50 |
# File 'lib/ngrokapi/models/application_session.rb', line 48 def to_s @attrs.to_s end |