« Twilio/Rest/Messaging/V1/BrandRegistration/BrandVetting.pm
↑ Summary
Twilio/Rest/Voice/V1/DialingPermissions/Settings.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Trunking::V1::Trunk::Recording; | ||||||||||||
| 3 | |||||||||||||
| 4 | 2 | ▶ | use 5.016; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 2 | our $VERSION = '2.001'; | |||||||||||
| 8 | |||||||||||||
| 9 | package Twilio::Rest::Trunking::V1::Trunk::RecordingContext; | ||||||||||||
| 10 | |||||||||||||
| 11 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | |||||||||||||
| 13 | 2 | ▶ | use Twilio::Serialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | |||||||||||||
| 15 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 2 | my ($class, $version, $trunk_sid) = @_; | |||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 2 | $self->{solution} = { trunk_sid => $trunk_sid }; | |||||||||||
| 19 | 2 | $self->{uri} = join q{}, '/Trunks/', Twilio::Serialize::path_segment($trunk_sid), '/Recording'; | |||||||||||
| 20 | 2 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 1 | ▶ | sub fetch { | ||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||
| 24 | 1 | my ($self) = @_; | |||||||||||
| 25 | |||||||||||||
| 26 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||
| 27 | 1 | return $self->_build_instance($response); | |||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | 1 | ▶ | sub update { | ||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||
| 31 | 1 | my ($self, $options) = @_; | |||||||||||
| 32 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 33 | |||||||||||||
| 34 | my $data = { | ||||||||||||
| 35 | Mode => $options->{mode}, | ||||||||||||
| 36 | Trim => $options->{trim}, | ||||||||||||
| 37 | 1 | }; | |||||||||||
| 38 | |||||||||||||
| 39 | my $response = | ||||||||||||
| 40 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||
| 41 | 1 | return $self->_build_instance($response); | |||||||||||
| 42 | } | ||||||||||||
| 43 | |||||||||||||
| 44 | 2 | ▶ | sub _build_instance { | ||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 45 | 2 | my ($self, $response) = @_; | |||||||||||
| 46 | return Twilio::Rest::Trunking::V1::Trunk::RecordingInstance->new($self->{version}, | ||||||||||||
| 47 | 2 | $response->get_content, $self->{solution}{trunk_sid}); | |||||||||||
| 48 | } | ||||||||||||
| 49 | |||||||||||||
| 50 | package Twilio::Rest::Trunking::V1::Trunk::RecordingInstance; | ||||||||||||
| 51 | |||||||||||||
| 52 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 53 | |||||||||||||
| 54 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 55 | |||||||||||||
| 56 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 57 | 2 | my ($class, $version, $payload, $trunk_sid) = @_; | |||||||||||
| 58 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 59 | 2 | $self->{solution} = { trunk_sid => $trunk_sid }; | |||||||||||
| 60 | 2 | return $self; | |||||||||||
| 61 | } | ||||||||||||
| 62 | |||||||||||||
| 63 | 0 | ▶ | sub fetch { | ||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||
| 64 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 65 | 0 | return $self->_context->fetch(@arguments); | |||||||||||
| 66 | } | ||||||||||||
| 67 | |||||||||||||
| 68 | 0 | ▶ | sub update { | ||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||
| 69 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 70 | 0 | return $self->_context->update(@arguments); | |||||||||||
| 71 | } | ||||||||||||
| 72 | |||||||||||||
| 73 | 0 | ▶ | sub _context { | ||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||
| 74 | 0 | my ($self) = @_; | |||||||||||
| 75 | return Twilio::Rest::Trunking::V1::Trunk::RecordingContext->new($self->{version}, | ||||||||||||
| 76 | 0 | $self->{solution}{trunk_sid}); | |||||||||||
| 77 | } | ||||||||||||
| 78 | |||||||||||||
| 79 | 2 | ▶ | sub mode { return $_[0]{properties}{mode} } | ||||||||||
|
Subroutine
mode: called CC=1 SCAR=0.0
| |||||||||||||
| 80 | 2 | ▶ | sub trim { return $_[0]{properties}{trim} } | ||||||||||
|
Subroutine
trim: called CC=1 SCAR=0.0
| |||||||||||||
| 81 | |||||||||||||
| 82 | 2 | 1; | |||||||||||
| 83 | |||||||||||||
| 84 | __END__ | ||||||||||||