< Summary

Information
Class: Services.ApiServices.OzonApi.Filters.OrderCancelCheckResponse
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/OzonApi/Filters/OrderCancelCheckResponse.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 65
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_Cancellable()100%210%
get_OrderNumber()100%210%
get_PostingGroups()100%210%
get_Postings()100%210%

File(s)

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

#LineLine coverage
 1using Newtonsoft.Json;
 2
 3namespace Services.ApiServices.OzonApi.Filters
 4{
 5    /// <summary>
 6    /// Ответ на запрос проверки возможности отмены заказа
 7    /// https://api-seller.ozon.ru/v1/order/cancel/check
 8    /// </summary>
 9    public class OrderCancelCheckResponse
 10    {
 11        /// <summary>
 12        /// true, если заказ можно отменить
 13        /// </summary>
 14        [JsonProperty("cancellable")]
 015        public bool Cancellable { get; set; }
 16
 17        /// <summary>
 18        /// Номер заказа
 19        /// </summary>
 20        [JsonProperty("order_number")]
 021        public string? OrderNumber { get; set; } = string.Empty;
 22
 23        /// <summary>Группы отправлений.</summary>
 24        [JsonProperty("posting_groups")]
 025        public List<PostingGroup>? PostingGroups { get; set; } = new();
 26
 27        /// <summary>Информация о возможности отмены отправлений.</summary>
 28        [JsonProperty("postings")]
 029        public List<PostingCancelInfo>? Postings { get; set; } = new();
 30    }
 31
 32    /// <summary>
 33    /// Группа отправлений в заказе
 34    /// </summary>
 35    public class PostingGroup
 36    {
 37        /// <summary>
 38        /// Список номеров отправлений в группе
 39        /// </summary>
 40        [JsonProperty("posting_numbers")]
 41        public List<string>? PostingNumbers { get; set; } = new();
 42    }
 43
 44    /// <summary>
 45    /// Информация о возможности отмены конкретного отправления
 46    /// </summary>
 47    public class PostingCancelInfo
 48    {
 49        /// <summary>
 50        /// true, если отправление можно отменить
 51        /// </summary>
 52        [JsonProperty("cancellable")]
 53        public bool Cancellable { get; set; }
 54
 55        /// <summary>
 56        /// Идентификатор отправления (posting_number)
 57        /// </summary>
 58        [JsonProperty("posting_number")]
 59        public string? PostingNumber { get; set; } = string.Empty;
 60
 61        /// <summary>Причина, по которой отправление нельзя отменить.</summary>
 62        [JsonProperty("why_not_cancellable")]
 63        public string? WhyNotCancellable { get; set; }
 64    }
 65}