« Twilio/Rest/Proxy/V1/Service/Session/Participant.pm
↑ Summary
Twilio/Rest/FlexApi/V1/Plugin/PluginVersions.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipant; | ||||||||||||||||||||
| 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::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantList; | ||||||||||||||||||||
| 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, $interaction_sid, $channel_sid) = @_; | |||||||||||||||||||
| 17 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 3 | $self->{solution} = { interaction_sid => $interaction_sid, channel_sid => $channel_sid }; | |||||||||||||||||||
| 19 | 3 | $self->{uri} = join q{}, '/Interactions/', Twilio::Serialize::path_segment($interaction_sid), | |||||||||||||||||||
| 20 | '/Channels/', Twilio::Serialize::path_segment($channel_sid), '/Participants'; | ||||||||||||||||||||
| 21 | 3 | return $self; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 25 | 1 | my ($self, $type, $media_properties, $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 | Type => $type, | ||||||||||||||||||||
| 30 | MediaProperties => Twilio::Serialize::json_object($media_properties), | ||||||||||||||||||||
| 31 | 1 | RoutingProperties => Twilio::Serialize::json_object($options->{routing_properties}), | |||||||||||||||||||
| 32 | }; | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | my $response = | ||||||||||||||||||||
| 35 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||||||||||
| 36 | return | ||||||||||||||||||||
| 37 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantInstance | ||||||||||||||||||||
| 38 | ->new( | ||||||||||||||||||||
| 39 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 40 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 41 | $self->{solution}{channel_sid} | ||||||||||||||||||||
| 42 | 1 | ); | |||||||||||||||||||
| 43 | } | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 46 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 47 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 48 | } | ||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 51 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 52 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 56 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 57 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | 1 | my $params = { | |||||||||||||||||||
| 60 | PageToken => $page_token, | ||||||||||||||||||||
| 61 | Page => $page_number, | ||||||||||||||||||||
| 62 | PageSize => $page_size, | ||||||||||||||||||||
| 63 | }; | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 66 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 67 | } | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 70 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 71 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 72 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 73 | } | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 76 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 77 | return | ||||||||||||||||||||
| 78 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantPage | ||||||||||||||||||||
| 79 | 1 | ->new($self->{version}, $response, $self->{solution}); | |||||||||||||||||||
| 80 | } | ||||||||||||||||||||
| 81 | |||||||||||||||||||||
| 82 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 83 | 1 | my ($self, $sid) = @_; | |||||||||||||||||||
| 84 | return | ||||||||||||||||||||
| 85 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantContext | ||||||||||||||||||||
| 86 | ->new( | ||||||||||||||||||||
| 87 | $self->{version}, | ||||||||||||||||||||
| 88 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 89 | 1 | $self->{solution}{channel_sid}, $sid | |||||||||||||||||||
| 90 | ); | ||||||||||||||||||||
| 91 | } | ||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantPage; | ||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 96 | |||||||||||||||||||||
| 97 | 1 | ▶ | sub records_key { return 'participants' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 98 | |||||||||||||||||||||
| 99 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 100 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 101 | return | ||||||||||||||||||||
| 102 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantInstance | ||||||||||||||||||||
| 103 | ->new( | ||||||||||||||||||||
| 104 | $self->{version}, $payload, | ||||||||||||||||||||
| 105 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 106 | $self->{solution}{channel_sid} | ||||||||||||||||||||
| 107 | 1 | ); | |||||||||||||||||||
| 108 | } | ||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantContext; | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 115 | |||||||||||||||||||||
| 116 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 117 | 1 | my ($class, $version, $interaction_sid, $channel_sid, $sid) = @_; | |||||||||||||||||||
| 118 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 119 | $self->{solution} = | ||||||||||||||||||||
| 120 | 1 | { interaction_sid => $interaction_sid, channel_sid => $channel_sid, sid => $sid }; | |||||||||||||||||||
| 121 | 1 | $self->{uri} = join q{}, '/Interactions/', Twilio::Serialize::path_segment($interaction_sid), | |||||||||||||||||||
| 122 | '/Channels/', Twilio::Serialize::path_segment($channel_sid), '/Participants/', | ||||||||||||||||||||
| 123 | Twilio::Serialize::path_segment($sid); | ||||||||||||||||||||
| 124 | 1 | return $self; | |||||||||||||||||||
| 125 | } | ||||||||||||||||||||
| 126 | |||||||||||||||||||||
| 127 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 128 | 1 | my ($self, $status) = @_; | |||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | 1 | my $data = { Status => $status, }; | |||||||||||||||||||
| 131 | |||||||||||||||||||||
| 132 | my $response = | ||||||||||||||||||||
| 133 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||||||||||
| 134 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 135 | } | ||||||||||||||||||||
| 136 | |||||||||||||||||||||
| 137 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 138 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 139 | return | ||||||||||||||||||||
| 140 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantInstance | ||||||||||||||||||||
| 141 | ->new( | ||||||||||||||||||||
| 142 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 143 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 144 | $self->{solution}{channel_sid}, | ||||||||||||||||||||
| 145 | $self->{solution}{sid} | ||||||||||||||||||||
| 146 | 1 | ); | |||||||||||||||||||
| 147 | } | ||||||||||||||||||||
| 148 | |||||||||||||||||||||
| 149 | package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantInstance; | ||||||||||||||||||||
| 150 | |||||||||||||||||||||
| 151 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 152 | |||||||||||||||||||||
| 153 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 154 | |||||||||||||||||||||
| 155 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 156 | 3 | my ($class, $version, $payload, $interaction_sid, $channel_sid, $sid) = @_; | |||||||||||||||||||
| 157 | 3 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 158 | $self->{solution} = { | ||||||||||||||||||||
| 159 | interaction_sid => $interaction_sid, | ||||||||||||||||||||
| 160 | channel_sid => $channel_sid, | ||||||||||||||||||||
| 161 | sid => $sid // $self->{properties}{sid} | ||||||||||||||||||||
| 162 | 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"}
| |||||||||||||||||||||
| 163 | 3 | return $self; | |||||||||||||||||||
| 164 | } | ||||||||||||||||||||
| 165 | |||||||||||||||||||||
| 166 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 167 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 168 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 169 | } | ||||||||||||||||||||
| 170 | |||||||||||||||||||||
| 171 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 172 | 0 | my ($self) = @_; | |||||||||||||||||||
| 173 | return | ||||||||||||||||||||
| 174 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelParticipantContext | ||||||||||||||||||||
| 175 | ->new( | ||||||||||||||||||||
| 176 | $self->{version}, | ||||||||||||||||||||
| 177 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 178 | $self->{solution}{channel_sid}, | ||||||||||||||||||||
| 179 | $self->{solution}{sid} | ||||||||||||||||||||
| 180 | 0 | ); | |||||||||||||||||||
| 181 | } | ||||||||||||||||||||
| 182 | |||||||||||||||||||||
| 183 | 3 | ▶ | sub channel_sid { return $_[0]{properties}{channel_sid} } | ||||||||||||||||||
|
Subroutine
channel_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 184 | 3 | ▶ | sub interaction_sid { return $_[0]{properties}{interaction_sid} } | ||||||||||||||||||
|
Subroutine
interaction_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 185 | 3 | ▶ | sub routing_properties { return $_[0]{properties}{routing_properties} } | ||||||||||||||||||
|
Subroutine
routing_properties: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 186 | 3 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 187 | 3 | ▶ | sub type { return $_[0]{properties}{type} } | ||||||||||||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 188 | 3 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 189 | |||||||||||||||||||||
| 190 | 2 | 1; | |||||||||||||||||||
| 191 | |||||||||||||||||||||
| 192 | __END__ | ||||||||||||||||||||