Enum SKUType

java.lang.Object
java.lang.Enum<SKUType>
net.dv8tion.jda.api.entities.SKUType
All Implemented Interfaces:
Serializable, Comparable<SKUType>

public enum SKUType extends Enum<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 Details

    • DURABLE

      public static final SKUType DURABLE
      Durable one-time purchase
    • CONSUMABLE

      public static final SKUType CONSUMABLE
      Consumable one-time purchase
    • SUBSCRIPTION

      public static final SKUType SUBSCRIPTION
      Represents a recurring subscription
    • SUBSCRIPTION_GROUP

      public static final SKUType SUBSCRIPTION_GROUP
      System-generated group for each SUBSCRIPTION SKU created
    • UNKNOWN

      public static final SKUType UNKNOWN
      Unknown type.
  • Method Details

    • values

      public static SKUType[] 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

      public static SKUType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromId

      @Nonnull public static SKUType fromId(int type)
      Parse a SKU type from the id
      Parameters:
      type - The type id
      Returns:
      SKU type or UNKNOWN if the SKU is not known.
    • getId

      public int getId()
      The Discord id of the SKU type
      Returns:
      The discord id