| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Taskrouter::V1::Workspace::WorkspaceRealTimeStatistics; | ||||||||||||
| 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::WorkspaceRealTimeStatisticsContext; | ||||||||||||
| 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) = @_; | |||||||||||
| 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 | '/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 //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 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 Twilio::Rest::Taskrouter::V1::Workspace::WorkspaceRealTimeStatisticsInstance->new( | ||||||||||||
| 36 | 1 | $self->{version}, $response->get_content, $self->{solution}{workspace_sid}); | |||||||||||
| 37 | } | ||||||||||||
| 38 | |||||||||||||
| 39 | package Twilio::Rest::Taskrouter::V1::Workspace::WorkspaceRealTimeStatisticsInstance; | ||||||||||||
| 40 | |||||||||||||
| 41 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 42 | |||||||||||||
| 43 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 44 | |||||||||||||
| 45 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 46 | 1 | my ($class, $version, $payload, $workspace_sid) = @_; | |||||||||||
| 47 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 48 | 1 | $self->{solution} = { workspace_sid => $workspace_sid }; | |||||||||||
| 49 | 1 | return $self; | |||||||||||
| 50 | } | ||||||||||||
| 51 | |||||||||||||
| 52 | 0 | ▶ | sub fetch { | ||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||
| 53 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 54 | 0 | return $self->_context->fetch(@arguments); | |||||||||||
| 55 | } | ||||||||||||
| 56 | |||||||||||||
| 57 | 0 | ▶ | sub _context { | ||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||
| 58 | 0 | my ($self) = @_; | |||||||||||
| 59 | return Twilio::Rest::Taskrouter::V1::Workspace::WorkspaceRealTimeStatisticsContext->new( | ||||||||||||
| 60 | 0 | $self->{version}, $self->{solution}{workspace_sid}); | |||||||||||
| 61 | } | ||||||||||||
| 62 | |||||||||||||
| 63 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 64 | 1 | ▶ | sub activity_statistics { return $_[0]{properties}{activity_statistics} } | ||||||||||
|
Subroutine
activity_statistics: called CC=1 SCAR=0.0
| |||||||||||||
| 65 | 1 | ▶ | sub longest_task_waiting_age { return $_[0]{properties}{longest_task_waiting_age} } | ||||||||||
|
Subroutine
longest_task_waiting_age: called CC=1 SCAR=0.0
| |||||||||||||
| 66 | 1 | ▶ | sub longest_task_waiting_sid { return $_[0]{properties}{longest_task_waiting_sid} } | ||||||||||
|
Subroutine
longest_task_waiting_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 67 | 1 | ▶ | sub tasks_by_priority { return $_[0]{properties}{tasks_by_priority} } | ||||||||||
|
Subroutine
tasks_by_priority: called CC=1 SCAR=0.0
| |||||||||||||
| 68 | 1 | ▶ | sub tasks_by_status { return $_[0]{properties}{tasks_by_status} } | ||||||||||
|
Subroutine
tasks_by_status: called CC=1 SCAR=0.0
| |||||||||||||
| 69 | 1 | ▶ | sub total_tasks { return $_[0]{properties}{total_tasks} } | ||||||||||
|
Subroutine
total_tasks: called CC=1 SCAR=0.0
| |||||||||||||
| 70 | 1 | ▶ | sub total_workers { return $_[0]{properties}{total_workers} } | ||||||||||
|
Subroutine
total_workers: called CC=1 SCAR=0.0
| |||||||||||||
| 71 | 1 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||
| 72 | 1 | ▶ | sub workspace_sid { return $_[0]{properties}{workspace_sid} } | ||||||||||
|
Subroutine
workspace_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 73 | |||||||||||||
| 74 | 2 | 1; | |||||||||||
| 75 | |||||||||||||
| 76 | __END__ | ||||||||||||