Braintree/PayPalAccountGateway.pm

filter: Statementstmt 50.0% 8 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 0.0% 0 / 2 totaltotal 43.4% 10 / 23 CC 1 SCAR 4.7
CC
1
Cov
50%
find
2.0
update
2.0
_make_request
2.0
CRAP 1.6
« Braintree/WebhookTesting.pm ↑ Summary Braintree/ApplePayCard.pm »
1 package Net::Braintree::PayPalAccountGateway;
2 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Carp qw(confess);
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 has 'gateway' => (is => 'ro');
6  
7 0 ▶sub find {
Subroutine find: not called CC=1 SCAR=6.9
Pod undocumented
8 0 my ($self, $token) = @_;
9 0 $self->_make_request("/payment_methods/paypal_account/$token", "get", undef)->paypal_account;
10 }
11  
12 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
Pod undocumented
13 0 my ($self, $token, $params) = @_;
14 0 $self->_make_request(
15 "/payment_methods/paypal_account/$token",
16 "put",
17 {
18 paypal_account => $params
19 });
20 }
21  
22 0 ▶sub _make_request {
Subroutine _make_request: not called CC=1 SCAR=6.9
23 0 my($self, $path, $verb, $params) = @_;
24 0 my $response = $self->gateway->http->$verb($path, $params);
25 0 my $result = Net::Braintree::Result->new(response => $response);
26 0 return $result;
27 }
28  
29 1 1;
« Braintree/WebhookTesting.pm ↑ Summary Braintree/ApplePayCard.pm »