AccessLevel

data class AccessLevel(val id: String, val isActive: Boolean, val vendorProductId: String, val offerId: String? = null, val store: String, val activatedAt: String, val startsAt: String?, val renewedAt: String?, val expiresAt: String?, val isLifetime: Boolean, val cancellationReason: String?, val isRefund: Boolean, val activeIntroductoryOfferType: String?, val activePromotionalOfferType: String?, val activePromotionalOfferId: String?, val willRenew: Boolean, val isInGracePeriod: Boolean, val unsubscribedAt: String?, val billingIssueDetectedAt: String?)

Represents a premium access level assigned to a user.

Constructors

Link copied to clipboard
constructor(id: String, isActive: Boolean, vendorProductId: String, offerId: String? = null, store: String, activatedAt: String, startsAt: String?, renewedAt: String?, expiresAt: String?, isLifetime: Boolean, cancellationReason: String?, isRefund: Boolean, activeIntroductoryOfferType: String?, activePromotionalOfferType: String?, activePromotionalOfferId: String?, willRenew: Boolean, isInGracePeriod: Boolean, unsubscribedAt: String?, billingIssueDetectedAt: String?)

Properties

Link copied to clipboard

Activation timestamp in ISO 8601 format.

Link copied to clipboard

Type of active introductory offer, if any. If the value is not null, it means that the offer was applied during the current subscription period. Possible values: free_trial, pay_as_you_go, pay_up_front

Link copied to clipboard

ID of active promotional offer, if any.

Link copied to clipboard

A type of an active promotional offer. If the value is not null, it means that the offer was applied during the current subscription period. Possible values: free_trial, pay_as_you_go, pay_up_front

Link copied to clipboard

When a billing issue was detected, if any. Subscription can still be active. Would be set to null if a charge is made.

Link copied to clipboard

Reason for cancellation, if any.

Link copied to clipboard

Time when the access level will expire (could be in the past and could be null for lifetime access)

Link copied to clipboard
val id: String

Identifier of the access level.

Link copied to clipboard

Whether this access level is currently active.

Link copied to clipboard

Whether the subscription is currently in grace period.

Link copied to clipboard

Whether this is a lifetime access (no expiration date).

Link copied to clipboard

Whether this access level was refunded.

Link copied to clipboard
val offerId: String? = null

Promotional or introductory offer ID, if applicable.

Link copied to clipboard

Time when the access level was renewed. It can be null if the purchase was first in chain or it is non-renewing subscription / non-consumable (e.g. lifetime)

Link copied to clipboard

Subscription start date. Nullable.

Link copied to clipboard

Store name (App Store, Google Play, etc.). Possible values: app_store, play_store, adapty

Link copied to clipboard

Time when the auto-renewable subscription was cancelled. Subscription can still be active, it just means that auto-renewal turned off. Will be set to null if the user reactivates the subscription.

Link copied to clipboard

Product identifier from App Store or Google Play.

Link copied to clipboard

Whether the subscription will automatically renew.