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
APaymentCard
is used to charge the cost of goods or services to an account, belonging to the party identified on the card. APaymentCard
which has a line of credit is aCreditCard
. ADebitCard
is aPaymentCard
where the associated account is debited immediately. An example for aDebitCard
is an EC-card or MaestroCard. Other forms ofPaymentCard
s 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 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()
-
-
-
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:
toString
in 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:
equals
in classPaymentMethod
-
canEqual
protected boolean canEqual(Object other)
- Overrides:
canEqual
in classPaymentMethod
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classPaymentMethod
-
-