File Coverage

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


line stmt bran cond sub pod time code
1             package Net::Braintree::SettlementBatchSummaryGateway;
2 1     1   4 use Moose;
  1         1  
  1         5  
3 1     1   3784 use Carp qw(confess);
  1         1  
  1         148  
4              
5             has 'gateway' => (is => 'ro');
6              
7             sub generate {
8 0     0 0   my ($self, $settlement_date, $group_by_custom_field) = @_;
9 0           my $params = {
10             settlement_date => $settlement_date
11             };
12 0 0         $params->{group_by_custom_field} = $group_by_custom_field if $group_by_custom_field;
13              
14 0           $self->_make_request("/settlement_batch_summary/", "post", {settlement_batch_summary => $params});
15             }
16              
17             sub _make_request {
18 0     0     my($self, $path, $verb, $params) = @_;
19 0           my $response = $self->gateway->http->$verb($path, $params);
20 0           my $result = Net::Braintree::Result->new(response => $response);
21 0           return $result;
22             }
23              
24             1;