InvoicesPaymentSettings.fromJson constructor

InvoicesPaymentSettings.fromJson(
  1. Object? json
)

Implementation

factory InvoicesPaymentSettings.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return InvoicesPaymentSettings(
    defaultMandate: map['default_mandate'] == null
        ? null
        : (map['default_mandate'] as String),
    paymentMethodOptions: map['payment_method_options'] == null
        ? null
        : InvoicesPaymentMethodOptions.fromJson(
            map['payment_method_options']),
    paymentMethodTypes: map['payment_method_types'] == null
        ? null
        : (map['payment_method_types'] as List<Object?>)
            .map((el) =>
                InvoicesPaymentSettingsPaymentMethodTypesItem.fromJson(el))
            .toList(),
  );
}