StoredTransactionRecord.fromMap constructor

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

Implementation

factory StoredTransactionRecord.fromMap(Map<String, dynamic> map) {
  return StoredTransactionRecord(
    tpId: map['tpId'] as String?,
    transactionType: map['transactionType'] as String?,
    transactionAmount: (map['transactionAmount'] as num?)?.toDouble(),
    state: map['state'] as String?,
    createdDate: map['createdDate'] as String?,
    cardLogo: map['cardLogo'] as String?,
    maskedAccountNumber: map['maskedAccountNumber'] as String?,
    transactionId: map['transactionId'] as String?,
    authCode: map['authCode'] as String?,
    expressResponseCode: map['expressResponseCode'] as String?,
    expressResponseMessage: map['expressResponseMessage'] as String?,
    hostResponseCode: map['hostResponseCode'] as String?,
    expressTransactionDate: map['expressTransactionDate'] as String?,
    expressTransactionTime: map['expressTransactionTime'] as String?,
    expressTransactionTimezone: map['expressTransactionTimezone'] as String?,
    hostBatchId: map['hostBatchId'] as String?,
    hostItemId: map['hostItemId'] as String?,
    hostBatchAmount: double.tryParse(
      map['hostBatchAmount']?.toString() ?? '',
    ),
    bin: map['bin'] as String?,
    emvData: map['emvData'] as String?,
    cardNumberMasked: map['cardNumberMasked'] as String?,
    xmlTransactionId: map['xmlTransactionId'] as String?,
    approvalNumber: map['approvalNumber'] as String?,
    referenceNumber: map['referenceNumber'] as String?,
    processorName: map['processorName'] as String?,
    transactionStatus: map['transactionStatus'] as String?,
    transactionStatusCode: map['transactionStatusCode'] as String?,
    hostTransactionId: map['hostTransactionId'] as String?,
    pinlessPOSConversionIndicator:
        map['pinlessPOSConversionIndicator'] as String?,
    retrievalReferenceNumber: map['retrievalReferenceNumber'] as String?,
    systemTraceAuditNumber: map['systemTraceAuditNumber'] as String?,
    tokenId: map['tokenId'] as String?,
    tokenProvider: map['tokenProvider'] as String?,
  );
}