Twilio/Rest/Video/V1/Room/RecordingRules.pm

filter: Statementstmt 100% 40 / 40 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 14 / 14 Podpod n/a totaltotal 96.4% 55 / 57 CC 2 SCAR 1.3
CC
2
Cov
98%
update
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Twilio/Rest/PreviewIam/V1/Token.pm ↑ Summary Twilio/Rest/Api/V2010/Account/ValidationRequest.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Video::V1::Room::RecordingRules;
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::Video::V1::Room::RecordingRulesList;
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, $room_sid) = @_;
17 2 my $self = $class->SUPER::new($version);
18 2 $self->{solution} = { room_sid => $room_sid };
19 2 $self->{uri} = join q{}, '/Rooms/', Twilio::Serialize::path_segment($room_sid), '/RecordingRules';
20 2 return $self;
21 }
22  
23 1 ▶sub fetch {
Subroutine fetch: called CC=1 SCAR=0.0
24 1 my ($self) = @_;
25  
26 1 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch');
27 return Twilio::Rest::Video::V1::Room::RecordingRulesInstance->new($self->{version},
28 1 $response->get_content, $self->{solution}{room_sid});
29 }
30  
31 1 ▶sub update {
Subroutine update: called CC=2 SCAR=7.0
32 1 my ($self, $options) = @_;
33 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
34  
35 1 my $data = { Rules => Twilio::Serialize::json_object($options->{rules}), };
36  
37 my $response =
38 1 $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data });
39 return Twilio::Rest::Video::V1::Room::RecordingRulesInstance->new($self->{version},
40 1 $response->get_content, $self->{solution}{room_sid});
41 }
42  
43 package Twilio::Rest::Video::V1::Room::RecordingRulesInstance;
44  
45 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
46  
47 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
48  
49 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
50 2 my ($class, $version, $payload, $room_sid) = @_;
51 2 my $self = $class->SUPER::new($version, $payload);
52 2 $self->{solution} = { room_sid => $room_sid };
53 2 return $self;
54 }
55  
56 2 ▶sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) }
Subroutine date_created: called CC=1 SCAR=0.0
57 2 ▶sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) }
Subroutine date_updated: called CC=1 SCAR=0.0
58 2 ▶sub room_sid { return $_[0]{properties}{room_sid} }
Subroutine room_sid: called CC=1 SCAR=0.0
59 2 ▶sub rules { return $_[0]{properties}{rules} }
Subroutine rules: called CC=1 SCAR=0.0
60  
61 2 1;
62  
63 __END__
« Twilio/Rest/PreviewIam/V1/Token.pm ↑ Summary Twilio/Rest/Api/V2010/Account/ValidationRequest.pm »