ReservationPlan.fromJson constructor

ReservationPlan.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ReservationPlan.fromJson(Map<String, dynamic> json) {
  return ReservationPlan(
    commitment: (json['commitment'] as String?)?.toCommitment(),
    expiresAt: timeStampFromJson(json['expiresAt']),
    purchasedAt: timeStampFromJson(json['purchasedAt']),
    renewalType: (json['renewalType'] as String?)?.toRenewalType(),
    reservedSlots: json['reservedSlots'] as int?,
    status: (json['status'] as String?)?.toReservationPlanStatus(),
  );
}