Twilio/Rest/Insights/V1/Conference/ConferenceParticipant.pm

filter: Statementstmt 88.7% 87 / 98 Branchbran n/a Conditioncond 57.1% 4 / 7 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 90.2% 46 / 51 Podpod n/a totaltotal 85.6% 137 / 160 CC 4 SCAR 1.9
CC
4
Cov
87%
fetch
2.0
page
2.0
new
2.0
CRAP 1.2
« Twilio/Rest/Memory/V1/Revision.pm ↑ Summary Twilio/Rest/Messaging/V1/DomainConfig.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Insights::V1::Conference::ConferenceParticipant;
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::Conference::ConferenceParticipantList;
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, $conference_sid) = @_;
17 2 my $self = $class->SUPER::new($version);
18 2 $self->{solution} = { conference_sid => $conference_sid };
19 2 $self->{uri} = join q{}, '/Conferences/', Twilio::Serialize::path_segment($conference_sid),
20 '/Participants';
21 2 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 Events => $options->{events},
40 Label => $options->{label},
41 ParticipantSid => $options->{participant_sid},
42 1 PageToken => $page_token,
43 Page => $page_number,
44 PageSize => $page_size,
45 };
46  
47 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
48 1 return $self->_build_page($response);
49 }
50  
51 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
52 0 my ($self, $target_url) = @_;
53 0 my $client = $self->{version}->get_domain->get_client;
54 0 return $self->_build_page($client->request('GET', $target_url));
55 }
56  
57 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
58 1 my ($self, $response) = @_;
59 return Twilio::Rest::Insights::V1::Conference::ConferenceParticipantPage->new($self->{version},
60 1 $response, $self->{solution});
61 }
62  
63 1 ▶sub get_context {
Subroutine get_context: called CC=1 SCAR=0.0
64 1 my ($self, $participant_sid) = @_;
65 return Twilio::Rest::Insights::V1::Conference::ConferenceParticipantContext->new($self->{version},
66 $self->{solution}{conference_sid},
67 1 $participant_sid);
68 }
69  
70 package Twilio::Rest::Insights::V1::Conference::ConferenceParticipantPage;
71  
72 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
73  
74 1 ▶sub records_key { return 'participants' }
Subroutine records_key: called CC=1 SCAR=0.0
75  
76 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
77 1 my ($self, $payload) = @_;
78 return Twilio::Rest::Insights::V1::Conference::ConferenceParticipantInstance->new(
79 1 $self->{version}, $payload, $self->{solution}{conference_sid});
80 }
81  
82 package Twilio::Rest::Insights::V1::Conference::ConferenceParticipantContext;
83  
84 2 ▶use parent 'Twilio::InstanceContext';
Subroutine BEGIN: called CC=1 SCAR=0.0
85  
86 2 ▶use Twilio::Serialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
87  
88 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
89 1 my ($class, $version, $conference_sid, $participant_sid) = @_;
90 1 my $self = $class->SUPER::new($version);
91 1 $self->{solution} = { conference_sid => $conference_sid, participant_sid => $participant_sid };
92 1 $self->{uri} = join q{}, '/Conferences/', Twilio::Serialize::path_segment($conference_sid),
93 '/Participants/', Twilio::Serialize::path_segment($participant_sid);
94 1 return $self;
95 }
96  
97 1 ▶sub fetch {
Subroutine fetch: called CC=2 SCAR=7.0
98 1 my ($self, $options) = @_;
99 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
100  
101 my $response = $self->{version}->handle_request(
102 'GET',
103 $self->{uri},
104 'fetch',
105 {
106 params => {
107 Events => $options->{events},
108 Metrics => $options->{metrics},
109 }
110 }
111 1 );
112 1 return $self->_build_instance($response);
113 }
114  
115 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
116 1 my ($self, $response) = @_;
117 return Twilio::Rest::Insights::V1::Conference::ConferenceParticipantInstance->new(
118 $self->{version}, $response->get_content,
119 $self->{solution}{conference_sid},
120 $self->{solution}{participant_sid}
121 1 );
122 }
123  
124 package Twilio::Rest::Insights::V1::Conference::ConferenceParticipantInstance;
125  
126 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
127  
128 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
129  
130 2 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
131 2 my ($class, $version, $payload, $conference_sid, $participant_sid) = @_;
132 2 my $self = $class->SUPER::new($version, $payload);
133 $self->{solution} = {
134 conference_sid => $conference_sid,
135 participant_sid => $participant_sid // $self->{properties}{participant_sid}
136 2 ▶ };
Condition66%2/3
$participant_sid // $self->{"properties"}{"participant_sid"}
l!l&&r!l&&!r
110
MC/DC0%0/2
$participant_sid // $self->{"properties"}{"participant_sid"}
$participant_sid $self->{"properties"}{"participant_sid"}
Truth table66%2/3
A // B
A= $participant_sidB= $self->{"properties"}{"participant_sid"}
ABresult
1X1
011
000
137 2 return $self;
138 }
139  
140 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
141 0 my ($self, @arguments) = @_;
142 0 return $self->_context->fetch(@arguments);
143 }
144  
145 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
146 0 my ($self) = @_;
147 return Twilio::Rest::Insights::V1::Conference::ConferenceParticipantContext->new(
148 $self->{version},
149 $self->{solution}{conference_sid},
150 $self->{solution}{participant_sid}
151 0 );
152 }
153  
154 2 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
155 2 ▶sub call_direction { return $_[0]{properties}{call_direction} }
Subroutine call_direction: called CC=1 SCAR=0.0
156 2 ▶sub call_sid { return $_[0]{properties}{call_sid} }
Subroutine call_sid: called CC=1 SCAR=0.0
157 2 ▶sub call_status { return $_[0]{properties}{call_status} }
Subroutine call_status: called CC=1 SCAR=0.0
158 2 ▶sub call_type { return $_[0]{properties}{call_type} }
Subroutine call_type: called CC=1 SCAR=0.0
159 2 ▶sub coached_participants { return $_[0]{properties}{coached_participants} }
Subroutine coached_participants: called CC=1 SCAR=0.0
160 2 ▶sub conference_region { return $_[0]{properties}{conference_region} }
Subroutine conference_region: called CC=1 SCAR=0.0
161 2 ▶sub conference_sid { return $_[0]{properties}{conference_sid} }
Subroutine conference_sid: called CC=1 SCAR=0.0
162 2 ▶sub country_code { return $_[0]{properties}{country_code} }
Subroutine country_code: called CC=1 SCAR=0.0
163 2 ▶sub duration_seconds { return $_[0]{properties}{duration_seconds} }
Subroutine duration_seconds: called CC=1 SCAR=0.0
164 2 ▶sub events { return $_[0]{properties}{events} }
Subroutine events: called CC=1 SCAR=0.0
165 2 ▶sub from { return $_[0]{properties}{from} }
Subroutine from: called CC=1 SCAR=0.0
166 2 ▶sub is_coach { return $_[0]{properties}{is_coach} }
Subroutine is_coach: called CC=1 SCAR=0.0
167 2 ▶sub is_moderator { return $_[0]{properties}{is_moderator} }
Subroutine is_moderator: called CC=1 SCAR=0.0
168 2 ▶sub jitter_buffer_size { return $_[0]{properties}{jitter_buffer_size} }
Subroutine jitter_buffer_size: called CC=1 SCAR=0.0
169 2 ▶sub join_time { return Twilio::Deserialize::date_time($_[0]{properties}{join_time}) }
Subroutine join_time: called CC=1 SCAR=0.0
170 2 ▶sub label { return $_[0]{properties}{label} }
Subroutine label: called CC=1 SCAR=0.0
171 2 ▶sub leave_time { return Twilio::Deserialize::date_time($_[0]{properties}{leave_time}) }
Subroutine leave_time: called CC=1 SCAR=0.0
172 2 ▶sub metrics { return $_[0]{properties}{metrics} }
Subroutine metrics: called CC=1 SCAR=0.0
173 2 ▶sub outbound_queue_length { return $_[0]{properties}{outbound_queue_length} }
Subroutine outbound_queue_length: called CC=1 SCAR=0.0
174 2 ▶sub outbound_time_in_queue { return $_[0]{properties}{outbound_time_in_queue} }
Subroutine outbound_time_in_queue: called CC=1 SCAR=0.0
175 2 ▶sub participant_region { return $_[0]{properties}{participant_region} }
Subroutine participant_region: called CC=1 SCAR=0.0
176 2 ▶sub participant_sid { return $_[0]{properties}{participant_sid} }
Subroutine participant_sid: called CC=1 SCAR=0.0
177 2 ▶sub processing_state { return $_[0]{properties}{processing_state} }
Subroutine processing_state: called CC=1 SCAR=0.0
178 2 ▶sub properties { return $_[0]{properties}{properties} }
Subroutine properties: called CC=1 SCAR=0.0
179 2 ▶sub to { return $_[0]{properties}{to} }
Subroutine to: called CC=1 SCAR=0.0
180 2 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
181  
182 2 1;
183  
184 __END__
« Twilio/Rest/Memory/V1/Revision.pm ↑ Summary Twilio/Rest/Messaging/V1/DomainConfig.pm »