Table of Contents

Class ReceiptPaymentsController

Namespace
KadicErp.WebApi.Controllers.Receivables
Assembly
KadicErp.WebApi.dll
[ApiController]
[Authorize]
[Route("api/receivables/receipts/{receiptId:guid}/payments")]
public class ReceiptPaymentsController : ControllerBase
Inheritance
object
ControllerBase
ReceiptPaymentsController

Constructors

ReceiptPaymentsController(ISender, IStringLocalizer<GeneralMessages>)

public ReceiptPaymentsController(ISender sender, IStringLocalizer<GeneralMessages> localizer)

Parameters

sender ISender
localizer IStringLocalizer<GeneralMessages>

Methods

DeletePayment(Guid, Guid)

Eliminar un pago de un recibo. Solo se puede eliminar si el monto del pago no ha sido aplicado a documentos.

[HttpDelete("{paymentId:guid}")]
[Authorize(Policy = "RECEIVABLES_RECEIPT_PAYMENTS_DELETE")]
public Task<IActionResult> DeletePayment(Guid receiptId, Guid paymentId)

Parameters

receiptId Guid
paymentId Guid

Returns

Task<IActionResult>

GetPaymentById(Guid, Guid, CancellationToken)

Obtener un pago especĂ­fico de un recibo por su ID.

[HttpGet("{paymentId:guid}")]
[Authorize(Policy = "RECEIVABLES_RECEIPT_PAYMENTS_VIEW")]
public Task<IActionResult> GetPaymentById(Guid receiptId, Guid paymentId, CancellationToken cancellationToken)

Parameters

receiptId Guid
paymentId Guid
cancellationToken CancellationToken

Returns

Task<IActionResult>

GetPayments(Guid, CancellationToken)

Listar todos los pagos de un recibo.

[HttpGet]
[Authorize(Policy = "RECEIVABLES_RECEIPT_PAYMENTS_VIEW")]
public Task<IActionResult> GetPayments(Guid receiptId, CancellationToken cancellationToken)

Parameters

receiptId Guid
cancellationToken CancellationToken

Returns

Task<IActionResult>