Interface CreditCard


public interface CreditCard
The credit card information persisted in the credit card store.
Since:
7.23
  • Method Details

    • newBuilder

      static CreditCard.Builder newBuilder(String number, YearMonth expirationDate)
      Creates a new CreditCard builder with the given required parameters.
      Parameters:
      number - the card number, consisting solely of digits, with no separators
      expirationDate - the expiration date
      Returns:
      a new CreditCart.Builder instance
      Throws:
      IllegalArgumentException - if the given number contains non-digit characters
      Since:
      8.0.0
    • cardholder

      default String cardholder()
      The name of the cardholder entered by the user.
    • number

      default String number()
      The card number.

      The returned string consists solely of digits, with no separators.

    • expirationMonth

      default Month expirationMonth()
      The expiration month of the credit card.
    • expirationYear

      default int expirationYear()
      The expiration year of the credit card.
    • network

      default CreditCardNetwork network()
      The network issuer of the card.