Enum Class SKUType
- All Implemented Interfaces:
Serializable, Comparable<SKUType>, Constable
SKU Types represent the type of the offered SKU.
For subscriptions, SKUs will have a type of either SUBSCRIPTION or SUBSCRIPTION_GROUP.
For any current implementations, you will want to use the SKU type SUBSCRIPTION.
A SUBSCRIPTION_GROUP is automatically created for each SUBSCRIPTION SKU and are not used at this time.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConsumable one-time purchaseDurable one-time purchaseRepresents a recurring subscriptionSystem-generated group for each SUBSCRIPTION SKU createdUnknown type. -
Method Summary
Modifier and TypeMethodDescriptionstatic SKUTypefromId(int type) Parse a SKU type from the idintgetId()The Discord id of the SKU typestatic SKUTypeReturns the enum constant of this class with the specified name.static SKUType[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
DURABLE
Durable one-time purchase -
CONSUMABLE
Consumable one-time purchase -
SUBSCRIPTION
Represents a recurring subscription -
SUBSCRIPTION_GROUP
System-generated group for each SUBSCRIPTION SKU created -
UNKNOWN
Unknown type.
-
-
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
-
fromId
-
getId
public int getId()The Discord id of the SKU type- Returns:
- The discord id
-