SubscriptionItemDeleteOptions.fromJson constructor
SubscriptionItemDeleteOptions.fromJson(
- Object? json
Implementation
factory SubscriptionItemDeleteOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return SubscriptionItemDeleteOptions(
clearUsage:
map['clear_usage'] == null ? null : (map['clear_usage'] as bool),
prorationBehavior: map['proration_behavior'] == null
? null
: PortalSubscriptionCancelProrationBehavior.fromJson(
map['proration_behavior']),
prorationDate: map['proration_date'] == null
? null
: DateTime.fromMillisecondsSinceEpoch(
(map['proration_date'] as int).toInt()),
);
}