Transaction.fromMap constructor

Transaction.fromMap(
  1. Map<String, dynamic> map
)

Generate an object from the map

Implementation

factory Transaction.fromMap(Map<String, dynamic> map) {
  return Transaction(
    acquirerTransactionKey: map['acquirerTransactionKey'] != null
        ? map['acquirerTransactionKey'] as String
        : null,
    actionCode:
        map['actionCode'] != null ? map['actionCode'] as String : null,
    aid: map['aid'] != null ? map['aid'] as String : null,
    amount: map['amount'] != null ? map['amount'] as String : null,
    appLabel: map['appLabel'] != null ? map['appLabel'] as String : null,
    arcq: map['arcq'] != null ? map['arcq'] as String : null,
    authorizationCode: map['authorizationCode'] != null
        ? map['authorizationCode'] as String
        : null,
    capture: map['capture'] != null ? map['capture'] as bool : null,
    cardBrand: map['cardBrand'] != null ? map['cardBrand'] as String : null,
    cardBrandId:
        map['cardBrandId'] != null ? map['cardBrandId'] as int : null,
    cardBrandName:
        map['cardBrandName'] != null ? map['cardBrandName'] as String : null,
    cardExpireDate: map['cardExpireDate'] != null
        ? map['cardExpireDate'] as String
        : null,
    cardHolderName: map['cardHolderName'] != null
        ? map['cardHolderName'] as String
        : null,
    cardHolderNumber: map['cardHolderNumber'] != null
        ? map['cardHolderNumber'] as String
        : null,
    cardSequenceNumber: map['cardSequenceNumber'] != null
        ? map['cardSequenceNumber'] as String
        : null,
    commandActionCode: map['commandActionCode'] != null
        ? map['commandActionCode'] as String
        : null,
    date: map['date'] != null ? map['date'] as String : null,
    entryMode: map['entryMode'] != null ? map['entryMode'] as String : null,
    iccRelatedData: map['iccRelatedData'] != null
        ? map['iccRelatedData'] as String
        : null,
    idFromBase: map['idFromBase'] != null ? map['idFromBase'] as int : null,
    initiatorTransactionKey: map['initiatorTransactionKey'] != null
        ? map['initiatorTransactionKey'] as String
        : null,
    instalmentTransaction: map['instalmentTransaction'] != null
        ? map['instalmentTransaction'] as String
        : null,
    instalmentType: map['instalmentType'] != null
        ? map['instalmentType'] as String
        : null,
    isFallbackTransaction: map['isFallbackTransaction'] != null
        ? map['isFallbackTransaction'] as bool
        : null,
    qualifiers: map['qualifiers'] != null
        ? List<String>.from((map['qualifiers'] as List))
        : null,
    saleAffiliationKey: map['saleAffiliationKey'] != null
        ? map['saleAffiliationKey'] as String
        : null,
    serviceCode:
        map['serviceCode'] != null ? map['serviceCode'] as String : null,
    time: map['time'] != null ? map['time'] as String : null,
    timeToPassTransaction: map['timeToPassTransaction'] != null
        ? map['timeToPassTransaction'] as String
        : null,
    transAppSelectedInfo: map['transAppSelectedInfo'] != null
        ? TransAppSelectedInfo.fromMap(
            map['transAppSelectedInfo'] as Map<String, dynamic>)
        : null,
    transactionReference: map['transactionReference'] != null
        ? map['transactionReference'] as String
        : null,
    transactionStatus: map['transactionStatus'] != null
        ? map['transactionStatus'] as String
        : null,
    typeOfTransactionEnum: map['typeOfTransactionEnum'] != null
        ? map['typeOfTransactionEnum'] as String
        : null,
  );
}