| | | 1 | | using Services.ApiServices.ApiSupplierIntegration; |
| | | 2 | | |
| | | 3 | | namespace Services.ApiServices.FavoritPartsApi; |
| | | 4 | | |
| | | 5 | | public sealed class FavoritPartsSupplierConnector : IApiSupplierConnector |
| | | 6 | | { |
| | | 7 | | private readonly FavoritPartsDataManager _manager; |
| | | 8 | | public FavoritPartsSupplierConnector(FavoritPartsDataManager manager) => _manager = manager; |
| | | 9 | | public string ProviderKey => "FavoritParts"; |
| | | 10 | | public string DisplayName => "Фаворит Союз"; |
| | | 11 | | public string DefaultCurrencyCode => "RUB"; |
| | | 12 | | public string SiteUrl => "https://lk.favorit-parts.ru/"; |
| | | 13 | | |
| | | 14 | | public async Task<ApiSupplierPingResult> PingAsync(CancellationToken cancellationToken = default) |
| | | 15 | | { |
| | | 16 | | await _manager.GetProfileAsync(cancellationToken); |
| | | 17 | | return new ApiSupplierPingResult(true); |
| | | 18 | | } |
| | | 19 | | } |
| | | 20 | | |
| | | 21 | | public sealed class FavoritPartsIstraSupplierConnector : IApiSupplierConnector |
| | | 22 | | { |
| | | 23 | | private readonly FavoritPartsIstraDataManager _manager; |
| | 0 | 24 | | public FavoritPartsIstraSupplierConnector(FavoritPartsIstraDataManager manager) => _manager = manager; |
| | 0 | 25 | | public string ProviderKey => "FavoritPartsIstra"; |
| | 0 | 26 | | public string DisplayName => "Фаворит Истра"; |
| | 0 | 27 | | public string DefaultCurrencyCode => "RUB"; |
| | 0 | 28 | | public string SiteUrl => "https://lk.favorit-parts.ru/"; |
| | | 29 | | |
| | | 30 | | public async Task<ApiSupplierPingResult> PingAsync(CancellationToken cancellationToken = default) |
| | | 31 | | { |
| | 0 | 32 | | await _manager.GetProfileAsync(cancellationToken); |
| | 0 | 33 | | return new ApiSupplierPingResult(true); |
| | 0 | 34 | | } |
| | | 35 | | } |
| | | 36 | | |
| | | 37 | | public sealed class FavoritPartsRostovSupplierConnector : IApiSupplierConnector |
| | | 38 | | { |
| | | 39 | | private readonly FavoritPartsRostovDataManager _manager; |
| | | 40 | | public FavoritPartsRostovSupplierConnector(FavoritPartsRostovDataManager manager) => _manager = manager; |
| | | 41 | | public string ProviderKey => "FavoritPartsRostov"; |
| | | 42 | | public string DisplayName => "Фаворит Ростов"; |
| | | 43 | | public string DefaultCurrencyCode => "RUB"; |
| | | 44 | | public string SiteUrl => "https://lk.favorit-parts.ru/"; |
| | | 45 | | |
| | | 46 | | public async Task<ApiSupplierPingResult> PingAsync(CancellationToken cancellationToken = default) |
| | | 47 | | { |
| | | 48 | | await _manager.GetProfileAsync(cancellationToken); |
| | | 49 | | return new ApiSupplierPingResult(true); |
| | | 50 | | } |
| | | 51 | | } |