Twilio/Rest/Verify/V2/Service/Entity/Challenge/Notification.pm

filter: Statementstmt 100% 42 / 42 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 18 / 18 Podpod n/a totaltotal 96.8% 61 / 63 CC 2 SCAR 1.0
CC
2
Cov
98%
create
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Twilio/Rest/Api/V2010/Account/Usage/Record.pm ↑ Summary Twilio/Rest/Messaging/V1/DomainConfigMessagingService.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Verify::V2::Service::Entity::Challenge::Notification;
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::Verify::V2::Service::Entity::Challenge::NotificationList;
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, $service_sid, $identity, $challenge_sid) = @_;
17 1 my $self = $class->SUPER::new($version);
18 $self->{solution} =
19 1 { service_sid => $service_sid, identity => $identity, challenge_sid => $challenge_sid };
20 1 $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($service_sid),
21 '/Entities/', Twilio::Serialize::path_segment($identity), '/Challenges/',
22 Twilio::Serialize::path_segment($challenge_sid), '/Notifications';
23 1 return $self;
24 }
25  
26 1 ▶sub create {
Subroutine create: called CC=2 SCAR=7.0
27 1 my ($self, $options) = @_;
28 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
29  
30 1 my $data = { Ttl => $options->{ttl}, };
31  
32 my $response =
33 1 $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data });
34 return Twilio::Rest::Verify::V2::Service::Entity::Challenge::NotificationInstance->new(
35 $self->{version}, $response->get_content,
36 $self->{solution}{service_sid}, $self->{solution}{identity},
37 $self->{solution}{challenge_sid}
38 1 );
39 }
40  
41 package Twilio::Rest::Verify::V2::Service::Entity::Challenge::NotificationInstance;
42  
43 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
44  
45 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
46  
47 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
48 1 my ($class, $version, $payload, $service_sid, $identity, $challenge_sid) = @_;
49 1 my $self = $class->SUPER::new($version, $payload);
50 $self->{solution} =
51 1 { service_sid => $service_sid, identity => $identity, challenge_sid => $challenge_sid };
52 1 return $self;
53 }
54  
55 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
56 1 ▶sub challenge_sid { return $_[0]{properties}{challenge_sid} }
Subroutine challenge_sid: called CC=1 SCAR=0.0
57 1 ▶sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) }
Subroutine date_created: called CC=1 SCAR=0.0
58 1 ▶sub entity_sid { return $_[0]{properties}{entity_sid} }
Subroutine entity_sid: called CC=1 SCAR=0.0
59 1 ▶sub identity { return $_[0]{properties}{identity} }
Subroutine identity: called CC=1 SCAR=0.0
60 1 ▶sub priority { return $_[0]{properties}{priority} }
Subroutine priority: called CC=1 SCAR=0.0
61 1 ▶sub service_sid { return $_[0]{properties}{service_sid} }
Subroutine service_sid: called CC=1 SCAR=0.0
62 1 ▶sub sid { return $_[0]{properties}{sid} }
Subroutine sid: called CC=1 SCAR=0.0
63 1 ▶sub ttl { return $_[0]{properties}{ttl} }
Subroutine ttl: called CC=1 SCAR=0.0
64  
65 2 1;
66  
67 __END__
« Twilio/Rest/Api/V2010/Account/Usage/Record.pm ↑ Summary Twilio/Rest/Messaging/V1/DomainConfigMessagingService.pm »