Interface SKU

All Superinterfaces:
ISnowflake, SkuSnowflake

public interface SKU extends SkuSnowflake
SKUs (stock-keeping units) in Discord represent premium offerings that can be made available to application users or guilds.
  • Method Summary

    Modifier and Type
    Method
    Description
    Flags can be used to differentiate user and server subscriptions
    Customer-facing name of your premium offering
    System-generated URL slug based on the SKU's name
    Type of the SKU
    default boolean
    Checks whether this SKU is available.
    default boolean
    Checks whether the SKU is available to be purchased for a guild.
    default boolean
    Checks whether the SKU is available to be purchased for a user.

    Methods inherited from interface ISnowflake

    getId, getIdLong, getTimeCreated
  • Method Details

    • getType

      @Nonnull SKUType getType()
      Type of the SKU
      Returns:
      SKU type
    • getName

      @Nonnull String getName()
      Customer-facing name of your premium offering
      Returns:
      SKU name
    • getSlug

      @Nonnull String getSlug()
      System-generated URL slug based on the SKU's name
      Returns:
      SKU slug
    • getFlags

      @Nonnull Set<SKUFlag> getFlags()
      Flags can be used to differentiate user and server subscriptions
      Returns:
      set of flags.
    • isGuildSKU

      default boolean isGuildSKU()
      Checks whether the SKU is available to be purchased for a guild.
      Returns:
      true if it's for guilds
    • isUserSKU

      default boolean isUserSKU()
      Checks whether the SKU is available to be purchased for a user.
      Returns:
      true if it's for users
    • isAvailable

      default boolean isAvailable()
      Checks whether this SKU is available.
      Returns:
      true if available