AdaptyPeriod.fromJson(Map<String, dynamic> json) : unit = periodUnitFromInt(json['unit']), numberOfUnits = json['numberOfUnits'];