docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor SubscriptionInfo

    SubscriptionInfo(AppleInAppPurchaseReceipt, string)

    Unpack Apple receipt subscription data.

    Declaration
    public SubscriptionInfo(AppleInAppPurchaseReceipt r, string intro_json)
    Parameters
    Type Name Description
    AppleInAppPurchaseReceipt r

    The Apple receipt from CrossPlatformValidator

    string intro_json

    From IAppleExtensions.GetIntroductoryPriceDictionary.GetIntroductoryPriceDictionary. Keys: introductoryPriceLocale, introductoryPrice, introductoryPriceNumberOfPeriods, numberOfUnits, unit, which can be fetched from Apple's remote service.

    Exceptions
    Type Condition
    InvalidProductTypeException

    Error found involving an invalid product type.

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

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

    Declaration
    public SubscriptionInfo(string skuDetails, bool isAutoRenewing, DateTime purchaseDate, bool isFreeTrial, bool hasIntroductoryPriceTrial, bool purchaseHistorySupported, string updateMetadata)
    Parameters
    Type Name Description
    string skuDetails

    The raw JSON from SkuDetail.getOriginalJson

    bool isAutoRenewing

    Whether this subscription is expected to auto-renew

    DateTime purchaseDate

    A date this subscription was billed

    bool isFreeTrial

    Indicates whether this Product is a free trial

    bool hasIntroductoryPriceTrial

    Indicates whether this Product may be owned with an introductory price period.

    bool purchaseHistorySupported

    Unsupported

    string updateMetadata

    Unsupported. Mechanism previously propagated subscription upgrade information to new subscription.

    Exceptions
    Type Condition
    InvalidProductTypeException

    For non-subscription product types.

    SubscriptionInfo(string)

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

    Declaration
    public SubscriptionInfo(string productId)
    Parameters
    Type Name Description
    string productId

    This subscription's product identifier

    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