private Dto.Xsd.OtherTaxCategory MapOtherTaxCategory(CityTaxType cityTaxType) { switch (cityTaxType) { case CityTaxType.Hotels1Or2Stars: return(Dto.Xsd.OtherTaxCategory.Hotels1Or2Stars); case CityTaxType.Hotels3Stars: return(Dto.Xsd.OtherTaxCategory.Hotels3Stars); case CityTaxType.Hotels4Stars: return(Dto.Xsd.OtherTaxCategory.Hotels4Stars); case CityTaxType.Hotels5Stars: return(Dto.Xsd.OtherTaxCategory.Hotels5Stars); case CityTaxType.RoomsOrApartments: return(Dto.Xsd.OtherTaxCategory.RoomsOrApartments); default: throw new ArgumentException($"Cannot map CityTaxType {cityTaxType} to {nameof(Dto.Xsd.OtherTaxCategory)}."); } }
public CityTax(CityTaxType type, PositiveAmount amount) { Type = type; Amount = amount ?? throw new ArgumentNullException(nameof(amount)); }