< Summary

Information
Class: Services.ApiServices.FidApi.Models.FidPriceHistoryRow
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/FidApi/Models/FidPriceStock.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 82
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_RunId()100%11100%
get_AssembledAt()100%11100%
get_AssembledBy()100%11100%
get_CabinetKey()100%11100%
get_Article()100%11100%
get_Price()100%11100%
get_OldPrice()100%11100%
get_TotalStock()100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/FidApi/Models/FidPriceStock.cs

#LineLine coverage
 1using Newtonsoft.Json;
 2
 3namespace Services.ApiServices.FidApi.Models;
 4
 5/// <summary>Единый снимок цены, остатков и истории из фид-сервиса.</summary>
 6public sealed class FidPriceStock
 7{
 8    [JsonProperty("current")]
 9    public List<FidPriceCurrentRow> Current { get; init; } = [];
 10
 11    [JsonProperty("history")]
 12    public List<FidPriceHistoryRow> History { get; init; } = [];
 13}
 14
 15public sealed class FidPriceCurrentRow
 16{
 17    [JsonProperty("cabinetKey")]
 18    public string CabinetKey { get; init; } = string.Empty;
 19
 20    [JsonProperty("article")]
 21    public string Article { get; init; } = string.Empty;
 22
 23    [JsonProperty("warehouseName")]
 24    public string? WarehouseName { get; init; }
 25
 26    [JsonProperty("stock")]
 27    public int? Stock { get; init; }
 28
 29    [JsonProperty("stockSupplier")]
 30    public string? StockSupplier { get; init; }
 31
 32    [JsonProperty("price")]
 33    public decimal? Price { get; init; }
 34
 35    [JsonProperty("oldPrice")]
 36    public decimal? OldPrice { get; init; }
 37
 38    [JsonProperty("minPrice")]
 39    public decimal? MinPrice { get; init; }
 40
 41    [JsonProperty("purchasePrice")]
 42    public decimal? PurchasePrice { get; init; }
 43
 44    [JsonProperty("priceWarehouse")]
 45    public string? PriceWarehouse { get; init; }
 46
 47    [JsonProperty("priceSupplier")]
 48    public string? PriceSupplier { get; init; }
 49
 50    [JsonProperty("runId")]
 51    public long? RunId { get; init; }
 52
 53    [JsonProperty("updatedAt")]
 54    public DateTime UpdatedAt { get; init; }
 55}
 56
 57public sealed class FidPriceHistoryRow
 58{
 59    [JsonProperty("runId")]
 260    public long RunId { get; init; }
 61
 62    [JsonProperty("assembledAt")]
 263    public DateTime AssembledAt { get; init; }
 64
 65    [JsonProperty("assembledBy")]
 266    public string? AssembledBy { get; init; }
 67
 68    [JsonProperty("cabinetKey")]
 369    public string CabinetKey { get; init; } = string.Empty;
 70
 71    [JsonProperty("article")]
 372    public string Article { get; init; } = string.Empty;
 73
 74    [JsonProperty("price")]
 275    public decimal? Price { get; init; }
 76
 77    [JsonProperty("oldPrice")]
 278    public decimal? OldPrice { get; init; }
 79
 80    [JsonProperty("totalStock")]
 281    public long? TotalStock { get; init; }
 82}