class NgrokAPI::Models::TunnelGroupBackend

Attributes

attrs[R]
client[R]
created_at[R]
description[R]
id[R]
labels[R]
metadata[R]
tunnels[R]
uri[R]

Public Class Methods

new(client: nil, attrs: {}) click to toggle source
# File lib/ngrokapi/models/tunnel_group_backend.rb, line 16
def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @id = @attrs['id']
  @uri = @attrs['uri']
  @created_at = @attrs['created_at']
  @description = @attrs['description']
  @metadata = @attrs['metadata']
  @labels = @attrs['labels']
  @tunnels = @attrs['tunnels']
end

Public Instance Methods

==(other) click to toggle source
# File lib/ngrokapi/models/tunnel_group_backend.rb, line 28
def ==(other)
  @attrs == other.attrs
end
delete() click to toggle source

Delete a TunnelGroup backend by ID.

ngrok.com/docs/api#api-tunnel-group-backends-delete

# File lib/ngrokapi/models/tunnel_group_backend.rb, line 44
def delete
  @client.delete(
    id: @id
  )
end
to_h() click to toggle source
# File lib/ngrokapi/models/tunnel_group_backend.rb, line 36
def to_h
  @attrs.to_h
end
to_s() click to toggle source
# File lib/ngrokapi/models/tunnel_group_backend.rb, line 32
def to_s
  @attrs.to_s
end
update( description: nil, metadata: nil, labels: {} ) click to toggle source

Update TunnelGroup backend by ID

ngrok.com/docs/api#api-tunnel-group-backends-update

# File lib/ngrokapi/models/tunnel_group_backend.rb, line 54
def update(
  description: nil,
  metadata: nil,
  labels: {}
)
  @description = description if description
  @metadata = metadata if metadata
  @labels = labels if labels
  @client.update(
    id: @id,
    description: description,
    metadata: metadata,
    labels: labels
  )
end