« lib/WebService/Braintree/_/Transaction/CreditCardDetail.pm
↑ Summary
lib/WebService/Braintree/_/AndroidPayCard.pm »
| 1 | # vim: sw=4 ts=4 ft=perl | ||
| 2 | |||
| 3 | package WebService::Braintree::_::AmexExpressCheckoutCard; | ||
| 4 | 22 | $WebService::Braintree::_::AmexExpressCheckoutCard::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::_::AmexExpressCheckoutCard | ||
| 11 | |||
| 12 | =head1 PURPOSE | ||
| 13 | |||
| 14 | This class represents a AMEX Express Checkout 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 card_member_number() | ||
| 45 | |||
| 46 | This returns the card's card-member number. | ||
| 47 | |||
| 48 | =cut | ||
| 49 | |||
| 50 | 22 | has card_member_number => ( | |
| 51 | is => 'ro', | ||
| 52 | ); | ||
| 53 | |||
| 54 | =head2 card_type() | ||
| 55 | |||
| 56 | This returns the card's type. | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | 22 | has card_type => ( | |
| 61 | is => 'ro', | ||
| 62 | ); | ||
| 63 | |||
| 64 | =head2 created_at() | ||
| 65 | |||
| 66 | This returns when this card was created. | ||
| 67 | |||
| 68 | =cut | ||
| 69 | |||
| 70 | 22 | has created_at => ( | |
| 71 | is => 'ro', | ||
| 72 | ); | ||
| 73 | |||
| 74 | =head2 customer_id() | ||
| 75 | |||
| 76 | This returns the card's customer's ID. | ||
| 77 | |||
| 78 | =cut | ||
| 79 | |||
| 80 | 22 | has customer_id => ( | |
| 81 | is => 'ro', | ||
| 82 | ); | ||
| 83 | |||
| 84 | =head2 default() | ||
| 85 | |||
| 86 | This returns if this card is default. | ||
| 87 | |||
| 88 | C<< is_default() >> is an alias for this attribute. | ||
| 89 | |||
| 90 | =cut | ||
| 91 | |||
| 92 | 22 | has default => ( | |
| 93 | is => 'ro', | ||
| 94 | alias => 'is_default', | ||
| 95 | ); | ||
| 96 | |||
| 97 | =head2 expiration_month() | ||
| 98 | |||
| 99 | This returns the card's expiration month. | ||
| 100 | |||
| 101 | =cut | ||
| 102 | |||
| 103 | 22 | has expiration_month => ( | |
| 104 | is => 'ro', | ||
| 105 | ); | ||
| 106 | |||
| 107 | =head2 expiration_year() | ||
| 108 | |||
| 109 | This returns the card's expiration year. | ||
| 110 | |||
| 111 | =cut | ||
| 112 | |||
| 113 | 22 | has expiration_year => ( | |
| 114 | is => 'ro', | ||
| 115 | ); | ||
| 116 | |||
| 117 | =head2 image_url() | ||
| 118 | |||
| 119 | This returns the card's image URL. | ||
| 120 | |||
| 121 | =cut | ||
| 122 | |||
| 123 | 22 | has image_url => ( | |
| 124 | is => 'ro', | ||
| 125 | ); | ||
| 126 | |||
| 127 | =head2 source_description() | ||
| 128 | |||
| 129 | This returns the card's source description. | ||
| 130 | |||
| 131 | =cut | ||
| 132 | |||
| 133 | 22 | has source_description => ( | |
| 134 | is => 'ro', | ||
| 135 | ); | ||
| 136 | |||
| 137 | =head2 subscriptions() | ||
| 138 | |||
| 139 | This returns the card's subscriptions. This will be an arrayref of | ||
| 140 | L<subscriptions|WebService::Braintree::_::Subscription/>. | ||
| 141 | |||
| 142 | =cut | ||
| 143 | |||
| 144 | 22 | has subscriptions => ( | |
| 145 | is => 'ro', | ||
| 146 | isa => ArrayRef[Subscription], | ||
| 147 | coerce => 1, | ||
| 148 | ); | ||
| 149 | |||
| 150 | =head2 token() | ||
| 151 | |||
| 152 | This returns the card's token. | ||
| 153 | |||
| 154 | =cut | ||
| 155 | |||
| 156 | 22 | has token => ( | |
| 157 | is => 'ro', | ||
| 158 | ); | ||
| 159 | |||
| 160 | =head2 updated_at() | ||
| 161 | |||
| 162 | This returns when this card was last updated. | ||
| 163 | |||
| 164 | =cut | ||
| 165 | |||
| 166 | 22 | has updated_at => ( | |
| 167 | is => 'ro', | ||
| 168 | ); | ||
| 169 | |||
| 170 | =head1 METHODS | ||
| 171 | |||
| 172 | =head2 expiration_date() | ||
| 173 | |||
| 174 | This returns this card's expiration date in MM/YYYY format. | ||
| 175 | |||
| 176 | =cut | ||
| 177 | |||
| 178 | 0 | ▶ | sub expiration_date { |
|
Subroutine
expiration_date: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 179 | 0 | my $self = shift; | |
| 180 | 0 | return $self->expiration_month . "/" . $self->expiration_year; | |
| 181 | } | ||
| 182 | |||
| 183 | 22 | __PACKAGE__->meta->make_immutable; | |
| 184 | |||
| 185 | 22 | 1; | |
| 186 | __END__ | ||