/// <summary>
        ///
        /// </summary>
        /// <param name="commodityType"></param>
        /// <param name="commodityDetails"></param>
        /// <param name="currency"></param>
        /// <param name="multiplier"></param>
        /// <param name="specifiedPrice"></param>
        /// <param name="deliveryDateRollConvention"></param>
        /// <param name="priceQuoteUnits"></param>
        /// <param name="deliveryDates"></param>
        /// <param name="exchangeId"></param>
        /// <param name="informationSource"></param>
        /// <returns></returns>
        public static Commodity Create(string commodityType, string commodityDetails, string currency, int multiplier, SpecifiedPriceEnum specifiedPrice,
                                       Offset deliveryDateRollConvention, PriceQuoteUnitsEnum priceQuoteUnits, DeliveryDatesEnum deliveryDates, string exchangeId, string informationSource)
        {
            var commodity = new Commodity
            {
                currency = new Currency {
                    Value = currency
                },
                commodityBase = new CommodityBase {
                    Value = commodityType
                },
                commodityDetails = new CommodityDetails {
                    Value = commodityDetails
                },
                deliveryDateRollConvention = deliveryDateRollConvention,
                Item1                   = deliveryDates,
                multiplier              = multiplier,
                multiplierSpecified     = true,
                specifiedPriceSpecified = true,
                unit           = new QuantityUnit(),
                specifiedPrice = specifiedPrice
            };

            commodity.unit.Value = priceQuoteUnits.ToString();
            if (exchangeId != null)
            {
                commodity.Item = ExchangeIdHelper.Parse(exchangeId);
            }
            else
            {
                commodity.Item = InformationSourceHelper.Create(informationSource);
            }
            return(commodity);
        }
        public static Quotation Create(decimal value, DateTime valuationDate,
                                       string businessCenter, string currency,
                                       string rateSourceProvider, string rateSource, string rateSourcePage,
                                       string assetMeasureType, string quoteUnits)
        {
            var quotation = new Quotation
            {
                businessCenter    = BusinessCentersHelper.Parse(businessCenter).businessCenter[0],
                currency          = CurrencyHelper.Parse(currency),
                informationSource =
                    InformationSourceHelper.Create(
                        InformationSourceHelper.Create(rateSourceProvider, rateSource,
                                                       rateSourcePage)),
                measureType            = AssetMeasureTypeHelper.Parse(assetMeasureType),
                quoteUnits             = PriceQuoteUnitsHelper.Create(quoteUnits),
                valuationDate          = valuationDate,
                valuationDateSpecified = true,
                value          = value,
                valueSpecified = true
            };

            return(quotation);
        }
        public static Quotation Copy(Quotation baseQuotation)
        {
            Quotation quotation = null;

            if (baseQuotation != null)
            {
                quotation = new Quotation();
                if (baseQuotation.businessCenter != null)
                {
                    quotation.businessCenter = BusinessCentersHelper.Parse(baseQuotation.businessCenter.Value).businessCenter[0];
                }
                if (baseQuotation.currency != null)
                {
                    quotation.currency = CurrencyHelper.Parse(baseQuotation.currency.Value);
                }
                if (baseQuotation.valueSpecified)
                {
                    quotation.value          = baseQuotation.value;
                    quotation.valueSpecified = true;
                }
                if (baseQuotation.valuationDateSpecified)
                {
                    quotation.valuationDate          = baseQuotation.valuationDate;
                    quotation.valuationDateSpecified = true;
                }
                if (baseQuotation.expiryTimeSpecified)
                {
                    quotation.expiryTime          = baseQuotation.expiryTime;
                    quotation.expiryTimeSpecified = true;
                }
                if (baseQuotation.sideSpecified)
                {
                    quotation.side          = baseQuotation.side;
                    quotation.sideSpecified = true;
                }
                if (baseQuotation.timeSpecified)
                {
                    quotation.time          = baseQuotation.time;
                    quotation.timeSpecified = true;
                }
                if (baseQuotation.sensitivitySet != null)
                {
                    quotation.sensitivitySet = SensitivitySetHelper.Copy(baseQuotation.sensitivitySet);
                }
                if (baseQuotation.measureType != null)
                {
                    quotation.measureType = AssetMeasureTypeHelper.Copy(baseQuotation.measureType);
                }
                if (baseQuotation.quoteUnits != null)
                {
                    quotation.quoteUnits = PriceQuoteUnitsHelper.Copy(baseQuotation.quoteUnits);
                }
                if (baseQuotation.informationSource != null)
                {
                    quotation.informationSource = InformationSourceHelper.Copy(baseQuotation.informationSource).ToArray();
                }
                if (baseQuotation.exchangeId != null)
                {
                    quotation.exchangeId = ExchangeIdHelper.Copy(baseQuotation.exchangeId);
                }
            }
            return(quotation);
        }