« Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociation.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/Local.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::InteractionTransfer; | ||||||||||||||||||||
| 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::InteractionTransferList; | ||||||||||||||||||||
| 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), '/Transfers'; | ||||||||||||||||||||
| 21 | 3 | return $self; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 25 | 1 | my ($self, $body) = @_; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 1 | my $data = Twilio::Serialize::json_body($body, {}); | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | my $response = $self->{version}->handle_request( | ||||||||||||||||||||
| 30 | 'POST', | ||||||||||||||||||||
| 31 | $self->{uri}, | ||||||||||||||||||||
| 32 | 1 | 'create', | |||||||||||||||||||
| 33 | { | ||||||||||||||||||||
| 34 | data => $data, | ||||||||||||||||||||
| 35 | headers => { 'Content-Type' => 'application/json', } | ||||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | ); | ||||||||||||||||||||
| 38 | return | ||||||||||||||||||||
| 39 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionTransferInstance->new( | ||||||||||||||||||||
| 40 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 41 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 42 | $self->{solution}{channel_sid} | ||||||||||||||||||||
| 43 | 1 | ); | |||||||||||||||||||
| 44 | } | ||||||||||||||||||||
| 45 | |||||||||||||||||||||
| 46 | 2 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 47 | 2 | my ($self, $sid) = @_; | |||||||||||||||||||
| 48 | return | ||||||||||||||||||||
| 49 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionTransferContext->new( | ||||||||||||||||||||
| 50 | $self->{version}, | ||||||||||||||||||||
| 51 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 52 | 2 | $self->{solution}{channel_sid}, $sid | |||||||||||||||||||
| 53 | ); | ||||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionTransferContext; | ||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 63 | 2 | my ($class, $version, $interaction_sid, $channel_sid, $sid) = @_; | |||||||||||||||||||
| 64 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 65 | $self->{solution} = | ||||||||||||||||||||
| 66 | 2 | { interaction_sid => $interaction_sid, channel_sid => $channel_sid, sid => $sid }; | |||||||||||||||||||
| 67 | 2 | $self->{uri} = join q{}, '/Interactions/', Twilio::Serialize::path_segment($interaction_sid), | |||||||||||||||||||
| 68 | '/Channels/', Twilio::Serialize::path_segment($channel_sid), '/Transfers/', | ||||||||||||||||||||
| 69 | Twilio::Serialize::path_segment($sid); | ||||||||||||||||||||
| 70 | 2 | return $self; | |||||||||||||||||||
| 71 | } | ||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 74 | 1 | my ($self) = @_; | |||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 77 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 78 | } | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 81 | 1 | my ($self, $body) = @_; | |||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | 1 | my $data = Twilio::Serialize::json_body($body, {}); | |||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | my $response = $self->{version}->handle_request( | ||||||||||||||||||||
| 86 | 'POST', | ||||||||||||||||||||
| 87 | $self->{uri}, | ||||||||||||||||||||
| 88 | 1 | 'update', | |||||||||||||||||||
| 89 | { | ||||||||||||||||||||
| 90 | data => $data, | ||||||||||||||||||||
| 91 | headers => { 'Content-Type' => 'application/json', } | ||||||||||||||||||||
| 92 | } | ||||||||||||||||||||
| 93 | ); | ||||||||||||||||||||
| 94 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 95 | } | ||||||||||||||||||||
| 96 | |||||||||||||||||||||
| 97 | 2 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 98 | 2 | my ($self, $response) = @_; | |||||||||||||||||||
| 99 | return | ||||||||||||||||||||
| 100 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionTransferInstance->new( | ||||||||||||||||||||
| 101 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 102 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 103 | $self->{solution}{channel_sid}, | ||||||||||||||||||||
| 104 | $self->{solution}{sid} | ||||||||||||||||||||
| 105 | 2 | ); | |||||||||||||||||||
| 106 | } | ||||||||||||||||||||
| 107 | |||||||||||||||||||||
| 108 | package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionTransferInstance; | ||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 115 | 3 | my ($class, $version, $payload, $interaction_sid, $channel_sid, $sid) = @_; | |||||||||||||||||||
| 116 | 3 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 117 | $self->{solution} = { | ||||||||||||||||||||
| 118 | interaction_sid => $interaction_sid, | ||||||||||||||||||||
| 119 | channel_sid => $channel_sid, | ||||||||||||||||||||
| 120 | sid => $sid // $self->{properties}{sid} | ||||||||||||||||||||
| 121 | 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"}
| |||||||||||||||||||||
| 122 | 3 | return $self; | |||||||||||||||||||
| 123 | } | ||||||||||||||||||||
| 124 | |||||||||||||||||||||
| 125 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 126 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 127 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 128 | } | ||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 131 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 132 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 133 | } | ||||||||||||||||||||
| 134 | |||||||||||||||||||||
| 135 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 136 | 0 | my ($self) = @_; | |||||||||||||||||||
| 137 | return | ||||||||||||||||||||
| 138 | Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionTransferContext->new( | ||||||||||||||||||||
| 139 | $self->{version}, | ||||||||||||||||||||
| 140 | $self->{solution}{interaction_sid}, | ||||||||||||||||||||
| 141 | $self->{solution}{channel_sid}, | ||||||||||||||||||||
| 142 | $self->{solution}{sid} | ||||||||||||||||||||
| 143 | 0 | ); | |||||||||||||||||||
| 144 | } | ||||||||||||||||||||
| 145 | |||||||||||||||||||||
| 146 | 3 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 147 | 3 | ▶ | sub channel_sid { return $_[0]{properties}{channel_sid} } | ||||||||||||||||||
|
Subroutine
channel_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 148 | 3 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 149 | 3 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 150 | 3 | ▶ | sub execution_sid { return $_[0]{properties}{execution_sid} } | ||||||||||||||||||
|
Subroutine
execution_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 151 | 3 | ▶ | sub from { return $_[0]{properties}{from} } | ||||||||||||||||||
|
Subroutine
from: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 152 | 3 | ▶ | sub instance_sid { return $_[0]{properties}{instance_sid} } | ||||||||||||||||||
|
Subroutine
instance_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 153 | 3 | ▶ | sub interaction_sid { return $_[0]{properties}{interaction_sid} } | ||||||||||||||||||
|
Subroutine
interaction_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 154 | 3 | ▶ | sub note_sid { return $_[0]{properties}{note_sid} } | ||||||||||||||||||
|
Subroutine
note_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 155 | 3 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 156 | 3 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 157 | 3 | ▶ | sub summary_sid { return $_[0]{properties}{summary_sid} } | ||||||||||||||||||
|
Subroutine
summary_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 158 | 3 | ▶ | sub to { return $_[0]{properties}{to} } | ||||||||||||||||||
|
Subroutine
to: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 159 | 3 | ▶ | sub type { return $_[0]{properties}{type} } | ||||||||||||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 160 | 3 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 161 | |||||||||||||||||||||
| 162 | 2 | 1; | |||||||||||||||||||
| 163 | |||||||||||||||||||||
| 164 | __END__ | ||||||||||||||||||||