File Coverage

blib/lib/Net/Flotum/Object/Charge.pm
Criterion Covered Total %
statement 21 21 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 3 0.0
total 29 32 90.6


line stmt bran cond sub pod time code
1             package Net::Flotum::Object::Charge;
2 4     4   13 use common::sense;
  4         5  
  4         16  
3 4     4   140 use Moo;
  4         5  
  4         14  
4 4     4   717 use namespace::clean;
  4         4  
  4         16  
5 4     4   652 use MooX::late;
  4         5  
  4         19  
6 4     4   354 use Carp;
  4         4  
  4         727  
7              
8             has flotum => (
9             is => "ro",
10             weak_ref => 1,
11             required => 1,
12             );
13              
14             has id => (
15             is => "rw",
16             isa => "Str",
17             required => 1,
18             );
19              
20             has customer => (
21             is => "rw",
22             isa => "Net::Flotum::Object::Customer",
23             weak_ref => 1,
24             );
25              
26             sub payment {
27 1     1 0 5143 my $self = shift;
28              
29 1         13 return $self->flotum->_payment_charge( @_, charge => $self );
30             }
31              
32             sub capture {
33 2     2 0 16 my $self = shift;
34              
35 2         43 return $self->flotum->_capture_charge( @_, charge => $self );
36             }
37              
38             sub refund {
39 1     1 0 1738 my $self = shift;
40              
41 1         14 return $self->flotum->_refund_charge( @_, charge => $self );
42             }
43              
44             1;
45              
46             __END__