Twilio/Rest/Insights/V1/CallSummaries.pm

filter: Statementstmt 90.2% 65 / 72 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 92.5% 37 / 40 Podpod n/a totaltotal 89.5% 103 / 115 CC 2 SCAR 1.2
CC
2
Cov
89%
page
2.0
read
2.0
stream
2.0
CRAP 1.1
« Twilio/Rest/Messaging/V1/DomainValidateDn.pm ↑ Summary Twilio/Rest/Numbers/V1/PortingPortIn.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Insights::V1::CallSummaries;
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::Insights::V1::CallSummariesList;
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) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = {};
19 1 $self->{uri} = '/Voice/Summaries';
20 1 return $self;
21 }
22  
23 0 ▶sub read {
Subroutine read: not called CC=1 SCAR=6.9
24 0 my ($self, @arguments) = @_;
25 0 return $self->read_records(@arguments);
26 }
27  
28 0 ▶sub stream {
Subroutine stream: not called CC=1 SCAR=6.9
29 0 my ($self, @arguments) = @_;
30 0 return $self->stream_records(@arguments);
31 }
32  
33 1 ▶sub page {
Subroutine page: called CC=2 SCAR=7.0
34 1 my ($self, $options, $page_size, $page_token, $page_number) = @_;
35 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
36  
37 my $params = {
38 AbnormalSession => Twilio::Serialize::boolean_to_string($options->{abnormal_session}),
39 AnsweredBy => $options->{answered_by},
40 AnsweredByAnnotation => $options->{answered_by_annotation},
41 BrandedBundleSid => $options->{branded_bundle_sid},
42 BrandedCallReason => $options->{branded_call_reason},
43 BrandedEnabled => Twilio::Serialize::boolean_to_string($options->{branded_enabled}),
44 BrandedLogo => Twilio::Serialize::boolean_to_string($options->{branded_logo}),
45 BrandedType => $options->{branded_type},
46 BrandedUseCase => $options->{branded_use_case},
47 BusinessProfileBundleSid => $options->{business_profile_bundle_sid},
48 BusinessProfileIdentity => $options->{business_profile_identity},
49 BusinessProfileIndustry => $options->{business_profile_industry},
50 BusinessProfileType => $options->{business_profile_type},
51 CallScoreAnnotation => $options->{call_score_annotation},
52 CallState => $options->{call_state},
53 CallType => $options->{call_type},
54 ConnectivityIssueAnnotation => $options->{connectivity_issue_annotation},
55 Direction => $options->{direction},
56 EndTime => $options->{end_time},
57 From => $options->{from},
58 FromCarrier => $options->{from_carrier},
59 FromCountryCode => $options->{from_country_code},
60 HasTag => Twilio::Serialize::boolean_to_string($options->{has_tag}),
61 ProcessingState => $options->{processing_state},
62 QualityIssueAnnotation => $options->{quality_issue_annotation},
63 SortBy => $options->{sort_by},
64 SpamAnnotation => Twilio::Serialize::boolean_to_string($options->{spam_annotation}),
65 StartTime => $options->{start_time},
66 Subaccount => $options->{subaccount},
67 To => $options->{to},
68 ToCarrier => $options->{to_carrier},
69 ToCountryCode => $options->{to_country_code},
70 VerifiedCaller => Twilio::Serialize::boolean_to_string($options->{verified_caller}),
71 VoiceIntegrityBundleSid => $options->{voice_integrity_bundle_sid},
72 VoiceIntegrityEnabled =>
73 Twilio::Serialize::boolean_to_string($options->{voice_integrity_enabled}),
74 VoiceIntegrityUseCase => $options->{voice_integrity_use_case},
75 1 PageToken => $page_token,
76 Page => $page_number,
77 PageSize => $page_size,
78 };
79  
80 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
81 1 return $self->_build_page($response);
82 }
83  
84 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
85 0 my ($self, $target_url) = @_;
86 0 my $client = $self->{version}->get_domain->get_client;
87 0 return $self->_build_page($client->request('GET', $target_url));
88 }
89  
90 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
91 1 my ($self, $response) = @_;
92 return Twilio::Rest::Insights::V1::CallSummariesPage->new($self->{version}, $response,
93 1 $self->{solution});
94 }
95  
96 package Twilio::Rest::Insights::V1::CallSummariesPage;
97  
98 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
99  
100 1 ▶sub records_key { return 'call_summaries' }
Subroutine records_key: called CC=1 SCAR=0.0
101  
102 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
103 1 my ($self, $payload) = @_;
104 1 return Twilio::Rest::Insights::V1::CallSummariesInstance->new($self->{version}, $payload);
105 }
106  
107 package Twilio::Rest::Insights::V1::CallSummariesInstance;
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 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
114 1 my ($class, $version, $payload) = @_;
115 1 my $self = $class->SUPER::new($version, $payload);
116 1 $self->{solution} = {};
117 1 return $self;
118 }
119  
120 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
121 1 ▶sub agent_session_summaries { return $_[0]{properties}{agent_session_summaries} }
Subroutine agent_session_summaries: called CC=1 SCAR=0.0
122 1 ▶sub annotation { return $_[0]{properties}{annotation} }
Subroutine annotation: called CC=1 SCAR=0.0
123 1 ▶sub answered_by { return $_[0]{properties}{answered_by} }
Subroutine answered_by: called CC=1 SCAR=0.0
124 1 ▶sub attributes { return $_[0]{properties}{attributes} }
Subroutine attributes: called CC=1 SCAR=0.0
125 1 ▶sub call_sid { return $_[0]{properties}{call_sid} }
Subroutine call_sid: called CC=1 SCAR=0.0
126 1 ▶sub call_state { return $_[0]{properties}{call_state} }
Subroutine call_state: called CC=1 SCAR=0.0
127 1 ▶sub call_type { return $_[0]{properties}{call_type} }
Subroutine call_type: called CC=1 SCAR=0.0
128 1 ▶sub carrier_edge { return $_[0]{properties}{carrier_edge} }
Subroutine carrier_edge: called CC=1 SCAR=0.0
129 1 ▶sub client_edge { return $_[0]{properties}{client_edge} }
Subroutine client_edge: called CC=1 SCAR=0.0
130 1 ▶sub connect_duration { return $_[0]{properties}{connect_duration} }
Subroutine connect_duration: called CC=1 SCAR=0.0
131 1 ▶sub created_time { return Twilio::Deserialize::date_time($_[0]{properties}{created_time}) }
Subroutine created_time: called CC=1 SCAR=0.0
132 1 ▶sub duration { return $_[0]{properties}{duration} }
Subroutine duration: called CC=1 SCAR=0.0
133 1 ▶sub end_time { return Twilio::Deserialize::date_time($_[0]{properties}{end_time}) }
Subroutine end_time: called CC=1 SCAR=0.0
134 1 ▶sub from { return $_[0]{properties}{from} }
Subroutine from: called CC=1 SCAR=0.0
135 1 ▶sub processing_state { return $_[0]{properties}{processing_state} }
Subroutine processing_state: called CC=1 SCAR=0.0
136 1 ▶sub properties { return $_[0]{properties}{properties} }
Subroutine properties: called CC=1 SCAR=0.0
137 1 ▶sub sdk_edge { return $_[0]{properties}{sdk_edge} }
Subroutine sdk_edge: called CC=1 SCAR=0.0
138 1 ▶sub sip_edge { return $_[0]{properties}{sip_edge} }
Subroutine sip_edge: called CC=1 SCAR=0.0
139 1 ▶sub start_time { return Twilio::Deserialize::date_time($_[0]{properties}{start_time}) }
Subroutine start_time: called CC=1 SCAR=0.0
140 1 ▶sub tags { return $_[0]{properties}{tags} }
Subroutine tags: called CC=1 SCAR=0.0
141 1 ▶sub to { return $_[0]{properties}{to} }
Subroutine to: called CC=1 SCAR=0.0
142 1 ▶sub trust { return $_[0]{properties}{trust} }
Subroutine trust: called CC=1 SCAR=0.0
143 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
144  
145 2 1;
146  
147 __END__
« Twilio/Rest/Messaging/V1/DomainValidateDn.pm ↑ Summary Twilio/Rest/Numbers/V1/PortingPortIn.pm »