lib/WebService/Braintree/ErrorResult.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 33 / 33 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/WebService/Braintree/ErrorCodes/Transaction/Options.pm ↑ Summary lib/WebService/Braintree/GenericSearch.pm »
1 # vim: sw=4 ts=4 ft=perl
2  
3 package WebService::Braintree::ErrorResult;
4 22 $WebService::Braintree::ErrorResult::VERSION = '1.7';
5 22 ▶use 5.010_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 22 ▶use strictures 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 WebService::Braintree::ErrorResult
11  
12 =head1 PURPOSE
13  
14 This class represents a result from the Braintree API with one or more
15 validation errors.
16  
17 =cut
18  
19 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 22 ▶use MooX::Aliases;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 22 ▶use WebService::Braintree::Types qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
23 CreditCardVerification
24 MerchantAccount
25 Subscription
26 Transaction
27 ValidationErrorCollection
28 22 );
29  
30 =head1 METHODS
31  
32 =cut
33  
34 =head2 credit_card_verification()
35  
36 This is an alias of L<verification()/verification()>.
37  
38 =head2 errors()
39  
40 This returns the L<collection/WebService::Braintree::ValidationErrorCollection>
41 of specfic validation errors associatd with this result.
42  
43 =cut
44  
45 22 has errors => (
46 is => 'ro',
47 isa => ValidationErrorCollection,
48 coerce => 1,
49 );
50  
51 =head2 merchant_account()
52  
53 This returns the L<merchant account/WebService::Braintree::_::MerchantAccount>
54 (if any) associated with this error.
55  
56 =cut
57  
58 22 has merchant_account => (
59 is => 'ro',
60 isa => MerchantAccount,
61 coerce => 1,
62 );
63  
64 =head2 message()
65  
66 This returns the string from Braintree that describes the full error.
67  
68 =cut
69  
70 22 has message => (
71 is => 'ro',
72 );
73  
74 =head2 params()
75  
76 TODO
77  
78 =cut
79  
80 22 has params => (
81 is => 'ro',
82 );
83  
84 =head2 response()
85  
86 This is the actual response received from Braintree.
87  
88 =cut
89  
90 22 has response => (
91 is => 'ro',
92 );
93  
94 =head2 subscription()
95  
96 This returns the L<subscription/WebService::Braintree::_::Subscription>
97 (if any) associated with this error.
98  
99 =cut
100  
101 22 has subscription => (
102 is => 'ro',
103 isa => Subscription,
104 coerce => 1,
105 );
106  
107 =head2 transaction()
108  
109 This returns the L<transaction/WebService::Braintree::_::Transaction>
110 (if any) associated with this error.
111  
112 =cut
113  
114 22 has transaction => (
115 is => 'ro',
116 isa => Transaction,
117 coerce => 1,
118 );
119  
120 =head2 verification()
121  
122 This returns the L<verification/WebService::Braintree::_::CreditCardVerification>
123 (if any) associated with this error.
124  
125 =cut
126  
127 22 has verification => (
128 is => 'ro',
129 isa => CreditCardVerification,
130 coerce => 1,
131 alias => 'credit_card_verification',
132 );
133  
134 =head2 is_success
135  
136 This always returns false.
137  
138 =cut
139  
140 1 ▶sub is_success { 0 }
Subroutine is_success: called CC=1 SCAR=0.0
Pod documented
141  
142 22 __PACKAGE__->meta->make_immutable;
143  
144 22 1;
145 __END__
« lib/WebService/Braintree/ErrorCodes/Transaction/Options.pm ↑ Summary lib/WebService/Braintree/GenericSearch.pm »