File Coverage

lib/WebService/Braintree/CreditCardVerification.pm
Criterion Covered Total %
statement 14 21 66.6
branch n/a
condition n/a
subroutine 5 9 55.5
pod 3 4 75.0
total 22 34 64.7


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