File Coverage

blib/lib/Business/GoCardless/Payout.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 16 18 88.8


line stmt bran cond sub pod time code
1             package Business::GoCardless::Payout;
2              
3             =head1 NAME
4              
5             Business::GoCardless::Payout
6              
7             =head1 DESCRIPTION
8              
9             A class for a gocardless payout, extends L
10              
11             =cut
12              
13 19     19   155 use strict;
  19         41  
  19         640  
14 19     19   115 use warnings;
  19         41  
  19         472  
15              
16 19     19   106 use Moo;
  19         41  
  19         118  
17             extends 'Business::GoCardless::Resource';
18              
19             =head1 ATTRIBUTES
20              
21             amount
22             arrival_date
23             created_at
24             currency
25             deducted_fees
26             fx
27             id
28             links
29             metadata
30             payout_type
31             reference
32             status
33             tax_currency
34              
35             =cut
36              
37             # app_ids, bank_reference, paid_at, and transaction_fees relate to the
38             # legacy (v1) basic API
39              
40             has [ qw/
41             app_ids
42             bank_reference
43             paid_at
44             transaction_fees
45              
46             amount
47             arrival_date
48             created_at
49             currency
50             deducted_fees
51             fx
52             id
53             links
54             metadata
55             payout_type
56             reference
57             status
58             tax_currency
59             / ] => (
60             is => 'rw',
61             );
62              
63             =head1 Status checks on a payout
64              
65             pending
66             paid
67              
68             if ( $Payout->paid ) {
69             ...
70             }
71              
72             =cut
73              
74 1     1 0 1801 sub pending { return shift->status eq 'pending' }
75 1     1 0 9 sub paid { return shift->status eq 'paid' }
76              
77             =head1 AUTHOR
78              
79             Lee Johnson - C
80              
81             This library is free software; you can redistribute it and/or modify it under
82             the same terms as Perl itself. If you would like to contribute documentation,
83             features, bug fixes, or anything else then please raise an issue / pull request:
84              
85             https://github.com/Humanstate/business-gocardless
86              
87             =cut
88              
89             1;
90              
91             # vim: ts=4:sw=4:et