| | | 1 | | using Newtonsoft.Json; |
| | | 2 | | using Services.ApiServices; |
| | | 3 | | |
| | | 4 | | namespace Services.ApiServices.OzonApi.Filters; |
| | | 5 | | |
| | | 6 | | /// <summary>POST /v1/posting/fbs/cancel-reason — список причин отмены отправлений.</summary> |
| | | 7 | | public class FbsCancelReasonListRequest : IRequestModel |
| | | 8 | | { |
| | | 9 | | [JsonProperty("related_posting_numbers")] |
| | | 10 | | public List<string>? RelatedPostingNumbers { get; set; } = new(); |
| | | 11 | | } |
| | | 12 | | |
| | | 13 | | public class FbsCancelReasonListResponse |
| | | 14 | | { |
| | | 15 | | [JsonProperty("result")] |
| | | 16 | | public List<FbsCancelReasonPostingResult>? Result { get; set; } = new(); |
| | | 17 | | } |
| | | 18 | | |
| | | 19 | | public 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 | | |
| | | 28 | | public 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> |
| | | 44 | | public class OzonCancelReasonCatalogRequest : IRequestModel { } |
| | | 45 | | |
| | | 46 | | public class OzonCancelReasonCatalogResponse |
| | | 47 | | { |
| | | 48 | | [JsonProperty("result")] |
| | 9 | 49 | | public List<FbsCancelReasonItem>? Result { get; set; } = new(); |
| | | 50 | | } |
| | | 51 | | |
| | | 52 | | /// <summary>POST /v2/posting/fbs/cancel — отмена отправления FBS.</summary> |
| | | 53 | | public 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 | | |
| | | 65 | | public class FbsPostingCancelResponse |
| | | 66 | | { |
| | | 67 | | [JsonProperty("result")] |
| | | 68 | | public bool Result { get; set; } |
| | | 69 | | } |