def list(self, request): # We filter out one because it should not be used anymore serializer = EnumOutputSerializer([ choice for choice in VehicleTrailerOption.choices if choice != "1" ], many=True) return Response(serializer.data)
def get_status(self, obj): return EnumOutputSerializer(parse_choice_to_tuple(InsuranceStatus(obj.status))).data
def get_event_size(self, obj): return EnumOutputSerializer(parse_choice_to_tuple(EventSize(obj.event_size))).data
def get_max_coverage(self, obj): if not obj.max_coverage: return None return EnumOutputSerializer( parse_choice_to_tuple(TemporaryVehicleInsuranceCoverageOption(obj.max_coverage)) ).data
def get_insurance_options(self, obj): return EnumOutputSerializer( [parse_choice_to_tuple(TemporaryVehicleInsuranceOptionApi(option)) for option in obj.insurance_options], many=True, ).data
def get_group_size(self, obj): return EnumOutputSerializer(parse_choice_to_tuple(GroupSize(obj.group_size))).data
def list(self, request): serializer = EnumOutputSerializer( TemporaryVehicleInsuranceOptionApi.choices, many=True) return Response(serializer.data)
def list(self, request): serializer = EnumOutputSerializer(InsuranceStatus.choices, many=True) return Response(serializer.data)
def list(self, request): serializer = EnumOutputSerializer(EventSize.choices, many=True) return Response(serializer.data)
def get_trailer(self, obj): return EnumOutputSerializer( parse_choice_to_tuple(VehicleTrailerOption(obj.trailer))).data
def get_type(self, obj): return EnumOutputSerializer( parse_choice_to_tuple(VehicleType(obj.type))).data