using System;
using System.Collections.Generic;
namespace UnityEngine.Purchasing
{
///
/// Used by Applications to control Unity Purchasing.
///
public interface IStoreController
{
///
/// Gets the collection of products in the store.
///
/// The product collection.
ProductCollection products { get; }
///
/// Initiate a purchase from the controlled store.
///
/// The product to be purchased.
/// The developer payload provided for certain stores that define such a concept (ex: Google Play).
void InitiatePurchase(Product product, string payload);
///
/// Initiate a purchase from the controlled store.
///
/// The id of the product to be purchased.
/// The developer payload provided for certain stores that define such a concept (ex: Google Play).
void InitiatePurchase(string productId, string payload);
///
/// Initiate a purchase from the controlled store.
///
/// The product to be purchased.
void InitiatePurchase(Product product);
///
/// Initiate a purchase from the controlled store
///
/// The id of the product to be purchased.
void InitiatePurchase(string productId);
///
/// Fetch additional products from the controlled store.
///
/// The set of product definitions to be fetched.
/// The event triggered on a successful fetch.
/// The event triggered on a failed fetch.
[Obsolete]
void FetchAdditionalProducts(HashSet additionalProducts, Action successCallback,
Action failCallback);
///
/// Fetch additional products from the controlled store.
///
/// The set of product definitions to be fetched.
/// The event triggered on a successful fetch.
/// The event triggered on a failed fetch. Contains the FailureReason and an optional error message.
void FetchAdditionalProducts(HashSet additionalProducts, Action successCallback,
Action failCallback);
///
/// Where an Application returned ProcessingResult.Pending
/// from IStoreListener.ProcessPurchase(), Applications should call
/// this method when processing completes.
///
/// The product for which its pending purchase it to be confirmed.
void ConfirmPendingPurchase(Product product);
}
}