Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
fix: temporarily add PaymentInstruction back to QuoteDetails (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwlee authored Jul 25, 2024
1 parent d421ca1 commit 6778d10
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/protocol/models/message_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,14 @@ class QuoteDetails {
final String subtotal;
final String total;
final String? fee;
final PaymentInstruction? paymentInstruction;

QuoteDetails({
required this.currencyCode,
required this.subtotal,
required this.total,
this.fee,
this.paymentInstruction,
});

factory QuoteDetails.fromJson(Map<String, dynamic> json) {
Expand All @@ -223,6 +225,9 @@ class QuoteDetails {
subtotal: json['subtotal'],
total: json['total'],
fee: json['fee'],
paymentInstruction: json['paymentInstruction'] != null
? PaymentInstruction.fromJson(json['paymentInstruction'])
: null,
);
}

Expand All @@ -232,6 +237,8 @@ class QuoteDetails {
'subtotal': subtotal,
'total': total,
if (fee != null) 'fee': fee,
if (paymentInstruction != null)
'paymentInstruction': paymentInstruction?.toJson(),
};
}
}
Expand Down

0 comments on commit 6778d10

Please sign in to comment.