Class: VoiceTel::Resources::Acl

Inherits:
Base
  • Object
show all
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

Methods inherited from Base

#compact_query, #initialize

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

#listObject



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