namespace UnityEngine.Purchasing
{
///
/// Metadata for the product, namely that which is relevant to the store subsystem
///
public class ProductMetadata
{
///
/// Parametrized constructor
///
/// The price, as a string.
/// The title of the product.
/// The description of the product.
/// The currency code of the localized price.
/// The localized price, by currency.
public ProductMetadata(string priceString, string title, string description, string currencyCode, decimal localizedPrice)
{
localizedPriceString = priceString;
localizedTitle = title;
localizedDescription = description;
isoCurrencyCode = currencyCode;
this.localizedPrice = localizedPrice;
}
///
/// Copy constructor
///
/// The ProductMetadata, as an object.
public ProductMetadata(ProductMetadata productMetadata)
{
localizedPriceString = productMetadata.localizedPriceString;
localizedTitle = productMetadata.localizedTitle;
localizedDescription = productMetadata.localizedDescription;
isoCurrencyCode = productMetadata.isoCurrencyCode;
localizedPrice = productMetadata.localizedPrice;
}
///
/// Default constructor
///
public ProductMetadata()
{
}
///
/// Gets the localized price.
/// This is the price formatted with currency symbol.
///
/// The localized price string.
public string localizedPriceString { get; internal set; }
///
/// Gets the localized title, as retrieved from the store subsystem;
/// Apple, Google etc.
///
public string localizedTitle { get; internal set; }
///
/// Gets the localized description, as retrieved from the store subsystem;
/// Apple, Google etc.
///
public string localizedDescription { get; internal set; }
///
/// The product's currency in ISO 4217 format eg GBP, USD etc.
///
public string isoCurrencyCode { get; internal set; }
///
/// The product's price, denominated in the currency
/// indicated by isoCurrencySymbol.
///
public decimal localizedPrice { get; internal set; }
}
}