| | | 1 | | using Services.ApiServices.InterpartsPriceApi.Models; |
| | | 2 | | using Services.ApiServices.TradesoftApi.Models.Response; |
| | | 3 | | |
| | | 4 | | namespace Services.ApiServices.InterpartsPriceApi; |
| | | 5 | | |
| | | 6 | | public static class InterpartsPriceApiExtensions |
| | | 7 | | { |
| | | 8 | | public static List<PreOrderItem> ToPreOrderItems( |
| | | 9 | | this IEnumerable<InterpartsPriceOffer>? offers, |
| | | 10 | | string? requestLogin, |
| | | 11 | | IReadOnlyDictionary<int, decimal> ratesToRub, |
| | | 12 | | IReadOnlyDictionary<int, string>? currencyNames = null) |
| | | 13 | | { |
| | 0 | 14 | | return InterpartsPriceOfferConverter.ConvertToPreOrderItems(offers, requestLogin, ratesToRub, currencyNames); |
| | | 15 | | } |
| | | 16 | | |
| | | 17 | | public static PreOrderItem? ToPreOrderItem( |
| | | 18 | | this InterpartsPriceOffer? offer, |
| | | 19 | | string? requestLogin, |
| | | 20 | | IReadOnlyDictionary<int, decimal>? ratesToRub, |
| | | 21 | | IReadOnlyDictionary<int, string>? currencyNames = null) |
| | | 22 | | { |
| | 0 | 23 | | return InterpartsPriceOfferConverter.ConvertSingleItem(offer, requestLogin, ratesToRub, currencyNames); |
| | | 24 | | } |
| | | 25 | | } |