Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContext.pm

filter: Statementstmt 90.4% 38 / 42 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.2% 15 / 17 Podpod n/a totaltotal 89.8% 53 / 59 CC 1 SCAR 1.1
CC
1
Cov
90%
fetch
2.0
_context
2.0
BEGIN
1.0
CRAP 1.1
« Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContext.pm ↑ Summary Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContext.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Studio::V1::Flow::Execution::ExecutionContext;
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::Execution::ExecutionContextContext;
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, $execution_sid) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = { flow_sid => $flow_sid, execution_sid => $execution_sid };
19 1 $self->{uri} = join q{}, '/Flows/', Twilio::Serialize::path_segment($flow_sid), '/Executions/',
20 Twilio::Serialize::path_segment($execution_sid), '/Context';
21 1 return $self;
22 }
23  
24 1 ▶sub fetch {
Subroutine fetch: called CC=1 SCAR=0.0
25 1 my ($self) = @_;
26  
27 1 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch');
28 1 return $self->_build_instance($response);
29 }
30  
31 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
32 1 my ($self, $response) = @_;
33 return Twilio::Rest::Studio::V1::Flow::Execution::ExecutionContextInstance->new(
34 $self->{version}, $response->get_content,
35 $self->{solution}{flow_sid},
36 $self->{solution}{execution_sid}
37 1 );
38 }
39  
40 package Twilio::Rest::Studio::V1::Flow::Execution::ExecutionContextInstance;
41  
42 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
43  
44 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
45  
46 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
47 1 my ($class, $version, $payload, $flow_sid, $execution_sid) = @_;
48 1 my $self = $class->SUPER::new($version, $payload);
49 1 $self->{solution} = { flow_sid => $flow_sid, execution_sid => $execution_sid };
50 1 return $self;
51 }
52  
53 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
54 0 my ($self, @arguments) = @_;
55 0 return $self->_context->fetch(@arguments);
56 }
57  
58 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
59 0 my ($self) = @_;
60 return Twilio::Rest::Studio::V1::Flow::Execution::ExecutionContextContext->new(
61 $self->{version},
62 $self->{solution}{flow_sid},
63 $self->{solution}{execution_sid}
64 0 );
65 }
66  
67 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
68 1 ▶sub context { return $_[0]{properties}{context} }
Subroutine context: called CC=1 SCAR=0.0
69 1 ▶sub execution_sid { return $_[0]{properties}{execution_sid} }
Subroutine execution_sid: called CC=1 SCAR=0.0
70 1 ▶sub flow_sid { return $_[0]{properties}{flow_sid} }
Subroutine flow_sid: called CC=1 SCAR=0.0
71 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
72  
73 2 1;
74  
75 __END__
« Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContext.pm ↑ Summary Twilio/Rest/Studio/V2/Flow/Execution/ExecutionContext.pm »