« blib/lib/SignalWire/Agents/Prefabs/Survey.pm
↑ Summary
blib/lib/SignalWire/Agents/REST/Namespaces/Registry.pm »
| 1 | package SignalWire::Agents::REST::Namespaces::Resources; | ||||||||||
| 2 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | # --- Addresses (no update) --- | ||||||||||
| 7 | package SignalWire::Agents::REST::Namespaces::Addresses; | ||||||||||
| 8 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 4 | extends 'SignalWire::Agents::REST::Namespaces::Base'; | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | sub list { | ||||||||
|
Subroutine
list: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 12 | 0 | my ($self, %params) = @_; | |||||||||
| 13 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 0 | return $self->_http->get($self->_base_path, params => $p); | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | sub create { | ||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 18 | 0 | my ($self, %kwargs) = @_; | |||||||||
| 19 | 0 | return $self->_http->post($self->_base_path, body => \%kwargs); | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 0 | ▶ | sub get { | ||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 23 | 0 | my ($self, $address_id) = @_; | |||||||||
| 24 | 0 | return $self->_http->get($self->_path($address_id)); | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | # --- Queues --- | ||||||||||
| 28 | package SignalWire::Agents::REST::Namespaces::Queues; | ||||||||||
| 29 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 30 | 4 | extends 'SignalWire::Agents::REST::Namespaces::CrudResource'; | |||||||||
| 31 | 3 | ▶ | has '+_update_method' => ( default => sub { 'PUT' } ); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 32 | |||||||||||
| 33 | 0 | ▶ | sub list_members { | ||||||||
|
Subroutine
list_members: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 34 | 0 | my ($self, $queue_id, %params) = @_; | |||||||||
| 35 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 0 | return $self->_http->get($self->_path($queue_id, 'members'), params => $p); | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 0 | ▶ | sub get_next_member { | ||||||||
|
Subroutine
get_next_member: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 40 | 0 | my ($self, $queue_id) = @_; | |||||||||
| 41 | 0 | return $self->_http->get($self->_path($queue_id, 'members', 'next')); | |||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | # --- Recordings (read-only + delete) --- | ||||||||||
| 45 | package SignalWire::Agents::REST::Namespaces::Recordings; | ||||||||||
| 46 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 47 | 4 | extends 'SignalWire::Agents::REST::Namespaces::Base'; | |||||||||
| 48 | |||||||||||
| 49 | 0 | ▶ | sub list { | ||||||||
|
Subroutine
list: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 50 | 0 | my ($self, %params) = @_; | |||||||||
| 51 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 52 | 0 | return $self->_http->get($self->_base_path, params => $p); | |||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 0 | ▶ | sub get { | ||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 56 | 0 | my ($self, $recording_id) = @_; | |||||||||
| 57 | 0 | return $self->_http->get($self->_path($recording_id)); | |||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | 0 | ▶ | sub delete_recording { | ||||||||
|
Subroutine
delete_recording: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 61 | 0 | my ($self, $recording_id) = @_; | |||||||||
| 62 | 0 | return $self->_http->delete_request($self->_path($recording_id)); | |||||||||
| 63 | } | ||||||||||
| 64 | |||||||||||
| 65 | # --- NumberGroups --- | ||||||||||
| 66 | package SignalWire::Agents::REST::Namespaces::NumberGroups; | ||||||||||
| 67 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 68 | 4 | extends 'SignalWire::Agents::REST::Namespaces::CrudResource'; | |||||||||
| 69 | 3 | ▶ | has '+_update_method' => ( default => sub { 'PUT' } ); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 70 | |||||||||||
| 71 | 0 | ▶ | sub list_memberships { | ||||||||
|
Subroutine
list_memberships: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 72 | 0 | my ($self, $group_id, %params) = @_; | |||||||||
| 73 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 74 | 0 | return $self->_http->get($self->_path($group_id, 'number_group_memberships'), params => $p); | |||||||||
| 75 | } | ||||||||||
| 76 | |||||||||||
| 77 | 0 | ▶ | sub add_membership { | ||||||||
|
Subroutine
add_membership: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 78 | 0 | my ($self, $group_id, %kwargs) = @_; | |||||||||
| 79 | 0 | return $self->_http->post($self->_path($group_id, 'number_group_memberships'), body => \%kwargs); | |||||||||
| 80 | } | ||||||||||
| 81 | |||||||||||
| 82 | # --- VerifiedCallers --- | ||||||||||
| 83 | package SignalWire::Agents::REST::Namespaces::VerifiedCallers; | ||||||||||
| 84 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 85 | 4 | extends 'SignalWire::Agents::REST::Namespaces::CrudResource'; | |||||||||
| 86 | 3 | ▶ | has '+_update_method' => ( default => sub { 'PUT' } ); | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 87 | |||||||||||
| 88 | 0 | ▶ | sub redial_verification { | ||||||||
|
Subroutine
redial_verification: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 89 | 0 | my ($self, $caller_id) = @_; | |||||||||
| 90 | 0 | return $self->_http->post($self->_path($caller_id, 'verification')); | |||||||||
| 91 | } | ||||||||||
| 92 | |||||||||||
| 93 | 0 | ▶ | sub submit_verification { | ||||||||
|
Subroutine
submit_verification: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 94 | 0 | my ($self, $caller_id, %kwargs) = @_; | |||||||||
| 95 | 0 | return $self->_http->put($self->_path($caller_id, 'verification'), body => \%kwargs); | |||||||||
| 96 | } | ||||||||||
| 97 | |||||||||||
| 98 | # --- SipProfile (singleton) --- | ||||||||||
| 99 | package SignalWire::Agents::REST::Namespaces::SipProfile; | ||||||||||
| 100 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 101 | 4 | extends 'SignalWire::Agents::REST::Namespaces::Base'; | |||||||||
| 102 | |||||||||||
| 103 | 0 | ▶ | sub get { | ||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 104 | 0 | my ($self) = @_; | |||||||||
| 105 | 0 | return $self->_http->get($self->_base_path); | |||||||||
| 106 | } | ||||||||||
| 107 | |||||||||||
| 108 | 0 | ▶ | sub update { | ||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 109 | 0 | my ($self, %kwargs) = @_; | |||||||||
| 110 | 0 | return $self->_http->put($self->_base_path, body => \%kwargs); | |||||||||
| 111 | } | ||||||||||
| 112 | |||||||||||
| 113 | # --- Lookup --- | ||||||||||
| 114 | package SignalWire::Agents::REST::Namespaces::Lookup; | ||||||||||
| 115 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 116 | 4 | extends 'SignalWire::Agents::REST::Namespaces::Base'; | |||||||||
| 117 | |||||||||||
| 118 | 0 | ▶ | sub phone_number { | ||||||||
|
Subroutine
phone_number: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 119 | 0 | my ($self, $e164, %params) = @_; | |||||||||
| 120 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 121 | 0 | return $self->_http->get($self->_path('phone_number', $e164), params => $p); | |||||||||
| 122 | } | ||||||||||
| 123 | |||||||||||
| 124 | # --- ShortCodes (read + update) --- | ||||||||||
| 125 | package SignalWire::Agents::REST::Namespaces::ShortCodes; | ||||||||||
| 126 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 127 | 4 | extends 'SignalWire::Agents::REST::Namespaces::Base'; | |||||||||
| 128 | |||||||||||
| 129 | 0 | ▶ | sub list { | ||||||||
|
Subroutine
list: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 130 | 0 | my ($self, %params) = @_; | |||||||||
| 131 | 0 | ▶ | my $p = %params ? \%params : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 132 | 0 | return $self->_http->get($self->_base_path, params => $p); | |||||||||
| 133 | } | ||||||||||
| 134 | |||||||||||
| 135 | 0 | ▶ | sub get { | ||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 136 | 0 | my ($self, $short_code_id) = @_; | |||||||||
| 137 | 0 | return $self->_http->get($self->_path($short_code_id)); | |||||||||
| 138 | } | ||||||||||
| 139 | |||||||||||
| 140 | 0 | ▶ | sub update { | ||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 141 | 0 | my ($self, $short_code_id, %kwargs) = @_; | |||||||||
| 142 | 0 | return $self->_http->put($self->_path($short_code_id), body => \%kwargs); | |||||||||
| 143 | } | ||||||||||
| 144 | |||||||||||
| 145 | # --- ImportedNumbers (create only) --- | ||||||||||
| 146 | package SignalWire::Agents::REST::Namespaces::ImportedNumbers; | ||||||||||
| 147 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 148 | 4 | extends 'SignalWire::Agents::REST::Namespaces::Base'; | |||||||||
| 149 | |||||||||||
| 150 | 0 | ▶ | sub create { | ||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 151 | 0 | my ($self, %kwargs) = @_; | |||||||||
| 152 | 0 | return $self->_http->post($self->_base_path, body => \%kwargs); | |||||||||
| 153 | } | ||||||||||
| 154 | |||||||||||
| 155 | # --- MFA --- | ||||||||||
| 156 | package SignalWire::Agents::REST::Namespaces::MFA; | ||||||||||
| 157 | 4 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 158 | 4 | extends 'SignalWire::Agents::REST::Namespaces::Base'; | |||||||||
| 159 | |||||||||||
| 160 | 0 | ▶ | sub sms { | ||||||||
|
Subroutine
sms: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 161 | 0 | my ($self, %kwargs) = @_; | |||||||||
| 162 | 0 | return $self->_http->post($self->_path('sms'), body => \%kwargs); | |||||||||
| 163 | } | ||||||||||
| 164 | |||||||||||
| 165 | 0 | ▶ | sub call { | ||||||||
|
Subroutine
call: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 166 | 0 | my ($self, %kwargs) = @_; | |||||||||
| 167 | 0 | return $self->_http->post($self->_path('call'), body => \%kwargs); | |||||||||
| 168 | } | ||||||||||
| 169 | |||||||||||
| 170 | 0 | ▶ | sub verify { | ||||||||
|
Subroutine
verify: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 171 | 0 | my ($self, $request_id, %kwargs) = @_; | |||||||||
| 172 | 0 | return $self->_http->post($self->_path($request_id, 'verify'), body => \%kwargs); | |||||||||
| 173 | } | ||||||||||
| 174 | |||||||||||
| 175 | 4 | 1; | |||||||||