intent reference generation + propagation

This commit is contained in:
Stephan D
2026-02-26 18:43:44 +01:00
parent 0f95f898a8
commit 7661038868
18 changed files with 816 additions and 24 deletions

View File

@@ -9,11 +9,18 @@ part 'payment_quote.g.dart';
@JsonSerializable()
class PaymentQuoteDTO {
final String? quoteRef;
final String? intentRef;
final QuoteAmountsDTO? amounts;
final QuoteFeesDTO? fees;
final FxQuoteDTO? fxQuote;
const PaymentQuoteDTO({this.quoteRef, this.amounts, this.fees, this.fxQuote});
const PaymentQuoteDTO({
this.quoteRef,
this.intentRef,
this.amounts,
this.fees,
this.fxQuote,
});
factory PaymentQuoteDTO.fromJson(Map<String, dynamic> json) =>
_$PaymentQuoteDTOFromJson(json);

View File

@@ -7,6 +7,7 @@ import 'package:pshared/models/payment/quote/quote.dart';
extension PaymentQuoteDTOMapper on PaymentQuoteDTO {
PaymentQuote toDomain({String? idempotencyKey}) => PaymentQuote(
quoteRef: quoteRef,
intentRef: intentRef,
idempotencyKey: idempotencyKey,
amounts: amounts?.toDomain(),
fees: fees?.toDomain(),
@@ -17,6 +18,7 @@ extension PaymentQuoteDTOMapper on PaymentQuoteDTO {
extension PaymentQuoteMapper on PaymentQuote {
PaymentQuoteDTO toDTO() => PaymentQuoteDTO(
quoteRef: quoteRef,
intentRef: intentRef,
amounts: amounts?.toDTO(),
fees: fees?.toDTO(),
fxQuote: fxQuote?.toDTO(),