2022-07-07 18:54:13 +00:00
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
|
|
|
|
class IoniaGiftCard {
|
|
|
|
IoniaGiftCard({
|
|
|
|
@required this.id,
|
|
|
|
@required this.merchantId,
|
|
|
|
@required this.legalName,
|
|
|
|
@required this.systemName,
|
|
|
|
@required this.barcodeUrl,
|
|
|
|
@required this.cardNumber,
|
|
|
|
@required this.cardPin,
|
|
|
|
@required this.usageInstructions,
|
|
|
|
@required this.balanceInstructions,
|
|
|
|
@required this.paymentInstructions,
|
|
|
|
@required this.cardImageUrl,
|
|
|
|
@required this.tip,
|
|
|
|
@required this.purchaseAmount,
|
|
|
|
@required this.actualAmount,
|
|
|
|
@required this.totalTransactionAmount,
|
|
|
|
@required this.totalDashTransactionAmount,
|
|
|
|
@required this.remainingAmount,
|
|
|
|
@required this.createdDateFormatted,
|
|
|
|
@required this.lastTransactionDateFormatted,
|
|
|
|
@required this.isActive,
|
|
|
|
@required this.isEmpty,
|
|
|
|
@required this.logoUrl});
|
|
|
|
|
|
|
|
factory IoniaGiftCard.fromJsonMap(Map<String, dynamic> element) {
|
|
|
|
return IoniaGiftCard(
|
|
|
|
id: element['Id'] as int,
|
|
|
|
merchantId: element['MerchantId'] as int,
|
|
|
|
legalName: element['LegalName'] as String,
|
|
|
|
systemName: element['SystemName'] as String,
|
|
|
|
barcodeUrl: element['BarcodeUrl'] as String,
|
|
|
|
cardNumber: element['CardNumber'] as String,
|
2022-07-14 16:57:40 +00:00
|
|
|
cardPin: element['CardPin'] as String,
|
2022-07-07 18:54:13 +00:00
|
|
|
tip: element['Tip'] as double,
|
|
|
|
purchaseAmount: element['PurchaseAmount'] as double,
|
|
|
|
actualAmount: element['ActualAmount'] as double,
|
|
|
|
totalTransactionAmount: element['TotalTransactionAmount'] as double,
|
|
|
|
totalDashTransactionAmount: element['TotalDashTransactionAmount'] as double,
|
|
|
|
remainingAmount: element['RemainingAmount'] as double,
|
|
|
|
isActive: element['IsActive'] as bool,
|
|
|
|
isEmpty: element['IsEmpty'] as bool,
|
|
|
|
logoUrl: element['LogoUrl'] as String,
|
|
|
|
createdDateFormatted: element['CreatedDate'] as String,
|
|
|
|
lastTransactionDateFormatted: element['LastTransactionDate'] as String);
|
|
|
|
}
|
|
|
|
|
|
|
|
final int id;
|
|
|
|
final int merchantId;
|
|
|
|
final String legalName;
|
|
|
|
final String systemName;
|
|
|
|
final String barcodeUrl;
|
|
|
|
final String cardNumber;
|
|
|
|
final String cardPin;
|
|
|
|
final Map<String, dynamic> usageInstructions;
|
|
|
|
final Map<String, dynamic> balanceInstructions;
|
|
|
|
final Map<String, dynamic> paymentInstructions;
|
|
|
|
final String cardImageUrl;
|
|
|
|
final double tip;
|
|
|
|
final double purchaseAmount;
|
|
|
|
final double actualAmount;
|
|
|
|
final double totalTransactionAmount;
|
|
|
|
final double totalDashTransactionAmount;
|
|
|
|
final double remainingAmount;
|
|
|
|
final String createdDateFormatted;
|
|
|
|
final String lastTransactionDateFormatted;
|
|
|
|
final bool isActive;
|
|
|
|
final bool isEmpty;
|
|
|
|
final String logoUrl;
|
|
|
|
}
|