using System;
using UnityEngine.Purchasing.Extension;
namespace UnityEngine.Purchasing
{
///
/// Access Google Play store specific configurations.
///
public interface IGooglePlayConfiguration : IStoreConfiguration
{
///
/// Set an optional listener for failures when connecting to the base Google Play Billing service. This may be called
/// after if a user does not have a Google account added to their
/// Android device.
///
/// This listener can be used to learn that initialization is paused, and the user must add a Google account
/// in order to be able to purchase and to download previous purchases. Adding a valid account will allow
/// the initialization to resume.
///
/// Will be called when
/// is interrupted by a disconnection from the Google Play Billing service.
void SetServiceDisconnectAtInitializeListener(Action action);
///
/// Set an optional listener for failures when querying product details.
///
/// Will be called with the retry count for each failed attempt to query product details.
void SetQueryProductDetailsFailedListener(Action action);
///
/// Set listener for deferred purchasing events.
/// Deferred purchasing is enabled by default and cannot be changed.
///
/// Deferred purchasing successful events. Do not grant the item here. Instead, record the purchase and remind the user to complete the transaction in the Play Store.
void SetDeferredPurchaseListener(Action action);
///
/// Set listener for deferred subscription change events.
/// Deferred subscription changes only take effect at the renewal cycle and no transaction is done immediately, therefore there is no receipt nor token.
///
/// Deferred subscription change event. No payout is granted here. Instead, notify the user that the subscription change will take effect at the next renewal cycle.
void SetDeferredProrationUpgradeDowngradeSubscriptionListener(Action action);
///
/// Optional obfuscation string to detect irregular activities when making a purchase.
/// For more information please visit https://developer.android.com/google/play/billing/security
///
/// The obfuscated account id
void SetObfuscatedAccountId(string accountId);
///
/// Optional obfuscation string to detect irregular activities when making a purchase
/// For more information please visit https://developer.android.com/google/play/billing/security
///
/// The obfuscated profile id
void SetObfuscatedProfileId(string profileId);
///
/// Set behavior at initialization of fetching purchase data. Use before calling .
///
/// Disable to prevent from automatically returning entitled purchases at initialization.
/// This allows greater control when tracking the origin of purchases.
/// Then use to fetch as-yet unseen entitled purchases.
///
/// Default is true.
///
///
void SetFetchPurchasesAtInitialize(bool enable);
///
/// Set behavior when fetching deferred purchases. Use before calling .
///
/// Exclude to prevent deferred purchases from being fetched and processed by at initialization.
/// When false, deferred purchases need to be handled in to prevent granting unpaid purchases.
///
/// Default is true.
///
///
void SetFetchPurchasesExcludeDeferred(bool exclude);
}
}