FedaTransaction.fromMap constructor

FedaTransaction.fromMap(
  1. dynamic map
)

Implementation

factory FedaTransaction.fromMap(map) {
  return FedaTransaction(
    id: map['id'],
    reference: map['reference'] != null ? map['reference'] as String : null,
    description:
        map['description'] != null ? map['description'] as String : null,
    amount: map['amount'].toDouble(),
    status: map['status'] != null ? map['status'] as String : null,
    mode: map['mode'] != null ? map['mode'] as String : null,
    amount_debited: map['amount_debited']?.toDouble(),
    receipt_url:
        map['receipt_url'] != null ? map['receipt_url'] as String : null,
    operator_fees:
        map['operator_fees'] != null ? map['operator_fees'] as String : null,
    approved_at:
        map['approved_at'] != null ? map['approved_at'] as String : null,
    created_at:
        map['created_at'] != null ? map['created_at'] as String : null,
    updated_at:
        map['updated_at'] != null ? map['updated_at'] as String : null,
    canceled_at:
        map['canceled_at'] != null ? map['canceled_at'] as String : null,
    declined_at:
        map['declined_at'] != null ? map['declined_at'] as String : null,
    refunded_at:
        map['refunded_at'] != null ? map['refunded_at'] as String : null,
    transferred_at: map['transferred_at'] != null
        ? map['transferred_at'] as String
        : null,
  );
}