line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Braintree::PaymentMethodNonceGateway; |
2
|
|
|
|
|
|
|
$WebService::Braintree::PaymentMethodNonceGateway::VERSION = '0.94'; |
3
|
20
|
|
|
20
|
|
400
|
use 5.010_001; |
|
20
|
|
|
|
|
63
|
|
4
|
20
|
|
|
20
|
|
99
|
use strictures 1; |
|
20
|
|
|
|
|
157
|
|
|
20
|
|
|
|
|
782
|
|
5
|
|
|
|
|
|
|
|
6
|
20
|
|
|
20
|
|
2038
|
use Moose; |
|
20
|
|
|
|
|
42
|
|
|
20
|
|
|
|
|
122
|
|
7
|
|
|
|
|
|
|
with 'WebService::Braintree::Role::MakeRequest'; |
8
|
|
|
|
|
|
|
|
9
|
20
|
|
|
20
|
|
120083
|
use WebService::Braintree::Util qw(validate_id); |
|
20
|
|
|
|
|
48
|
|
|
20
|
|
|
|
|
4369
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'gateway' => (is => 'ro'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub create { |
14
|
0
|
|
|
0
|
0
|
|
my ($self, $token) = @_; |
15
|
0
|
0
|
|
|
|
|
if (!validate_id($token)) { |
16
|
0
|
|
|
|
|
|
confess "NotFoundError"; |
17
|
|
|
|
|
|
|
} |
18
|
0
|
|
|
|
|
|
my $response = $self->_make_request("/payment_methods/${token}/nonces", 'post'); |
19
|
0
|
|
|
|
|
|
return $response; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub find { |
23
|
0
|
|
|
0
|
0
|
|
my ($self, $token) = @_; |
24
|
0
|
0
|
|
|
|
|
if (!validate_id($token)) { |
25
|
0
|
|
|
|
|
|
confess "NotFoundError"; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $response = $self->_make_request("/payment_method_nonces/" . $token, 'get'); |
29
|
0
|
|
|
|
|
|
return $response; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
__END__ |