lib/WebService/Braintree/UsBankAccount.pm

filter: Statementstmt 70.5% 12 / 17 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 62.9% 17 / 27 CC 2 SCAR 10.4
CC
2
Cov
63%
sale
6.0
find
2.0
BEGIN
1.0
CRAP 2.8
« lib/WebService/Braintree/IdealPayment.pm ↑ Summary lib/WebService/Braintree/Transaction.pm »
1 # vim: sw=4 ts=4 ft=perl
2  
3 package WebService::Braintree::UsBankAccount;
4 22 $WebService::Braintree::UsBankAccount::VERSION = '1.7';
5 22 ▶use 5.010_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 22 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 WebService::Braintree::UsBankAccount
11  
12 =head1 PURPOSE
13  
14 This class finds US Bank Account payment methods.
15  
16 =cut
17  
18 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 22 with 'WebService::Braintree::Role::Interface';
21  
22 =head1 CLASS METHODS
23  
24 =head2 find()
25  
26 This takes a token and returns the US Bank account (if it exists).
27  
28 =cut
29  
30 0 ▶sub find {
Subroutine find: not called CC=1 SCAR=6.9
Pod documented
31 0 my ($class, $token) = @_;
32 0 $class->gateway->us_bank_account->find($token);
33 }
34  
35 =head2 sale()
36  
37 This takes a token and an optional hashref of parameters and creates a sale
38 transaction on the provided token.
39  
40 =cut
41  
42 0 ▶sub sale {
Subroutine sale: not called CC=2 SCAR=17.9
Pod documented
43 0 my ($class, $token, $params) = @_;
44 $class->gateway->transaction->sale({
45 0 ▶ %{$params//{}},
Condition0%0/2
$params // {}
l!l
00
MC/DC0%0/1
$params // {}
$params
Truth table0%0/2
A
A= $params
Aresult
11
00
46 payment_method_token => $token,
47 options => { submit_for_settlement => 1 },
48 });
49 }
50  
51 22 __PACKAGE__->meta->make_immutable;
52  
53 22 1;
54 __END__
« lib/WebService/Braintree/IdealPayment.pm ↑ Summary lib/WebService/Braintree/Transaction.pm »