Class CreditCard

All Implemented Interfaces:
Serializable, org.jmolecules.ddd.types.ValueObject

public final class CreditCard extends PaymentCard
A credit card.
Author:
Hannes Weisbach, Oliver Gierke
See Also:
  • 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 card
      cardNumber - the number of this card
      nameOnCard - name of the card owner
      billingAddress - the address to which account statements are sent
      validFrom - date from which the card is valid
      expiryDate - date on which the card expires
      cardVerificationCode - verification code printed on the card or a PIN
      dailyWithdrawalLimit - maximum amount of Money which can be withdrawn on a day
      creditLimit - 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 card
      cardNumber - the number of this card
      nameOnCard - name of the card owner
      billingAddress - the address to which account statements are sent
      validFrom - date from which the card is valid
      expiryDate - date on which the card expires
      cardVerificationCode - verification code printed on the card or a PIN
      dailyWithdrawalLimit - maximum amount of Money which can be withdrawn on a day
      creditLimit - 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

      public String toString()
      Overrides:
      toString in class PaymentCard
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class PaymentCard
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class PaymentCard
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PaymentCard