Package com.tnsai.payment
Interface Settlement
- All Known Implementing Classes:
Settlement.AlreadySettled,Settlement.Expired,Settlement.Rejected,Settlement.Settled
public sealed interface Settlement
permits Settlement.Settled, Settlement.Rejected, Settlement.AlreadySettled, Settlement.Expired
Outcome of
PaymentBroker.settle(com.tnsai.payment.Quote) (TNS-298). Sealed so consumers
can dispatch with an exhaustive pattern-match: settled, rejected,
already-settled (idempotency replay), or expired.- Since:
- 0.10.0 (TNS-298)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordIdempotency replay — a prior settlement with the sameQuote.idempotencyKeyalready succeeded; broker returns the originaltransactionIdso callers can reconcile.static final recordQuote was pastQuote.expiresAtwhen settlement was attempted.static final recordBroker refused — insufficient funds, payer KYC failure, broker policy block.static final recordFunds moved successfully. -
Method Summary
Modifier and TypeMethodDescriptionquoteId()TheQuote.quoteIdthis settlement attempt referenced.Wall-clock instant the broker resolved this attempt.