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