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 PaymentCards 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 |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getBillingAddress()
The billing address registered with this card.
|
String |
getCardAssociationName()
The name of the card association.
|
String |
getCardNumber()
The number uniquely identifying this payment card.
|
String |
getCardVerificationCode()
The verification code 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() |
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 toString()
toString in class PaymentMethodpublic String getCardAssociationName()
public String getCardNumber()
public String getNameOnCard()
public String getBillingAddress()
public LocalDateTime getValidFrom()
public LocalDateTime getExpiryDate()
public String getCardVerificationCode()
public boolean equals(Object o)
equals in class PaymentMethodprotected boolean canEqual(Object other)
canEqual in class PaymentMethodpublic int hashCode()
hashCode in class PaymentMethodCopyright © 2018. All rights reserved.