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