refinement phase 3

This commit is contained in:
hamid
2026-07-13 11:26:39 +03:30
parent 1ce36f9414
commit 314763f764
194 changed files with 24211 additions and 274 deletions
@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Asp.Versioning;
using Baya.Application.Features.Refunds.Queries.GetRefundByBooking;
using Baya.Application.Features.Refunds.Queries.GetRefundStatus;
using Baya.Application.Models.Refunds;
using Baya.WebFramework.Attributes;
@@ -23,4 +24,10 @@ public sealed class RefundsController(ISender sender) : BaseController
[ProducesOkApiResponseType<RefundStatusDto>]
public async Task<IActionResult> Status(long id, CancellationToken cancellationToken)
=> OperationResult(await sender.Send(new GetRefundStatusQuery(id), cancellationToken));
// Reach the refund from its booking id (the id the customer holds) — 404 when none exists (REQ-021).
[HttpGet("by_booking/{bookingId}")]
[ProducesOkApiResponseType<RefundStatusDto>]
public async Task<IActionResult> ByBooking(long bookingId, CancellationToken cancellationToken)
=> OperationResult(await sender.Send(new GetRefundByBookingQuery(bookingId), cancellationToken));
}