< Summary

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

File(s)

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

#LineLine coverage
 1using Newtonsoft.Json;
 2using Services.ApiServices;
 3
 4namespace Services.ApiServices.OzonApi.Filters;
 5
 6/// <summary>POST /v1/posting/fbs/cancel-reason — список причин отмены отправлений.</summary>
 7public class FbsCancelReasonListRequest : IRequestModel
 8{
 9    [JsonProperty("related_posting_numbers")]
 010    public List<string>? RelatedPostingNumbers { get; set; } = new();
 11}
 12
 13public class FbsCancelReasonListResponse
 14{
 15    [JsonProperty("result")]
 16    public List<FbsCancelReasonPostingResult>? Result { get; set; } = new();
 17}
 18
 19public class FbsCancelReasonPostingResult
 20{
 21    [JsonProperty("posting_number")]
 22    public string? PostingNumber { get; set; } = string.Empty;
 23
 24    [JsonProperty("reasons")]
 25    public List<FbsCancelReasonItem>? Reasons { get; set; } = new();
 26}
 27
 28public class FbsCancelReasonItem
 29{
 30    [JsonProperty("id")]
 31    public long Id { get; set; }
 32
 33    [JsonProperty("title")]
 34    public string? Title { get; set; } = string.Empty;
 35
 36    [JsonProperty("type_id")]
 37    public string? TypeId { get; set; }
 38
 39    [JsonProperty("is_available_for_cancellation")]
 40    public bool IsAvailableForCancellation { get; set; }
 41}
 42
 43/// <summary>Общий каталог причин отмены FBS/FBO.</summary>
 44public class OzonCancelReasonCatalogRequest : IRequestModel { }
 45
 46public class OzonCancelReasonCatalogResponse
 47{
 48    [JsonProperty("result")]
 49    public List<FbsCancelReasonItem>? Result { get; set; } = new();
 50}
 51
 52/// <summary>POST /v2/posting/fbs/cancel — отмена отправления FBS.</summary>
 53public class FbsPostingCancelRequest : IRequestModel
 54{
 55    [JsonProperty("cancel_reason_id")]
 56    public long CancelReasonId { get; set; }
 57
 58    [JsonProperty("cancel_reason_message")]
 59    public string? CancelReasonMessage { get; set; }
 60
 61    [JsonProperty("posting_number")]
 62    public string? PostingNumber { get; set; } = string.Empty;
 63}
 64
 65public class FbsPostingCancelResponse
 66{
 67    [JsonProperty("result")]
 68    public bool Result { get; set; }
 69}

Methods/Properties

get_RelatedPostingNumbers()