Summary
Define refund DTOs and integrate them into OrderResponse.
Context
Issue #14 implemented OrderResponse but deferred refund-related fields. The Montonio API returns refunds, availableForRefund, and (already included) isRefundableType on the order response. The TypeScript client defines:
interface RefundResponse {
uuid: string;
amount: number;
status: string;
currency: Currency;
createdAt: string;
type: string;
}
Requirements
- Create
RefundResponse response DTO in an appropriate package (e.g., sdk.order.response or a new sdk.refund package)
- Add
refunds: List<RefundResponse> and availableForRefund: BigDecimal fields to OrderResponse
- Unit tests for serialization/deserialization round-trips
Refs
Summary
Define refund DTOs and integrate them into
OrderResponse.Context
Issue #14 implemented
OrderResponsebut deferred refund-related fields. The Montonio API returnsrefunds,availableForRefund, and (already included)isRefundableTypeon the order response. The TypeScript client defines:Requirements
RefundResponseresponse DTO in an appropriate package (e.g.,sdk.order.responseor a newsdk.refundpackage)refunds: List<RefundResponse>andavailableForRefund: BigDecimalfields toOrderResponseRefs
OrderResponseinmontonio-client:refunds: RefundResponse[],availableForRefund: numberdocs/plans/2026-04-10-payment-order-models-design.md