public async Task <IActionResult> Post([FromBody] RegisterRequest message) { var request = new RegisterCommand(message.PIN, message.Name, message.InitialAmount); await registerInput.Handle(request); return(registerPresenter.ViewModel); }
public async Task <IActionResult> Get(Guid accountId) { var request = new GetAccountDetailsCommand(accountId); await getAccountDetailsInput.Handle(request); return(getAccountDetailsPresenter.ViewModel); }
public async Task <IActionResult> Withdraw([FromBody] WithdrawRequest message) { var request = new WithdrawCommand(message.AccountId, message.Amount); await withdrawInput.Handle(request); return(withdrawPresenter.ViewModel); }
public async Task <IActionResult> Deposit([FromBody] DepositRequest message) { var request = new DepositCommand(message.AccountId, message.Amount); await depositInput.Handle(request); return(depositPresenter.ViewModel); }
public async Task <IActionResult> Close(Guid accountId) { var request = new CloseCommand(accountId); await closeAccountInput.Handle(request); return(closePresenter.ViewModel); }