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 productPlanIdentifier: String?, val isSandbox: Boolean, val unsubscribeDetectedAt: Date?, val billingIssueDetectedAt: Date?, val ownershipType: OwnershipType, jsonObject: JSONObject, val verification: VerificationResult = VerificationResult.NOT_REQUESTED) : 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
constructor(identifier: String, isActive: Boolean, willRenew: Boolean, periodType: PeriodType, latestPurchaseDate: Date, originalPurchaseDate: Date, expirationDate: Date?, store: Store, productIdentifier: String, productPlanIdentifier: String?, isSandbox: Boolean, unsubscribeDetectedAt: Date?, billingIssueDetectedAt: Date?, ownershipType: OwnershipType, jsonObject: JSONObject, verification: VerificationResult = VerificationResult.NOT_REQUESTED)

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

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

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

The entitlement identifier configured in the RevenueCat dashboard.

Link copied to clipboard

True if the user has access to this entitlement.

Link copied to clipboard

False if this entitlement is unlocked via a production purchase.

Link copied to clipboard

The latest purchase or renewal date for the entitlement.

Link copied to clipboard

The first date this entitlement was purchased.

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

The product identifier that unlocked this entitlement. For Google subscriptions, this is the subscription ID. For Amazon subscriptions, this is the termSku. For INAPP purchases, this is simply the productId.

Link copied to clipboard

The base plan identifier that unlocked this entitlement (Google only).

Link copied to clipboard
open override val rawData: JSONObject

The underlying data.

Link copied to clipboard

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

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

If entitlement verification was enabled, the result of that verification. If not, VerificationResult.NOT_REQUESTED

Link copied to clipboard

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.