BillingPortalConfigurationCreateOptions.fromJson constructor
BillingPortalConfigurationCreateOptions.fromJson(
- Object? json
Implementation
factory BillingPortalConfigurationCreateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return BillingPortalConfigurationCreateOptions(
businessProfile:
ConfigurationBusinessProfile.fromJson(map['business_profile']),
defaultReturnUrl: map['default_return_url'] == null
? null
: (map['default_return_url'] as String),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
features: ConfigurationFeatures.fromJson(map['features']),
loginPage: map['login_page'] == null
? null
: PortalSubscriptionPause.fromJson(map['login_page']),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
);
}