Package org.salespointframework.payment
Class PaymentCard
- java.lang.Object
-
- org.salespointframework.payment.PaymentMethod
-
- org.salespointframework.payment.PaymentCard
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CreditCard,DebitCard
public abstract class PaymentCard extends PaymentMethod
APaymentCardis used to charge the cost of goods or services to an account, belonging to the party identified on the card. APaymentCardwhich has a line of credit is aCreditCard. ADebitCardis aPaymentCardwhere the associated account is debited immediately. An example for aDebitCardis an EC-card or MaestroCard. Other forms ofPaymentCards such as prepaid cards or charge cards are not implemented at the moment.- Author:
- Hannes Weisbach, Oliver Gierke
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PaymentCard(String cardName, String cardAssociationName, String cardNumber, String nameOnCard, String billingAddress, LocalDateTime validFrom, LocalDateTime expiryDate, String cardVerificationCode)Instantiates aPaymentCard.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)StringgetBillingAddress()The billing address registered with this card.StringgetCardAssociationName()The name of the card association.StringgetCardNumber()The number uniquely identifying this payment card.StringgetCardVerificationCode()The verification code of this card.LocalDateTimegetExpiryDate()The date on which the card expires.StringgetNameOnCard()The name of the party to which the card was issued to.LocalDateTimegetValidFrom()The date from which on the card is valid.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
PaymentCard
public PaymentCard(String cardName, String cardAssociationName, String cardNumber, String nameOnCard, String billingAddress, LocalDateTime validFrom, LocalDateTime expiryDate, String cardVerificationCode)
Instantiates aPaymentCard.- Parameters:
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 PIN
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toStringin classPaymentMethod
-
getCardAssociationName
public String getCardAssociationName()
The name of the card association.
-
getCardNumber
public String getCardNumber()
The number uniquely identifying this payment card.
-
getNameOnCard
public String getNameOnCard()
The name of the party to which the card was issued to.
-
getBillingAddress
public String getBillingAddress()
The billing address registered with this card.
-
getValidFrom
public LocalDateTime getValidFrom()
The date from which on the card is valid.
-
getExpiryDate
public LocalDateTime getExpiryDate()
The date on which the card expires.
-
getCardVerificationCode
public String getCardVerificationCode()
The verification code of this card.
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classPaymentMethod
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqualin classPaymentMethod
-
hashCode
public int hashCode()
- Overrides:
hashCodein classPaymentMethod
-
-