lib/LWP/Authen/OAuth2/ServiceProvider/Dwolla.pm

filter: Statementstmt 85.7% 24 / 28 Branchbran 33.3% 2 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 33.3% 2 / 6 totaltotal 72.0% 36 / 50 CC 4 SCAR 7.7
CC
4
Cov
76%
api_url_base
6.0
authorization_endpoint
2.0
token_endpoint
2.0
CRAP 2.2
« blib/lib/LWP/Authen/OAuth2/ServiceProvider/Google.pm ↑ Summary blib/lib/LWP/Authen/OAuth2/ServiceProvider/Strava.pm »
1 package LWP::Authen::OAuth2::ServiceProvider::Dwolla;
2  
3 # ABSTRACT: Access Dwolla API v2
4 2 our $VERSION = '0.18'; # VERSION
5  
6 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use base qw/LWP::Authen::OAuth2::ServiceProvider/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use JSON qw/decode_json/;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 sub authorization_endpoint {
14 1 ▶ my $self = shift;
Subroutine authorization_endpoint: called CC=2 SCAR=7.1
Pod documented
15 1 ▶ my $host = $self->{use_test_urls} ? 'uat.dwolla.com' : 'www.dwolla.com';
Branch: 1 branch
BranchTrueFalseTotal
$self->{'use_test_urls'} ? : 0 1 1
16 1 return 'https://'.$host.'/oauth/v2/authenticate';
17 }
18  
19 sub token_endpoint {
20 1 ▶ my $self = shift;
Subroutine token_endpoint: called CC=2 SCAR=7.1
Pod documented
21 1 ▶ my $host = $self->{use_test_urls} ? 'uat.dwolla.com' : 'www.dwolla.com';
Branch: 1 branch
BranchTrueFalseTotal
$self->{'use_test_urls'} ? : 0 1 1
22 1 return 'https://'.$host.'/oauth/v2/token';
23 }
24  
25 sub api_url_base {
26 0 ▶ my $self = shift;
Subroutine api_url_base: not called CC=2 SCAR=17.9
Pod undocumented
27 0 ▶ my $host = $self->{use_test_urls} ? 'api-uat.dwolla.com' : 'api.dwolla.com';
Branch: 1 branch
BranchTrueFalseTotal
$self->{'use_test_urls'} ? : 0 0 0
28 0 return 'https://'.$host;
29 }
30  
31 sub authorization_required_params {
32 1 ▶ my $self = shift;
Subroutine authorization_required_params: called CC=1 SCAR=0.0
Pod undocumented
33 1 return ('scope', $self->SUPER::authorization_required_params());
34 }
35  
36 sub authorization_optional_params {
37 1 ▶ my $self = shift;
Subroutine authorization_optional_params: called CC=1 SCAR=0.0
Pod undocumented
38 1 return ($self->SUPER::authorization_optional_params(), qw/dwolla_landing verified_account/);
39 }
40  
41 sub default_api_headers {
42 0 ▶ return { 'Content-Type' => 'application/vnd.dwolla.v1.hal+json', 'Accept' => 'application/vnd.dwolla.v1.hal+json' };
Subroutine default_api_headers: not called CC=1 SCAR=6.9
Pod undocumented
43 }
44  
45  
46 2 1;
47  
48 __END__
« blib/lib/LWP/Authen/OAuth2/ServiceProvider/Google.pm ↑ Summary blib/lib/LWP/Authen/OAuth2/ServiceProvider/Strava.pm »