Twilio/Rest/FlexApi/V1/InsightsAssessmentsComment.pm

filter: Statementstmt 89.2% 58 / 65 Branchbran n/a Conditioncond 50.0% 2 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 89.6% 26 / 29 Podpod n/a totaltotal 86.0% 86 / 100 CC 3 SCAR 2.0
CC
3
Cov
87%
create
2.0
page
2.0
read
2.0
CRAP 1.2
« Twilio/Rest/Video/V1/RecordingSettings.pm ↑ Summary Twilio/Rest/Verify/V2/Safelist.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::FlexApi::V1::InsightsAssessmentsComment;
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::FlexApi::V1::InsightsAssessmentsCommentList;
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 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
16 2 my ($class, $version) = @_;
17 2 my $self = $class->SUPER::new($version);
18 2 $self->{solution} = {};
19 2 $self->{uri} = '/Insights/QualityManagement/Assessments/Comments';
20 2 return $self;
21 }
22  
23 1 ▶sub create {
Subroutine create: called CC=2 SCAR=7.0
24 1 my ($self, $category_id, $category_name, $comment, $segment_id, $agent_id, $offset, $options) =
25 @_;
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 1 my $data = {
29 CategoryId => $category_id,
30 CategoryName => $category_name,
31 Comment => $comment,
32 SegmentId => $segment_id,
33 AgentId => $agent_id,
34 Offset => $offset,
35 };
36  
37 my $response = $self->{version}->handle_request(
38 'POST',
39 $self->{uri},
40 'create',
41 {
42 data => $data,
43 headers => { Authorization => $options->{authorization}, }
44 }
45 1 );
46 return Twilio::Rest::FlexApi::V1::InsightsAssessmentsCommentInstance->new($self->{version},
47 1 $response->get_content);
48 }
49  
50 0 ▶sub read {
Subroutine read: not called CC=1 SCAR=6.9
51 0 my ($self, @arguments) = @_;
52 0 return $self->read_records(@arguments);
53 }
54  
55 0 ▶sub stream {
Subroutine stream: not called CC=1 SCAR=6.9
56 0 my ($self, @arguments) = @_;
57 0 return $self->stream_records(@arguments);
58 }
59  
60 1 ▶sub page {
Subroutine page: called CC=2 SCAR=7.0
61 1 my ($self, $options, $page_size, $page_token, $page_number) = @_;
62 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
63  
64 my $params = {
65 AgentId => $options->{agent_id},
66 SegmentId => $options->{segment_id},
67 1 PageToken => $page_token,
68 Page => $page_number,
69 PageSize => $page_size,
70 };
71  
72 my $response = $self->{version}->page(
73 'GET',
74 $self->{uri},
75 {
76 params => $params,
77 headers => { Authorization => $options->{authorization}, }
78 }
79 1 );
80 1 return $self->_build_page($response);
81 }
82  
83 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
84 0 my ($self, $target_url) = @_;
85 0 my $client = $self->{version}->get_domain->get_client;
86 0 return $self->_build_page($client->request('GET', $target_url));
87 }
88  
89 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
90 1 my ($self, $response) = @_;
91 return Twilio::Rest::FlexApi::V1::InsightsAssessmentsCommentPage->new($self->{version},
92 1 $response, $self->{solution});
93 }
94  
95 package Twilio::Rest::FlexApi::V1::InsightsAssessmentsCommentPage;
96  
97 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
98  
99 1 ▶sub records_key { return 'comments' }
Subroutine records_key: called CC=1 SCAR=0.0
100  
101 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
102 1 my ($self, $payload) = @_;
103 return Twilio::Rest::FlexApi::V1::InsightsAssessmentsCommentInstance->new($self->{version},
104 1 $payload);
105 }
106  
107 package Twilio::Rest::FlexApi::V1::InsightsAssessmentsCommentInstance;
108  
109 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
110  
111 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
112  
113 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
114 2 my ($class, $version, $payload) = @_;
115 2 my $self = $class->SUPER::new($version, $payload);
116 2 $self->{solution} = {};
117 2 return $self;
118 }
119  
120 2 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
121 2 ▶sub agent_id { return $_[0]{properties}{agent_id} }
Subroutine agent_id: called CC=1 SCAR=0.0
122 2 ▶sub assessment_sid { return $_[0]{properties}{assessment_sid} }
Subroutine assessment_sid: called CC=1 SCAR=0.0
123 2 ▶sub comment { return $_[0]{properties}{comment} }
Subroutine comment: called CC=1 SCAR=0.0
124 2 ▶sub offset { return $_[0]{properties}{offset} }
Subroutine offset: called CC=1 SCAR=0.0
125 2 ▶sub report { return $_[0]{properties}{report} }
Subroutine report: called CC=1 SCAR=0.0
126 2 ▶sub segment_id { return $_[0]{properties}{segment_id} }
Subroutine segment_id: called CC=1 SCAR=0.0
127 2 ▶sub timestamp { return $_[0]{properties}{timestamp} }
Subroutine timestamp: called CC=1 SCAR=0.0
128 2 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
129 2 ▶sub user_email { return $_[0]{properties}{user_email} }
Subroutine user_email: called CC=1 SCAR=0.0
130 2 ▶sub user_name { return $_[0]{properties}{user_name} }
Subroutine user_name: called CC=1 SCAR=0.0
131 2 ▶sub weight { return $_[0]{properties}{weight} }
Subroutine weight: called CC=1 SCAR=0.0
132  
133 2 1;
134  
135 __END__
« Twilio/Rest/Video/V1/RecordingSettings.pm ↑ Summary Twilio/Rest/Verify/V2/Safelist.pm »