Twilio/Rest/Numbers/V1/PortingAllPortIn.pm

filter: Statementstmt 87.0% 47 / 54 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 86.3% 19 / 22 Podpod n/a totaltotal 84.8% 67 / 79 CC 2 SCAR 2.0
CC
2
Cov
86%
page
2.0
read
2.0
stream
2.0
CRAP 1.2
« Twilio/Rest/Knowledge/V2/Chunk.pm ↑ Summary Twilio/Rest/Intelligence/V3/Version.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Numbers::V1::PortingAllPortIn;
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::Numbers::V1::PortingAllPortInList;
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} = '/Porting/PortIn/PortInRequests';
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, $page_number) = @_;
35 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
36  
37 my $params = {
38 CreatedAfter => $options->{created_after},
39 CreatedBefore => $options->{created_before},
40 PortInRequestSid => $options->{port_in_request_sid},
41 PortInRequestStatus => $options->{port_in_request_status},
42 Size => $options->{size},
43 Token => $options->{token},
44 1 PageToken => $page_token,
45 Page => $page_number,
46 PageSize => $page_size,
47 };
48  
49 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
50 1 return $self->_build_page($response);
51 }
52  
53 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
54 0 my ($self, $target_url) = @_;
55 0 my $client = $self->{version}->get_domain->get_client;
56 0 return $self->_build_page($client->request('GET', $target_url));
57 }
58  
59 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
60 1 my ($self, $response) = @_;
61 return Twilio::Rest::Numbers::V1::PortingAllPortInPage->new($self->{version}, $response,
62 1 $self->{solution});
63 }
64  
65 package Twilio::Rest::Numbers::V1::PortingAllPortInPage;
66  
67 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
68  
69 1 ▶sub records_key { return 'port_in_requests' }
Subroutine records_key: called CC=1 SCAR=0.0
70  
71 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
72 1 my ($self, $payload) = @_;
73 1 return Twilio::Rest::Numbers::V1::PortingAllPortInInstance->new($self->{version}, $payload);
74 }
75  
76 package Twilio::Rest::Numbers::V1::PortingAllPortInInstance;
77  
78 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
79  
80 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
81  
82 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
83 1 my ($class, $version, $payload) = @_;
84 1 my $self = $class->SUPER::new($version, $payload);
85 1 $self->{solution} = {};
86 1 return $self;
87 }
88  
89 1 ▶sub phone_numbers_ported { return $_[0]{properties}{phone_numbers_ported} }
Subroutine phone_numbers_ported: called CC=1 SCAR=0.0
90 1 ▶sub phone_numbers_requested { return $_[0]{properties}{phone_numbers_requested} }
Subroutine phone_numbers_requested: called CC=1 SCAR=0.0
91 1 ▶sub port_in_request_sid { return $_[0]{properties}{port_in_request_sid} }
Subroutine port_in_request_sid: called CC=1 SCAR=0.0
92 1 ▶sub port_in_request_status { return $_[0]{properties}{port_in_request_status} }
Subroutine port_in_request_status: called CC=1 SCAR=0.0
93 1 ▶sub status_last_updated_timestamp { return $_[0]{properties}{status_last_updated_timestamp} }
Subroutine status_last_updated_timestamp: called CC=1 SCAR=0.0
94 1 ▶sub suggested_action { return $_[0]{properties}{suggested_action} }
Subroutine suggested_action: called CC=1 SCAR=0.0
95  
96 2 1;
97  
98 __END__
« Twilio/Rest/Knowledge/V2/Chunk.pm ↑ Summary Twilio/Rest/Intelligence/V3/Version.pm »