< Summary

Information
Class: Services.ApiServices.OzonApi.Filters.OzonActionsProductsResponse
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/OzonApi/Filters/OzonPromoModels.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 75
Line coverage: 0%
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_Result()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/OzonApi/Filters/OzonPromoModels.cs

#LineLine coverage
 1using Newtonsoft.Json;
 2using Services.ApiServices;
 3
 4namespace Services.ApiServices.OzonApi.Filters;
 5
 6public class OzonPromoDto
 7{
 8    [JsonProperty("action_id")]
 9    public int ActionId { get; set; }
 10
 11    [JsonProperty("title")]
 12    public string? Title { get; set; } = "";
 13
 14    [JsonProperty("date_start")]
 15    public string? DateFrom { get; set; } = "";
 16
 17    [JsonProperty("date_end")]
 18    public string? DateTo { get; set; } = "";
 19}
 20
 21public class OzonActionsResponse
 22{
 23    [JsonProperty("result")]
 24    public List<OzonPromoDto>? Result { get; set; } = new();
 25}
 26
 27public class OzonActionsProductsRequest : IRequestModel
 28{
 29    [JsonProperty("action_id")]
 30    public int ActionId { get; set; }
 31
 32    [JsonProperty("offset")]
 33    public int Offset { get; set; } = 0;
 34
 35    [JsonProperty("limit")]
 36    public int Limit { get; set; } = 1000;
 37}
 38
 39public class OzonPromoProductDto
 40{
 41    [JsonProperty("id")]
 42    public long Id { get; set; }
 43
 44    [JsonProperty("offer_id")]
 45    public string? OfferId { get; set; } = "";
 46}
 47
 48public class OzonActionsProductsResponse
 49{
 50    [JsonProperty("result")]
 051    public OzonActionsProductsResult? Result { get; set; }
 52}
 53
 54public class OzonActionsProductsResult
 55{
 56    [JsonProperty("products")]
 57    public List<OzonPromoProductDto>? Products { get; set; } = new();
 58
 59    [JsonProperty("total")]
 60    public int Total { get; set; }
 61}
 62
 63public class OzonActionsRequest : IRequestModel
 64{
 65    // POST /v1/actions не требует тела — пустой объект
 66}
 67
 68/// <summary>Статус участия артикула в акции Ozon.</summary>
 69public class OzonPromoStatusDto
 70{
 71    public bool    InPromo   { get; set; }
 72    public int     ActionId  { get; set; }
 73    public string  PromoName { get; set; } = "";
 74    public string? DateTo    { get; set; }
 75}

Methods/Properties

get_Result()