InvoiceMandateOptionsCard.fromJson constructor

InvoiceMandateOptionsCard.fromJson(
  1. Object? json
)

Implementation

factory InvoiceMandateOptionsCard.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return InvoiceMandateOptionsCard(
    amount: map['amount'] == null ? null : (map['amount'] as num).toInt(),
    amountType: map['amount_type'] == null
        ? null
        : InvoiceMandateOptionsCardAmountType.fromJson(map['amount_type']),
    description:
        map['description'] == null ? null : (map['description'] as String),
  );
}