SubscriptionScheduleCurrentPhase.fromJson constructor

SubscriptionScheduleCurrentPhase.fromJson(
  1. Object? json
)

Implementation

factory SubscriptionScheduleCurrentPhase.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return SubscriptionScheduleCurrentPhase(
    endDate:
        DateTime.fromMillisecondsSinceEpoch((map['end_date'] as int).toInt()),
    startDate: DateTime.fromMillisecondsSinceEpoch(
        (map['start_date'] as int).toInt()),
  );
}