Пример #1
0
		public Task<Balance> GetWalletBalanceAsync(Guid walletId, CurrencyCode currency)
		{
			if (walletId == Guid.Empty)
				throw new ArgumentException("walletId");
			if (!Enum.IsDefined(typeof(CurrencyCode), currency))
				throw new ArgumentException("currency");

			var request = new GetWalletBalanceMessageBuilder(walletId, currency);
			return SendAsync(request).ReadAsAsync<Balance>();
		}
Пример #2
0
        public Task <Balance> GetWalletBalanceAsync(Guid walletId, CurrencyCode currency)
        {
            if (walletId == Guid.Empty)
            {
                throw new ArgumentException("walletId");
            }
            if (!Enum.IsDefined(typeof(CurrencyCode), currency))
            {
                throw new ArgumentException("currency");
            }

            var request = new GetWalletBalanceMessageBuilder(walletId, currency);

            return(SendAsync(request).ReadAsAsync <Balance>());
        }