SessionFlowData.fromJson constructor

SessionFlowData.fromJson(
  1. Object? json
)

Implementation

factory SessionFlowData.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SessionFlowData(
    afterCompletion: map['after_completion'] == null
        ? null
        : SessionAfterCompletion.fromJson(map['after_completion']),
    subscriptionCancel: map['subscription_cancel'] == null
        ? null
        : SessionSubscriptionCancel.fromJson(map['subscription_cancel']),
    subscriptionUpdate: map['subscription_update'] == null
        ? null
        : PortalFlowsFlowSubscriptionUpdate.fromJson(
            map['subscription_update']),
    subscriptionUpdateConfirm: map['subscription_update_confirm'] == null
        ? null
        : SessionSubscriptionUpdateConfirm.fromJson(
            map['subscription_update_confirm']),
    type: BillingPortalSessionFlowType.fromJson(map['type']),
  );
}