« lib/WebService/Braintree/_/AmexExpressCheckoutCard.pm
↑ Summary
lib/WebService/Braintree/_/ApplePayCard.pm »
| 1 | # vim: sw=4 ts=4 ft=perl | ||
| 2 | |||
| 3 | package WebService::Braintree::_::AndroidPayCard; | ||
| 4 | 22 | $WebService::Braintree::_::AndroidPayCard::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::_::AndroidPayCard | ||
| 11 | |||
| 12 | =head1 PURPOSE | ||
| 13 | |||
| 14 | This class represents a AndroidPay card. | ||
| 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 | 22 | ▶ | use Types::Standard qw(ArrayRef); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | 22 | ▶ | use WebService::Braintree::Types qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | Subscription | ||
| 28 | 22 | ); | |
| 29 | |||
| 30 | =head1 ATTRIBUTES | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | =head2 bin() | ||
| 35 | |||
| 36 | This returns the card's bin. | ||
| 37 | |||
| 38 | =cut | ||
| 39 | |||
| 40 | 22 | has bin => ( | |
| 41 | is => 'ro', | ||
| 42 | ); | ||
| 43 | |||
| 44 | =head2 created_at() | ||
| 45 | |||
| 46 | This returns when this card was created. | ||
| 47 | |||
| 48 | =cut | ||
| 49 | |||
| 50 | 22 | has created_at => ( | |
| 51 | is => 'ro', | ||
| 52 | ); | ||
| 53 | |||
| 54 | =head2 customer_id() | ||
| 55 | |||
| 56 | This returns the card's customer ID. | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | 22 | has customer_id => ( | |
| 61 | is => 'ro', | ||
| 62 | ); | ||
| 63 | |||
| 64 | =head2 default() | ||
| 65 | |||
| 66 | This returns if this card is default. | ||
| 67 | |||
| 68 | C<< is_default() >> is an alias for this attribute. | ||
| 69 | |||
| 70 | =cut | ||
| 71 | |||
| 72 | 22 | has default => ( | |
| 73 | is => 'ro', | ||
| 74 | alias => 'is_default', | ||
| 75 | ); | ||
| 76 | |||
| 77 | =head2 expiration_month() | ||
| 78 | |||
| 79 | This returns the card's expiration month. | ||
| 80 | |||
| 81 | =cut | ||
| 82 | |||
| 83 | 22 | has expiration_month => ( | |
| 84 | is => 'ro', | ||
| 85 | ); | ||
| 86 | |||
| 87 | =head2 expiration_year() | ||
| 88 | |||
| 89 | This returns the card's expiration year. | ||
| 90 | |||
| 91 | =cut | ||
| 92 | |||
| 93 | 22 | has expiration_year => ( | |
| 94 | is => 'ro', | ||
| 95 | ); | ||
| 96 | |||
| 97 | =head2 google_transaction_id() | ||
| 98 | |||
| 99 | This returns the card's Google transaction ID. | ||
| 100 | |||
| 101 | =cut | ||
| 102 | |||
| 103 | 22 | has google_transaction_id => ( | |
| 104 | is => 'ro', | ||
| 105 | ); | ||
| 106 | |||
| 107 | =head2 image_url() | ||
| 108 | |||
| 109 | This returns the card's image URL. | ||
| 110 | |||
| 111 | =cut | ||
| 112 | |||
| 113 | 22 | has image_url => ( | |
| 114 | is => 'ro', | ||
| 115 | ); | ||
| 116 | |||
| 117 | =head2 source_card_type() | ||
| 118 | |||
| 119 | This returns the card's source card's type. | ||
| 120 | |||
| 121 | =cut | ||
| 122 | |||
| 123 | 22 | has source_card_type => ( | |
| 124 | is => 'ro', | ||
| 125 | ); | ||
| 126 | |||
| 127 | =head2 source_card_last4() | ||
| 128 | |||
| 129 | This returns the card's source card's last-4. | ||
| 130 | |||
| 131 | =cut | ||
| 132 | |||
| 133 | 22 | has source_card_last4 => ( | |
| 134 | is => 'ro', | ||
| 135 | ); | ||
| 136 | |||
| 137 | =head2 source_description() | ||
| 138 | |||
| 139 | This returns the card's source description. | ||
| 140 | |||
| 141 | =cut | ||
| 142 | |||
| 143 | 22 | has source_description => ( | |
| 144 | is => 'ro', | ||
| 145 | ); | ||
| 146 | |||
| 147 | =head2 subscriptions() | ||
| 148 | |||
| 149 | This returns the card's subscriptions. This will be an arrayref of | ||
| 150 | L<subscriptions|WebService::Braintree::_::Subscription/>. | ||
| 151 | |||
| 152 | =cut | ||
| 153 | |||
| 154 | 22 | has subscriptions => ( | |
| 155 | is => 'ro', | ||
| 156 | isa => ArrayRef[Subscription], | ||
| 157 | coerce => 1, | ||
| 158 | ); | ||
| 159 | |||
| 160 | =head2 token() | ||
| 161 | |||
| 162 | This returns the card's token. | ||
| 163 | |||
| 164 | =cut | ||
| 165 | |||
| 166 | 22 | has token => ( | |
| 167 | is => 'ro', | ||
| 168 | ); | ||
| 169 | |||
| 170 | =head2 updated_at() | ||
| 171 | |||
| 172 | This returns when this card was last updated. | ||
| 173 | |||
| 174 | =cut | ||
| 175 | |||
| 176 | 22 | has updated_at => ( | |
| 177 | is => 'ro', | ||
| 178 | ); | ||
| 179 | |||
| 180 | =head2 virtual_card_type() | ||
| 181 | |||
| 182 | This returns the card's virtual card's type. | ||
| 183 | |||
| 184 | =cut | ||
| 185 | |||
| 186 | 22 | has virtual_card_type => ( | |
| 187 | is => 'ro', | ||
| 188 | ); | ||
| 189 | |||
| 190 | =head2 virtual_card_last4() | ||
| 191 | |||
| 192 | This returns the card's virtual card's last-4. | ||
| 193 | |||
| 194 | =cut | ||
| 195 | |||
| 196 | 22 | has virtual_card_last4 => ( | |
| 197 | is => 'ro', | ||
| 198 | ); | ||
| 199 | |||
| 200 | =head1 METHODS | ||
| 201 | |||
| 202 | =head2 expiration_date() | ||
| 203 | |||
| 204 | This returns this card's expiration date in MM/YYYY format. | ||
| 205 | |||
| 206 | =cut | ||
| 207 | |||
| 208 | 0 | ▶ | sub expiration_date { |
|
Subroutine
expiration_date: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 209 | 0 | my $self = shift; | |
| 210 | 0 | return $self->expiration_month . "/" . $self->expiration_year; | |
| 211 | } | ||
| 212 | |||
| 213 | 22 | __PACKAGE__->meta->make_immutable; | |
| 214 | |||
| 215 | 22 | 1; | |
| 216 | __END__ | ||