lib/WebService/Braintree/_/Transaction/MasterpassCardDetail.pm

filter: Statementstmt 88.2% 30 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 85.3% 35 / 41 CC 1 SCAR 3.4
CC
1
Cov
88%
expiration_date
2.0
masked_number
2.0
BEGIN
1.0
CRAP 1.4
« lib/WebService/Braintree/PaymentMethodNonce.pm ↑ Summary lib/WebService/Braintree/_/Transaction/VisaCheckoutCardDetail.pm »
1 # vim: sw=4 ts=4 ft=perl
2  
3 package WebService::Braintree::_::Transaction::MasterpassCardDetail;
4 22 $WebService::Braintree::_::Transaction::MasterpassCardDetail::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::_::Transaction::MasterpassCardDetail
11  
12 =head1 PURPOSE
13  
14 This class represents a transaction Masterpass card detail.
15  
16 This class will only be created as part of a L<response|WebService::Braintree::Result> or L<error response|WebService::Braintree::ErrorResult>.
17  
18 =cut
19  
20 22 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 22 extends 'WebService::Braintree::_';
23  
24 =head1 ATTRIBUTES
25  
26 =cut
27  
28 =head2 bin()
29  
30 This is the bin for this masterpass card detail.
31  
32 =cut
33  
34 22 has bin => (
35 is => 'ro',
36 );
37  
38 =head2 card_type()
39  
40 This is the card type for this masterpass card detail.
41  
42 =cut
43  
44 22 has card_type => (
45 is => 'ro',
46 );
47  
48 =head2 cardholer_name()
49  
50 This is the cardholder name for this masterpass card detail.
51  
52 =cut
53  
54 22 has cardholder_name => (
55 is => 'ro',
56 );
57  
58 =head2 commercial()
59  
60 This is true if this masterpass card detail is commercial.
61  
62 =cut
63  
64 22 has commercial => (
65 is => 'ro',
66 );
67  
68 =head2 country_of_issuance()
69  
70 This is the country of issuance for this masterpass card detail.
71  
72 =cut
73  
74 22 has country_of_issuance => (
75 is => 'ro',
76 );
77  
78 =head2 customer_location()
79  
80 This is the customer location for this masterpass card detail.
81  
82 =cut
83  
84 22 has customer_location => (
85 is => 'ro',
86 );
87  
88 =head2 debit()
89  
90 This is true if this masterpass card detail is debit.
91  
92 =cut
93  
94 22 has debit => (
95 is => 'ro',
96 );
97  
98 =head2 durbin_regulated()
99  
100 This is true if this masterpass card detail is Durbin-regulated.
101  
102 =cut
103  
104 22 has durbin_regulated => (
105 is => 'ro',
106 );
107  
108 =head2 expiration_month()
109  
110 This is the expiration month for this masterpass card detail.
111  
112 =cut
113  
114 22 has expiration_month => (
115 is => 'ro',
116 );
117  
118 =head2 expiration_year()
119  
120 This is the expiration year for this masterpass card detail.
121  
122 =cut
123  
124 22 has expiration_year => (
125 is => 'ro',
126 );
127  
128 =head2 healthcare()
129  
130 This is true if this masterpass card detail is healthcare.
131  
132 =cut
133  
134 22 has healthcare => (
135 is => 'ro',
136 );
137  
138 =head2 image_url()
139  
140 This is the image URL for this masterpass card detail.
141  
142 =cut
143  
144 22 has image_url => (
145 is => 'ro',
146 );
147  
148 =head2 issuing_bank()
149  
150 This is the issuing bank for this masterpass card detail.
151  
152 =cut
153  
154 22 has issuing_bank => (
155 is => 'ro',
156 );
157  
158 =head2 last_4()
159  
160 This is the last-4 for this masterpass card detail.
161  
162 =cut
163  
164 22 has last_4 => (
165 is => 'ro',
166 );
167  
168 =head2 payroll()
169  
170 This is true if this masterpass card detail is payroll.
171  
172 =cut
173  
174 22 has payroll => (
175 is => 'ro',
176 );
177  
178 =head2 prepaid()
179  
180 This is true if this masterpass card detail is prepaid.
181  
182 =cut
183  
184 22 has prepaid => (
185 is => 'ro',
186 );
187  
188 =head2 product_id()
189  
190 This is the product ID for this masterpass card detail.
191  
192 =cut
193  
194 22 has product_id => (
195 is => 'ro',
196 );
197  
198 =head2 token()
199  
200 This is the token for this masterpass card detail.
201  
202 =cut
203  
204 22 has token => (
205 is => 'ro',
206 );
207  
208 =head1 METHODS
209  
210 =head2 expiration_date()
211  
212 This returns the expiration date in MM/YYYY format.
213  
214 =cut
215  
216 0 ▶sub expiration_date {
Subroutine expiration_date: not called CC=1 SCAR=6.9
Pod documented
217 0 my $self = shift;
218 0 $self->expiration_month . '/' . $self->expiration_year;
219 }
220  
221 =head2 masked_number()
222  
223 This returns the card number with the center masked out.
224  
225 =cut
226  
227 0 ▶sub masked_number {
Subroutine masked_number: not called CC=1 SCAR=6.9
Pod documented
228 0 my $self = shift;
229 0 $self->bin . '******' . $self->last_4;
230 }
231  
232 22 __PACKAGE__->meta->make_immutable;
233  
234 22 1;
235 __END__
« lib/WebService/Braintree/PaymentMethodNonce.pm ↑ Summary lib/WebService/Braintree/_/Transaction/VisaCheckoutCardDetail.pm »