/// <summary> /// Initializes a new instance of the ReservationValidationMessageModel /// class. /// </summary> /// <param name="category">The message category. Possible values /// include: 'OfferNotAvailable', 'AutoUnitAssignment'</param> /// <param name="code">The message Code. Possible values include: /// 'UnitGroupFullyBooked', 'UnitGroupCapacityExceeded', /// 'RatePlanRestrictionsViolated', 'RatePlanSurchargesNotSet', /// 'RateRestrictionsViolated', 'RatePlanChannelNotSet', 'RatesNotSet', /// 'BlockFullyBooked', 'UnitMoved', /// 'IncludedServicesAmountExceededRateAmount', /// 'RatePlanCompanyRestrictionsViolated'</param> /// <param name="message">The message description</param> public ReservationValidationMessageModel(ValidationMessageCategory category, ValidationMessageCode code, string message) { Category = category; Code = code; Message = message; CustomInit(); }
internal static string ToSerializedValue(this ValidationMessageCode value) { switch (value) { case ValidationMessageCode.UnitGroupFullyBooked: return("UnitGroupFullyBooked"); case ValidationMessageCode.UnitGroupCapacityExceeded: return("UnitGroupCapacityExceeded"); case ValidationMessageCode.RatePlanRestrictionsViolated: return("RatePlanRestrictionsViolated"); case ValidationMessageCode.RatePlanSurchargesNotSet: return("RatePlanSurchargesNotSet"); case ValidationMessageCode.RateRestrictionsViolated: return("RateRestrictionsViolated"); case ValidationMessageCode.RatePlanChannelNotSet: return("RatePlanChannelNotSet"); case ValidationMessageCode.RatesNotSet: return("RatesNotSet"); case ValidationMessageCode.BlockFullyBooked: return("BlockFullyBooked"); case ValidationMessageCode.UnitMoved: return("UnitMoved"); case ValidationMessageCode.IncludedServicesAmountExceededRateAmount: return("IncludedServicesAmountExceededRateAmount"); case ValidationMessageCode.RatePlanCompanyRestrictionsViolated: return("RatePlanCompanyRestrictionsViolated"); } return(null); }