Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatistics.pm

filter: Statementstmt 86.7% 46 / 53 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 85.7% 18 / 21 Podpod n/a totaltotal 84.4% 65 / 77 CC 2 SCAR 2.1
CC
2
Cov
85%
page
2.0
read
2.0
stream
2.0
CRAP 1.2
« Twilio/Rest/Knowledge/V1/Knowledge/Chunk.pm ↑ Summary Twilio/Rest/Verify/V2/Template.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Taskrouter::V1::Workspace::TaskQueue::TaskQueuesStatistics;
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::TaskQueue::TaskQueuesStatisticsList;
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 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
16 1 my ($class, $version, $workspace_sid) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = { workspace_sid => $workspace_sid };
19 1 $self->{uri} = join q{}, '/Workspaces/', Twilio::Serialize::path_segment($workspace_sid),
20 '/TaskQueues/Statistics';
21 1 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 //= {}
l!l
10
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
37  
38 my $params = {
39 EndDate => Twilio::Serialize::iso8601_date_time($options->{end_date}),
40 FriendlyName => $options->{friendly_name},
41 Minutes => $options->{minutes},
42 SplitByWaitTime => $options->{split_by_wait_time},
43 StartDate => Twilio::Serialize::iso8601_date_time($options->{start_date}),
44 TaskChannel => $options->{task_channel},
45 1 PageToken => $page_token,
46 Page => $page_number,
47 PageSize => $page_size,
48 };
49  
50 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
51 1 return $self->_build_page($response);
52 }
53  
54 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
55 0 my ($self, $target_url) = @_;
56 0 my $client = $self->{version}->get_domain->get_client;
57 0 return $self->_build_page($client->request('GET', $target_url));
58 }
59  
60 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
61 1 my ($self, $response) = @_;
62 return Twilio::Rest::Taskrouter::V1::Workspace::TaskQueue::TaskQueuesStatisticsPage->new(
63 1 $self->{version}, $response, $self->{solution});
64 }
65  
66 package Twilio::Rest::Taskrouter::V1::Workspace::TaskQueue::TaskQueuesStatisticsPage;
67  
68 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
69  
70 1 ▶sub records_key { return 'task_queues_statistics' }
Subroutine records_key: called CC=1 SCAR=0.0
71  
72 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
73 1 my ($self, $payload) = @_;
74 return Twilio::Rest::Taskrouter::V1::Workspace::TaskQueue::TaskQueuesStatisticsInstance->new(
75 1 $self->{version}, $payload, $self->{solution}{workspace_sid});
76 }
77  
78 package Twilio::Rest::Taskrouter::V1::Workspace::TaskQueue::TaskQueuesStatisticsInstance;
79  
80 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
81  
82 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
83  
84 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
85 1 my ($class, $version, $payload, $workspace_sid) = @_;
86 1 my $self = $class->SUPER::new($version, $payload);
87 1 $self->{solution} = { workspace_sid => $workspace_sid };
88 1 return $self;
89 }
90  
91 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
92 1 ▶sub cumulative { return $_[0]{properties}{cumulative} }
Subroutine cumulative: called CC=1 SCAR=0.0
93 1 ▶sub realtime { return $_[0]{properties}{realtime} }
Subroutine realtime: called CC=1 SCAR=0.0
94 1 ▶sub task_queue_sid { return $_[0]{properties}{task_queue_sid} }
Subroutine task_queue_sid: called CC=1 SCAR=0.0
95 1 ▶sub workspace_sid { return $_[0]{properties}{workspace_sid} }
Subroutine workspace_sid: called CC=1 SCAR=0.0
96  
97 2 1;
98  
99 __END__
« Twilio/Rest/Knowledge/V1/Knowledge/Chunk.pm ↑ Summary Twilio/Rest/Verify/V2/Template.pm »