public abstract class PaymentCard extends PaymentMethod
PaymentCard
is used to charge the cost of goods or services to an account, belonging to the party
identified on the card. A PaymentCard
which has a line of credit is a CreditCard
. A
DebitCard
is a PaymentCard
where the associated account is debited immediately. An example for a
DebitCard
is an EC-card or MaestroCard. Other forms of PaymentCard
s such as prepaid cards or charge
cards are not implemented at the moment.Constructor and Description |
---|
PaymentCard(String cardName,
String cardAssociationName,
String cardNumber,
String nameOnCard,
String billingAddress,
LocalDateTime validFrom,
LocalDateTime expiryDate,
String cardVerificationCode)
Instantiates a
PaymentCard . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getBillingAddress()
The billing address registered with this card.
|
String |
getCardAssociationName() |
String |
getCardNumber()
The number uniquely identifying this payment card.
|
String |
getCardVerificationCode()
The verification code or PIN of this card.
|
LocalDateTime |
getExpiryDate()
The date on which the card expires.
|
String |
getNameOnCard()
The name of the party to which the card was issued to.
|
LocalDateTime |
getValidFrom()
The date from which on the card is valid.
|
int |
hashCode() |
String |
toString()
The string representation of this
PaymentMethod . |
public PaymentCard(String cardName, String cardAssociationName, String cardNumber, String nameOnCard, String billingAddress, LocalDateTime validFrom, LocalDateTime expiryDate, String cardVerificationCode)
PaymentCard
.cardName
- specific name of this card, e.g. VISA, or MasterCardcardAssociationName
- the name of the association which issued the cardcardNumber
- the number of this cardnameOnCard
- name of the card ownerbillingAddress
- the address to which account statements are sentvalidFrom
- date from which the card is validexpiryDate
- date on which the card expirescardVerificationCode
- verification code printed on the card or a PINpublic String getCardAssociationName()
public String getCardNumber()
public String getNameOnCard()
public String getBillingAddress()
public LocalDateTime getValidFrom()
DateTime
representing the date from which the card is valid.public LocalDateTime getExpiryDate()
DateTime
representing the date on which the card expires.public String getCardVerificationCode()
public String toString()
PaymentMethod
PaymentMethod
. It's the description that was given to the
constructor.toString
in class PaymentMethod
PaymentMethod
.public boolean equals(Object obj)
equals
in class PaymentMethod
public int hashCode()
hashCode
in class PaymentMethod
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.