BillingPortalConfigurationUpdateOptions.fromJson constructor
BillingPortalConfigurationUpdateOptions.fromJson(
- Object? json
Implementation
factory BillingPortalConfigurationUpdateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return BillingPortalConfigurationUpdateOptions(
active: map['active'] == null ? null : (map['active'] as bool),
businessProfile: map['business_profile'] == null
? null
: BillingPortalConfigurationUpdateOptionsBusinessProfile.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: map['features'] == null
? null
: BillingPortalConfigurationUpdateOptionsFeatures.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),
)),
);
}