Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the ServiceModel class.
 /// </summary>
 /// <param name="code">The code for the service</param>
 /// <param name="defaultGrossPrice">The default price, used when
 /// defining rates or calculating offers</param>
 /// <param name="description">The description for the service</param>
 /// <param name="id">The service id</param>
 /// <param name="name">The name for the service</param>
 /// <param name="pricingUnit">Defines the granularity (room, person)
 /// for which this item is offered and priced. Possible values include:
 /// 'Room', 'Person'</param>
 public ServiceModel(string code, MonetaryValueModel defaultGrossPrice, string description, string id, string name, PricedUnit pricingUnit)
 {
     Code = code;
     DefaultGrossPrice = defaultGrossPrice;
     Description       = description;
     Id          = id;
     Name        = name;
     PricingUnit = pricingUnit;
     CustomInit();
 }
Esempio n. 2
0
        internal static string ToSerializedValue(this PricedUnit value)
        {
            switch (value)
            {
            case PricedUnit.Room:
                return("Room");

            case PricedUnit.Person:
                return("Person");
            }
            return(null);
        }