Sku

class Sku(val data: DiscordSku, val kord: Kord, val supplier: EntitySupplier = kord.defaultSupplier) : SkuBehavior(source)

An instance of an SKU.

SKUs (or stock-keeping units) represent premium offerings that can be made available to your Application's Users or Guilds.

Constructors

Link copied to clipboard
constructor(data: DiscordSku, kord: Kord, supplier: EntitySupplier = kord.defaultSupplier)

Properties

Link copied to clipboard
open override val applicationId: Snowflake

The ID of the Application this SKU is for.

Link copied to clipboard
Link copied to clipboard

The flags of this SKU.

Link copied to clipboard
open override val id: Snowflake

The unique identifier of this entity.

Link copied to clipboard
open override val kord: Kord

The kord instance that created this object.

Link copied to clipboard

The customer-facing name of this premium offering.

Link copied to clipboard

A system-generated URL slug based on this SKU's name.

Link copied to clipboard
open override val supplier: EntitySupplier

The supplier used to request entities.

Link copied to clipboard

The type of this SKU.

Functions

Link copied to clipboard
open operator override fun compareTo(other: Entity): Int

Compares entities on id.

Link copied to clipboard

Requests to create a new test entitlement to this SKU for a given guild.

Requests to create a new test entitlement to this SKU for a given user.

open suspend fun createTestEntitlement(ownerId: Snowflake, ownerType: EntitlementOwnerType): Entitlement

Requests to create a new test entitlement to this SKU for an owner with the given ownerId and ownerType.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open suspend fun getSubscription(subscriptionId: Snowflake): Subscription

Requests a Subscription containing this SKU by its id.

Link copied to clipboard
open suspend fun getSubscriptionOrNull(subscriptionId: Snowflake): Subscription?

Requests a Subscription containing this SKU by its id. Returns null if it wasn't found.

Link copied to clipboard

Requests to get all Subscriptions containing this Sku.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun withStrategy(strategy: EntitySupplyStrategy<*>): Sku

Returns a copy of this class with a new supplier provided by the strategy.