public async Task <ActionResult> WithDrawMoney(ChangeBalanceVM changeBalance) { int currencyCodeInt = _currencyCodesResolver.Resolve(changeBalance.CurrencyCode); Result result = await _accountService.WithdrawMoneyAsync(changeBalance.UserId, changeBalance.Amount, currencyCodeInt); return(ProcessResult(result)); }
public async Task <HttpResponseMessage> WithDrawMoney(long userId, decimal money, string currency) { ChangeBalanceVM changeBalanceVM = new ChangeBalanceVM() { Amount = money, CurrencyCode = currency, UserId = userId }; string json = JsonConvert.SerializeObject(changeBalanceVM); StringContent data = new StringContent(json, Encoding.UTF8, "application/json"); return(await _client.PutAsync($"/account/WithDrawMoney", data)); }