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