< Summary

Information
Class: Services.ApiServices.OzonApi.Filters.ProductAttributesItemResponse
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/OzonApi/Filters/ProductAttributesItemResponse.cs
Line coverage
36%
Covered lines: 8
Uncovered lines: 14
Coverable lines: 22
Total lines: 76
Line coverage: 36.3%
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_Id()100%11100%
get_OfferId()100%210%
get_Sku()100%210%
get_TypeId()100%210%
get_Name()100%210%
get_Barcode()100%210%
get_Barcodes()100%11100%
get_PrimaryImage()100%11100%
get_Images()100%11100%
get_ColorImage()100%210%
get_DescriptionCategoryId()100%210%
get_DimensionUnit()100%210%
get_Weight()100%210%
get_WeightUnit()100%210%
get_Depth()100%210%
get_Height()100%210%
get_Width()100%210%
get_ModelInfo()100%210%
get_Attributes()100%11100%
get_AttributesWithDefaults()100%11100%
get_ComplexAttributes()100%11100%
get_PdfList()100%11100%

File(s)

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

#LineLine coverage
 1using Newtonsoft.Json;
 2
 3namespace Services.ApiServices.OzonApi.Filters;
 4
 5public class ProductAttributesItemResponse
 6{
 7    [JsonProperty("id")]
 28    public long Id { get; set; }
 9
 10    [JsonProperty("offer_id")]
 011    public string? OfferId { get; set; }
 12
 13    // В документации поле описано как строка, но в ответе иногда приходит числом.
 14    // Newtonsoft корректно обрабатывает число -> string.
 15    [JsonProperty("sku")]
 016    public string? Sku { get; set; }
 17
 18    [JsonProperty("type_id")]
 019    public long? TypeId { get; set; }
 20
 21    [JsonProperty("name")]
 022    public string? Name { get; set; }
 23
 24    [JsonProperty("barcode")]
 025    public string? Barcode { get; set; }
 26
 27    [JsonProperty("barcodes")]
 128    public List<string>? Barcodes { get; set; } = [];
 29
 30    [JsonProperty("primary_image")]
 231    public string? PrimaryImage { get; set; }
 32
 33    [JsonProperty("images")]
 134    public List<string>? Images { get; set; } = [];
 35
 36    [JsonProperty("color_image")]
 037    public string? ColorImage { get; set; }
 38
 39    [JsonProperty("description_category_id")]
 040    public long? DescriptionCategoryId { get; set; }
 41
 42    [JsonProperty("dimension_unit")]
 043    public string? DimensionUnit { get; set; }
 44
 45    [JsonProperty("weight")]
 046    public long? Weight { get; set; }
 47
 48    [JsonProperty("weight_unit")]
 049    public string? WeightUnit { get; set; }
 50
 51    [JsonProperty("depth")]
 052    public long? Depth { get; set; }
 53
 54    [JsonProperty("height")]
 055    public long? Height { get; set; }
 56
 57    [JsonProperty("width")]
 058    public long? Width { get; set; }
 59
 60    [JsonProperty("model_info")]
 061    public ProductAttributesModelInfoResponse? ModelInfo { get; set; }
 62
 63    [JsonProperty("attributes")]
 164    public List<ProductAttributesAttributeResponse>? Attributes { get; set; } = [];
 65
 66    [JsonProperty("attributes_with_defaults")]
 167    public List<long>? AttributesWithDefaults { get; set; } = [];
 68
 69    [JsonProperty("complex_attributes")]
 170    public List<object>? ComplexAttributes { get; set; } = [];
 71
 72    // pdf_list может иметь разный состав полей, для текущей задачи не разворачиваем.
 73    [JsonProperty("pdf_list")]
 174    public List<object>? PdfList { get; set; } = [];
 75}
 76