Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatistics.pm

filter: Statementstmt 91.4% 43 / 47 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 90.4% 19 / 21 Podpod n/a totaltotal 88.7% 63 / 71 CC 2 SCAR 1.7
CC
2
Cov
90%
fetch
2.0
fetch
2.0
_context
2.0
CRAP 1.2
« Twilio/Rest/Preview/Wireless/Sim/Usage.pm ↑ Summary Twilio/Rest/FlexApi/V1/PluginArchive.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Taskrouter::V1::Workspace::Workflow::WorkflowRealTimeStatistics;
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::Taskrouter::V1::Workspace::Workflow::WorkflowRealTimeStatisticsContext;
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, $workspace_sid, $workflow_sid) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = { workspace_sid => $workspace_sid, workflow_sid => $workflow_sid };
19 1 $self->{uri} = join q{}, '/Workspaces/', Twilio::Serialize::path_segment($workspace_sid),
20 '/Workflows/', Twilio::Serialize::path_segment($workflow_sid), '/RealTimeStatistics';
21 1 return $self;
22 }
23  
24 1 ▶sub fetch {
Subroutine fetch: called CC=2 SCAR=7.0
25 1 my ($self, $options) = @_;
26 1 ▶ $options //= {};
Condition50%1/2
$options //= {}
l!l
10
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
27  
28 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch',
29 1 { params => { TaskChannel => $options->{task_channel}, } });
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
36 Twilio::Rest::Taskrouter::V1::Workspace::Workflow::WorkflowRealTimeStatisticsInstance->new(
37 $self->{version}, $response->get_content,
38 $self->{solution}{workspace_sid},
39 $self->{solution}{workflow_sid}
40 1 );
41 }
42  
43 package Twilio::Rest::Taskrouter::V1::Workspace::Workflow::WorkflowRealTimeStatisticsInstance;
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, $workspace_sid, $workflow_sid) = @_;
51 1 my $self = $class->SUPER::new($version, $payload);
52 1 $self->{solution} = { workspace_sid => $workspace_sid, workflow_sid => $workflow_sid };
53 1 return $self;
54 }
55  
56 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
57 0 my ($self, @arguments) = @_;
58 0 return $self->_context->fetch(@arguments);
59 }
60  
61 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
62 0 my ($self) = @_;
63 return Twilio::Rest::Taskrouter::V1::Workspace::Workflow::WorkflowRealTimeStatisticsContext->new(
64 $self->{version},
65 $self->{solution}{workspace_sid},
66 $self->{solution}{workflow_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 longest_task_waiting_age { return $_[0]{properties}{longest_task_waiting_age} }
Subroutine longest_task_waiting_age: called CC=1 SCAR=0.0
72 1 ▶sub longest_task_waiting_sid { return $_[0]{properties}{longest_task_waiting_sid} }
Subroutine longest_task_waiting_sid: called CC=1 SCAR=0.0
73 1 ▶sub tasks_by_priority { return $_[0]{properties}{tasks_by_priority} }
Subroutine tasks_by_priority: called CC=1 SCAR=0.0
74 1 ▶sub tasks_by_status { return $_[0]{properties}{tasks_by_status} }
Subroutine tasks_by_status: called CC=1 SCAR=0.0
75 1 ▶sub total_tasks { return $_[0]{properties}{total_tasks} }
Subroutine total_tasks: called CC=1 SCAR=0.0
76 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
77 1 ▶sub workflow_sid { return $_[0]{properties}{workflow_sid} }
Subroutine workflow_sid: called CC=1 SCAR=0.0
78 1 ▶sub workspace_sid { return $_[0]{properties}{workspace_sid} }
Subroutine workspace_sid: called CC=1 SCAR=0.0
79  
80 2 1;
81  
82 __END__
« Twilio/Rest/Preview/Wireless/Sim/Usage.pm ↑ Summary Twilio/Rest/FlexApi/V1/PluginArchive.pm »