File Coverage

blib/lib/Net/Braintree/Dispute.pm
Criterion Covered Total %
statement 12 17 70.5
branch 0 2 0.0
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 16 25 64.0


line stmt bran cond sub pod time code
1             package Net::Braintree::Dispute;
2 1     1   317 use Net::Braintree::Dispute::TransactionDetails;
  1         3  
  1         37  
3 1     1   511 use Net::Braintree::Dispute::Status;
  1         2  
  1         23  
4 1     1   360 use Net::Braintree::Dispute::Reason;
  1         2  
  1         22  
5              
6 1     1   5 use Moose;
  1         0  
  1         7  
7             extends 'Net::Braintree::ResultObject';
8              
9             my $meta = __PACKAGE__->meta;
10              
11             sub BUILD {
12 0     0 0   my ($self, $attributes) = @_;
13              
14 0           $meta->add_attribute('transaction_details', is => 'rw');
15 0 0         $self->transaction_details(Net::Braintree::Dispute::TransactionDetails->new($attributes->{transaction})) if ref($attributes->{transaction}) eq 'HASH';
16 0           delete($attributes->{transaction});
17 0           $self->set_attributes_from_hash($self, $attributes);
18             }
19              
20             1;