docs.unity3d.com
    Show / Hide Table of Contents

    Class Product

    May be purchased as an In App Purchase.

    Inheritance
    Object
    Product
    Inherited Members
    Object.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Purchasing
    Syntax
    public class Product

    Properties

    availableToPurchase

    Determine if this product is available to purchase according to the store subsystem.

    This will be false if the product's identifier is unknown, incorrect or otherwise disabled with the store provider (ie Apple, Google et al).

    If this is false, purchase attempts will immediately fail.

    Declaration
    public bool availableToPurchase { get; }
    Property Value
    Type Description
    Boolean

    definition

    Basic immutable product properties.

    Declaration
    public ProductDefinition definition { get; }
    Property Value
    Type Description
    ProductDefinition

    hasReceipt

    Owned Non Consumables and Subscriptions should always have receipts. Consumable's receipts are not persisted between App restarts.

    Declaration
    public bool hasReceipt { get; }
    Property Value
    Type Description
    Boolean

    metadata

    Localized metadata provided by the store system.

    Declaration
    public ProductMetadata metadata { get; }
    Property Value
    Type Description
    ProductMetadata

    The metadata.

    receipt

    The purchase receipt for this product, if owned. For consumable purchases, this will be the most recent purchase receipt. Consumable receipts are not saved between app restarts. Receipts is in JSON format.

    Declaration
    public string receipt { get; }
    Property Value
    Type Description
    String

    transactionID

    A unique identifier for this product's transaction.

    This will only be set when the product was purchased during this session.

    Declaration
    public string transactionID { get; }
    Property Value
    Type Description
    String

    Methods

    Equals(Object)

    Check if this product is equal to another.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The product to compare with this object.

    Returns
    Type Description
    Boolean

    True if the products are equal

    Overrides
    Object.Equals(Object)

    GetHashCode()

    Get the unique Hash representing the product.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code as integer

    Overrides
    Object.GetHashCode()
    Back to top
    Terms of use
    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