Class: NgrokAPI::Services::EdgeRouteOIDCModuleClient

Inherits:
Object
  • Object
show all
Defined in:
lib/ngrokapi/services/edge_route_oidc_module_client.rb

Overview

Constant Summary collapse

PATH =

The API path for the requests

'/edges/https/%{edge_id}/routes/%{id}/oidc'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ EdgeRouteOIDCModuleClient

Returns a new instance of EdgeRouteOIDCModuleClient.



13
14
15
# File 'lib/ngrokapi/services/edge_route_oidc_module_client.rb', line 13

def initialize(client:)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



11
12
13
# File 'lib/ngrokapi/services/edge_route_oidc_module_client.rb', line 11

def client
  @client
end

Instance Method Details

#delete(edge_id: "", id: "") ⇒ NgrokAPI::Models::Empty

Parameters:

  • edge_id (string) (defaults to: "")

    unique identifier of this edge

  • id (string) (defaults to: "")

    unique identifier of this edge route

Returns:

  • (NgrokAPI::Models::Empty)

    result from the API request



93
94
95
96
97
98
99
100
# File 'lib/ngrokapi/services/edge_route_oidc_module_client.rb', line 93

def delete(edge_id: "", id: "")
  path = '/edges/https/%{edge_id}/routes/%{id}/oidc'
  replacements = {
    edge_id: edge_id,
    id: id,
  }
  @client.delete(path % replacements)
end

#delete!(edge_id: "", id: "") ⇒ NgrokAPI::Models::Empty

Parameters:

  • edge_id (string) (defaults to: "")

    unique identifier of this edge

  • id (string) (defaults to: "")

    unique identifier of this edge route

Returns:

  • (NgrokAPI::Models::Empty)

    result from the API request



108
109
110
111
112
113
114
115
# File 'lib/ngrokapi/services/edge_route_oidc_module_client.rb', line 108

def delete!(edge_id: "", id: "")
  path = '/edges/https/%{edge_id}/routes/%{id}/oidc'
  replacements = {
    edge_id: edge_id,
    id: id,
  }
  @client.delete(path % replacements, danger: true)
end

#get(edge_id: "", id: "") ⇒ NgrokAPI::Models::EndpointOIDC

Parameters:

  • edge_id (string) (defaults to: "")

    unique identifier of this edge

  • id (string) (defaults to: "")

    unique identifier of this edge route

Returns:



59
60
61
62
63
64
65
66
67
68
# File 'lib/ngrokapi/services/edge_route_oidc_module_client.rb', line 59

def get(edge_id: "", id: "")
  path = '/edges/https/%{edge_id}/routes/%{id}/oidc'
  replacements = {
    edge_id: edge_id,
    id: id,
  }
  data = {}
  result = @client.get(path % replacements, data: data)
  NgrokAPI::Models::EndpointOIDC.new(client: self, attrs: result)
end

#get!(edge_id: "", id: "") ⇒ NgrokAPI::Models::EndpointOIDC

Parameters:

  • edge_id (string) (defaults to: "")

    unique identifier of this edge

  • id (string) (defaults to: "")

    unique identifier of this edge route

Returns:



76
77
78
79
80
81
82
83
84
85
# File 'lib/ngrokapi/services/edge_route_oidc_module_client.rb', line 76

def get!(edge_id: "", id: "")
  path = '/edges/https/%{edge_id}/routes/%{id}/oidc'
  replacements = {
    edge_id: edge_id,
    id: id,
  }
  data = {}
  result = @client.get(path % replacements, data: data, danger: true)
  NgrokAPI::Models::EndpointOIDC.new(client: self, attrs: result)
end

#replace(edge_id: "", id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointOIDC

Parameters:

  • edge_id (string) (defaults to: "")
  • id (string) (defaults to: "")
  • a_module (EndpointOIDC) (defaults to: nil)

Returns:



24
25
26
27
28
29
30
31
32
33
# File 'lib/ngrokapi/services/edge_route_oidc_module_client.rb', line 24

def replace(edge_id: "", id: "", a_module: nil)
  path = '/edges/https/%{edge_id}/routes/%{id}/oidc'
  replacements = {
    edge_id: edge_id,
    id: id,
  }
  data = a_module
  result = @client.put(path % replacements, data: data)
  NgrokAPI::Models::EndpointOIDC.new(client: self, attrs: result)
end

#replace!(edge_id: "", id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointOIDC

Parameters:

  • edge_id (string) (defaults to: "")
  • id (string) (defaults to: "")
  • a_module (EndpointOIDC) (defaults to: nil)

Returns:



42
43
44
45
46
47
48
49
50
51
# File 'lib/ngrokapi/services/edge_route_oidc_module_client.rb', line 42

def replace!(edge_id: "", id: "", a_module: nil)
  path = '/edges/https/%{edge_id}/routes/%{id}/oidc'
  replacements = {
    edge_id: edge_id,
    id: id,
  }
  data = a_module
  result = @client.put(path % replacements, data: data, danger: true)
  NgrokAPI::Models::EndpointOIDC.new(client: self, attrs: result)
end