File Coverage

blib/lib/WebService/Braintree/CreditCardVerification.pm
Criterion Covered Total %
statement 9 16 56.2
branch n/a
condition n/a
subroutine 3 7 42.8
pod 3 4 75.0
total 15 27 55.5


line stmt bran cond sub pod time code
1             package WebService::Braintree::CreditCardVerification;
2             $WebService::Braintree::CreditCardVerification::VERSION = '0.92';
3             =head1 NAME
4              
5             WebService::Braintree::CreditCardVerification
6              
7             =head1 PURPOSE
8              
9             This class searches, lists, and finds credit card verifications.
10              
11             =cut
12              
13             # TODO: Why are these used here?
14              
15 1     1   5 use WebService::Braintree::CreditCard;
  1         2  
  1         26  
16 1     1   5 use WebService::Braintree::CreditCard::CardType;
  1         2  
  1         16  
17              
18 1     1   4 use Moose;
  1         2  
  1         4  
19              
20             =head1 CLASS METHODS
21              
22             =head2 search()
23              
24             This takes a subref which is used to set the search parameters and returns a
25             credit card verification object.
26              
27             Please see L<Searching|WebService::Braintree/SEARCHING> for more information on
28             the subref and how it works.
29              
30             =cut
31              
32             sub search {
33 0     0 1   my ($class, $block) = @_;
34 0           $class->gateway->credit_card_verification->search($block);
35             }
36              
37             =head2 all()
38              
39             This returns all the credit card verifications.
40              
41             =cut
42              
43             sub all {
44 0     0 1   my $class = shift;
45 0           $class->gateway->credit_card_verification->all;
46             }
47              
48             =head2 find()
49              
50             This takes a token and returns the credit card verification associated with
51             that token.
52              
53             =cut
54              
55             sub find {
56 0     0 1   my ($class, $token) = @_;
57 0           $class->gateway->credit_card_verification->find($token);
58             }
59              
60             sub gateway {
61 0     0 0   WebService::Braintree->configuration->gateway;
62             }
63              
64             =head1 OBJECT METHODS
65              
66             UNKNOWN
67              
68             =cut
69              
70             has 'avs_error_response_code' => (is => 'ro');
71             has 'avs_postal_code_response_code' => (is => 'ro');
72             has 'avs_street_address_response_code' => (is => 'ro');
73             has 'cvv_response_code' => (is => 'ro');
74             has 'merchant_account_id' => (is => 'ro');
75             has 'processor_response_code' => (is => 'ro');
76             has 'processor_response_text' => (is => 'ro');
77             has 'id' => (is => 'ro');
78             has 'gateway_rejection_reason' => (is => 'ro');
79             has 'credit_card' => (is => 'ro'); # <-- Is this a ::CreditCard?
80             has 'billing' => (is => 'ro');
81             has 'created_at' => (is => 'ro');
82             has 'status' => (is => 'ro');
83              
84             __PACKAGE__->meta->make_immutable;
85              
86             1;
87             __END__
88              
89             =head1 TODO
90              
91             =over 4
92              
93             =item Need to document the keys and values that are returned
94              
95             =item Need to document the required and optional input parameters
96              
97             =item Need to document the possible errors/exceptions
98              
99             =back
100              
101             =cut