| | | 1 | | using Newtonsoft.Json.Linq; |
| | | 2 | | |
| | | 3 | | namespace Services.ApiServices.MoskvorechieApi; |
| | | 4 | | |
| | | 5 | | public sealed class MoskvorechieIstraDataManager |
| | | 6 | | { |
| | | 7 | | private readonly MoskvorechieIstraHttpClient _client; |
| | 188 | 8 | | public MoskvorechieIstraDataManager(MoskvorechieIstraHttpClient client) => _client = client; |
| | 0 | 9 | | public Task<JToken> FindBrandsAsync(string article, CancellationToken ct = default) => _client.GetAsync("brand_by_nr |
| | 0 | 10 | | public Task<JToken> SearchPricesAsync(string article, string? brand, CancellationToken ct = default) => _client.GetA |
| | 0 | 11 | | public Task<JToken> GetGoodsInfoAsync(string id, CancellationToken ct = default) => _client.GetAsync("g_info", new D |
| | 34 | 12 | | public Task<JToken> GetBasketAsync(CancellationToken ct = default) => _client.GetAsync("my_basket", ct: ct); |
| | 6 | 13 | | public Task<JToken> AddToBasketAsync(string id, decimal quantity, string? comment, CancellationToken ct = default) = |
| | 2 | 14 | | public Task<JToken> CleanBasketAsync(CancellationToken ct = default) => _client.PostAsync("clean_basket", ct: ct); |
| | 4 | 15 | | public Task<JToken> MakeOrderAsync(CancellationToken ct = default) => _client.PostAsync("make_order_v2", ct: ct); |
| | | 16 | | public Task<JToken> GetOrderStatesAsync(IReadOnlyCollection<string> orderIds, CancellationToken ct = default) => |
| | 86 | 17 | | _client.PostAsync("make_order_v2", new Dictionary<string, string?> { ["oids"] = string.Join(';', orderIds.Where( |
| | | 18 | | } |