Package-level declarations

Types

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

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

Link copied to clipboard
@Serializable
data class NonSubscriptionTransaction(val transactionId: String, val productId: String, val purchaseDate: Date, val isConsumable: Boolean, val isRevoked: Boolean, val store: Store = Store.PLAY_STORE)

Represents a non-subscription transaction (e.g., one-time purchases) in the customer's purchase history.

Link copied to clipboard
@Serializable
data class SubscriptionTransaction(val transactionId: String, val productId: String, val purchaseDate: Date, val willRenew: Boolean, val isRevoked: Boolean, val isInGracePeriod: Boolean, val isInBillingRetryPeriod: Boolean, val isActive: Boolean, val expirationDate: Date?, val store: Store = Store.PLAY_STORE, val offerType: LatestPeriodType? = null, val subscriptionGroupId: String? = null)

Represents a subscription transaction in the customer's purchase history.

Functions

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard

Merges a list of entitlements, keeping the highest priority entitlement for each ID. Uses EntitlementPriorityComparator to determine priority. When merging, productIds from all entitlements with the same ID are combined.

Link copied to clipboard
Link copied to clipboard