idempotency key delivery fix

This commit is contained in:
Stephan D
2026-01-21 16:50:47 +01:00
parent 87f99be01d
commit bd5dfb4f26
11 changed files with 63 additions and 24 deletions

View File

@@ -9,6 +9,7 @@ part 'quotes.g.dart';
@JsonSerializable()
class PaymentQuotesDTO {
final String quoteRef;
final String idempotencyKey;
final PaymentQuoteAggregateDTO? aggregate;
final List<PaymentQuoteDTO>? quotes;
@@ -16,6 +17,7 @@ class PaymentQuotesDTO {
required this.quoteRef,
this.aggregate,
this.quotes,
required this.idempotencyKey,
});
factory PaymentQuotesDTO.fromJson(Map<String, dynamic> json) => _$PaymentQuotesDTOFromJson(json);

View File

@@ -9,11 +9,13 @@ extension PaymentQuotesDTOMapper on PaymentQuotesDTO {
quoteRef: quoteRef,
aggregate: aggregate?.toDomain(),
quotes: quotes?.map((quote) => quote.toDomain()).toList(),
idempotencyKey: idempotencyKey
);
}
extension PaymentQuotesMapper on PaymentQuotes {
PaymentQuotesDTO toDTO() => PaymentQuotesDTO(
idempotencyKey: idempotencyKey,
quoteRef: quoteRef,
aggregate: aggregate?.toDTO(),
quotes: quotes?.map((quote) => quote.toDTO()).toList(),