intent reference generation + propagation
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user