PaymentLinkSubscriptionData.fromJson constructor
PaymentLinkSubscriptionData.fromJson(
- Object? json
Implementation
factory PaymentLinkSubscriptionData.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PaymentLinkSubscriptionData(
description:
map['description'] == null ? null : (map['description'] as String),
invoiceSettings:
PaymentLinksResourceSubscriptionDataInvoiceSettings.fromJson(
map['invoice_settings']),
metadata: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
trialPeriodDays: map['trial_period_days'] == null
? null
: (map['trial_period_days'] as num).toInt(),
trialSettings: map['trial_settings'] == null
? null
: PaymentLinkSubscriptionDataTrialSettings.fromJson(
map['trial_settings']),
);
}