CreditCard.fromMap constructor

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

Implementation

factory CreditCard.fromMap(Map<String, dynamic> map) {
  return CreditCard(
    number: map['number'] ?? '',
    last4: map['last4'] ?? '',
    bin: map['bin'] ?? '',
    cardHolderName: map['cardHolderName'] ?? "",
    expiresOn: map['expires_on'] ?? '',
    scheme: map['scheme'] ?? '',
    expiryMonth: map['expiry_month'] ?? '',
    expiryYear: map['expiry_year'] ?? '',
    cvv: map['cvv'] ?? '',
  );
}