File Coverage

blib/lib/Net/Braintree/PayPalAccountGateway.pm
Criterion Covered Total %
statement 6 14 42.8
branch n/a
condition n/a
subroutine 2 5 40.0
pod 0 2 0.0
total 8 21 38.1


line stmt bran cond sub pod time code
1             package Net::Braintree::PayPalAccountGateway;
2 1     1   5 use Moose;
  1         2  
  1         6  
3 1     1   5473 use Carp qw(confess);
  1         2  
  1         243  
4              
5             has 'gateway' => (is => 'ro');
6              
7             sub find {
8 0     0 0   my ($self, $token) = @_;
9 0           $self->_make_request("/payment_methods/paypal_account/$token", "get", undef)->paypal_account;
10             }
11              
12             sub update {
13 0     0 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             sub _make_request {
23 0     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;