PaymentMethodUpdateOptionsCard.fromJson constructor

PaymentMethodUpdateOptionsCard.fromJson(
  1. Object? json
)

Implementation

factory PaymentMethodUpdateOptionsCard.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentMethodUpdateOptionsCard(
    expMonth:
        map['exp_month'] == null ? null : (map['exp_month'] as num).toInt(),
    expYear:
        map['exp_year'] == null ? null : (map['exp_year'] as num).toInt(),
    networks: map['networks'] == null
        ? null
        : PaymentMethodUpdateOptionsCardNetworks.fromJson(map['networks']),
  );
}