« Twilio/Rest/Video/V1/Room/Transcriptions.pm
↑ Summary
Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelParticipant.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Proxy::V1::Service::Session::Participant; | ||||||||||||||||||||
| 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::Proxy::V1::Service::Session::ParticipantList; | ||||||||||||||||||||
| 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 | 7 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 7 | my ($class, $version, $service_sid, $session_sid) = @_; | |||||||||||||||||||
| 17 | 7 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 7 | $self->{solution} = { service_sid => $service_sid, session_sid => $session_sid }; | |||||||||||||||||||
| 19 | 7 | $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($service_sid), | |||||||||||||||||||
| 20 | '/Sessions/', Twilio::Serialize::path_segment($session_sid), '/Participants'; | ||||||||||||||||||||
| 21 | 7 | return $self; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 25 | 1 | my ($self, $identifier, $options) = @_; | |||||||||||||||||||
| 26 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | my $data = { | ||||||||||||||||||||
| 29 | Identifier => $identifier, | ||||||||||||||||||||
| 30 | FriendlyName => $options->{friendly_name}, | ||||||||||||||||||||
| 31 | ProxyIdentifier => $options->{proxy_identifier}, | ||||||||||||||||||||
| 32 | ProxyIdentifierSid => $options->{proxy_identifier_sid}, | ||||||||||||||||||||
| 33 | 1 | }; | |||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | my $response = | ||||||||||||||||||||
| 36 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||||||||||
| 37 | return Twilio::Rest::Proxy::V1::Service::Session::ParticipantInstance->new( | ||||||||||||||||||||
| 38 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 39 | $self->{solution}{service_sid}, | ||||||||||||||||||||
| 40 | $self->{solution}{session_sid} | ||||||||||||||||||||
| 41 | 1 | ); | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 45 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 46 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 50 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 51 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 52 | } | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 55 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 56 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | 1 | my $params = { | |||||||||||||||||||
| 59 | PageToken => $page_token, | ||||||||||||||||||||
| 60 | Page => $page_number, | ||||||||||||||||||||
| 61 | PageSize => $page_size, | ||||||||||||||||||||
| 62 | }; | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 65 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 66 | } | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 69 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 70 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 71 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 72 | } | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 75 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 76 | return Twilio::Rest::Proxy::V1::Service::Session::ParticipantPage->new($self->{version}, | ||||||||||||||||||||
| 77 | 1 | $response, $self->{solution}); | |||||||||||||||||||
| 78 | } | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 5 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 81 | 5 | my ($self, $sid) = @_; | |||||||||||||||||||
| 82 | return Twilio::Rest::Proxy::V1::Service::Session::ParticipantContext->new( | ||||||||||||||||||||
| 83 | $self->{version}, | ||||||||||||||||||||
| 84 | $self->{solution}{service_sid}, | ||||||||||||||||||||
| 85 | 5 | $self->{solution}{session_sid}, $sid | |||||||||||||||||||
| 86 | ); | ||||||||||||||||||||
| 87 | } | ||||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | package Twilio::Rest::Proxy::V1::Service::Session::ParticipantPage; | ||||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | 1 | ▶ | sub records_key { return 'participants' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 96 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 97 | return Twilio::Rest::Proxy::V1::Service::Session::ParticipantInstance->new( | ||||||||||||||||||||
| 98 | $self->{version}, $payload, | ||||||||||||||||||||
| 99 | $self->{solution}{service_sid}, | ||||||||||||||||||||
| 100 | $self->{solution}{session_sid} | ||||||||||||||||||||
| 101 | 1 | ); | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | package Twilio::Rest::Proxy::V1::Service::Session::ParticipantContext; | ||||||||||||||||||||
| 105 | |||||||||||||||||||||
| 106 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 107 | |||||||||||||||||||||
| 108 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | 5 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 111 | 5 | my ($class, $version, $service_sid, $session_sid, $sid) = @_; | |||||||||||||||||||
| 112 | 5 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 113 | 5 | $self->{solution} = { service_sid => $service_sid, session_sid => $session_sid, sid => $sid }; | |||||||||||||||||||
| 114 | 5 | $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($service_sid), | |||||||||||||||||||
| 115 | '/Sessions/', Twilio::Serialize::path_segment($session_sid), '/Participants/', | ||||||||||||||||||||
| 116 | Twilio::Serialize::path_segment($sid); | ||||||||||||||||||||
| 117 | 5 | return $self; | |||||||||||||||||||
| 118 | } | ||||||||||||||||||||
| 119 | |||||||||||||||||||||
| 120 | 1 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 121 | 1 | my ($self) = @_; | |||||||||||||||||||
| 122 | 1 | $self->{version}->handle_request('DELETE', $self->{uri}, 'delete'); | |||||||||||||||||||
| 123 | 1 | return 1; | |||||||||||||||||||
| 124 | } | ||||||||||||||||||||
| 125 | |||||||||||||||||||||
| 126 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 127 | 1 | my ($self) = @_; | |||||||||||||||||||
| 128 | |||||||||||||||||||||
| 129 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 130 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 131 | } | ||||||||||||||||||||
| 132 | |||||||||||||||||||||
| 133 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 134 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 135 | return Twilio::Rest::Proxy::V1::Service::Session::ParticipantInstance->new( | ||||||||||||||||||||
| 136 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 137 | $self->{solution}{service_sid}, | ||||||||||||||||||||
| 138 | $self->{solution}{session_sid}, | ||||||||||||||||||||
| 139 | $self->{solution}{sid} | ||||||||||||||||||||
| 140 | 1 | ); | |||||||||||||||||||
| 141 | } | ||||||||||||||||||||
| 142 | |||||||||||||||||||||
| 143 | 3 | ▶ | sub message_interactions { | ||||||||||||||||||
|
Subroutine
message_interactions: called CC=2 SCAR=6.9
| |||||||||||||||||||||
| 144 | 3 | my ($self, $sid) = @_; | |||||||||||||||||||
| 145 | 3 | require Twilio::Rest::Proxy::V1::Service::Session::Participant::MessageInteraction; | |||||||||||||||||||
| 146 | my $list = Twilio::Rest::Proxy::V1::Service::Session::Participant::MessageInteractionList->new( | ||||||||||||||||||||
| 147 | $self->{version}, | ||||||||||||||||||||
| 148 | $self->{solution}{service_sid}, | ||||||||||||||||||||
| 149 | $self->{solution}{session_sid}, | ||||||||||||||||||||
| 150 | $self->{solution}{sid} | ||||||||||||||||||||
| 151 | 3 | ); | |||||||||||||||||||
| 152 | 3 | ▶ | return defined $sid ? $list->get_context($sid) : $list; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 153 | } | ||||||||||||||||||||
| 154 | |||||||||||||||||||||
| 155 | package Twilio::Rest::Proxy::V1::Service::Session::ParticipantInstance; | ||||||||||||||||||||
| 156 | |||||||||||||||||||||
| 157 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 158 | |||||||||||||||||||||
| 159 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 160 | |||||||||||||||||||||
| 161 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 162 | 3 | my ($class, $version, $payload, $service_sid, $session_sid, $sid) = @_; | |||||||||||||||||||
| 163 | 3 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 164 | $self->{solution} = { | ||||||||||||||||||||
| 165 | service_sid => $service_sid, | ||||||||||||||||||||
| 166 | session_sid => $session_sid, | ||||||||||||||||||||
| 167 | sid => $sid // $self->{properties}{sid} | ||||||||||||||||||||
| 168 | 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"}
| |||||||||||||||||||||
| 169 | 3 | return $self; | |||||||||||||||||||
| 170 | } | ||||||||||||||||||||
| 171 | |||||||||||||||||||||
| 172 | 0 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 173 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 174 | 0 | return $self->_context->delete(@arguments); | |||||||||||||||||||
| 175 | } | ||||||||||||||||||||
| 176 | |||||||||||||||||||||
| 177 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 178 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 179 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 180 | } | ||||||||||||||||||||
| 181 | |||||||||||||||||||||
| 182 | 0 | ▶ | sub message_interactions { | ||||||||||||||||||
|
Subroutine
message_interactions: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 183 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 184 | 0 | return $self->_context->message_interactions(@arguments); | |||||||||||||||||||
| 185 | } | ||||||||||||||||||||
| 186 | |||||||||||||||||||||
| 187 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 188 | 0 | my ($self) = @_; | |||||||||||||||||||
| 189 | return Twilio::Rest::Proxy::V1::Service::Session::ParticipantContext->new( | ||||||||||||||||||||
| 190 | $self->{version}, | ||||||||||||||||||||
| 191 | $self->{solution}{service_sid}, | ||||||||||||||||||||
| 192 | $self->{solution}{session_sid}, | ||||||||||||||||||||
| 193 | $self->{solution}{sid} | ||||||||||||||||||||
| 194 | 0 | ); | |||||||||||||||||||
| 195 | } | ||||||||||||||||||||
| 196 | |||||||||||||||||||||
| 197 | 3 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 198 | 3 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 199 | 3 | ▶ | sub date_deleted { return Twilio::Deserialize::date_time($_[0]{properties}{date_deleted}) } | ||||||||||||||||||
|
Subroutine
date_deleted: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 200 | 3 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 201 | 3 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 202 | 3 | ▶ | sub identifier { return $_[0]{properties}{identifier} } | ||||||||||||||||||
|
Subroutine
identifier: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 203 | 3 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 204 | 3 | ▶ | sub proxy_identifier { return $_[0]{properties}{proxy_identifier} } | ||||||||||||||||||
|
Subroutine
proxy_identifier: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 205 | 3 | ▶ | sub proxy_identifier_sid { return $_[0]{properties}{proxy_identifier_sid} } | ||||||||||||||||||
|
Subroutine
proxy_identifier_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 206 | 3 | ▶ | sub service_sid { return $_[0]{properties}{service_sid} } | ||||||||||||||||||
|
Subroutine
service_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 207 | 3 | ▶ | sub session_sid { return $_[0]{properties}{session_sid} } | ||||||||||||||||||
|
Subroutine
session_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 208 | 3 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 209 | 3 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 210 | |||||||||||||||||||||
| 211 | 2 | 1; | |||||||||||||||||||
| 212 | |||||||||||||||||||||
| 213 | __END__ | ||||||||||||||||||||