« Twilio/Rest/FlexApi/V1/PluginConfigurationArchive.pm
↑ Summary
Twilio/Rest/Verify/V2/Service/Verification.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Chat::V3::Channel; | ||||||||||||||||||||
| 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::Chat::V3::ChannelList; | ||||||||||||||||||||
| 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 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 1 | my ($class, $version, $service_sid) = @_; | |||||||||||||||||||
| 17 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 1 | $self->{solution} = { service_sid => $service_sid }; | |||||||||||||||||||
| 19 | 1 | $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($service_sid), '/Channels'; | |||||||||||||||||||
| 20 | 1 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 24 | 1 | my ($self, $sid) = @_; | |||||||||||||||||||
| 25 | return Twilio::Rest::Chat::V3::ChannelContext->new($self->{version}, | ||||||||||||||||||||
| 26 | 1 | $self->{solution}{service_sid}, $sid); | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | package Twilio::Rest::Chat::V3::ChannelContext; | ||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 36 | 1 | my ($class, $version, $service_sid, $sid) = @_; | |||||||||||||||||||
| 37 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 38 | 1 | $self->{solution} = { service_sid => $service_sid, sid => $sid }; | |||||||||||||||||||
| 39 | 1 | $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($service_sid), | |||||||||||||||||||
| 40 | '/Channels/', Twilio::Serialize::path_segment($sid); | ||||||||||||||||||||
| 41 | 1 | return $self; | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 45 | 1 | my ($self, $options) = @_; | |||||||||||||||||||
| 46 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | my $data = { | ||||||||||||||||||||
| 49 | MessagingServiceSid => $options->{messaging_service_sid}, | ||||||||||||||||||||
| 50 | Type => $options->{type}, | ||||||||||||||||||||
| 51 | 1 | }; | |||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | my $response = $self->{version}->handle_request( | ||||||||||||||||||||
| 54 | 'POST', | ||||||||||||||||||||
| 55 | $self->{uri}, | ||||||||||||||||||||
| 56 | 'update', | ||||||||||||||||||||
| 57 | { | ||||||||||||||||||||
| 58 | data => $data, | ||||||||||||||||||||
| 59 | headers => { 'X-Twilio-Webhook-Enabled' => $options->{x_twilio_webhook_enabled}, } | ||||||||||||||||||||
| 60 | } | ||||||||||||||||||||
| 61 | 1 | ); | |||||||||||||||||||
| 62 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 63 | } | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 66 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 67 | return Twilio::Rest::Chat::V3::ChannelInstance->new( | ||||||||||||||||||||
| 68 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 69 | $self->{solution}{service_sid}, $self->{solution}{sid} | ||||||||||||||||||||
| 70 | 1 | ); | |||||||||||||||||||
| 71 | } | ||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | package Twilio::Rest::Chat::V3::ChannelInstance; | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.4
| |||||||||||||||||||||
| 80 | 1 | my ($class, $version, $payload, $service_sid, $sid) = @_; | |||||||||||||||||||
| 81 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 82 | 1 | ▶ | $self->{solution} = { service_sid => $service_sid, sid => $sid // $self->{properties}{sid} }; | ||||||||||||||||||
|
Condition33%1/3
$sid // $self->{"properties"}{"sid"}
MC/DC0%0/2
$sid // $self->{"properties"}{"sid"}
$sid
$self->{"properties"}{"sid"}
Truth table33%1/3
A // B
A= $sidB= $self->{"properties"}{"sid"}
| |||||||||||||||||||||
| 83 | 1 | return $self; | |||||||||||||||||||
| 84 | } | ||||||||||||||||||||
| 85 | |||||||||||||||||||||
| 86 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 87 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 88 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 89 | } | ||||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 92 | 0 | my ($self) = @_; | |||||||||||||||||||
| 93 | return Twilio::Rest::Chat::V3::ChannelContext->new( | ||||||||||||||||||||
| 94 | $self->{version}, | ||||||||||||||||||||
| 95 | $self->{solution}{service_sid}, | ||||||||||||||||||||
| 96 | $self->{solution}{sid} | ||||||||||||||||||||
| 97 | 0 | ); | |||||||||||||||||||
| 98 | } | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 101 | 1 | ▶ | sub attributes { return $_[0]{properties}{attributes} } | ||||||||||||||||||
|
Subroutine
attributes: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 102 | 1 | ▶ | sub created_by { return $_[0]{properties}{created_by} } | ||||||||||||||||||
|
Subroutine
created_by: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 103 | 1 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 104 | 1 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 105 | 1 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 106 | 1 | ▶ | sub members_count { return $_[0]{properties}{members_count} } | ||||||||||||||||||
|
Subroutine
members_count: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 107 | 1 | ▶ | sub messages_count { return $_[0]{properties}{messages_count} } | ||||||||||||||||||
|
Subroutine
messages_count: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 108 | 1 | ▶ | sub messaging_service_sid { return $_[0]{properties}{messaging_service_sid} } | ||||||||||||||||||
|
Subroutine
messaging_service_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 109 | 1 | ▶ | sub service_sid { return $_[0]{properties}{service_sid} } | ||||||||||||||||||
|
Subroutine
service_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 110 | 1 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 111 | 1 | ▶ | sub type { return $_[0]{properties}{type} } | ||||||||||||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 112 | 1 | ▶ | sub unique_name { return $_[0]{properties}{unique_name} } | ||||||||||||||||||
|
Subroutine
unique_name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | 1 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 114 | |||||||||||||||||||||
| 115 | 2 | 1; | |||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | __END__ | ||||||||||||||||||||