| | | 1 | | using Newtonsoft.Json; |
| | | 2 | | |
| | | 3 | | namespace Services.ApiServices.FavoritPartsApi; |
| | | 4 | | |
| | | 5 | | /// <summary>Тело POST /ws/v1/order/. Один заказ = один WarehouseShipping + один ShippingDate (см. FavoritPartsCartServi |
| | | 6 | | /// Идентификаторы сериализуются в верхнем регистре — см. <see cref="FavoritPartsGuid"/>.</summary> |
| | | 7 | | public sealed class FavoritPartsOrderRequest |
| | | 8 | | { |
| | 2 | 9 | | [JsonProperty("WarehouseShipping"), JsonConverter(typeof(FavoritPartsGuidJsonConverter))] public Guid WarehouseShipp |
| | | 10 | | /// <summary>Формат yyyyMMdd.</summary> |
| | 3 | 11 | | [JsonProperty("ShippingDate")] public string ShippingDate { get; set; } = string.Empty; |
| | 2 | 12 | | [JsonProperty("TradePoint"), JsonConverter(typeof(FavoritPartsGuidJsonConverter))] public Guid TradePoint { get; set |
| | | 13 | | /// <summary>1 — наличная, 2 — безналичная, 3 — банковская карта.</summary> |
| | 2 | 14 | | [JsonProperty("PaymentType")] public int PaymentType { get; set; } |
| | | 15 | | /// <summary>1 — доставка, 2 — самовывоз.</summary> |
| | 2 | 16 | | [JsonProperty("DeliveryType")] public int DeliveryType { get; set; } |
| | | 17 | | /// <summary>1 — авто, 2 — ЖД, 3 — авиа; 0, если DeliveryType = самовывоз.</summary> |
| | 2 | 18 | | [JsonProperty("TransportType")] public int TransportType { get; set; } |
| | 1 | 19 | | [JsonProperty("Comment")] public string? Comment { get; set; } |
| | 3 | 20 | | [JsonProperty("GoodsList")] public List<FavoritPartsOrderGoodsLine> GoodsList { get; set; } = new(); |
| | | 21 | | } |
| | | 22 | | |
| | | 23 | | public sealed class FavoritPartsOrderGoodsLine |
| | | 24 | | { |
| | | 25 | | [JsonProperty("Goods"), JsonConverter(typeof(FavoritPartsGuidJsonConverter))] public Guid Goods { get; set; } |
| | | 26 | | [JsonProperty("WarehouseGroup"), JsonConverter(typeof(FavoritPartsGuidJsonConverter))] public Guid WarehouseGroup { |
| | | 27 | | [JsonProperty("Count")] public decimal Count { get; set; } |
| | | 28 | | [JsonProperty("Comment")] public string? Comment { get; set; } |
| | | 29 | | } |