No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ProductMetadata.cs 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. /// Copy constructor
  26. /// </summary>
  27. /// <param name="productMetadata"> The ProductMetadata, as an object. </param>
  28. public ProductMetadata(ProductMetadata productMetadata)
  29. {
  30. localizedPriceString = productMetadata.localizedPriceString;
  31. localizedTitle = productMetadata.localizedTitle;
  32. localizedDescription = productMetadata.localizedDescription;
  33. isoCurrencyCode = productMetadata.isoCurrencyCode;
  34. localizedPrice = productMetadata.localizedPrice;
  35. }
  36. /// <summary>
  37. /// Default constructor
  38. /// </summary>
  39. public ProductMetadata()
  40. {
  41. }
  42. /// <summary>
  43. /// Gets the localized price.
  44. /// This is the price formatted with currency symbol.
  45. /// </summary>
  46. /// <value>The localized price string.</value>
  47. public string localizedPriceString { get; internal set; }
  48. /// <summary>
  49. /// Gets the localized title, as retrieved from the store subsystem;
  50. /// Apple, Google etc.
  51. /// </summary>
  52. public string localizedTitle { get; internal set; }
  53. /// <summary>
  54. /// Gets the localized description, as retrieved from the store subsystem;
  55. /// Apple, Google etc.
  56. /// </summary>
  57. public string localizedDescription { get; internal set; }
  58. /// <summary>
  59. /// The product's currency in ISO 4217 format eg GBP, USD etc.
  60. /// </summary>
  61. public string isoCurrencyCode { get; internal set; }
  62. /// <summary>
  63. /// The product's price, denominated in the currency
  64. /// indicated by <c>isoCurrencySymbol</c>.
  65. /// </summary>
  66. public decimal localizedPrice { get; internal set; }
  67. }
  68. }