File Coverage

blib/lib/Net/Flotum/Object/Charge.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 0 3 0.0
total 25 28 89.2


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