diff --git a/VkNet/Model/Price.cs b/VkNet/Model/Price.cs index 9442e710a..2b9d68ac5 100644 --- a/VkNet/Model/Price.cs +++ b/VkNet/Model/Price.cs @@ -1,4 +1,5 @@ using System; +using Newtonsoft.Json; using VkNet.Utils; namespace VkNet.Model @@ -12,16 +13,25 @@ public class Price /// /// Целочисленное значение цены, умноженное на 100. /// + [JsonProperty("amount")] public long? Amount { get; set; } /// /// Валюта. /// + [JsonProperty("currency")] public Currency Currency { get; set; } + /// + /// Старая цена товара в сотых долях единицы валюты. + /// + [JsonProperty("old_amount")] + public long? OldAmount { get; set; } + /// /// Строка с локализованной ценой и валютой. /// + [JsonProperty("text")] public string Text { get; set; } /// @@ -33,9 +43,10 @@ public static Price FromJson(VkResponse response) { var price = new Price { - Amount = response[key: "amount"] - , Currency = response[key: "currency"] - , Text = response[key: "text"] + Amount = response["amount"], + Currency = response["currency"], + OldAmount = response["old_amount"], + Text = response["text"] }; return price;