docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ExtensibleProductService

    An abstract store service to extend an existing Product Service which will handle all of the basic IProductService implementations The main purpose of this is to allow a custom store to add implementations of extended features to this service. The calls to IProductService are kept virtual so that the derivations of the base store implementing them can be added to or overridden.

    Inheritance
    object
    ExtensibleProductService
    Implements
    IProductService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    public abstract class ExtensibleProductService : IProductService

    Constructors

    ExtensibleProductService(IProductService)

    Constructor to be used by derived classes

    Declaration
    protected ExtensibleProductService(IProductService baseProductService)
    Parameters
    Type Name Description
    IProductService baseProductService

    The base service implementation which implements IProductService

    Properties

    Apple

    Apple Specific Product Extensions

    Declaration
    public virtual IAppleStoreExtendedProductService? Apple { get; }
    Property Value
    Type Description
    IAppleStoreExtendedProductService

    Methods

    FetchProducts(List<ProductDefinition>, IRetryPolicy?)

    Fetches products with an optional retry policy.

    Declaration
    public virtual void FetchProducts(List<ProductDefinition> productDefinitions, IRetryPolicy? retryPolicy = null)
    Parameters
    Type Name Description
    List<ProductDefinition> productDefinitions

    The list of product definitions to fetch.

    IRetryPolicy retryPolicy

    The retry policy to use for fetching products, if any.

    FetchProductsWithNoRetries(List<ProductDefinition>)

    Fetches products without any retry policy.

    Declaration
    public virtual void FetchProductsWithNoRetries(List<ProductDefinition> productDefinitions)
    Parameters
    Type Name Description
    List<ProductDefinition> productDefinitions

    The list of product definitions to fetch.

    GetProductById(string)

    Gets a product by its identifier.

    Declaration
    public virtual Product? GetProductById(string productId)
    Parameters
    Type Name Description
    string productId

    The identifier of the product to retrieve.

    Returns
    Type Description
    Product

    The product with the specified identifier, or null if not found.

    GetProducts()

    Gets the products from the internal product service.

    Declaration
    public virtual ReadOnlyObservableCollection<Product> GetProducts()
    Returns
    Type Description
    ReadOnlyObservableCollection<Product>

    A read-only collection of products.

    Events

    OnProductsFetchFailed

    Event that is triggered when product fetching fails.

    Declaration
    public event Action<ProductFetchFailed>? OnProductsFetchFailed
    Event Type
    Type Description
    Action<ProductFetchFailed>

    OnProductsFetched

    Event that is triggered when products are fetched successfully.

    Declaration
    public event Action<List<Product>>? OnProductsFetched
    Event Type
    Type Description
    Action<List<Product>>

    Implements

    IProductService
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)