« Twilio/Rest/Voice/V1/DialingPermissions/Country.pm
↑ Summary
Twilio/Rest/Conversations/V1/Service/User/UserConversation.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Api::V2010::Account::Conference::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::Api::V2010::Account::Conference::RecordingList; | ||||||||||||||||||||
| 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 | 4 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 4 | my ($class, $version, $account_sid, $conference_sid) = @_; | |||||||||||||||||||
| 17 | 4 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 4 | $self->{solution} = { account_sid => $account_sid, conference_sid => $conference_sid }; | |||||||||||||||||||
| 19 | 4 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |||||||||||||||||||
| 20 | '/Conferences/', Twilio::Serialize::path_segment($conference_sid), '/Recordings.json'; | ||||||||||||||||||||
| 21 | 4 | return $self; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 25 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 26 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 30 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 31 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 35 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 36 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | my $params = { | ||||||||||||||||||||
| 39 | DateCreated => Twilio::Serialize::iso8601_date($options->{date_created}), | ||||||||||||||||||||
| 40 | 'DateCreated<' => Twilio::Serialize::iso8601_date($options->{date_created_before}), | ||||||||||||||||||||
| 41 | 1 | 'DateCreated>' => Twilio::Serialize::iso8601_date($options->{date_created_after}), | |||||||||||||||||||
| 42 | 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::Api::V2010::Account::Conference::RecordingPage->new($self->{version}, | ||||||||||||||||||||
| 60 | 1 | $response, $self->{solution}); | |||||||||||||||||||
| 61 | } | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | 3 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 64 | 3 | my ($self, $sid) = @_; | |||||||||||||||||||
| 65 | return Twilio::Rest::Api::V2010::Account::Conference::RecordingContext->new( | ||||||||||||||||||||
| 66 | $self->{version}, | ||||||||||||||||||||
| 67 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 68 | 3 | $self->{solution}{conference_sid}, $sid | |||||||||||||||||||
| 69 | ); | ||||||||||||||||||||
| 70 | } | ||||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | package Twilio::Rest::Api::V2010::Account::Conference::RecordingPage; | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | 1 | ▶ | sub records_key { return 'recordings' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 79 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 80 | return Twilio::Rest::Api::V2010::Account::Conference::RecordingInstance->new( | ||||||||||||||||||||
| 81 | $self->{version}, $payload, | ||||||||||||||||||||
| 82 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 83 | $self->{solution}{conference_sid} | ||||||||||||||||||||
| 84 | 1 | ); | |||||||||||||||||||
| 85 | } | ||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | package Twilio::Rest::Api::V2010::Account::Conference::RecordingContext; | ||||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 94 | 3 | my ($class, $version, $account_sid, $conference_sid, $sid) = @_; | |||||||||||||||||||
| 95 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 96 | $self->{solution} = | ||||||||||||||||||||
| 97 | 3 | { account_sid => $account_sid, conference_sid => $conference_sid, sid => $sid }; | |||||||||||||||||||
| 98 | 3 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), | |||||||||||||||||||
| 99 | '/Conferences/', Twilio::Serialize::path_segment($conference_sid), '/Recordings/', | ||||||||||||||||||||
| 100 | Twilio::Serialize::path_segment($sid), '.json'; | ||||||||||||||||||||
| 101 | 3 | return $self; | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | 1 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 105 | 1 | my ($self) = @_; | |||||||||||||||||||
| 106 | 1 | $self->{version}->handle_request('DELETE', $self->{uri}, 'delete'); | |||||||||||||||||||
| 107 | 1 | return 1; | |||||||||||||||||||
| 108 | } | ||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 111 | 1 | my ($self) = @_; | |||||||||||||||||||
| 112 | |||||||||||||||||||||
| 113 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 114 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 115 | } | ||||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 118 | 1 | my ($self, $status, $options) = @_; | |||||||||||||||||||
| 119 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 120 | |||||||||||||||||||||
| 121 | my $data = { | ||||||||||||||||||||
| 122 | Status => $status, | ||||||||||||||||||||
| 123 | PauseBehavior => $options->{pause_behavior}, | ||||||||||||||||||||
| 124 | 1 | }; | |||||||||||||||||||
| 125 | |||||||||||||||||||||
| 126 | my $response = | ||||||||||||||||||||
| 127 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||||||||||
| 128 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 129 | } | ||||||||||||||||||||
| 130 | |||||||||||||||||||||
| 131 | 2 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 132 | 2 | my ($self, $response) = @_; | |||||||||||||||||||
| 133 | return Twilio::Rest::Api::V2010::Account::Conference::RecordingInstance->new( | ||||||||||||||||||||
| 134 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 135 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 136 | $self->{solution}{conference_sid}, | ||||||||||||||||||||
| 137 | $self->{solution}{sid} | ||||||||||||||||||||
| 138 | 2 | ); | |||||||||||||||||||
| 139 | } | ||||||||||||||||||||
| 140 | |||||||||||||||||||||
| 141 | package Twilio::Rest::Api::V2010::Account::Conference::RecordingInstance; | ||||||||||||||||||||
| 142 | |||||||||||||||||||||
| 143 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 144 | |||||||||||||||||||||
| 145 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 146 | |||||||||||||||||||||
| 147 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 148 | 3 | my ($class, $version, $payload, $account_sid, $conference_sid, $sid) = @_; | |||||||||||||||||||
| 149 | 3 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 150 | $self->{solution} = { | ||||||||||||||||||||
| 151 | account_sid => $account_sid, | ||||||||||||||||||||
| 152 | conference_sid => $conference_sid, | ||||||||||||||||||||
| 153 | sid => $sid // $self->{properties}{sid} | ||||||||||||||||||||
| 154 | 3 | ▶ | }; | ||||||||||||||||||
|
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"}
| |||||||||||||||||||||
| 155 | 3 | return $self; | |||||||||||||||||||
| 156 | } | ||||||||||||||||||||
| 157 | |||||||||||||||||||||
| 158 | 0 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 159 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 160 | 0 | return $self->_context->delete(@arguments); | |||||||||||||||||||
| 161 | } | ||||||||||||||||||||
| 162 | |||||||||||||||||||||
| 163 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 164 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 165 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 166 | } | ||||||||||||||||||||
| 167 | |||||||||||||||||||||
| 168 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 169 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 170 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 171 | } | ||||||||||||||||||||
| 172 | |||||||||||||||||||||
| 173 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 174 | 0 | my ($self) = @_; | |||||||||||||||||||
| 175 | return Twilio::Rest::Api::V2010::Account::Conference::RecordingContext->new( | ||||||||||||||||||||
| 176 | $self->{version}, | ||||||||||||||||||||
| 177 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 178 | $self->{solution}{conference_sid}, | ||||||||||||||||||||
| 179 | $self->{solution}{sid} | ||||||||||||||||||||
| 180 | 0 | ); | |||||||||||||||||||
| 181 | } | ||||||||||||||||||||
| 182 | |||||||||||||||||||||
| 183 | 3 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 184 | 3 | ▶ | sub api_version { return $_[0]{properties}{api_version} } | ||||||||||||||||||
|
Subroutine
api_version: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 185 | 3 | ▶ | sub call_sid { return $_[0]{properties}{call_sid} } | ||||||||||||||||||
|
Subroutine
call_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 186 | 3 | ▶ | sub channels { return $_[0]{properties}{channels} } | ||||||||||||||||||
|
Subroutine
channels: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 187 | 3 | ▶ | sub conference_sid { return $_[0]{properties}{conference_sid} } | ||||||||||||||||||
|
Subroutine
conference_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 188 | 3 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 189 | 3 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 190 | 3 | ▶ | sub duration { return $_[0]{properties}{duration} } | ||||||||||||||||||
|
Subroutine
duration: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 191 | 3 | ▶ | sub encryption_details { return $_[0]{properties}{encryption_details} } | ||||||||||||||||||
|
Subroutine
encryption_details: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 192 | 3 | ▶ | sub error_code { return $_[0]{properties}{error_code} } | ||||||||||||||||||
|
Subroutine
error_code: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 193 | 3 | ▶ | sub price { return $_[0]{properties}{price} } | ||||||||||||||||||
|
Subroutine
price: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 194 | 3 | ▶ | sub price_unit { return $_[0]{properties}{price_unit} } | ||||||||||||||||||
|
Subroutine
price_unit: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 195 | 3 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 196 | 3 | ▶ | sub source { return $_[0]{properties}{source} } | ||||||||||||||||||
|
Subroutine
source: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 197 | 3 | ▶ | sub start_time { return Twilio::Deserialize::date_time($_[0]{properties}{start_time}) } | ||||||||||||||||||
|
Subroutine
start_time: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 198 | 3 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 199 | 3 | ▶ | sub uri { return $_[0]{properties}{uri} } | ||||||||||||||||||
|
Subroutine
uri: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 200 | |||||||||||||||||||||
| 201 | 2 | 1; | |||||||||||||||||||
| 202 | |||||||||||||||||||||
| 203 | __END__ | ||||||||||||||||||||