lib/WebService/Braintree/PaymentMethodNonceGateway.pm

filter: Statementstmt 76.9% 20 / 26 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 0.0% 0 / 2 totaltotal 65.0% 26 / 40 CC 3 SCAR 11.0
CC
3
Cov
67%
create
6.0
find
6.0
BEGIN
1.0
CRAP 3.0
« lib/WebService/Braintree/_/Transaction.pm ↑ Summary lib/WebService/Braintree/ResourceCollection.pm »
1 # vim: sw=4 ts=4 ft=perl
2  
3 package # hide from pause
4 WebService::Braintree::PaymentMethodNonceGateway;
5  
6 22 ▶use 5.010_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 22 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 22 with 'WebService::Braintree::Role::MakeRequest';
11  
12 22 ▶use Carp qw(confess);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 22 ▶use WebService::Braintree::Util qw(validate_id);
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 22 ▶use WebService::Braintree::_::PaymentMethodNonce;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 0 ▶sub create {
Subroutine create: not called CC=2 SCAR=17.9
Pod undocumented
19 0 my ($self, $token) = @_;
20 0 ▶ confess "NotFoundError" if !validate_id($token);
Branch: 1 branch
BranchTrueFalseTotal
unless validate_id($token) 0 0 0
21 0 $self->_make_request("/payment_methods/${token}/nonces", 'post');
22 }
23  
24 0 ▶sub find {
Subroutine find: not called CC=2 SCAR=17.9
Pod undocumented
25 0 my ($self, $token) = @_;
26 0 ▶ confess "NotFoundError" if !validate_id($token);
Branch: 1 branch
BranchTrueFalseTotal
unless validate_id($token) 0 0 0
27 0 $self->_make_request("/payment_method_nonces/" . $token, 'get');
28 }
29  
30 22 __PACKAGE__->meta->make_immutable;
31  
32 22 1;
33 __END__
« lib/WebService/Braintree/_/Transaction.pm ↑ Summary lib/WebService/Braintree/ResourceCollection.pm »