Add savingsPercentage to ionia merch discount.

This commit is contained in:
M 2022-07-28 11:22:24 +01:00
parent 5148272e42
commit 7e32ba4463

View file

@ -55,8 +55,8 @@ class IoniaMerchant {
@required this.ngcSku, @required this.ngcSku,
@required this.acceptedCurrency, @required this.acceptedCurrency,
@required this.deepLink, @required this.deepLink,
@required this.isPayLater @required this.isPayLater,
}); @required this.savingsPercentage});
factory IoniaMerchant.fromJsonMap(Map<String, dynamic> element) { factory IoniaMerchant.fromJsonMap(Map<String, dynamic> element) {
return IoniaMerchant( return IoniaMerchant(
@ -112,7 +112,8 @@ class IoniaMerchant {
ngcSku: element["NgcSku"] as String, ngcSku: element["NgcSku"] as String,
acceptedCurrency: element["AcceptedCurrency"] as String, acceptedCurrency: element["AcceptedCurrency"] as String,
deepLink: element["DeepLink"] 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; final int id;
@ -168,7 +169,8 @@ class IoniaMerchant {
final String acceptedCurrency; final String acceptedCurrency;
final String deepLink; final String deepLink;
final bool isPayLater; final bool isPayLater;
final double savingsPercentage;
double get discount => level3; double get discount => savingsPercentage;
} }