| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Studio::V1::Flow::Engagement::Step; | ||||||||||||||||||||
| 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::Studio::V1::Flow::Engagement::StepList; | ||||||||||||||||||||
| 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, $flow_sid, $engagement_sid) = @_; | |||||||||||||||||||
| 17 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 3 | $self->{solution} = { flow_sid => $flow_sid, engagement_sid => $engagement_sid }; | |||||||||||||||||||
| 19 | 3 | $self->{uri} = join q{}, '/Flows/', Twilio::Serialize::path_segment($flow_sid), '/Engagements/', | |||||||||||||||||||
| 20 | Twilio::Serialize::path_segment($engagement_sid), '/Steps'; | ||||||||||||||||||||
| 21 | 3 | return $self; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 25 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 26 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 30 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 31 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 35 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 36 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 1 | my $params = { | |||||||||||||||||||
| 39 | PageToken => $page_token, | ||||||||||||||||||||
| 40 | Page => $page_number, | ||||||||||||||||||||
| 41 | PageSize => $page_size, | ||||||||||||||||||||
| 42 | }; | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 45 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 46 | } | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 49 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 50 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 51 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 52 | } | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 55 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 56 | return Twilio::Rest::Studio::V1::Flow::Engagement::StepPage->new($self->{version}, $response, | ||||||||||||||||||||
| 57 | 1 | $self->{solution}); | |||||||||||||||||||
| 58 | } | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 2 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 61 | 2 | my ($self, $sid) = @_; | |||||||||||||||||||
| 62 | return Twilio::Rest::Studio::V1::Flow::Engagement::StepContext->new( | ||||||||||||||||||||
| 63 | $self->{version}, | ||||||||||||||||||||
| 64 | $self->{solution}{flow_sid}, | ||||||||||||||||||||
| 65 | 2 | $self->{solution}{engagement_sid}, $sid | |||||||||||||||||||
| 66 | ); | ||||||||||||||||||||
| 67 | } | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | package Twilio::Rest::Studio::V1::Flow::Engagement::StepPage; | ||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | 1 | ▶ | sub records_key { return 'steps' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 76 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 77 | return Twilio::Rest::Studio::V1::Flow::Engagement::StepInstance->new( | ||||||||||||||||||||
| 78 | $self->{version}, $payload, | ||||||||||||||||||||
| 79 | $self->{solution}{flow_sid}, | ||||||||||||||||||||
| 80 | $self->{solution}{engagement_sid} | ||||||||||||||||||||
| 81 | 1 | ); | |||||||||||||||||||
| 82 | } | ||||||||||||||||||||
| 83 | |||||||||||||||||||||
| 84 | package Twilio::Rest::Studio::V1::Flow::Engagement::StepContext; | ||||||||||||||||||||
| 85 | |||||||||||||||||||||
| 86 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 87 | |||||||||||||||||||||
| 88 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 91 | 2 | my ($class, $version, $flow_sid, $engagement_sid, $sid) = @_; | |||||||||||||||||||
| 92 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 93 | 2 | $self->{solution} = { flow_sid => $flow_sid, engagement_sid => $engagement_sid, sid => $sid }; | |||||||||||||||||||
| 94 | 2 | $self->{uri} = join q{}, '/Flows/', Twilio::Serialize::path_segment($flow_sid), '/Engagements/', | |||||||||||||||||||
| 95 | Twilio::Serialize::path_segment($engagement_sid), '/Steps/', | ||||||||||||||||||||
| 96 | Twilio::Serialize::path_segment($sid); | ||||||||||||||||||||
| 97 | 2 | return $self; | |||||||||||||||||||
| 98 | } | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 101 | 1 | my ($self) = @_; | |||||||||||||||||||
| 102 | |||||||||||||||||||||
| 103 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 104 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 105 | } | ||||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 108 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 109 | return Twilio::Rest::Studio::V1::Flow::Engagement::StepInstance->new( | ||||||||||||||||||||
| 110 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 111 | $self->{solution}{flow_sid}, | ||||||||||||||||||||
| 112 | $self->{solution}{engagement_sid}, | ||||||||||||||||||||
| 113 | $self->{solution}{sid} | ||||||||||||||||||||
| 114 | 1 | ); | |||||||||||||||||||
| 115 | } | ||||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | 1 | ▶ | sub step_context { | ||||||||||||||||||
|
Subroutine
step_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 118 | 1 | my ($self) = @_; | |||||||||||||||||||
| 119 | 1 | require Twilio::Rest::Studio::V1::Flow::Engagement::Step::StepContext; | |||||||||||||||||||
| 120 | return Twilio::Rest::Studio::V1::Flow::Engagement::Step::StepContextContext->new( | ||||||||||||||||||||
| 121 | $self->{version}, | ||||||||||||||||||||
| 122 | $self->{solution}{flow_sid}, | ||||||||||||||||||||
| 123 | $self->{solution}{engagement_sid}, | ||||||||||||||||||||
| 124 | $self->{solution}{sid} | ||||||||||||||||||||
| 125 | 1 | ); | |||||||||||||||||||
| 126 | } | ||||||||||||||||||||
| 127 | |||||||||||||||||||||
| 128 | package Twilio::Rest::Studio::V1::Flow::Engagement::StepInstance; | ||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 131 | |||||||||||||||||||||
| 132 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 135 | 2 | my ($class, $version, $payload, $flow_sid, $engagement_sid, $sid) = @_; | |||||||||||||||||||
| 136 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 137 | $self->{solution} = { | ||||||||||||||||||||
| 138 | flow_sid => $flow_sid, | ||||||||||||||||||||
| 139 | engagement_sid => $engagement_sid, | ||||||||||||||||||||
| 140 | sid => $sid // $self->{properties}{sid} | ||||||||||||||||||||
| 141 | 2 | ▶ | }; | ||||||||||||||||||
|
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"}
| |||||||||||||||||||||
| 142 | 2 | return $self; | |||||||||||||||||||
| 143 | } | ||||||||||||||||||||
| 144 | |||||||||||||||||||||
| 145 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 146 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 147 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 148 | } | ||||||||||||||||||||
| 149 | |||||||||||||||||||||
| 150 | 0 | ▶ | sub step_context { | ||||||||||||||||||
|
Subroutine
step_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 151 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 152 | 0 | return $self->_context->step_context(@arguments); | |||||||||||||||||||
| 153 | } | ||||||||||||||||||||
| 154 | |||||||||||||||||||||
| 155 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 156 | 0 | my ($self) = @_; | |||||||||||||||||||
| 157 | return Twilio::Rest::Studio::V1::Flow::Engagement::StepContext->new( | ||||||||||||||||||||
| 158 | $self->{version}, | ||||||||||||||||||||
| 159 | $self->{solution}{flow_sid}, | ||||||||||||||||||||
| 160 | $self->{solution}{engagement_sid}, | ||||||||||||||||||||
| 161 | $self->{solution}{sid} | ||||||||||||||||||||
| 162 | 0 | ); | |||||||||||||||||||
| 163 | } | ||||||||||||||||||||
| 164 | |||||||||||||||||||||
| 165 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 166 | 2 | ▶ | sub context { return $_[0]{properties}{context} } | ||||||||||||||||||
|
Subroutine
context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 167 | 2 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 168 | 2 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 169 | 2 | ▶ | sub engagement_sid { return $_[0]{properties}{engagement_sid} } | ||||||||||||||||||
|
Subroutine
engagement_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 170 | 2 | ▶ | sub flow_sid { return $_[0]{properties}{flow_sid} } | ||||||||||||||||||
|
Subroutine
flow_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 171 | 2 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 172 | 2 | ▶ | sub name { return $_[0]{properties}{name} } | ||||||||||||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 173 | 2 | ▶ | sub parent_step_sid { return $_[0]{properties}{parent_step_sid} } | ||||||||||||||||||
|
Subroutine
parent_step_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 174 | 2 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 175 | 2 | ▶ | sub transitioned_from { return $_[0]{properties}{transitioned_from} } | ||||||||||||||||||
|
Subroutine
transitioned_from: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 176 | 2 | ▶ | sub transitioned_to { return $_[0]{properties}{transitioned_to} } | ||||||||||||||||||
|
Subroutine
transitioned_to: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 177 | 2 | ▶ | sub type { return $_[0]{properties}{type} } | ||||||||||||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 178 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 179 | |||||||||||||||||||||
| 180 | 2 | 1; | |||||||||||||||||||
| 181 | |||||||||||||||||||||
| 182 | __END__ | ||||||||||||||||||||