Package org.salespointframework.payment
Class CreditCard
java.lang.Object
org.salespointframework.payment.PaymentMethod
org.salespointframework.payment.PaymentCard
org.salespointframework.payment.CreditCard
- All Implemented Interfaces:
Serializable
public final class CreditCard extends PaymentCard
A credit card.
- Author:
- Hannes Weisbach, Oliver Gierke
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description CreditCard(String cardName, String cardAssociationName, String cardNumber, String nameOnCard, String billingAddress, LocalDateTime validFrom, LocalDateTime expiryDate, String cardVerificationCode, javax.money.MonetaryAmount dailyWithdrawalLimit, javax.money.MonetaryAmount creditLimit)
Instantiates a specific credit card.CreditCard(String cardAssociationName, String cardNumber, String nameOnCard, String billingAddress, LocalDateTime validFrom, LocalDateTime expiryDate, String cardVerificationCode, javax.money.MonetaryAmount dailyWithdrawalLimit, javax.money.MonetaryAmount creditLimit)
Instantiates a generic credit card. -
Method Summary
Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
javax.money.MonetaryAmount
getCreditLimit()
Line of credit extended by the issuing association to the card holder.javax.money.MonetaryAmount
getDailyWithdrawalLimit()
The maximum amount of money, the card holder can dispose of within a day.int
hashCode()
String
toString()
Methods inherited from class org.salespointframework.payment.PaymentCard
getBillingAddress, getCardAssociationName, getCardNumber, getCardVerificationCode, getExpiryDate, getNameOnCard, getValidFrom
-
Constructor Details
-
CreditCard
public CreditCard(String cardName, String cardAssociationName, String cardNumber, String nameOnCard, String billingAddress, LocalDateTime validFrom, LocalDateTime expiryDate, String cardVerificationCode, javax.money.MonetaryAmount dailyWithdrawalLimit, javax.money.MonetaryAmount creditLimit)Instantiates a specific credit card.- Parameters:
cardName
- The name of the card.cardAssociationName
- 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 PINdailyWithdrawalLimit
- maximum amount ofMoney
which can be withdrawn on a daycreditLimit
-Money
representing the line of credit extended by the issuing association to the card owner
-
CreditCard
public CreditCard(String cardAssociationName, String cardNumber, String nameOnCard, String billingAddress, LocalDateTime validFrom, LocalDateTime expiryDate, String cardVerificationCode, javax.money.MonetaryAmount dailyWithdrawalLimit, javax.money.MonetaryAmount creditLimit)Instantiates a generic credit card.- Parameters:
cardAssociationName
- 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 PINdailyWithdrawalLimit
- maximum amount ofMoney
which can be withdrawn on a daycreditLimit
-Money
representing the line of credit extended by the issuing association to the card owner
-
-
Method Details
-
getDailyWithdrawalLimit
public javax.money.MonetaryAmount getDailyWithdrawalLimit()The maximum amount of money, the card holder can dispose of within a day. -
getCreditLimit
public javax.money.MonetaryAmount getCreditLimit()Line of credit extended by the issuing association to the card holder. -
toString
- Overrides:
toString
in classPaymentCard
-
equals
- Overrides:
equals
in classPaymentCard
-
canEqual
- Overrides:
canEqual
in classPaymentCard
-
hashCode
public int hashCode()- Overrides:
hashCode
in classPaymentCard
-