1
0

ProductMetadata.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. namespace UnityEngine.Purchasing
  2. {
  3. /// <summary>
  4. /// Metadata for the product, namely that which is relevant to the store subsystem
  5. /// </summary>
  6. public class ProductMetadata
  7. {
  8. /// <summary>
  9. /// Parametrized constructor
  10. /// </summary>
  11. /// <param name="priceString"> The price, as a string. </param>
  12. /// <param name="title"> The title of the product. </param>
  13. /// <param name="description"> The description of the product. </param>
  14. /// <param name="currencyCode"> The currency code of the localized price. </param>
  15. /// <param name="localizedPrice"> The localized price, by currency. </param>
  16. public ProductMetadata(string priceString, string title, string description, string currencyCode, decimal localizedPrice)
  17. {
  18. localizedPriceString = priceString;
  19. localizedTitle = title;
  20. localizedDescription = description;
  21. isoCurrencyCode = currencyCode;
  22. this.localizedPrice = localizedPrice;
  23. }
  24. /// <summary>
  25. /// Default constructor
  26. /// </summary>
  27. public ProductMetadata()
  28. {
  29. }
  30. /// <summary>
  31. /// Gets the localized price.
  32. /// This is the price formatted with currency symbol.
  33. /// </summary>
  34. /// <value>The localized price string.</value>
  35. public string localizedPriceString { get; internal set; }
  36. /// <summary>
  37. /// Gets the localized title, as retrieved from the store subsystem;
  38. /// Apple, Google etc.
  39. /// </summary>
  40. public string localizedTitle { get; internal set; }
  41. /// <summary>
  42. /// Gets the localized description, as retrieved from the store subsystem;
  43. /// Apple, Google etc.
  44. /// </summary>
  45. public string localizedDescription { get; internal set; }
  46. /// <summary>
  47. /// The product's currency in ISO 4217 format eg GBP, USD etc.
  48. /// </summary>
  49. public string isoCurrencyCode { get; internal set; }
  50. /// <summary>
  51. /// The product's price, denominated in the currency
  52. /// indicated by <c>isoCurrencySymbol</c>.
  53. /// </summary>
  54. public decimal localizedPrice { get; internal set; }
  55. }
  56. }