Twilio/Rest/Oauth/V1/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/Messaging/V1/Service/UsAppToPersonUsecase.pm ↑ Summary Twilio/Rest/Oauth/V2/Authorize.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Oauth::V1::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::V1::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 ClientId => $options->{client_id},
34 RedirectUri => $options->{redirect_uri},
35 ResponseType => $options->{response_type},
36 Scope => $options->{scope},
37 State => $options->{state},
38 }
39 }
40 1 );
41 1 return Twilio::Rest::Oauth::V1::AuthorizeInstance->new($self->{version}, $response->get_content);
42 }
43  
44 package Twilio::Rest::Oauth::V1::AuthorizeInstance;
45  
46 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
47  
48 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
49  
50 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
51 1 my ($class, $version, $payload) = @_;
52 1 my $self = $class->SUPER::new($version, $payload);
53 1 $self->{solution} = {};
54 1 return $self;
55 }
56  
57 1 ▶sub redirect_to { return $_[0]{properties}{redirect_to} }
Subroutine redirect_to: called CC=1 SCAR=0.0
58  
59 2 1;
60  
61 __END__
« Twilio/Rest/Messaging/V1/Service/UsAppToPersonUsecase.pm ↑ Summary Twilio/Rest/Oauth/V2/Authorize.pm »