File Coverage

lib/WebService/Braintree/PlanGateway.pm
Criterion Covered Total %
statement 11 15 73.3
branch n/a
condition 0 2 0.0
subroutine 4 5 80.0
pod 0 1 0.0
total 15 23 65.2


line stmt bran cond sub pod time code
1             package WebService::Braintree::PlanGateway;
2             $WebService::Braintree::PlanGateway::VERSION = '0.94';
3 20     20   423 use 5.010_001;
  20         66  
4 20     20   103 use strictures 1;
  20         140  
  20         760  
5              
6 20     20   2052 use Moose;
  20         38  
  20         113  
7             with 'WebService::Braintree::Role::MakeRequest';
8              
9 20     20   118602 use WebService::Braintree::Util qw(to_instance_array);
  20         42  
  20         2803  
10              
11             has 'gateway' => (is => 'ro');
12              
13             sub all {
14 0     0 0   my $self = shift;
15              
16 0           my $response = $self->gateway->http->get("/plans");
17 0   0       my $attrs = $response->{plans} || [];
18 0           return to_instance_array($attrs, 'WebService::Braintree::Plan');
19             }
20              
21             __PACKAGE__->meta->make_immutable;
22              
23             1;
24             __END__