diff --git a/core/api/core.api b/core/api/core.api index ecaa12c28ed7..c6b9747ca07a 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -10959,6 +10959,7 @@ public final class dev/kord/core/entity/monetization/Subscription : dev/kord/cor public fun getId ()Ldev/kord/common/entity/Snowflake; public fun getKord ()Ldev/kord/core/Kord; public final fun getSkuIds ()Ljava/util/List; + public final fun getSkus ()Ljava/util/List; public final fun getStartsAt ()Lkotlinx/datetime/Instant; public final fun getStatus ()Ldev/kord/common/entity/SubscriptionStatus; public final fun getUser ()Ldev/kord/core/behavior/UserBehavior; diff --git a/core/api/core.klib.api b/core/api/core.klib.api index d8e5d3b6dbf3..6d212634e253 100644 --- a/core/api/core.klib.api +++ b/core/api/core.klib.api @@ -7037,6 +7037,8 @@ final class dev.kord.core.entity.monetization/Subscription : dev.kord.core.entit final fun (): dev.kord.core/Kord // dev.kord.core.entity.monetization/Subscription.kord.|(){}[0] final val skuIds // dev.kord.core.entity.monetization/Subscription.skuIds|{}skuIds[0] final fun (): kotlin.collections/List // dev.kord.core.entity.monetization/Subscription.skuIds.|(){}[0] + final val skus // dev.kord.core.entity.monetization/Subscription.skus|{}skus[0] + final fun (): kotlin.collections/List // dev.kord.core.entity.monetization/Subscription.skus.|(){}[0] final val startsAt // dev.kord.core.entity.monetization/Subscription.startsAt|{}startsAt[0] final fun (): kotlinx.datetime/Instant // dev.kord.core.entity.monetization/Subscription.startsAt.|(){}[0] final val status // dev.kord.core.entity.monetization/Subscription.status|{}status[0] diff --git a/core/src/commonMain/kotlin/entity/monetization/Subscription.kt b/core/src/commonMain/kotlin/entity/monetization/Subscription.kt index 3006c919407b..09d0235eb673 100644 --- a/core/src/commonMain/kotlin/entity/monetization/Subscription.kt +++ b/core/src/commonMain/kotlin/entity/monetization/Subscription.kt @@ -4,6 +4,8 @@ import dev.kord.common.entity.Snowflake import dev.kord.common.entity.SubscriptionStatus import dev.kord.core.Kord import dev.kord.core.behavior.UserBehavior +import dev.kord.core.behavior.monetization.SkuBehavior +import dev.kord.core.behavior.monetization.SkuBehaviorImpl import dev.kord.core.cache.data.SubscriptionData import dev.kord.core.entity.KordEntity import dev.kord.core.entity.User @@ -31,6 +33,10 @@ public class Subscription( /** The list of IDs of the [Sku]s subscribed to. */ public val skuIds: List get() = data.skuIds + /** The list of behaviors of the [Sku]s subscribed to. */ + public val skus: List + get() = skuIds.map { skuId -> SkuBehaviorImpl(applicationId = kord.selfId, id = skuId, kord) } + /** The list of IDs of the [Entitlement]s granted for this subscription. */ public val entitlementIds: List get() = data.entitlementIds