| 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 //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 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__ | ||||||||||||