idempotency key delivery fix
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user