Class: VoiceTel::Resources::Acl
- Defined in:
- lib/voicetel/resources/acl.rb
Overview
AclService — manages the IP allowlist (CIDR entries).
The DELETE /v2.2/acl endpoint is unusual: it returns 200 with a body (not 204). 409 conflicts include partial success/failure detail in the body — surfaced through ApiError#body so callers can inspect it.
Instance Method Summary collapse
-
#add(body) ⇒ Object
body example: { acl: [{ cidr: “1.2.3.0/24” }] }.
- #list ⇒ Object
- #remove(body) ⇒ Object
Methods inherited from Base
Constructor Details
This class inherits a constructor from VoiceTel::Resources::Base
Instance Method Details
#add(body) ⇒ Object
body example: { acl: [{ cidr: “1.2.3.0/24” }] }
18 19 20 |
# File 'lib/voicetel/resources/acl.rb', line 18 def add(body) @transport.request(:post, "/v2.2/acl", body: body) end |
#list ⇒ Object
13 14 15 |
# File 'lib/voicetel/resources/acl.rb', line 13 def list @transport.request(:get, "/v2.2/acl") end |
#remove(body) ⇒ Object
22 23 24 |
# File 'lib/voicetel/resources/acl.rb', line 22 def remove(body) @transport.request(:delete, "/v2.2/acl", body: body) end |