CustomerInfo

@Serializable
data class CustomerInfo(val subscriptions: List<SubscriptionTransaction>, val nonSubscriptions: List<NonSubscriptionTransaction>, val userId: String = "", val entitlements: List<Entitlement>, isPlaceholder: Boolean = false)(source)

A class that contains the latest subscription and entitlement info about the customer. These objects are non-mutable and do not update automatically.

Constructors

Link copied to clipboard
constructor(subscriptions: List<SubscriptionTransaction>, nonSubscriptions: List<NonSubscriptionTransaction>, userId: String = "", entitlements: List<Entitlement>, isPlaceholder: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A Set of the product identifiers for the active subscriptions.

Link copied to clipboard
@SerialName(value = "entitlements")
val entitlements: List<Entitlement>

All entitlements available to the user.

Link copied to clipboard
@SerialName(value = "nonSubscriptions")
val nonSubscriptions: List<NonSubscriptionTransaction>

The non-subscription transactions the user has made. The transactions are ordered by purchase date in ascending order.

Link copied to clipboard
@SerialName(value = "subscriptions")
val subscriptions: List<SubscriptionTransaction>

The subscription transactions the user has made. The transactions are ordered by purchase date in ascending order.

Link copied to clipboard
@SerialName(value = "userId")
val userId: String

The ID of the user. Equivalent to Superwall.userId.

Functions

Link copied to clipboard

Merges this CustomerInfo (device) with web CustomerInfo, deduplicating transactions by transaction ID.

Link copied to clipboard
open override fun toString(): String