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

filter: Statementstmt 90.9% 40 / 44 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 88.8% 16 / 18 Podpod n/a totaltotal 87.6% 57 / 65 CC 2 SCAR 1.9
CC
2
Cov
89%
fetch
2.0
fetch
2.0
_context
2.0
CRAP 1.2
« Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatistics.pm ↑ Summary Twilio/Rest/Verify/V2/Service/AccessToken.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::WorkflowStatistics;
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::WorkflowStatisticsContext;
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), '/Statistics';
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(
29 'GET',
30 $self->{uri},
31 'fetch',
32 {
33 params => {
34 EndDate => Twilio::Serialize::iso8601_date_time($options->{end_date}),
35 Minutes => $options->{minutes},
36 SplitByWaitTime => $options->{split_by_wait_time},
37 StartDate => Twilio::Serialize::iso8601_date_time($options->{start_date}),
38 TaskChannel => $options->{task_channel},
39 }
40 }
41 1 );
42 1 return $self->_build_instance($response);
43 }
44  
45 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
46 1 my ($self, $response) = @_;
47 return Twilio::Rest::Taskrouter::V1::Workspace::Workflow::WorkflowStatisticsInstance->new(
48 $self->{version}, $response->get_content,
49 $self->{solution}{workspace_sid},
50 $self->{solution}{workflow_sid}
51 1 );
52 }
53  
54 package Twilio::Rest::Taskrouter::V1::Workspace::Workflow::WorkflowStatisticsInstance;
55  
56 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
57  
58 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
59  
60 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
61 1 my ($class, $version, $payload, $workspace_sid, $workflow_sid) = @_;
62 1 my $self = $class->SUPER::new($version, $payload);
63 1 $self->{solution} = { workspace_sid => $workspace_sid, workflow_sid => $workflow_sid };
64 1 return $self;
65 }
66  
67 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
68 0 my ($self, @arguments) = @_;
69 0 return $self->_context->fetch(@arguments);
70 }
71  
72 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
73 0 my ($self) = @_;
74 return Twilio::Rest::Taskrouter::V1::Workspace::Workflow::WorkflowStatisticsContext->new(
75 $self->{version},
76 $self->{solution}{workspace_sid},
77 $self->{solution}{workflow_sid}
78 0 );
79 }
80  
81 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
82 1 ▶sub cumulative { return $_[0]{properties}{cumulative} }
Subroutine cumulative: called CC=1 SCAR=0.0
83 1 ▶sub realtime { return $_[0]{properties}{realtime} }
Subroutine realtime: called CC=1 SCAR=0.0
84 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
85 1 ▶sub workflow_sid { return $_[0]{properties}{workflow_sid} }
Subroutine workflow_sid: called CC=1 SCAR=0.0
86 1 ▶sub workspace_sid { return $_[0]{properties}{workspace_sid} }
Subroutine workspace_sid: called CC=1 SCAR=0.0
87  
88 2 1;
89  
90 __END__
« Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatistics.pm ↑ Summary Twilio/Rest/Verify/V2/Service/AccessToken.pm »