/// <summary>
 /// Initializes a new instance of the <see cref="AnnuityCalculatorDepositAmountRequest" /> class.
 /// </summary>
 /// <param name="inflationRate">inflationRate (default to 0.0F).</param>
 /// <param name="decumulationHorizon">decumulationHorizon (required).</param>
 /// <param name="accountIds">accountIds.</param>
 /// <param name="taxRate">taxRate (default to 0.0F).</param>
 /// <param name="accumulationHorizon">accumulationHorizon (required).</param>
 /// <param name="annuityAmount">annuityAmount (required).</param>
 /// <param name="portfolioReturn">portfolioReturn (required).</param>
 /// <param name="depositSchedule">depositSchedule.</param>
 /// <param name="annuityFrequencyInterval">annuityFrequencyInterval (default to AnnuityFrequencyIntervalEnum.Year).</param>
 /// <param name="initialBalance">initialBalance (default to 0.0F).</param>
 /// <param name="aggregationAccountIds">aggregationAccountIds.</param>
 /// <param name="createLog">createLog (default to false).</param>
 public AnnuityCalculatorDepositAmountRequest(float?inflationRate = 0.0F, int?decumulationHorizon = default(int?), List <Guid?> accountIds = default(List <Guid?>), float?taxRate = 0.0F, int?accumulationHorizon = default(int?), float?annuityAmount = default(float?), float?portfolioReturn = default(float?), AnnuityDepositSchedule depositSchedule = default(AnnuityDepositSchedule), AnnuityFrequencyIntervalEnum?annuityFrequencyInterval = AnnuityFrequencyIntervalEnum.Year, float?initialBalance = 0.0F, List <Guid?> aggregationAccountIds = default(List <Guid?>), bool?createLog = false)
 {
     // to ensure "decumulationHorizon" is required (not null)
     if (decumulationHorizon == null)
     {
         throw new InvalidDataException("decumulationHorizon is a required property for AnnuityCalculatorDepositAmountRequest and cannot be null");
     }
     else
     {
         this.DecumulationHorizon = decumulationHorizon;
     }
     // to ensure "accumulationHorizon" is required (not null)
     if (accumulationHorizon == null)
     {
         throw new InvalidDataException("accumulationHorizon is a required property for AnnuityCalculatorDepositAmountRequest and cannot be null");
     }
     else
     {
         this.AccumulationHorizon = accumulationHorizon;
     }
     // to ensure "annuityAmount" is required (not null)
     if (annuityAmount == null)
     {
         throw new InvalidDataException("annuityAmount is a required property for AnnuityCalculatorDepositAmountRequest and cannot be null");
     }
     else
     {
         this.AnnuityAmount = annuityAmount;
     }
     // to ensure "portfolioReturn" is required (not null)
     if (portfolioReturn == null)
     {
         throw new InvalidDataException("portfolioReturn is a required property for AnnuityCalculatorDepositAmountRequest and cannot be null");
     }
     else
     {
         this.PortfolioReturn = portfolioReturn;
     }
     // use default value if no "inflationRate" provided
     if (inflationRate == null)
     {
         this.InflationRate = 0.0F;
     }
     else
     {
         this.InflationRate = inflationRate;
     }
     this.AccountIds = accountIds;
     // use default value if no "taxRate" provided
     if (taxRate == null)
     {
         this.TaxRate = 0.0F;
     }
     else
     {
         this.TaxRate = taxRate;
     }
     this.DepositSchedule = depositSchedule;
     // use default value if no "annuityFrequencyInterval" provided
     if (annuityFrequencyInterval == null)
     {
         this.AnnuityFrequencyInterval = AnnuityFrequencyIntervalEnum.Year;
     }
     else
     {
         this.AnnuityFrequencyInterval = annuityFrequencyInterval;
     }
     // use default value if no "initialBalance" provided
     if (initialBalance == null)
     {
         this.InitialBalance = 0.0F;
     }
     else
     {
         this.InitialBalance = initialBalance;
     }
     this.AggregationAccountIds = aggregationAccountIds;
     // use default value if no "createLog" provided
     if (createLog == null)
     {
         this.CreateLog = false;
     }
     else
     {
         this.CreateLog = createLog;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VariableAnnuityRequest" /> class.
 /// </summary>
 /// <param name="p">p.</param>
 /// <param name="allocationId">allocationId.</param>
 /// <param name="decumulationHorizon">decumulationHorizon (required).</param>
 /// <param name="accumulationHorizon">accumulationHorizon (required).</param>
 /// <param name="annuitizationRate">annuitizationRate (default to 0.0F).</param>
 /// <param name="guaranteedRateBenefit">guaranteedRateBenefit.</param>
 /// <param name="modelId">modelId.</param>
 /// <param name="portfolioTickers">portfolioTickers.</param>
 /// <param name="createLog">createLog (default to false).</param>
 /// <param name="inflationRate">inflationRate (default to 0.0F).</param>
 /// <param name="aggregationAccountId">aggregationAccountId.</param>
 /// <param name="n">n (default to 1000).</param>
 /// <param name="guaranteedAccumulationBenefit">guaranteedAccumulationBenefit (default to 0.0F).</param>
 /// <param name="endDate">endDate.</param>
 /// <param name="taxRate">taxRate (default to 0.0F).</param>
 /// <param name="startDate">startDate.</param>
 /// <param name="removeOutliers">removeOutliers (default to false).</param>
 /// <param name="portfolioWeights">portfolioWeights.</param>
 /// <param name="portfolioId">portfolioId.</param>
 /// <param name="resultType">resultType (default to ResultTypeEnum.Median).</param>
 /// <param name="accountId">accountId.</param>
 /// <param name="tradingDaysPerYear">tradingDaysPerYear (default to 252).</param>
 /// <param name="useProxyData">useProxyData (default to false).</param>
 /// <param name="initialBalance">initialBalance (default to 0.0F).</param>
 /// <param name="marketDataSource">marketDataSource (default to MarketDataSourceEnum.Nucleus).</param>
 /// <param name="frequencyInterval">frequencyInterval (default to FrequencyIntervalEnum.Year).</param>
 /// <param name="depositSchedule">depositSchedule.</param>
 public VariableAnnuityRequest(decimal?p = default(decimal?), Guid?allocationId = default(Guid?), int?decumulationHorizon = default(int?), int?accumulationHorizon = default(int?), float?annuitizationRate = 0.0F, List <GuaranteedRateBenefit> guaranteedRateBenefit = default(List <GuaranteedRateBenefit>), Guid?modelId = default(Guid?), List <string> portfolioTickers = default(List <string>), bool?createLog = false, float?inflationRate = 0.0F, Guid?aggregationAccountId = default(Guid?), int?n = 1000, float?guaranteedAccumulationBenefit = 0.0F, string endDate = default(string), float?taxRate = 0.0F, string startDate = default(string), bool?removeOutliers = false, List <float?> portfolioWeights = default(List <float?>), Guid?portfolioId = default(Guid?), ResultTypeEnum?resultType = ResultTypeEnum.Median, Guid?accountId = default(Guid?), int?tradingDaysPerYear = 252, bool?useProxyData = false, float?initialBalance = 0.0F, MarketDataSourceEnum?marketDataSource = MarketDataSourceEnum.Nucleus, FrequencyIntervalEnum?frequencyInterval = FrequencyIntervalEnum.Year, AnnuityDepositSchedule depositSchedule = default(AnnuityDepositSchedule))
 {
     // to ensure "decumulationHorizon" is required (not null)
     if (decumulationHorizon == null)
     {
         throw new InvalidDataException("decumulationHorizon is a required property for VariableAnnuityRequest and cannot be null");
     }
     else
     {
         this.DecumulationHorizon = decumulationHorizon;
     }
     // to ensure "accumulationHorizon" is required (not null)
     if (accumulationHorizon == null)
     {
         throw new InvalidDataException("accumulationHorizon is a required property for VariableAnnuityRequest and cannot be null");
     }
     else
     {
         this.AccumulationHorizon = accumulationHorizon;
     }
     this.P            = p;
     this.AllocationId = allocationId;
     // use default value if no "annuitizationRate" provided
     if (annuitizationRate == null)
     {
         this.AnnuitizationRate = 0.0F;
     }
     else
     {
         this.AnnuitizationRate = annuitizationRate;
     }
     this.GuaranteedRateBenefit = guaranteedRateBenefit;
     this.ModelId          = modelId;
     this.PortfolioTickers = portfolioTickers;
     // use default value if no "createLog" provided
     if (createLog == null)
     {
         this.CreateLog = false;
     }
     else
     {
         this.CreateLog = createLog;
     }
     // use default value if no "inflationRate" provided
     if (inflationRate == null)
     {
         this.InflationRate = 0.0F;
     }
     else
     {
         this.InflationRate = inflationRate;
     }
     this.AggregationAccountId = aggregationAccountId;
     // use default value if no "n" provided
     if (n == null)
     {
         this.N = 1000;
     }
     else
     {
         this.N = n;
     }
     // use default value if no "guaranteedAccumulationBenefit" provided
     if (guaranteedAccumulationBenefit == null)
     {
         this.GuaranteedAccumulationBenefit = 0.0F;
     }
     else
     {
         this.GuaranteedAccumulationBenefit = guaranteedAccumulationBenefit;
     }
     this.EndDate = endDate;
     // use default value if no "taxRate" provided
     if (taxRate == null)
     {
         this.TaxRate = 0.0F;
     }
     else
     {
         this.TaxRate = taxRate;
     }
     this.StartDate = startDate;
     // use default value if no "removeOutliers" provided
     if (removeOutliers == null)
     {
         this.RemoveOutliers = false;
     }
     else
     {
         this.RemoveOutliers = removeOutliers;
     }
     this.PortfolioWeights = portfolioWeights;
     this.PortfolioId      = portfolioId;
     // use default value if no "resultType" provided
     if (resultType == null)
     {
         this.ResultType = ResultTypeEnum.Median;
     }
     else
     {
         this.ResultType = resultType;
     }
     this.AccountId = accountId;
     // use default value if no "tradingDaysPerYear" provided
     if (tradingDaysPerYear == null)
     {
         this.TradingDaysPerYear = 252;
     }
     else
     {
         this.TradingDaysPerYear = tradingDaysPerYear;
     }
     // use default value if no "useProxyData" provided
     if (useProxyData == null)
     {
         this.UseProxyData = false;
     }
     else
     {
         this.UseProxyData = useProxyData;
     }
     // use default value if no "initialBalance" provided
     if (initialBalance == null)
     {
         this.InitialBalance = 0.0F;
     }
     else
     {
         this.InitialBalance = initialBalance;
     }
     // use default value if no "marketDataSource" provided
     if (marketDataSource == null)
     {
         this.MarketDataSource = MarketDataSourceEnum.Nucleus;
     }
     else
     {
         this.MarketDataSource = marketDataSource;
     }
     // use default value if no "frequencyInterval" provided
     if (frequencyInterval == null)
     {
         this.FrequencyInterval = FrequencyIntervalEnum.Year;
     }
     else
     {
         this.FrequencyInterval = frequencyInterval;
     }
     this.DepositSchedule = depositSchedule;
 }