GoCardless/Payout.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 25.0% 1 / 4 totaltotal 88.8% 24 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« GoCardless/Bill.pm ↑ Summary GoCardless/Customer.pm »
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<Business::GoCardless::Resource>
10  
11 =cut
12  
13 55 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 55 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 55 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 55 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 55 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 bounced
68  
69 if ( $Payout->paid ) {
70 ...
71 }
72  
73 =cut
74  
75 1 ▶sub pending { return shift->status eq 'pending' }
Subroutine pending: called CC=1 SCAR=0.0
Pod undocumented
76 1 ▶sub paid { return shift->status eq 'paid' }
Subroutine paid: called CC=1 SCAR=0.0
Pod undocumented
77 2 ▶sub bounced { return shift->status eq 'bounced' }
Subroutine bounced: called CC=1 SCAR=0.0
Pod undocumented
78  
79 =head1 Operations on a payout
80  
81 =head2 update
82  
83 Update the payout's metadata (Pro API only), returns the updated Payout object:
84  
85 $Payout->update( metadata => { ... } );
86  
87 =cut
88  
89 1 ▶sub update { shift->_update( @_ ); }
Subroutine update: called CC=1 SCAR=0.0
Pod documented
90  
91 =head1 AUTHOR
92  
93 Lee Johnson - C<lee@payprop.com>
94  
95 This library is free software; you can redistribute it and/or modify it under
96 the same terms as Perl itself. If you would like to contribute documentation,
97 features, bug fixes, or anything else then please raise an issue / pull request:
98  
99 https://github.com/payprop/business-gocardless
100  
101 =cut
102  
103 55 1;
104  
105 # vim: ts=4:sw=4:et
« GoCardless/Bill.pm ↑ Summary GoCardless/Customer.pm »