Table of Contents

Class InstallmentsController

Namespace
KadicErp.WebApi.Controllers.RentACar
Assembly
KadicErp.WebApi.dll
[ApiController]
[Route("api/rentcar/installments")]
[Authorize]
public sealed class InstallmentsController : ControllerBase
Inheritance
object
ControllerBase
InstallmentsController

Constructors

InstallmentsController(ISender)

public InstallmentsController(ISender sender)

Parameters

sender ISender

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

id Guid
cancellationToken CancellationToken

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

branchId Guid
dueDate DateOnly?
dateFrom DateOnly?
dateTo DateOnly?
statusFilter string
paymentStatus string
hasMora bool?
pendingMora bool?
morningNotificationSent bool?
followUpNotificationSent bool?
anyNotificationSent bool?
customerNameContains string
customerPhone string
customerNameExact string
installmentNumber int?
installmentStatus string
amountMin decimal?
amountMax decimal?
contractNumberContains string
contractId Guid?
hasBaseInvoice bool?
hasLateFeeDebitNote bool?
sortBy string
sortOrder string
pageNumber int?
pageSize int?
cancellationToken CancellationToken

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

id Guid
cancellationToken CancellationToken

Returns

Task<IActionResult>