Twilio/Rest/Iam/V1/GetApiKeys.pm

filter: Statementstmt 83.6% 46 / 55 Branchbran n/a Conditioncond 16.6% 1 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 85.7% 18 / 21 Podpod n/a totaltotal 76.4% 65 / 85 CC 4 SCAR 6.7
CC
4
Cov
77%
read
6.0
stream
6.0
page
2.0
CRAP 2.0
« Twilio/InstanceResource.pm ↑ Summary Twilio/Rest/Conversations/V2.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Iam::V1::GetApiKeys;
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::Iam::V1::GetApiKeysList;
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} = '/Keys';
20 1 return $self;
21 }
22  
23 0 ▶sub read {
Subroutine read: not called CC=2 SCAR=17.9
24 0 my ($self, $account_sid, $options, @arguments) = @_;
25 0 ▶ return $self->read_records({ %{ $options // {} }, account_sid => $account_sid }, @arguments);
Condition0%0/2
$options // {}
l!l
00
MC/DC0%0/1
$options // {}
$options
Truth table0%0/2
A
A= $options
Aresult
11
00
26 }
27  
28 0 ▶sub stream {
Subroutine stream: not called CC=2 SCAR=17.9
29 0 my ($self, $account_sid, $options, @arguments) = @_;
30 0 ▶ return $self->stream_records({ %{ $options // {} }, account_sid => $account_sid }, @arguments);
Condition0%0/2
$options // {}
l!l
00
MC/DC0%0/1
$options // {}
$options
Truth table0%0/2
A
A= $options
Aresult
11
00
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 AccountSid => $options->{account_sid},
39 1 PageToken => $page_token,
40 Page => $page_number,
41 PageSize => $page_size,
42 };
43  
44 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
45 1 return $self->_build_page($response);
46 }
47  
48 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
49 0 my ($self, $target_url) = @_;
50 0 my $client = $self->{version}->get_domain->get_client;
51 0 return $self->_build_page($client->request('GET', $target_url));
52 }
53  
54 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
55 1 my ($self, $response) = @_;
56 1 return Twilio::Rest::Iam::V1::GetApiKeysPage->new($self->{version}, $response, $self->{solution});
57 }
58  
59 package Twilio::Rest::Iam::V1::GetApiKeysPage;
60  
61 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
62  
63 1 ▶sub records_key { return 'keys' }
Subroutine records_key: called CC=1 SCAR=0.0
64  
65 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
66 1 my ($self, $payload) = @_;
67 1 return Twilio::Rest::Iam::V1::GetApiKeysInstance->new($self->{version}, $payload);
68 }
69  
70 package Twilio::Rest::Iam::V1::GetApiKeysInstance;
71  
72 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
73  
74 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
75  
76 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
77 1 my ($class, $version, $payload) = @_;
78 1 my $self = $class->SUPER::new($version, $payload);
79 1 $self->{solution} = {};
80 1 return $self;
81 }
82  
83 1 ▶sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) }
Subroutine date_created: called CC=1 SCAR=0.0
84 1 ▶sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) }
Subroutine date_updated: called CC=1 SCAR=0.0
85 1 ▶sub flags { return $_[0]{properties}{flags} }
Subroutine flags: called CC=1 SCAR=0.0
86 1 ▶sub friendly_name { return $_[0]{properties}{friendly_name} }
Subroutine friendly_name: called CC=1 SCAR=0.0
87 1 ▶sub sid { return $_[0]{properties}{sid} }
Subroutine sid: called CC=1 SCAR=0.0
88  
89 2 1;
90  
91 __END__
« Twilio/InstanceResource.pm ↑ Summary Twilio/Rest/Conversations/V2.pm »