Class: NgrokAPI::Models::Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/ngrokapi/models/endpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:, result:) ⇒ Endpoint

Returns a new instance of Endpoint.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/ngrokapi/models/endpoint.rb', line 22

def initialize(client:, result:)
  @client = client
  @result = result
  @id = @result['id']
  @region = @result['region']
  @created_at = @result['created_at']
  @updated_at = @result['updated_at']
  @public_url = @result['public_url']
  @proto = @result['proto']
  @hostport = @result['hostport']
  @type = @result['type']
  @metadata = @result['metadata']
  @domain = @result['domain']
  @tcp_addr = @result['tcp_addr']
  @tunnel = @result['tunnel']
  @edge = @result['edge']
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def client
  @client
end

#created_atObject (readonly)

Returns the value of attribute created_at.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def created_at
  @created_at
end

#domainObject (readonly)

Returns the value of attribute domain.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def domain
  @domain
end

#edgeObject (readonly)

Returns the value of attribute edge.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def edge
  @edge
end

#hostportObject (readonly)

Returns the value of attribute hostport.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def hostport
  @hostport
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def 
  @metadata
end

#protoObject (readonly)

Returns the value of attribute proto.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def proto
  @proto
end

#public_urlObject (readonly)

Returns the value of attribute public_url.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def public_url
  @public_url
end

#regionObject (readonly)

Returns the value of attribute region.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def region
  @region
end

#resultObject (readonly)

Returns the value of attribute result.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def result
  @result
end

#tcp_addrObject (readonly)

Returns the value of attribute tcp_addr.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def tcp_addr
  @tcp_addr
end

#tunnelObject (readonly)

Returns the value of attribute tunnel.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def tunnel
  @tunnel
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def type
  @type
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



6
7
8
# File 'lib/ngrokapi/models/endpoint.rb', line 6

def updated_at
  @updated_at
end

Instance Method Details

#==(other) ⇒ Object



40
41
42
# File 'lib/ngrokapi/models/endpoint.rb', line 40

def ==(other)
  @result == other.result
end

#to_sObject



44
45
46
# File 'lib/ngrokapi/models/endpoint.rb', line 44

def to_s
  @result.to_s
end