PaymentLinkUpdateOptionsSubscriptionData.fromJson constructor

PaymentLinkUpdateOptionsSubscriptionData.fromJson(
  1. Object? json
)

Implementation

factory PaymentLinkUpdateOptionsSubscriptionData.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PaymentLinkUpdateOptionsSubscriptionData(
    invoiceSettings: map['invoice_settings'] == null
        ? null
        : SessionInvoiceSettings.fromJson(map['invoice_settings']),
    metadata: map['metadata'] == null
        ? null
        : (map['metadata'] as Map).cast<String, Object?>().map((
              key,
              value,
            ) =>
                MapEntry(
                  key,
                  (value as String),
                )),
    trialSettings: map['trial_settings'] == null
        ? null
        : SessionTrialSettings.fromJson(map['trial_settings']),
  );
}