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
« OAuth2/Args.pm ↑ Summary OAuth2/ServiceProvider/Google.pm »
1 package LWP::Authen::OAuth2::ServiceProvider::Dwolla;
2  
3 # ABSTRACT: Access Dwolla API v2
4 2 our $VERSION = '0.20'; # 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 1 ▶sub authorization_endpoint {
Subroutine authorization_endpoint: called CC=2 SCAR=7.1
Pod documented
14 1 my $self = shift;
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 1 ▶sub token_endpoint {
Subroutine token_endpoint: called CC=2 SCAR=7.1
Pod documented
20 1 my $self = shift;
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 0 ▶sub api_url_base {
Subroutine api_url_base: not called CC=2 SCAR=17.9
Pod undocumented
26 0 my $self = shift;
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 1 ▶sub authorization_required_params {
Subroutine authorization_required_params: called CC=1 SCAR=0.0
Pod undocumented
32 1 my $self = shift;
33 1 return ('scope', $self->SUPER::authorization_required_params());
34 }
35  
36 1 ▶sub authorization_optional_params {
Subroutine authorization_optional_params: called CC=1 SCAR=0.0
Pod undocumented
37 1 my $self = shift;
38 1 return ($self->SUPER::authorization_optional_params(), qw/dwolla_landing verified_account/);
39 }
40  
41 0 ▶sub default_api_headers {
Subroutine default_api_headers: not called CC=1 SCAR=6.9
Pod undocumented
42 0 return { 'Content-Type' => 'application/vnd.dwolla.v1.hal+json', 'Accept' => 'application/vnd.dwolla.v1.hal+json' };
43 }
44  
45  
46 2 1;
47  
48 __END__
« OAuth2/Args.pm ↑ Summary OAuth2/ServiceProvider/Google.pm »