public async Task <ActionResult <AccountItemDto> > PutBooking( [FromRoute] Guid accountId, [FromRoute] Guid bookingId, [FromBody] AccountItemDto booking) { await mediator.Send(new ChangePaymentCommand(accountId, bookingId, booking)); booking.BookingId = bookingId; return(Ok(booking)); }
public ChangePaymentCommand(Guid accountRootId, Guid bookingId, AccountItemDto accountItemDto) { AccountRootId = accountRootId; BookingId = bookingId; AccountItemDto = accountItemDto; }
public BookPaymentCommand(Guid accountRootId, AccountItemDto accountItemDto) { AccountRootId = accountRootId; AccountItemDto = accountItemDto; }
public async Task <ActionResult <AccountItemDto> > PostNewBooking([FromRoute] Guid accountId, [FromBody] AccountItemDto booking) { booking.BookingId = Guid.NewGuid(); await mediator.Send(new BookPaymentCommand(accountId, booking)); return(Ok(booking)); }