« lib/WebService/Braintree/_/Transaction.pm
↑ Summary
lib/WebService/Braintree/ResourceCollection.pm »
| 1 | # vim: sw=4 ts=4 ft=perl | ||||||||||
| 2 | |||||||||||
| 3 | package # hide from pause | ||||||||||
| 4 | WebService::Braintree::PaymentMethodNonceGateway; | ||||||||||
| 5 | |||||||||||
| 6 | 22 | ▶ | use 5.010_001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 22 | ▶ | use strictures 1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 22 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 22 | with 'WebService::Braintree::Role::MakeRequest'; | |||||||||
| 11 | |||||||||||
| 12 | 22 | ▶ | use Carp qw(confess); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | 22 | ▶ | use WebService::Braintree::Util qw(validate_id); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | 22 | ▶ | use WebService::Braintree::_::PaymentMethodNonce; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | sub create { | ||||||||
|
Subroutine
create: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 19 | 0 | my ($self, $token) = @_; | |||||||||
| 20 | 0 | ▶ | confess "NotFoundError" if !validate_id($token); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | $self->_make_request("/payment_methods/${token}/nonces", 'post'); | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub find { | ||||||||
|
Subroutine
find: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 25 | 0 | my ($self, $token) = @_; | |||||||||
| 26 | 0 | ▶ | confess "NotFoundError" if !validate_id($token); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 0 | $self->_make_request("/payment_method_nonces/" . $token, 'get'); | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 22 | __PACKAGE__->meta->make_immutable; | |||||||||
| 31 | |||||||||||
| 32 | 22 | 1; | |||||||||
| 33 | __END__ | ||||||||||