Class: NgrokAPI::Services::TLSEdgeTLSTerminationModuleClient
- Inherits:
-
Object
- Object
- NgrokAPI::Services::TLSEdgeTLSTerminationModuleClient
- Defined in:
- lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb
Overview
Constant Summary collapse
- PATH =
The API path for the requests
'/edges/tls/%{id}/tls_termination'
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #delete(id: "") ⇒ NgrokAPI::Models::Empty
- #delete!(id: "") ⇒ NgrokAPI::Models::Empty
- #get(id: "") ⇒ NgrokAPI::Models::EndpointTLSTermination
- #get!(id: "") ⇒ NgrokAPI::Models::EndpointTLSTermination
-
#initialize(client:) ⇒ TLSEdgeTLSTerminationModuleClient
constructor
A new instance of TLSEdgeTLSTerminationModuleClient.
- #replace(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointTLSTermination
- #replace!(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointTLSTermination
Constructor Details
#initialize(client:) ⇒ TLSEdgeTLSTerminationModuleClient
Returns a new instance of TLSEdgeTLSTerminationModuleClient.
13 14 15 |
# File 'lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb', line 13 def initialize(client:) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
11 12 13 |
# File 'lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb', line 11 def client @client end |
Instance Method Details
#delete(id: "") ⇒ NgrokAPI::Models::Empty
84 85 86 87 88 89 90 |
# File 'lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb', line 84 def delete(id: "") path = '/edges/tls/%{id}/tls_termination' replacements = { id: id, } @client.delete(path % replacements) end |
#delete!(id: "") ⇒ NgrokAPI::Models::Empty
97 98 99 100 101 102 103 |
# File 'lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb', line 97 def delete!(id: "") path = '/edges/tls/%{id}/tls_termination' replacements = { id: id, } @client.delete(path % replacements, danger: true) end |
#get(id: "") ⇒ NgrokAPI::Models::EndpointTLSTermination
54 55 56 57 58 59 60 61 62 |
# File 'lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb', line 54 def get(id: "") path = '/edges/tls/%{id}/tls_termination' replacements = { id: id, } data = {} result = @client.get(path % replacements, data: data) NgrokAPI::Models::EndpointTLSTermination.new(client: self, attrs: result) end |
#get!(id: "") ⇒ NgrokAPI::Models::EndpointTLSTermination
69 70 71 72 73 74 75 76 77 |
# File 'lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb', line 69 def get!(id: "") path = '/edges/tls/%{id}/tls_termination' replacements = { id: id, } data = {} result = @client.get(path % replacements, data: data, danger: true) NgrokAPI::Models::EndpointTLSTermination.new(client: self, attrs: result) end |
#replace(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointTLSTermination
23 24 25 26 27 28 29 30 31 |
# File 'lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb', line 23 def replace(id: "", a_module: nil) path = '/edges/tls/%{id}/tls_termination' replacements = { id: id, } data = a_module result = @client.put(path % replacements, data: data) NgrokAPI::Models::EndpointTLSTermination.new(client: self, attrs: result) end |
#replace!(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointTLSTermination
39 40 41 42 43 44 45 46 47 |
# File 'lib/ngrokapi/services/tls_edge_tls_termination_module_client.rb', line 39 def replace!(id: "", a_module: nil) path = '/edges/tls/%{id}/tls_termination' replacements = { id: id, } data = a_module result = @client.put(path % replacements, data: data, danger: true) NgrokAPI::Models::EndpointTLSTermination.new(client: self, attrs: result) end |