SubscriptionMandateOptions.fromJson constructor

SubscriptionMandateOptions.fromJson(
  1. Object? json
)

Implementation

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