AdaptyProfile

data class AdaptyProfile

Represents a user profile in Adapty.

Contains information about the user's subscriptions, access levels, non-subscription purchases, custom attributes, and test device status.

Types

Link copied to clipboard
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.

Link copied to clipboard
class Date(year: Int, month: Int, date: Int)

Represents a date (year-month-day) for user attributes.

Link copied to clipboard

Represents user gender.

Link copied to clipboard
data class NonSubscription(val purchaseId: String, val vendorProductId: String, val vendorTransactionId: String?, val store: String, val purchasedAt: String, val isConsumable: Boolean, val isSandbox: Boolean, val isRefund: Boolean)

Represents a non-subscription purchase (consumables or one-time purchases).

Link copied to clipboard
data class Subscription(val isActive: Boolean, val vendorProductId: String, val vendorTransactionId: String?, val vendorOriginalTransactionId: String?, val offerId: String?, val store: String, val activatedAt: String, val renewedAt: String?, val expiresAt: String?, val startsAt: String?, val isLifetime: Boolean, val activeIntroductoryOfferType: String?, val activePromotionalOfferType: String?, val activePromotionalOfferId: String?, val willRenew: Boolean, val isInGracePeriod: Boolean, val unsubscribedAt: String?, val billingIssueDetectedAt: String?, val isSandbox: Boolean, val isRefund: Boolean, val cancellationReason: String?)

Represents a subscription purchase of the user.

Properties

Link copied to clipboard

A map of access level identifiers to AccessLevel objects. The values are Can be null if the customer has no access levels.

Link copied to clipboard

User-defined key-value attributes previously set via .updateProfile().

Link copied to clipboard

Optional identifier of the user in your system.

Link copied to clipboard

Indicates whether the profile belongs to a test device. Read more about test devices in Adapty documentation.

Link copied to clipboard

A map of product IDs to lists of NonSubscription purchases. The keys are product ids from the store. The values are arrays of information about consumables. Can be null if the customer has no purchases.

Link copied to clipboard

The unique identifier of the profile in Adapty.

Link copied to clipboard

A map of product IDs to Subscription objects. The values are information about subscriptions. Can be null if the customer has no subscriptions.