Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContext.pm

filter: Statementstmt 90.7% 39 / 43 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 16 / 18 Podpod n/a totaltotal 90.1% 55 / 61 CC 1 SCAR 1.1
CC
1
Cov
91%
fetch
2.0
_context
2.0
BEGIN
1.0
CRAP 1.1
« Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContent.pm ↑ Summary Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContext.pm »
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::StepContext;
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::Step::StepContextContext;
10  
11 2 ▶use parent 'Twilio::InstanceContext';
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, $flow_sid, $engagement_sid, $step_sid) = @_;
17 1 my $self = $class->SUPER::new($version);
18 $self->{solution} =
19 1 { flow_sid => $flow_sid, engagement_sid => $engagement_sid, step_sid => $step_sid };
20 1 $self->{uri} = join q{}, '/Flows/', Twilio::Serialize::path_segment($flow_sid), '/Engagements/',
21 Twilio::Serialize::path_segment($engagement_sid), '/Steps/',
22 Twilio::Serialize::path_segment($step_sid), '/Context';
23 1 return $self;
24 }
25  
26 1 ▶sub fetch {
Subroutine fetch: called CC=1 SCAR=0.0
27 1 my ($self) = @_;
28  
29 1 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch');
30 1 return $self->_build_instance($response);
31 }
32  
33 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
34 1 my ($self, $response) = @_;
35 return Twilio::Rest::Studio::V1::Flow::Engagement::Step::StepContextInstance->new(
36 $self->{version}, $response->get_content,
37 $self->{solution}{flow_sid},
38 $self->{solution}{engagement_sid},
39 $self->{solution}{step_sid}
40 1 );
41 }
42  
43 package Twilio::Rest::Studio::V1::Flow::Engagement::Step::StepContextInstance;
44  
45 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
46  
47 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
50 1 my ($class, $version, $payload, $flow_sid, $engagement_sid, $step_sid) = @_;
51 1 my $self = $class->SUPER::new($version, $payload);
52 $self->{solution} =
53 1 { flow_sid => $flow_sid, engagement_sid => $engagement_sid, step_sid => $step_sid };
54 1 return $self;
55 }
56  
57 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
58 0 my ($self, @arguments) = @_;
59 0 return $self->_context->fetch(@arguments);
60 }
61  
62 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
63 0 my ($self) = @_;
64 return Twilio::Rest::Studio::V1::Flow::Engagement::Step::StepContextContext->new(
65 $self->{version}, $self->{solution}{flow_sid},
66 $self->{solution}{engagement_sid}, $self->{solution}{step_sid}
67 0 );
68 }
69  
70 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
71 1 ▶sub context { return $_[0]{properties}{context} }
Subroutine context: called CC=1 SCAR=0.0
72 1 ▶sub engagement_sid { return $_[0]{properties}{engagement_sid} }
Subroutine engagement_sid: called CC=1 SCAR=0.0
73 1 ▶sub flow_sid { return $_[0]{properties}{flow_sid} }
Subroutine flow_sid: called CC=1 SCAR=0.0
74 1 ▶sub step_sid { return $_[0]{properties}{step_sid} }
Subroutine step_sid: called CC=1 SCAR=0.0
75 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
76  
77 2 1;
78  
79 __END__
« Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion/FunctionVersionContent.pm ↑ Summary Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContext.pm »