Transaction.fromMap constructor
Creates an instance of Transaction from a Map.
Implementation
factory Transaction.fromMap(Map<String, dynamic> map) {
return Transaction(
result: map['result'] != null ? map['result'] as String : null,
resultDetails:
map['resultDetails'] != null ? map['resultDetails'] as String : null,
amount: map['amount'] != null ? map['amount'] as String : null,
callerId: map['callerId'] != null ? map['callerId'] as String : null,
nsu: map['nsu'] != null ? map['nsu'] as String : null,
nsuLastSuccesfullMessage: map['nsuLastSuccesfullMessage'] != null
? map['nsuLastSuccesfullMessage'] as String
: null,
cvNumber: map['cvNumber'] != null ? map['cvNumber'] as String : null,
receiptAlreadyPrinted: map['receiptAlreadyPrinted'] != null
? map['receiptAlreadyPrinted'] as bool
: null,
type: map['type'] != null ? map['type'] as String : null,
brand: map['brand'] != null ? map['brand'] as String : null,
inputType: map['inputType'] != null ? map['inputType'] as String : null,
installments:
map['installments'] != null ? map['installments'] as String : null,
gmtDateTime:
map['gmtDateTime'] != null ? map['gmtDateTime'] as String : null,
nsuLocal: map['nsuLocal'] != null ? map['nsuLocal'] as String : null,
authorizationCode: map['authorizationCode'] != null
? map['authorizationCode'] as String
: null,
cardBin: map['cardBin'] != null ? map['cardBin'] as String : null,
cardLastDigits: map['cardLastDigits'] != null
? map['cardLastDigits'] as String
: null,
extraScreensResult: map['extraScreensResult'] != null
? map['extraScreensResult'] as String
: null,
splitPayloadResponse: map['splitPayloadResponse'] != null
? map['splitPayloadResponse'] as String
: null,
cardholderName: map['cardholderName'] != null
? map['cardholderName'] as String
: null,
automationSlip: map['automationSlip'] != null
? AutomationSlip.fromMap(
map['automationSlip'] as Map<String, dynamic>)
: null,
printMerchantPreference: map['printMerchantPreference'] != null
? map['printMerchantPreference'] as bool
: null,
orderId: map['orderId'] != null ? map['orderId'] as String : null,
pixPayloadResponse: map['pixPayloadResponse'] != null
? map['pixPayloadResponse'] as String
: null,
refundTransactionDate: map['refundTransactionDate'] != null
? map['refundTransactionDate'] as String
: null,
refundCvNumber: map['refundCvNumber'] != null
? map['refundCvNumber'] as String
: null,
refundOriginTerminal: map['refundOriginTerminal'] != null
? map['refundOriginTerminal'] as String
: null,
);
}