Class: NgrokAPI::Services::EndpointIPPolicyModuleClient
- Inherits:
-
Object
- Object
- NgrokAPI::Services::EndpointIPPolicyModuleClient
- Defined in:
- lib/ngrokapi/services/endpoint_ip_policy_module_client.rb
Overview
Constant Summary collapse
- PATH =
The API path for the requests
'/endpoint_configurations/%{id}/ip_policy'
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::EndpointIPPolicy
- #get!(id: "") ⇒ NgrokAPI::Models::EndpointIPPolicy
-
#initialize(client:) ⇒ EndpointIPPolicyModuleClient
constructor
A new instance of EndpointIPPolicyModuleClient.
- #replace(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointIPPolicy
- #replace!(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointIPPolicy
Constructor Details
#initialize(client:) ⇒ EndpointIPPolicyModuleClient
Returns a new instance of EndpointIPPolicyModuleClient.
13 14 15 |
# File 'lib/ngrokapi/services/endpoint_ip_policy_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/endpoint_ip_policy_module_client.rb', line 11 def client @client end |
Instance Method Details
#delete(id: "") ⇒ NgrokAPI::Models::Empty
96 97 98 99 100 101 102 103 104 |
# File 'lib/ngrokapi/services/endpoint_ip_policy_module_client.rb', line 96 def delete( id: "" ) path = '/endpoint_configurations/%{id}/ip_policy' replacements = { id: id, } @client.delete(path % replacements) end |
#delete!(id: "") ⇒ NgrokAPI::Models::Empty
111 112 113 114 115 116 117 118 119 |
# File 'lib/ngrokapi/services/endpoint_ip_policy_module_client.rb', line 111 def delete!( id: "" ) path = '/endpoint_configurations/%{id}/ip_policy' replacements = { id: id, } @client.delete(path % replacements, danger: true) end |
#get(id: "") ⇒ NgrokAPI::Models::EndpointIPPolicy
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/ngrokapi/services/endpoint_ip_policy_module_client.rb', line 62 def get( id: "" ) path = '/endpoint_configurations/%{id}/ip_policy' replacements = { id: id, } data = {} result = @client.get(path % replacements, data: data) NgrokAPI::Models::EndpointIPPolicy.new(client: self, result: result) end |
#get!(id: "") ⇒ NgrokAPI::Models::EndpointIPPolicy
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/ngrokapi/services/endpoint_ip_policy_module_client.rb', line 79 def get!( id: "" ) path = '/endpoint_configurations/%{id}/ip_policy' replacements = { id: id, } data = {} result = @client.get(path % replacements, data: data, danger: true) NgrokAPI::Models::EndpointIPPolicy.new(client: self, result: result) end |
#replace(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointIPPolicy
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ngrokapi/services/endpoint_ip_policy_module_client.rb', line 23 def replace( id: "", a_module: nil ) path = '/endpoint_configurations/%{id}/ip_policy' replacements = { id: id, } data = {} data[:module] = a_module if a_module result = @client.put(path % replacements, data: data) NgrokAPI::Models::EndpointIPPolicy.new(client: self, result: result) end |
#replace!(id: "", a_module: nil) ⇒ NgrokAPI::Models::EndpointIPPolicy
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ngrokapi/services/endpoint_ip_policy_module_client.rb', line 43 def replace!( id: "", a_module: nil ) path = '/endpoint_configurations/%{id}/ip_policy' replacements = { id: id, } data = {} data[:module] = a_module if a_module result = @client.put(path % replacements, data: data, danger: true) NgrokAPI::Models::EndpointIPPolicy.new(client: self, result: result) end |