Twilio/Rest/Webhooks/V1/EdgeZone.pm

filter: Statementstmt 86.5% 45 / 52 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 85.0% 17 / 20 Podpod n/a totaltotal 84.0% 63 / 75 CC 2 SCAR 2.1
CC
2
Cov
85%
page
2.0
read
2.0
stream
2.0
CRAP 1.2
« Twilio/Rest/Memory/V1/Trait.pm ↑ Summary Twilio/Rest/Wireless/V1/UsageRecord.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Webhooks::V1::EdgeZone;
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::Webhooks::V1::EdgeZoneList;
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} = '/Webhooks/EdgeZones';
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) = @_;
35 1 ▶ $options //= {};
Condition50%1/2
$options //= {}
l!l
01
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
36  
37 1 my $params = {
38 pageSize => $page_size,
39 pageToken => $page_token,
40 };
41  
42 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
43 1 return $self->_build_page($response);
44 }
45  
46 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
47 0 my ($self, $target_url) = @_;
48 0 my $client = $self->{version}->get_domain->get_client;
49 0 return $self->_build_page($client->request('GET', $target_url));
50 }
51  
52 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
53 1 my ($self, $response) = @_;
54 return Twilio::Rest::Webhooks::V1::EdgeZonePage->new($self->{version}, $response,
55 1 $self->{solution});
56 }
57  
58 package Twilio::Rest::Webhooks::V1::EdgeZonePage;
59  
60 2 ▶use parent 'Twilio::TokenPaginationPage';
Subroutine BEGIN: called CC=1 SCAR=0.0
61  
62 1 ▶sub records_key { return 'edgeZones' }
Subroutine records_key: called CC=1 SCAR=0.0
63  
64 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
65 1 my ($self, $payload) = @_;
66 1 return Twilio::Rest::Webhooks::V1::EdgeZoneInstance->new($self->{version}, $payload);
67 }
68  
69 package Twilio::Rest::Webhooks::V1::EdgeZoneInstance;
70  
71 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
72  
73 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
74  
75 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
76 1 my ($class, $version, $payload) = @_;
77 1 my $self = $class->SUPER::new($version, $payload);
78 1 $self->{solution} = {};
79 1 return $self;
80 }
81  
82 1 ▶sub description { return $_[0]{properties}{description} }
Subroutine description: called CC=1 SCAR=0.0
83 1 ▶sub edge_locations { return $_[0]{properties}{edgeLocations} }
Subroutine edge_locations: called CC=1 SCAR=0.0
84 1 ▶sub friendly_name { return $_[0]{properties}{friendlyName} }
Subroutine friendly_name: called CC=1 SCAR=0.0
85 1 ▶sub id { return $_[0]{properties}{id} }
Subroutine id: called CC=1 SCAR=0.0
86  
87 2 1;
88  
89 __END__
« Twilio/Rest/Memory/V1/Trait.pm ↑ Summary Twilio/Rest/Wireless/V1/UsageRecord.pm »