PortalSubscriptionCancel.fromJson constructor

PortalSubscriptionCancel.fromJson(
  1. Object? json
)

Implementation

factory PortalSubscriptionCancel.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return PortalSubscriptionCancel(
    cancellationReason: PortalSubscriptionCancellationReason.fromJson(
        map['cancellation_reason']),
    enabled: (map['enabled'] as bool),
    mode: PortalSubscriptionCancelMode.fromJson(map['mode']),
    prorationBehavior: PortalSubscriptionCancelProrationBehavior.fromJson(
        map['proration_behavior']),
  );
}