AdaptySDK 4.1.1
Loading...
Searching...
No Matches
AdaptySDK.AdaptyProfile.AccessLevel Class Referencesealed

One access level of a profile: whether it is active, what granted it, and until when. More...

Public Member Functions

override string ToString ()
 A description for logs and the debugger. The format is not part of the contract — read the members rather than parsing it.

Public Attributes

readonly string Id
 Unique identifier of the access level configured by you in Adapty Dashboard.
readonly bool IsActive
 Whether the access level is active.
readonly string VendorProductId
 The identifier of the product, in the store it was bought from, that unlocked this access level.
readonly string Store
 The store of the purchase that unlocked this access level.
readonly DateTime ActivatedAt
 The time when the access level was activated.
readonly? DateTime RenewedAt
 The time when the access level was renewed. Null when there has been no renewal.
readonly? DateTime ExpiresAt
 The time when the access level will expire (could be in the past and could be null for lifetime access).
readonly bool IsLifetime
 Whether the access level is active for a lifetime (no expiration date).
readonly string ActiveIntroductoryOfferType
 The type of active introductory offer.
readonly string ActivePromotionalOfferType
 The type of active promotional offer.
readonly string ActivePromotionalOfferId
 The App Store promotional offer that unlocked this access level. Null when the purchase used none, and for a purchase made on Android — the profile is one object across platforms, so this says where the purchase happened, not where the app runs.
readonly string OfferId
 The Google Play offer that unlocked this access level. Null when the purchase used none, and for a purchase made on iOS — see ActivePromotionalOfferId.
readonly bool WillRenew
 Whether the auto-renewable subscription is set to renew.
readonly bool IsInGracePeriod
 Whether the auto-renewable subscription is in the grace period.
readonly? DateTime UnsubscribedAt
 The time when the auto-renewable subscription was cancelled.
readonly? DateTime BillingIssueDetectedAt
 The time a billing issue was detected — the store could not charge the payment method.
readonly? DateTime StartsAt
 The time when the access level has started (could be in the future). Null when there is no start date.
readonly string CancellationReason
 The reason why the subscription was cancelled. Null when it was not.
readonly bool IsRefund
 Whether the purchase was refunded.

Private Member Functions

 AccessLevel ()

Detailed Description

One access level of a profile: whether it is active, what granted it, and until when.

Constructor & Destructor Documentation

◆ AccessLevel()

AdaptySDK.AdaptyProfile.AccessLevel.AccessLevel ( )
private

Member Function Documentation

◆ ToString()

override string AdaptySDK.AdaptyProfile.AccessLevel.ToString ( )

A description for logs and the debugger. The format is not part of the contract — read the members rather than parsing it.

Member Data Documentation

◆ ActivatedAt

readonly DateTime AdaptySDK.AdaptyProfile.AccessLevel.ActivatedAt

The time when the access level was activated.

◆ ActiveIntroductoryOfferType

readonly string AdaptySDK.AdaptyProfile.AccessLevel.ActiveIntroductoryOfferType

The type of active introductory offer.

Possible values are: free_trial, pay_as_you_go, pay_up_front. If the value is not null, it means that the offer was applied during the current subscription period.

◆ ActivePromotionalOfferId

readonly string AdaptySDK.AdaptyProfile.AccessLevel.ActivePromotionalOfferId

The App Store promotional offer that unlocked this access level. Null when the purchase used none, and for a purchase made on Android — the profile is one object across platforms, so this says where the purchase happened, not where the app runs.

◆ ActivePromotionalOfferType

readonly string AdaptySDK.AdaptyProfile.AccessLevel.ActivePromotionalOfferType

The type of active promotional offer.

Possible values are: free_trial, pay_as_you_go, pay_up_front. If the value is not null, it means that the offer was applied during the current subscription period.

◆ BillingIssueDetectedAt

readonly? DateTime AdaptySDK.AdaptyProfile.AccessLevel.BillingIssueDetectedAt

The time a billing issue was detected — the store could not charge the payment method.

Subscription can still be active. Will be set to null if the charge will be made.

◆ CancellationReason

readonly string AdaptySDK.AdaptyProfile.AccessLevel.CancellationReason

The reason why the subscription was cancelled. Null when it was not.

The values the native SDKs list: voluntarily_cancelled, billing_error, price_increase, product_was_not_available, refund, upgraded, unknown. It stays a string rather than an enum because the contract leaves the set open — do not write a switch that assumes these are all of them.

◆ ExpiresAt

readonly? DateTime AdaptySDK.AdaptyProfile.AccessLevel.ExpiresAt

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

◆ Id

readonly string AdaptySDK.AdaptyProfile.AccessLevel.Id

Unique identifier of the access level configured by you in Adapty Dashboard.

◆ IsActive

readonly bool AdaptySDK.AdaptyProfile.AccessLevel.IsActive

Whether the access level is active.

Generally, you have to check just this property to determine if the user has access to premium features.

◆ IsInGracePeriod

readonly bool AdaptySDK.AdaptyProfile.AccessLevel.IsInGracePeriod

Whether the auto-renewable subscription is in the grace period.

◆ IsLifetime

readonly bool AdaptySDK.AdaptyProfile.AccessLevel.IsLifetime

Whether the access level is active for a lifetime (no expiration date).

If set to true you shouldn't check expires_at , or you could just check isActive.

◆ IsRefund

readonly bool AdaptySDK.AdaptyProfile.AccessLevel.IsRefund

Whether the purchase was refunded.

◆ OfferId

readonly string AdaptySDK.AdaptyProfile.AccessLevel.OfferId

The Google Play offer that unlocked this access level. Null when the purchase used none, and for a purchase made on iOS — see ActivePromotionalOfferId.

◆ RenewedAt

readonly? DateTime AdaptySDK.AdaptyProfile.AccessLevel.RenewedAt

The time when the access level was renewed. Null when there has been no renewal.

◆ StartsAt

readonly? DateTime AdaptySDK.AdaptyProfile.AccessLevel.StartsAt

The time when the access level has started (could be in the future). Null when there is no start date.

◆ Store

readonly string AdaptySDK.AdaptyProfile.AccessLevel.Store

The store of the purchase that unlocked this access level.

The possible values are: app_store, play_store, adapty.

◆ UnsubscribedAt

readonly? DateTime AdaptySDK.AdaptyProfile.AccessLevel.UnsubscribedAt

The 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.

◆ VendorProductId

readonly string AdaptySDK.AdaptyProfile.AccessLevel.VendorProductId

The identifier of the product, in the store it was bought from, that unlocked this access level.

◆ WillRenew

readonly bool AdaptySDK.AdaptyProfile.AccessLevel.WillRenew

Whether the auto-renewable subscription is set to renew.


The documentation for this class was generated from the following file: