/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='merchantId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <WalletInfo> > ApiWalletByMerchantIdGetAsync(this ILykkePayServiceGenerateAddressMicroService operations, string merchantId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ApiWalletByMerchantIdGetWithHttpMessagesAsync(merchantId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
private async Task <double> GetWalletAmount() { var walletResult = await _generateAddressMicroService.ApiWalletByMerchantIdGetWithHttpMessagesAsync(_address.Orders.First().MerchantId); try { var res = (from w in walletResult.Body where _address.Address.Equals(w.WalletAddress, StringComparison.CurrentCultureIgnoreCase) select w.Amount).First(); return(res.Value); } catch { return(0); } }
protected async Task <List <ToOneAddress> > GetListOfSources(string assertId) { if (string.IsNullOrEmpty(assertId)) { return(null); } var walletResult = await GnerateAddressClient.ApiWalletByMerchantIdGetWithHttpMessagesAsync(MerchantId); var res = (from w in walletResult.Body where assertId.Equals(w.Assert, StringComparison.CurrentCultureIgnoreCase) select new ToOneAddress { Address = w.WalletAddress, Amount = (decimal?)w.Amount }).ToList(); return(res); }