| 1 | package Net::Braintree::PayPalAccountGateway; | ||
| 2 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use Carp qw(confess); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | has 'gateway' => (is => 'ro'); | |
| 6 | |||
| 7 | 0 | ▶ | sub find { |
|
Subroutine
find: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 8 | 0 | my ($self, $token) = @_; | |
| 9 | 0 | $self->_make_request("/payment_methods/paypal_account/$token", "get", undef)->paypal_account; | |
| 10 | } | ||
| 11 | |||
| 12 | 0 | ▶ | sub update { |
|
Subroutine
update: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 13 | 0 | my ($self, $token, $params) = @_; | |
| 14 | 0 | $self->_make_request( | |
| 15 | "/payment_methods/paypal_account/$token", | ||
| 16 | "put", | ||
| 17 | { | ||
| 18 | paypal_account => $params | ||
| 19 | }); | ||
| 20 | } | ||
| 21 | |||
| 22 | 0 | ▶ | sub _make_request { |
|
Subroutine
_make_request: not called CC=1 SCAR=6.9
| |||
| 23 | 0 | my($self, $path, $verb, $params) = @_; | |
| 24 | 0 | my $response = $self->gateway->http->$verb($path, $params); | |
| 25 | 0 | my $result = Net::Braintree::Result->new(response => $response); | |
| 26 | 0 | return $result; | |
| 27 | } | ||
| 28 | |||
| 29 | 1 | 1; | |