Class InstallmentsController
- Namespace
- KadicErp.WebApi.Controllers.RentACar
- Assembly
- KadicErp.WebApi.dll
[ApiController]
[Route("api/rentcar/installments")]
[Authorize]
public sealed class InstallmentsController : ControllerBase
- Inheritance
-
objectControllerBaseInstallmentsController
Constructors
InstallmentsController(ISender)
public InstallmentsController(ISender sender)
Parameters
senderISender
Methods
ApplyMora(Guid, CancellationToken)
Manually generates a Nota de Débito B03 (mora / late fee) for a single installment. Returns the ID of the created debit note.
[HttpPost("{id:guid}/apply-mora")]
[Authorize(Policy = "RENTACAR_INSTALLMENTS_APPLY_MORA")]
public Task<IActionResult> ApplyMora(Guid id, CancellationToken cancellationToken)
Parameters
idGuidcancellationTokenCancellationToken
Returns
- Task<IActionResult>
GetPaymentStatus(Guid, DateOnly?, DateOnly?, DateOnly?, string?, string?, bool?, bool?, bool?, bool?, bool?, string?, string?, string?, int?, string?, decimal?, decimal?, string?, Guid?, bool?, bool?, string?, string?, int?, int?, CancellationToken)
Returns the payment / notification / mora status for all installments of a branch. Supports comprehensive filtering by date, payment status, notifications, mora, amount, customer, contract, and more.
[HttpGet("payment-status")]
[Authorize(Policy = "RENTACAR_INSTALLMENTS_PAYMENT_STATUS")]
public Task<IActionResult> GetPaymentStatus(Guid branchId, DateOnly? dueDate = null, DateOnly? dateFrom = null, DateOnly? dateTo = null, string? statusFilter = null, string? paymentStatus = null, bool? hasMora = null, bool? pendingMora = null, bool? morningNotificationSent = null, bool? followUpNotificationSent = null, bool? anyNotificationSent = null, string? customerNameContains = null, string? customerPhone = null, string? customerNameExact = null, int? installmentNumber = null, string? installmentStatus = null, decimal? amountMin = null, decimal? amountMax = null, string? contractNumberContains = null, Guid? contractId = null, bool? hasBaseInvoice = null, bool? hasLateFeeDebitNote = null, string? sortBy = null, string? sortOrder = null, int? pageNumber = null, int? pageSize = null, CancellationToken cancellationToken = default)
Parameters
branchIdGuiddueDateDateOnly?dateFromDateOnly?dateToDateOnly?statusFilterstringpaymentStatusstringhasMorabool?pendingMorabool?morningNotificationSentbool?followUpNotificationSentbool?anyNotificationSentbool?customerNameContainsstringcustomerPhonestringcustomerNameExactstringinstallmentNumberint?installmentStatusstringamountMindecimal?amountMaxdecimal?contractNumberContainsstringcontractIdGuid?hasBaseInvoicebool?hasLateFeeDebitNotebool?sortBystringsortOrderstringpageNumberint?pageSizeint?cancellationTokenCancellationToken
Returns
- Task<IActionResult>
ResendNotification(Guid, CancellationToken)
Manually resends the payment notification (WhatsApp + Email) for a single installment.
[HttpPost("{id:guid}/resend-notification")]
[Authorize(Policy = "RENTACAR_INSTALLMENTS_RESEND_NOTIFICATION")]
public Task<IActionResult> ResendNotification(Guid id, CancellationToken cancellationToken)
Parameters
idGuidcancellationTokenCancellationToken
Returns
- Task<IActionResult>