Class: NgrokAPI::Services::EndpointOIDCModuleClient

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

Overview

Constant Summary collapse

PATH =

The API path for the requests

'/endpoint_configurations/%{id}/oidc'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ EndpointOIDCModuleClient

Returns a new instance of EndpointOIDCModuleClient.



13
14
15
# File 'lib/ngrokapi/services/endpoint_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/endpoint_oidc_module_client.rb', line 11

def client
  @client
end

Instance Method Details

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

Parameters:

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

    a resource identifier

Returns:

  • (NgrokAPI::Models::Empty)

    result from the API request



86
87
88
89
90
91
92
# File 'lib/ngrokapi/services/endpoint_oidc_module_client.rb', line 86

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

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

Parameters:

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

    a resource identifier

Returns:

  • (NgrokAPI::Models::Empty)

    result from the API request



99
100
101
102
103
104
105
# File 'lib/ngrokapi/services/endpoint_oidc_module_client.rb', line 99

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

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

Parameters:

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

    a resource identifier

Returns:



56
57
58
59
60
61
62
63
64
# File 'lib/ngrokapi/services/endpoint_oidc_module_client.rb', line 56

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

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

Parameters:

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

    a resource identifier

Returns:



71
72
73
74
75
76
77
78
79
# File 'lib/ngrokapi/services/endpoint_oidc_module_client.rb', line 71

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

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

Parameters:

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

Returns:



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

def replace(id: "", a_module: nil)
  path = '/endpoint_configurations/%{id}/oidc'
  replacements = {
    id: id,
  }
  data = {}
  data[:module] = a_module if a_module
  result = @client.put(path % replacements, data: data)
  NgrokAPI::Models::EndpointOIDC.new(client: self, result: result)
end

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

Parameters:

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

Returns:



40
41
42
43
44
45
46
47
48
49
# File 'lib/ngrokapi/services/endpoint_oidc_module_client.rb', line 40

def replace!(id: "", a_module: nil)
  path = '/endpoint_configurations/%{id}/oidc'
  replacements = {
    id: id,
  }
  data = {}
  data[:module] = a_module if a_module
  result = @client.put(path % replacements, data: data, danger: true)
  NgrokAPI::Models::EndpointOIDC.new(client: self, result: result)
end