Twilio/Rest/Supersim/V1/NetworkAccessProfile/NetworkAccessProfileNetwork.pm

filter: Statementstmt 84.7% 72 / 85 Branchbran n/a Conditioncond 60.0% 3 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 81.8% 27 / 33 Podpod n/a totaltotal 80.9% 102 / 126 CC 3 SCAR 2.5
CC
3
Cov
83%
page
2.0
new
2.0
read
2.0
CRAP 1.3
« Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignment.pm ↑ Summary Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignments.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetwork;
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::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkList;
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 4 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
16 4 my ($class, $version, $network_access_profile_sid) = @_;
17 4 my $self = $class->SUPER::new($version);
18 4 $self->{solution} = { network_access_profile_sid => $network_access_profile_sid };
19 4 $self->{uri} = join q{}, '/NetworkAccessProfiles/',
20 Twilio::Serialize::path_segment($network_access_profile_sid), '/Networks';
21 4 return $self;
22 }
23  
24 1 ▶sub create {
Subroutine create: called CC=1 SCAR=0.0
25 1 my ($self, $network) = @_;
26  
27 1 my $data = { Network => $network, };
28  
29 my $response =
30 1 $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data });
31 return
32 Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkInstance->new(
33 1 $self->{version}, $response->get_content, $self->{solution}{network_access_profile_sid});
34 }
35  
36 0 ▶sub read {
Subroutine read: not called CC=1 SCAR=6.9
37 0 my ($self, @arguments) = @_;
38 0 return $self->read_records(@arguments);
39 }
40  
41 0 ▶sub stream {
Subroutine stream: not called CC=1 SCAR=6.9
42 0 my ($self, @arguments) = @_;
43 0 return $self->stream_records(@arguments);
44 }
45  
46 1 ▶sub page {
Subroutine page: called CC=2 SCAR=7.0
47 1 my ($self, $options, $page_size, $page_token, $page_number) = @_;
48 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
49  
50 1 my $params = {
51 PageToken => $page_token,
52 Page => $page_number,
53 PageSize => $page_size,
54 };
55  
56 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
57 1 return $self->_build_page($response);
58 }
59  
60 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
61 0 my ($self, $target_url) = @_;
62 0 my $client = $self->{version}->get_domain->get_client;
63 0 return $self->_build_page($client->request('GET', $target_url));
64 }
65  
66 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
67 1 my ($self, $response) = @_;
68 return Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkPage->new(
69 1 $self->{version}, $response, $self->{solution});
70 }
71  
72 2 ▶sub get_context {
Subroutine get_context: called CC=1 SCAR=0.0
73 2 my ($self, $sid) = @_;
74 return Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkContext->new(
75 2 $self->{version}, $self->{solution}{network_access_profile_sid}, $sid);
76 }
77  
78 package Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkPage;
79  
80 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
81  
82 1 ▶sub records_key { return 'networks' }
Subroutine records_key: called CC=1 SCAR=0.0
83  
84 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
85 1 my ($self, $payload) = @_;
86 return
87 Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkInstance->new(
88 1 $self->{version}, $payload, $self->{solution}{network_access_profile_sid});
89 }
90  
91 package Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkContext;
92  
93 2 ▶use parent 'Twilio::InstanceContext';
Subroutine BEGIN: called CC=1 SCAR=0.0
94  
95 2 ▶use Twilio::Serialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
96  
97 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
98 2 my ($class, $version, $network_access_profile_sid, $sid) = @_;
99 2 my $self = $class->SUPER::new($version);
100 2 $self->{solution} = { network_access_profile_sid => $network_access_profile_sid, sid => $sid };
101 2 $self->{uri} = join q{}, '/NetworkAccessProfiles/',
102 Twilio::Serialize::path_segment($network_access_profile_sid), '/Networks/',
103 Twilio::Serialize::path_segment($sid);
104 2 return $self;
105 }
106  
107 1 ▶sub delete {
Subroutine delete: called CC=1 SCAR=0.0
108 1 my ($self) = @_;
109 1 $self->{version}->handle_request('DELETE', $self->{uri}, 'delete');
110 1 return 1;
111 }
112  
113 1 ▶sub fetch {
Subroutine fetch: called CC=1 SCAR=0.0
114 1 my ($self) = @_;
115  
116 1 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch');
117 1 return $self->_build_instance($response);
118 }
119  
120 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
121 1 my ($self, $response) = @_;
122 return
123 Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkInstance->new(
124 $self->{version}, $response->get_content,
125 $self->{solution}{network_access_profile_sid},
126 $self->{solution}{sid}
127 1 );
128 }
129  
130 package Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkInstance;
131  
132 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
133  
134 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
135  
136 3 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
137 3 my ($class, $version, $payload, $network_access_profile_sid, $sid) = @_;
138 3 my $self = $class->SUPER::new($version, $payload);
139 $self->{solution} = {
140 network_access_profile_sid => $network_access_profile_sid,
141 sid => $sid // $self->{properties}{sid}
142 3 ▶ };
Condition66%2/3
$sid // $self->{"properties"}{"sid"}
l!l&&r!l&&!r
120
MC/DC0%0/2
$sid // $self->{"properties"}{"sid"}
$sid $self->{"properties"}{"sid"}
Truth table66%2/3
A // B
A= $sidB= $self->{"properties"}{"sid"}
ABresult
1X1
011
000
143 3 return $self;
144 }
145  
146 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
147 0 my ($self, @arguments) = @_;
148 0 return $self->_context->delete(@arguments);
149 }
150  
151 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
152 0 my ($self, @arguments) = @_;
153 0 return $self->_context->fetch(@arguments);
154 }
155  
156 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
157 0 my ($self) = @_;
158 return Twilio::Rest::Supersim::V1::NetworkAccessProfile::NetworkAccessProfileNetworkContext->new(
159 $self->{version},
160 $self->{solution}{network_access_profile_sid},
161 $self->{solution}{sid}
162 0 );
163 }
164  
165 3 ▶sub friendly_name { return $_[0]{properties}{friendly_name} }
Subroutine friendly_name: called CC=1 SCAR=0.0
166 3 ▶sub identifiers { return $_[0]{properties}{identifiers} }
Subroutine identifiers: called CC=1 SCAR=0.0
167 3 ▶sub iso_country { return $_[0]{properties}{iso_country} }
Subroutine iso_country: called CC=1 SCAR=0.0
168 3 ▶sub network_access_profile_sid { return $_[0]{properties}{network_access_profile_sid} }
Subroutine network_access_profile_sid: called CC=1 SCAR=0.0
169 3 ▶sub sid { return $_[0]{properties}{sid} }
Subroutine sid: called CC=1 SCAR=0.0
170 3 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
171  
172 2 1;
173  
174 __END__
« Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignment.pm ↑ Summary Twilio/Rest/Trusthub/V1/CustomerProfiles/CustomerProfilesEntityAssignments.pm »