Class: NgrokAPI::Services::EndpointSAMLModuleClient

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

Overview

Constant Summary collapse

PATH =

The API path for the requests

'/endpoint_configurations/%{id}/saml'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ EndpointSAMLModuleClient

Returns a new instance of EndpointSAMLModuleClient.



13
14
15
# File 'lib/ngrokapi/services/endpoint_saml_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_saml_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



96
97
98
99
100
101
102
103
104
# File 'lib/ngrokapi/services/endpoint_saml_module_client.rb', line 96

def delete(
  id: ""
)
  path = '/endpoint_configurations/%{id}/saml'
  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



111
112
113
114
115
116
117
118
119
# File 'lib/ngrokapi/services/endpoint_saml_module_client.rb', line 111

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

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

Parameters:

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

    a resource identifier

Returns:



62
63
64
65
66
67
68
69
70
71
72
# File 'lib/ngrokapi/services/endpoint_saml_module_client.rb', line 62

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

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

Parameters:

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

    a resource identifier

Returns:



79
80
81
82
83
84
85
86
87
88
89
# File 'lib/ngrokapi/services/endpoint_saml_module_client.rb', line 79

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

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

Parameters:

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

Returns:



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

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

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

Parameters:

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

Returns:



43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/ngrokapi/services/endpoint_saml_module_client.rb', line 43

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