line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Braintree::PaymentMethodNonce; |
2
|
|
|
|
|
|
|
$WebService::Braintree::PaymentMethodNonce::VERSION = '0.92'; |
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
WebService::Braintree::PaymentMethodNonce |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 PURPOSE |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
This class creates and finds payment method nonces. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
14
|
|
|
|
|
|
|
extends 'WebService::Braintree::ResultObject'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 CLASS METHODS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head2 create() |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This takes a token and returns the payment method nonce created. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub create { |
25
|
0
|
|
|
0
|
1
|
|
my ($class, $token) = @_; |
26
|
0
|
|
|
|
|
|
$class->gateway->payment_method_nonce->create($token); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head2 find() |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
This takes a token and returns the payment method nonce (if it exists). |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub find { |
36
|
0
|
|
|
0
|
1
|
|
my ($class, $token) = @_; |
37
|
0
|
|
|
|
|
|
$class->gateway->payment_method_nonce->find($token); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub gateway { |
41
|
0
|
|
|
0
|
0
|
|
return WebService::Braintree->configuration->gateway; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 OBJECT METHODS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
UNKNOWN |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__END__ |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 TODO |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=over 4 |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item Need to document the keys and values that are returned |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item Need to document the required and optional input parameters |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item Need to document the possible errors/exceptions |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=back |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=cut |