RefundWithTokenResponse.fromMap constructor

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

Implementation

factory RefundWithTokenResponse.fromMap(Map<String, dynamic> map) {
  return RefundWithTokenResponse(
    status: _parseTransactionStatus(map['transactionStatus'] as String?),
    isApproved: map['isApproved'] as bool? ?? false,
    approvedAmount: (map['approvedAmount'] as num?)?.toDouble(),
    tpId: map['tpId'] as String?,
    host: map['host'] != null
        ? HostResponse.fromMap(Map<String, dynamic>.from(map['host']))
        : null,
    errorMessage: map['errorMessage'] as String?,
  );
}