BillingPortalConfigurationUpdateOptionsFeaturesSubscriptionUpdate.fromJson constructor
BillingPortalConfigurationUpdateOptionsFeaturesSubscriptionUpdate.fromJson(
- Object? json
Implementation
factory BillingPortalConfigurationUpdateOptionsFeaturesSubscriptionUpdate.fromJson(
Object? json) {
final map = (json as Map).cast<String, Object?>();
return BillingPortalConfigurationUpdateOptionsFeaturesSubscriptionUpdate(
defaultAllowedUpdates: map['default_allowed_updates'] == null
? null
: (map['default_allowed_updates'] as List<Object?>)
.map((el) =>
PortalSubscriptionUpdateDefaultAllowedUpdatesItem.fromJson(
el))
.toList(),
enabled: map['enabled'] == null ? null : (map['enabled'] as bool),
products: map['products'] == null
? null
: (map['products'] as List<Object?>)
.map((el) => PortalSubscriptionUpdateProduct.fromJson(el))
.toList(),
prorationBehavior: map['proration_behavior'] == null
? null
: PortalSubscriptionCancelProrationBehavior.fromJson(
map['proration_behavior']),
);
}