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)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeclares that theCreditAccount
is used to represent account credit.Declares that theCreditAccount
is used to represent a gift card.Declares that theCreditAccount
is used to represent store credit. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isAccountCredit
(String creditAccountType) static boolean
isGiftCard
(String creditAccountType) static boolean
isStoreCredit
(String creditAccountType) static DefaultCreditAccountType
Returns the enum constant of this class with the specified name.static DefaultCreditAccountType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface com.broadleafcommerce.creditaccount.domain.enums.CreditAccountType
name
-
Enum Constant Details
-
STORE_CREDIT
Declares that theCreditAccount
is used to represent store credit. Typically, each user (customer or account) can only have 1 store credit account. -
ACCOUNT_CREDIT
Declares that theCreditAccount
is used to represent account credit. In this case, theCreditAccount.balance
represents a business's (or department's) available credit with your store. -
GIFT_CARD
Declares that theCreditAccount
is used to represent a gift card. In this case, theCreditAccount
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
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
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 nameNullPointerException
- if the argument is null
-
isStoreCredit
-
isAccountCredit
-
isGiftCard
-