| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Video::V1::Room::RoomRecording; | ||||||||||||||||||||
| 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::Video::V1::Room::RoomRecordingList; | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 2 | ▶ | use parent 'Twilio::ListResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 3 | my ($class, $version, $room_sid) = @_; | |||||||||||||||||||
| 17 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 3 | $self->{solution} = { room_sid => $room_sid }; | |||||||||||||||||||
| 19 | 3 | $self->{uri} = join q{}, '/Rooms/', Twilio::Serialize::path_segment($room_sid), '/Recordings'; | |||||||||||||||||||
| 20 | 3 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 24 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 25 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 29 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 30 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 34 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 35 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | my $params = { | ||||||||||||||||||||
| 38 | DateCreatedAfter => Twilio::Serialize::iso8601_date_time($options->{date_created_after}), | ||||||||||||||||||||
| 39 | DateCreatedBefore => Twilio::Serialize::iso8601_date_time($options->{date_created_before}), | ||||||||||||||||||||
| 40 | SourceSid => $options->{source_sid}, | ||||||||||||||||||||
| 41 | Status => $options->{status}, | ||||||||||||||||||||
| 42 | 1 | PageToken => $page_token, | |||||||||||||||||||
| 43 | Page => $page_number, | ||||||||||||||||||||
| 44 | PageSize => $page_size, | ||||||||||||||||||||
| 45 | }; | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 48 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 49 | } | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 52 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 53 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 54 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 55 | } | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 58 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 59 | return Twilio::Rest::Video::V1::Room::RoomRecordingPage->new($self->{version}, $response, | ||||||||||||||||||||
| 60 | 1 | $self->{solution}); | |||||||||||||||||||
| 61 | } | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | 2 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 64 | 2 | my ($self, $sid) = @_; | |||||||||||||||||||
| 65 | return Twilio::Rest::Video::V1::Room::RoomRecordingContext->new($self->{version}, | ||||||||||||||||||||
| 66 | 2 | $self->{solution}{room_sid}, $sid); | |||||||||||||||||||
| 67 | } | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | package Twilio::Rest::Video::V1::Room::RoomRecordingPage; | ||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | 1 | ▶ | sub records_key { return 'recordings' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 76 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 77 | return Twilio::Rest::Video::V1::Room::RoomRecordingInstance->new($self->{version}, $payload, | ||||||||||||||||||||
| 78 | 1 | $self->{solution}{room_sid}); | |||||||||||||||||||
| 79 | } | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | package Twilio::Rest::Video::V1::Room::RoomRecordingContext; | ||||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 88 | 2 | my ($class, $version, $room_sid, $sid) = @_; | |||||||||||||||||||
| 89 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 90 | 2 | $self->{solution} = { room_sid => $room_sid, sid => $sid }; | |||||||||||||||||||
| 91 | 2 | $self->{uri} = join q{}, '/Rooms/', Twilio::Serialize::path_segment($room_sid), '/Recordings/', | |||||||||||||||||||
| 92 | Twilio::Serialize::path_segment($sid); | ||||||||||||||||||||
| 93 | 2 | return $self; | |||||||||||||||||||
| 94 | } | ||||||||||||||||||||
| 95 | |||||||||||||||||||||
| 96 | 1 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 97 | 1 | my ($self) = @_; | |||||||||||||||||||
| 98 | 1 | $self->{version}->handle_request('DELETE', $self->{uri}, 'delete'); | |||||||||||||||||||
| 99 | 1 | return 1; | |||||||||||||||||||
| 100 | } | ||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 103 | 1 | my ($self) = @_; | |||||||||||||||||||
| 104 | |||||||||||||||||||||
| 105 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 106 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 107 | } | ||||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 110 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 111 | return Twilio::Rest::Video::V1::Room::RoomRecordingInstance->new( | ||||||||||||||||||||
| 112 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 113 | $self->{solution}{room_sid}, $self->{solution}{sid} | ||||||||||||||||||||
| 114 | 1 | ); | |||||||||||||||||||
| 115 | } | ||||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | package Twilio::Rest::Video::V1::Room::RoomRecordingInstance; | ||||||||||||||||||||
| 118 | |||||||||||||||||||||
| 119 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 120 | |||||||||||||||||||||
| 121 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 124 | 2 | my ($class, $version, $payload, $room_sid, $sid) = @_; | |||||||||||||||||||
| 125 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 126 | 2 | ▶ | $self->{solution} = { room_sid => $room_sid, sid => $sid // $self->{properties}{sid} }; | ||||||||||||||||||
|
Condition66%2/3
$sid // $self->{"properties"}{"sid"}
MC/DC0%0/2
$sid // $self->{"properties"}{"sid"}
$sid
$self->{"properties"}{"sid"}
Truth table66%2/3
A // B
A= $sidB= $self->{"properties"}{"sid"}
| |||||||||||||||||||||
| 127 | 2 | return $self; | |||||||||||||||||||
| 128 | } | ||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | 0 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 131 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 132 | 0 | return $self->_context->delete(@arguments); | |||||||||||||||||||
| 133 | } | ||||||||||||||||||||
| 134 | |||||||||||||||||||||
| 135 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 136 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 137 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 138 | } | ||||||||||||||||||||
| 139 | |||||||||||||||||||||
| 140 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 141 | 0 | my ($self) = @_; | |||||||||||||||||||
| 142 | return Twilio::Rest::Video::V1::Room::RoomRecordingContext->new( | ||||||||||||||||||||
| 143 | $self->{version}, | ||||||||||||||||||||
| 144 | $self->{solution}{room_sid}, | ||||||||||||||||||||
| 145 | $self->{solution}{sid} | ||||||||||||||||||||
| 146 | 0 | ); | |||||||||||||||||||
| 147 | } | ||||||||||||||||||||
| 148 | |||||||||||||||||||||
| 149 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 150 | 2 | ▶ | sub codec { return $_[0]{properties}{codec} } | ||||||||||||||||||
|
Subroutine
codec: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 151 | 2 | ▶ | sub container_format { return $_[0]{properties}{container_format} } | ||||||||||||||||||
|
Subroutine
container_format: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 152 | 2 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 153 | 2 | ▶ | sub duration { return $_[0]{properties}{duration} } | ||||||||||||||||||
|
Subroutine
duration: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 154 | 2 | ▶ | sub grouping_sids { return $_[0]{properties}{grouping_sids} } | ||||||||||||||||||
|
Subroutine
grouping_sids: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 155 | 2 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 156 | 2 | ▶ | sub media_external_location { return $_[0]{properties}{media_external_location} } | ||||||||||||||||||
|
Subroutine
media_external_location: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 157 | 2 | ▶ | sub offset { return $_[0]{properties}{offset} } | ||||||||||||||||||
|
Subroutine
offset: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 158 | 2 | ▶ | sub room_sid { return $_[0]{properties}{room_sid} } | ||||||||||||||||||
|
Subroutine
room_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 159 | 2 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 160 | 2 | ▶ | sub size { return $_[0]{properties}{size} } | ||||||||||||||||||
|
Subroutine
size: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 161 | 2 | ▶ | sub source_sid { return $_[0]{properties}{source_sid} } | ||||||||||||||||||
|
Subroutine
source_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 162 | 2 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 163 | 2 | ▶ | sub track_name { return $_[0]{properties}{track_name} } | ||||||||||||||||||
|
Subroutine
track_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 164 | 2 | ▶ | sub type { return $_[0]{properties}{type} } | ||||||||||||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 165 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 166 | |||||||||||||||||||||
| 167 | 2 | 1; | |||||||||||||||||||
| 168 | |||||||||||||||||||||
| 169 | __END__ | ||||||||||||||||||||