docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SubscriptionInfo

    A container for a Product’s subscription-related information.

    Inheritance
    object
    SubscriptionInfo
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.Purchasing
    Assembly: solution.dll
    Syntax
    public class SubscriptionInfo

    Constructors

    Name Description
    SubscriptionInfo(string)

    Especially crucial values relating to subscription products. Note this is intended to be called internally.

    SubscriptionInfo(string, bool, DateTime, bool, bool, bool, string)

    Especially crucial values relating to Google subscription products. Note this is intended to be called internally.

    SubscriptionInfo(AppleInAppPurchaseReceipt, string)

    Unpack Apple receipt subscription data.

    Methods

    Name Description
    getCancelDate()

    When this auto-renewable receipt was canceled. Note the store-specific behavior.

    getExpireDate()

    When this auto-renewable receipt expires.

    getFreeTrialPeriod()

    The period duration of the free trial for this subscription, if enabled. Note the store-specific behavior.

    getFreeTrialPeriodString()

    The string representation of the period in ISO8601 format this subscription is free for. Note the store-specific behavior.

    getIntroductoryPrice()

    For subscriptions with an introductory price, get this price. Note the store-specific behavior.

    getIntroductoryPricePeriod()

    Indicates how much time remains for the introductory price period. Note the store-specific behavior.

    getIntroductoryPricePeriodCycles()

    Indicates the number of introductory price billing periods that can be applied to this subscription Product. Note the store-specific behavior.

    getProductId()

    Store specific product identifier.

    getPurchaseDate()

    A date this subscription was billed. Note the store-specific behavior.

    getRemainingTime()

    Indicates how much time remains until the next billing date. Note the store-specific behavior. Note also that the receipt may update and change this subscription expiration status if the user sends their iOS app to the background and then returns it to the foreground.

    getSkuDetails()

    The raw JSON SkuDetails from the underlying Google API. Note the store-specific behavior. Note this is not supported.

    getSubscriptionInfoJsonString()

    A JSON including a collection of data involving free-trial and introductory prices. Note the store-specific behavior. Used internally for subscription updating on Google store.

    getSubscriptionPeriod()

    The duration of this subscription. Note the store-specific behavior.

    isAutoRenewing()

    Indicates whether this Product is expected to auto-renew. The product must be auto-renewable, not canceled, and not expired.

    isCancelled()

    Indicates whether this Product has been cancelled. A cancelled subscription means the Product is currently subscribed, and will not renew on the next billing date.

    isExpired()

    Indicates whether this auto-renewable subscription Product is currently unsubscribed or not. Note the store-specific behavior. Note also that the receipt may update and change this subscription expiration status if the user sends their iOS app to the background and then returns it to the foreground. It is therefore recommended to remember subscription expiration state at app-launch, and ignore the fact that a subscription may expire later during this app launch runtime session.

    isFreeTrial()

    Indicates whether this Product is a free trial. Note the store-specific behavior.

    isIntroductoryPricePeriod()

    Indicates whether this Product is currently owned within an introductory price period. Note the store-specific behavior.

    isSubscribed()

    Indicates whether this auto-renewable subscription Product is currently subscribed or not. Note the store-specific behavior. Note also that the receipt may update and change this subscription expiration status if the user sends their iOS app to the background and then returns it to the foreground. It is therefore recommended to remember subscription expiration state at app-launch, and ignore the fact that a subscription may expire later during this app launch runtime session.

    See Also

    getSubscriptionInfo()
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023