PaymentIntentFinancialConnections.fromJson constructor

PaymentIntentFinancialConnections.fromJson(
  1. Object? json
)

Implementation

factory PaymentIntentFinancialConnections.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentIntentFinancialConnections(
    permissions: map['permissions'] == null
        ? null
        : (map['permissions'] as List<Object?>)
            .map((el) =>
                FinancialConnectionsAccountPermissionsItem.fromJson(el))
            .toList(),
    prefetch: map['prefetch'] == null
        ? null
        : (map['prefetch'] as List<Object?>)
            .map((el) =>
                InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetchItem
                    .fromJson(el))
            .toList(),
    returnUrl:
        map['return_url'] == null ? null : (map['return_url'] as String),
  );
}