reserveRefund abstract method

Future<DVRefundReservation> reserveRefund({
  1. required String saleId,
  2. required String refundId,
  3. required int amount,
  4. required int taxFor(
    1. int refundedBefore,
    2. int refundedAfter
    ),
  5. required DateTime at,
  6. String? reason,
})

Counts amount against what is left of saleId's capture, as one step with checking that it fits. taxFor is given the amount refunded before and after, and returns the tax this refund reverses.

Implementation

Future<DVRefundReservation> reserveRefund({
  required String saleId,
  required String refundId,
  required int amount,
  required int Function(int refundedBefore, int refundedAfter) taxFor,
  required DateTime at,
  String? reason,
});