| 1 | # vim: sw=4 ts=4 ft=perl | ||||||||||||
| 2 | |||||||||||||
| 3 | package WebService::Braintree::EuropeBankAccount; | ||||||||||||
| 4 | 22 | $WebService::Braintree::EuropeBankAccount::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::EuropeBankAccount | ||||||||||||
| 11 | |||||||||||||
| 12 | =head1 PURPOSE | ||||||||||||
| 13 | |||||||||||||
| 14 | This class finds Europe 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 a L<response|WebService::Braintee::PaymentMethodResult> with the C<< europe_bank_account() >> set. | ||||||||||||
| 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->europe_bank_account->find($token); | |||||||||||
| 33 | } | ||||||||||||
| 34 | |||||||||||||
| 35 | =head2 sale() | ||||||||||||
| 36 | |||||||||||||
| 37 | This takes a token and an optional hashref of parameters. This delegates to | ||||||||||||
| 38 | L<WebService::Braintree::Transaction/sale>, setting the | ||||||||||||
| 39 | C<< payment_method_token >> appropriately and submitting the transaction for | ||||||||||||
| 40 | settlement. | ||||||||||||
| 41 | |||||||||||||
| 42 | =cut | ||||||||||||
| 43 | |||||||||||||
| 44 | 0 | ▶ | sub sale { | ||||||||||
|
Subroutine
sale: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 45 | 0 | my ($class, $token, $params) = @_; | |||||||||||
| 46 | $class->gateway->transaction->sale({ | ||||||||||||
| 47 | 0 | ▶ | %{$params//{}}, | ||||||||||
|
Condition0%0/2
$params // {}
MC/DC0%0/1
$params // {}
$params
Truth table0%0/2
A
A= $params
| |||||||||||||
| 48 | payment_method_token => $token, | ||||||||||||
| 49 | options => { submit_for_settlement => 1 }, | ||||||||||||
| 50 | }); | ||||||||||||
| 51 | } | ||||||||||||
| 52 | |||||||||||||
| 53 | 22 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 54 | |||||||||||||
| 55 | 22 | 1; | |||||||||||
| 56 | __END__ | ||||||||||||