Enum Class DefaultCreditAccountType

java.lang.Object
java.lang.Enum<DefaultCreditAccountType>
com.broadleafcommerce.creditaccount.domain.enums.DefaultCreditAccountType
All Implemented Interfaces:
CreditAccountType, Serializable, Comparable<DefaultCreditAccountType>, Constable

public enum DefaultCreditAccountType extends Enum<DefaultCreditAccountType> implements CreditAccountType
The default credit account types.
Author:
Dima Myroniuk (dmyroniuk)
  • Enum Constant Details

    • STORE_CREDIT

      public static final DefaultCreditAccountType STORE_CREDIT
      Declares that the CreditAccount is used to represent store credit. Typically, each user (customer or account) can only have 1 store credit account.
    • ACCOUNT_CREDIT

      public static final DefaultCreditAccountType ACCOUNT_CREDIT
      Declares that the CreditAccount is used to represent account credit. In this case, the CreditAccount.balance represents a business's (or department's) available credit with your store.
    • GIFT_CARD

      public static final DefaultCreditAccountType GIFT_CARD
      Declares that the CreditAccount is used to represent a gift card. In this case, the CreditAccount is typically accessed by providing the account number and a secondary data point like the gift card pin, their email address, etc.
  • Method Details

    • values

      public static DefaultCreditAccountType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DefaultCreditAccountType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isStoreCredit

      public static boolean isStoreCredit(String creditAccountType)
    • isAccountCredit

      public static boolean isAccountCredit(String creditAccountType)
    • isGiftCard

      public static boolean isGiftCard(String creditAccountType)