Enum SKUType
- All Implemented Interfaces:
Serializable, Comparable<SKUType>
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.
-
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 type with the specified name.static SKUType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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
-