From 7e32ba44638a0390b0154dd398c0d4228c896a01 Mon Sep 17 00:00:00 2001 From: M Date: Thu, 28 Jul 2022 11:22:24 +0100 Subject: [PATCH] Add savingsPercentage to ionia merch discount. --- lib/ionia/ionia_merchant.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ionia/ionia_merchant.dart b/lib/ionia/ionia_merchant.dart index 6b85a18b3..16df62da7 100644 --- a/lib/ionia/ionia_merchant.dart +++ b/lib/ionia/ionia_merchant.dart @@ -55,8 +55,8 @@ class IoniaMerchant { @required this.ngcSku, @required this.acceptedCurrency, @required this.deepLink, - @required this.isPayLater - }); + @required this.isPayLater, + @required this.savingsPercentage}); factory IoniaMerchant.fromJsonMap(Map element) { return IoniaMerchant( @@ -112,7 +112,8 @@ class IoniaMerchant { ngcSku: element["NgcSku"] as String, acceptedCurrency: element["AcceptedCurrency"] as String, deepLink: element["DeepLink"] as String, - isPayLater: element["IsPayLater"] as bool); + isPayLater: element["IsPayLater"] as bool, + savingsPercentage: element["SavingsPercentage"] as double); } final int id; @@ -168,7 +169,8 @@ class IoniaMerchant { final String acceptedCurrency; final String deepLink; final bool isPayLater; + final double savingsPercentage; - double get discount => level3; + double get discount => savingsPercentage; }