| | | 1 | | using Newtonsoft.Json; |
| | | 2 | | using Services.ApiServices; |
| | | 3 | | |
| | | 4 | | namespace Services.ApiServices.OzonApi.Filters; |
| | | 5 | | |
| | | 6 | | public class OzonPromoDto |
| | | 7 | | { |
| | | 8 | | [JsonProperty("action_id")] |
| | 0 | 9 | | public int ActionId { get; set; } |
| | | 10 | | |
| | | 11 | | [JsonProperty("title")] |
| | 0 | 12 | | public string? Title { get; set; } = ""; |
| | | 13 | | |
| | | 14 | | [JsonProperty("date_start")] |
| | 0 | 15 | | public string? DateFrom { get; set; } = ""; |
| | | 16 | | |
| | | 17 | | [JsonProperty("date_end")] |
| | 0 | 18 | | public string? DateTo { get; set; } = ""; |
| | | 19 | | } |
| | | 20 | | |
| | | 21 | | public class OzonActionsResponse |
| | | 22 | | { |
| | | 23 | | [JsonProperty("result")] |
| | | 24 | | public List<OzonPromoDto>? Result { get; set; } = new(); |
| | | 25 | | } |
| | | 26 | | |
| | | 27 | | public 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 | | |
| | | 39 | | public 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 | | |
| | | 48 | | public class OzonActionsProductsResponse |
| | | 49 | | { |
| | | 50 | | [JsonProperty("result")] |
| | | 51 | | public OzonActionsProductsResult? Result { get; set; } |
| | | 52 | | } |
| | | 53 | | |
| | | 54 | | public 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 | | |
| | | 63 | | public class OzonActionsRequest : IRequestModel |
| | | 64 | | { |
| | | 65 | | // POST /v1/actions не требует тела — пустой объект |
| | | 66 | | } |
| | | 67 | | |
| | | 68 | | /// <summary>Статус участия артикула в акции Ozon.</summary> |
| | | 69 | | public 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 | | } |