Twilio/Rest/Oauth/V2/Authorize.pm

filter: Statementstmt 100% 33 / 33 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 10 / 10 Podpod n/a totaltotal 95.6% 44 / 46 CC 2 SCAR 1.7
CC
2
Cov
97%
fetch
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Twilio/Rest/Oauth/V1/Authorize.pm ↑ Summary Twilio/Rest/PreviewIam/V1/Authorize.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Oauth::V2::Authorize;
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::Oauth::V2::AuthorizeList;
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} = '/authorize';
20 1 return $self;
21 }
22  
23 1 ▶sub fetch {
Subroutine fetch: called CC=2 SCAR=7.0
24 1 my ($self, $options) = @_;
25 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
26  
27 my $response = $self->{version}->handle_request(
28 'GET',
29 $self->{uri},
30 'fetch',
31 {
32 params => {
33 client_id => $options->{client_id},
34 code_challenge => $options->{code_challenge},
35 code_challenge_method => $options->{code_challenge_method},
36 redirect_uri => $options->{redirect_uri},
37 response_type => $options->{response_type},
38 scope => $options->{scope},
39 state => $options->{state},
40 }
41 }
42 1 );
43 1 return Twilio::Rest::Oauth::V2::AuthorizeInstance->new($self->{version}, $response->get_content);
44 }
45  
46 package Twilio::Rest::Oauth::V2::AuthorizeInstance;
47  
48 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
49  
50 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
51  
52 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
53 1 my ($class, $version, $payload) = @_;
54 1 my $self = $class->SUPER::new($version, $payload);
55 1 $self->{solution} = {};
56 1 return $self;
57 }
58  
59 1 ▶sub redirect_to { return $_[0]{properties}{redirect_to} }
Subroutine redirect_to: called CC=1 SCAR=0.0
60  
61 2 1;
62  
63 __END__
« Twilio/Rest/Oauth/V1/Authorize.pm ↑ Summary Twilio/Rest/PreviewIam/V1/Authorize.pm »