EntitlementInfo

data class EntitlementInfo(    val identifier: String,     val isActive: Boolean,     val willRenew: Boolean,     val periodType: PeriodType,     val latestPurchaseDate: Date,     val originalPurchaseDate: Date,     val expirationDate: Date?,     val store: Store,     val productIdentifier: String,     val isSandbox: Boolean,     val unsubscribeDetectedAt: Date?,     val billingIssueDetectedAt: Date?,     val ownershipType: OwnershipType,     val jsonObject: JSONObject) : Parcelable, RawDataContainer<JSONObject>

This object gives you access to all of the information about the status of a user's entitlements.

Constructors

Link copied to clipboard
fun EntitlementInfo(    identifier: String,     isActive: Boolean,     willRenew: Boolean,     periodType: PeriodType,     latestPurchaseDate: Date,     originalPurchaseDate: Date,     expirationDate: Date?,     store: Store,     productIdentifier: String,     isSandbox: Boolean,     unsubscribeDetectedAt: Date?,     billingIssueDetectedAt: Date?,     ownershipType: OwnershipType,     jsonObject: JSONObject)

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
val billingIssueDetectedAt: Date?

The date a billing issue was detected. Can be null if there is no billing issue or an issue has been resolved. Note: Entitlement may still be active even if there is a billing issue. Check the isActive property.

Link copied to clipboard
val expirationDate: Date?

The expiration date for the entitlement, can be null for lifetime access. If the periodType is TRIAL, this is the trial expiration date.

Link copied to clipboard
val identifier: String

The entitlement identifier configured in the RevenueCat dashboard.

Link copied to clipboard
val isActive: Boolean

True if the user has access to this entitlement.

Link copied to clipboard
val isSandbox: Boolean

False if this entitlement is unlocked via a production purchase.

Link copied to clipboard
val jsonObject: JSONObject
Link copied to clipboard
val latestPurchaseDate: Date

The latest purchase or renewal date for the entitlement.

Link copied to clipboard
val originalPurchaseDate: Date

The first date this entitlement was purchased.

Link copied to clipboard
val ownershipType: OwnershipType
Link copied to clipboard
val periodType: PeriodType

The last period type this entitlement was in Either: NORMAL, INTRO or TRIAL.

Link copied to clipboard
val productIdentifier: String

The product identifier that unlocked this entitlement.

Link copied to clipboard
open override val rawData: JSONObject

The underlying data.

Link copied to clipboard
val store: Store

The store where this entitlement was unlocked from. Either: APP_STORE, MAC_APP_STORE, PLAY_STORE, STRIPE, PROMOTIONAL or UNKNOWN_STORE.

Link copied to clipboard
val unsubscribeDetectedAt: Date?

The date an unsubscribe was detected. Can be null. Note: Entitlement may still be active even if user has unsubscribed. Check the isActive property.

Link copied to clipboard
val willRenew: Boolean

True if the underlying subscription is set to renew at the end of the billing period (expirationDate). Will always be True if entitlement is for lifetime access.