internal static string ToSerializedValue(this OfferValidationMessageCode value)
        {
            switch (value)
            {
            case OfferValidationMessageCode.UnitGroupFullyBooked:
                return("UnitGroupFullyBooked");

            case OfferValidationMessageCode.UnitGroupCapacityExceeded:
                return("UnitGroupCapacityExceeded");

            case OfferValidationMessageCode.RatePlanRestrictionsViolated:
                return("RatePlanRestrictionsViolated");

            case OfferValidationMessageCode.RatePlanSurchargesNotSet:
                return("RatePlanSurchargesNotSet");

            case OfferValidationMessageCode.RateRestrictionsViolated:
                return("RateRestrictionsViolated");

            case OfferValidationMessageCode.RatePlanChannelNotSet:
                return("RatePlanChannelNotSet");

            case OfferValidationMessageCode.RatesNotSet:
                return("RatesNotSet");

            case OfferValidationMessageCode.BlockFullyBooked:
                return("BlockFullyBooked");

            case OfferValidationMessageCode.IncludedServicesAmountExceededRateAmount:
                return("IncludedServicesAmountExceededRateAmount");
            }
            return(null);
        }
 /// <summary>
 /// Initializes a new instance of the OfferValidationMessageModel
 /// class.
 /// </summary>
 /// <param name="code">The message Code. Possible values include:
 /// 'UnitGroupFullyBooked', 'UnitGroupCapacityExceeded',
 /// 'RatePlanRestrictionsViolated', 'RatePlanSurchargesNotSet',
 /// 'RateRestrictionsViolated', 'RatePlanChannelNotSet', 'RatesNotSet',
 /// 'BlockFullyBooked',
 /// 'IncludedServicesAmountExceededRateAmount'</param>
 /// <param name="message">The message description</param>
 public OfferValidationMessageModel(OfferValidationMessageCode code, string message)
 {
     Code    = code;
     Message = message;
     CustomInit();
 }